Verification code generation method, verification code verification method and verification code processing system
By generating image CAPTCHAs without explicit text prompts using the Star Map database and performing real-time verification, the problem of image CAPTCHAs being easily cracked in existing technologies is solved, thus improving security and user protection.
Patent Information
- Application Number
- CN202311797439.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-12-25
AI Technical Summary
Existing image verification codes, which rely on text prompts, are easily cracked by attackers, resulting in low security and impacting users' private property and account security.
The system generates CAPTCHAs using a star map database. It randomly selects verification star map data from the database, draws lines and performs coordinate transformation to generate image CAPTCHAs without explicit text prompts, and performs real-time verification.
It improves the randomness and security of CAPTCHAs, enhances the security of user verification, and protects users' private property and account security.
Smart Images

Figure CN117763528B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of security service technology, and more specifically, to a verification code generation method, a verification code verification method, and a verification code processing system. Background Technology
[0002] Image verification codes have a wide range of applications in various fields, such as websites and software applications. Users need to recognize images and perform operations as required. Only after successful verification can they use a certain function to achieve various different types of functions such as login, commenting, account modification, and payment.
[0003] Existing image-based CAPTCHAs typically require accompanying text prompts to explain the verification method, such as sliding a square to the correct position or selecting a specific image type. However, because these verification methods directly explain the process through text, requiring only attention to the CAPTCHA itself, attackers can easily crack them through text extraction and image parsing. This results in low security, making CAPTCHAs vulnerable to misuse and negatively impacting user security, potentially harming their personal assets and account safety. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a verification code generation method, a verification code verification method, and a verification code processing system to improve the problem of low security in the verification process in the prior art.
[0005] To address the aforementioned problems, in a first aspect, embodiments of this application provide a verification code generation method, the method comprising:
[0006] Based on the obtained verification code request, the verification star map data is determined from the star map database; wherein, the verification star map data includes n constellation points, where n is a positive integer greater than 2;
[0007] Connect the n constellation points in the verification star map data to draw a line and determine the verification code question;
[0008] The verification star map data is transformed to obtain planar data;
[0009] Based on the CAPTCHA question and the planar data, a target CAPTCHA is generated.
[0010] In the above implementation process, when generating image CAPTCHAs, verification star chart data with multiple constellation points can be determined from a star chart database. Based on this, the CAPTCHA question and corresponding planar data are determined, and the target CAPTCHA is obtained by combining the CAPTCHA question and planar data. The ability to design CAPTCHAs based on star charts effectively improves the randomness and security of CAPTCHAs. Furthermore, determining the CAPTCHA question based on the star chart eliminates the need for explicit text prompts, effectively increasing the difficulty of cracking the CAPTCHA and thus enhancing the security of users' verification processes. This effectively protects users' private property and account security and is applicable to various verification scenarios.
[0011] Optionally, determining the verification star map data from the star map database based on the obtained verification code request includes:
[0012] Based on the obtained verification code request, a target star map is randomly determined from multiple star maps in the star map database; wherein, the target star map includes multiple constellation points and constellation paths composed of multiple constellation points;
[0013] Based on the point requirement and the constellation path, the corresponding verification star map data is determined from multiple constellation points in the target star map; wherein, the point requirement is determined according to the difficulty parameter in the verification code request.
[0014] In the above implementation process, when a corresponding verification code request is received, a target star map with multiple constellation points and constellation paths composed of these points is randomly selected from multiple star map databases. Furthermore, since the required verification difficulty varies, the difficulty parameters carried in the verification code requests also differ, as do the point requirements corresponding to these parameters. Based on the determined point requirements and the corresponding star map path on the target star map, a corresponding number of constellation points are selected from the multiple constellation points in the target star map as the corresponding verification star map data. The ability to randomly select a star map, limit the number of constellation points based on difficulty requirements, and select the positions of constellation points according to the star map path effectively improves the randomness and efficiency of the verification star map data, thereby enhancing the randomness and security of the verification code.
[0015] Optionally, the step of converting the verification star map data to obtain planar data includes:
[0016] Based on a preset coordinate transformation algorithm, the latitude and longitude coordinates of each constellation point in the verification star map data are converted into corresponding two-dimensional plane coordinates;
[0017] Determine the edge coordinates in all the aforementioned two-dimensional plane coordinates;
[0018] The target region is obtained by expanding the region based on the edge coordinates.
[0019] A target number of obfuscation points are added to the target area to obtain the planar data; wherein each obfuscation point does not overlap; the target number is determined based on the number of constellation points.
[0020] In the above implementation process, since the constellation points in the star map data are in three-dimensional latitude and longitude coordinates, a corresponding coordinate transformation algorithm can be used to convert the three-dimensional latitude and longitude coordinates into corresponding two-dimensional planar coordinates in order to generate a two-dimensional image verification code. Furthermore, to ensure the integrity and connectivity of the points, corresponding edge coordinates can be determined from all the two-dimensional planar coordinates, and region expansion can be performed based on the edge coordinates to obtain the corresponding target region. Then, the target region is filled with a corresponding number of obfuscation points to obtain the corresponding planar data. This allows for coordinate transformation to determine the points in the two-dimensional plane, region expansion to improve the usability of the points, and increasing the difficulty of verification and cracking by filling in obfuscation points.
[0021] Optionally, generating the target CAPTCHA based on the CAPTCHA question and the planar data includes:
[0022] The planar data is added to the background image to obtain a scatter image; wherein the area of the background image is larger than the area of the planar data.
[0023] The CAPTCHA question is added to a blank area in the scatter plot to obtain the target CAPTCHA.
[0024] In the above implementation process, the CAPTCHA question and planar data can be combined to obtain the corresponding image CAPTCHA. During the combination, the planar data can first be added to the corresponding background image to obtain a scatter plot. Then, the CAPTCHA question is added to the blank areas of the scatter plot image, allowing the CAPTCHA question to provide a prompt for the verification method without obscuring the planar data. This method can combine the question and the points on the planar data to generate the corresponding target CAPTCHA, prompting the user to perform a connection verification in an image format. This effectively increases the difficulty of cracking the target CAPTCHA, thereby improving its security and ultimately enhancing the security of the verification process.
[0025] Optionally, the star map database is determined in the following manner:
[0026] Multiple star images acquired under different preset conditions are obtained; wherein, the preset conditions include at least one of latitude and longitude conditions and time conditions;
[0027] Determine the parameter data for each of the star charts; wherein the parameter data includes at least one of: constellation name, number of path points, and latitude and longitude coordinates;
[0028] Multiple star charts and their corresponding parameter data are stored in a database to obtain the star chart database.
[0029] In the above implementation process, to improve the randomness of the target CAPTCHA, multiple star charts under different latitude and longitude conditions and different time conditions can be pre-collected, and various parameter data in each star chart can be determined. The star charts and parameter data are then stored in a database, forming a star chart database with multiple star charts. This ability to collect star charts under various conditions and extract parameters to serve as the data basis for the CAPTCHA effectively improves the randomness and security of the target CAPTCHA.
[0030] Secondly, this application also provides a verification code generation device, which includes: a star map module, a question module, a conversion module, and a generation module;
[0031] The star map module is used to determine verification star map data from the star map database based on the obtained verification code request; wherein, the verification star map data includes n constellation points, where n is a positive integer greater than 2;
[0032] The question module is used to draw lines connecting n constellation points in the verification star map data to determine the verification code question;
[0033] The conversion module is used to convert the verification star map data to obtain planar data;
[0034] The generation module is used to generate a target CAPTCHA based on the CAPTCHA question and the planar data.
[0035] In the above implementation process, when generating image verification codes, the determination module can determine verification star map data with multiple constellation points from the star map database, the question module and the conversion module can determine the verification code question and the corresponding planar data of the image based on the verification star map data, and the generation module can obtain the corresponding target verification code by combining the verification code question and the planar data.
[0036] Thirdly, embodiments of this application also provide a verification code verification method, the method comprising:
[0037] The system acquires connection data generated in real time by the user based on a target verification code; wherein the target verification code is an image verification code generated by the verification code generation method described above; and the connection data includes at least one connection.
[0038] The verification was performed based on the connection data, and the verification results were obtained.
[0039] In the above implementation process, connection data generated by the user in real time based on the target verification code can be obtained. The connection data includes at least one connection. Verification is performed based on the obtained real-time connection data to obtain the corresponding verification result. This allows for real-time acquisition and verification of user-generated connection data during the verification process, rather than waiting until the user completes all connections. This effectively improves verification efficiency and real-time performance, and allows for timely replacement of the verification code and re-verification in case of verification errors.
[0040] Optionally, the verification based on the connection data to obtain the verification result includes:
[0041] Extract the corresponding point information from the connection data;
[0042] According to the preset coordinate transformation algorithm, the point information is converted into latitude and longitude coordinates.
[0043] Verify whether each latitude and longitude coordinate point belongs to the corresponding array in the verification star map data corresponding to the target verification code;
[0044] If each of the latitude and longitude coordinate points is determined to belong to the verification star map data, then the corresponding latitude and longitude length is calculated based on the two latitude and longitude coordinate points corresponding to each line.
[0045] The latitude and longitude lengths are compared with the constellation path lengths in the verification star map data to obtain sub-verification results for each of the connected lines;
[0046] All the sub-verification results are integrated to obtain the verification result of the target verification code.
[0047] In the above implementation process, considering the security of verification, the connection data can be encrypted for verification. A preset coordinate transformation algorithm is used to encrypt and transform the point information extracted from the connection data into corresponding latitude and longitude coordinates. This verifies whether each latitude and longitude coordinate point belongs to the corresponding array in the verification star map data corresponding to the target verification code. After successful verification, the latitude and longitude length between the two latitude and longitude coordinate points of the connection is calculated to determine if the latitude and longitude length matches the constellation path length in the verification star map data, obtaining a sub-verification result for each connection. After all connection verifications are completed, all sub-verification results are integrated to obtain the final verification result. This method can convert planar points into latitude and longitude coordinates for encrypted verification using a coordinate transformation algorithm. Furthermore, during verification, the correctness of the points is verified first, followed by the correctness of the connection, allowing for independent verification of each connection through a dual verification method. This enables real-time verification of each connection and determines the final verification result based on multiple sub-verification results, effectively improving the confidentiality and real-time performance of the verification.
[0048] Optionally, the verification based on the connection data to obtain the verification result includes:
[0049] Extract the corresponding point information from the connection data;
[0050] Verify whether each of the aforementioned point information belongs to the corresponding array of two-dimensional plane coordinates in the plane data corresponding to the target verification code;
[0051] If it is determined that each of the point information belongs to the two-dimensional plane coordinates, then the corresponding plane length is calculated based on the two point information corresponding to each line.
[0052] The plane length is compared with the two-dimensional coordinate path length in the plane data to obtain the sub-verification result for each of the connected lines;
[0053] All the sub-verification results are integrated to obtain the verification result of the target verification code.
[0054] In the above implementation process, considering the efficiency of verification, two-dimensional planar verification can be directly performed on the connection data. The point information extracted from the connection data is directly verified to see if it belongs to the corresponding array of two-dimensional planar coordinates in the planar data corresponding to the target verification code. After successful verification, the planar length between the two point information points of the connection is calculated to determine if the planar length is consistent with the two-dimensional coordinate path length in the planar data, obtaining a sub-verification result for each connection. After all connection verifications are completed, all sub-verification results are integrated to obtain the final verification result. This approach allows for direct verification using two-dimensional point coordinates. Furthermore, the verification process first verifies the correctness of the point information and then verifies the correctness of the connection, enabling independent verification of each connection through a dual verification method. It allows for real-time verification of each connection and determines the final verification result based on multiple sub-verification results, effectively improving verification efficiency and real-time performance.
[0055] Optionally, the step of verifying based on the connection data to obtain a verification result further includes:
[0056] The system displays a prompt for the sub-verification result that is incorrect and records the source of the incorrect sub-verification result, thus obtaining error record data.
[0057] If the number of verification errors in the sub-verification result exceeds the error count threshold, an updated verification code is generated.
[0058] If the erroneous record data is determined to be abnormal, the verification process will stop.
[0059] In the above implementation process, when any sub-verification result results in a verification error, a prompt can be displayed, and the source of the error can be recorded. If the number of errors in a sub-verification result exceeds the error count threshold, it indicates multiple connection errors during user verification, and an updated verification code can be generated for re-verification. If the recorded error data is abnormal, it indicates a potential attack, and verification can be stopped to prevent attacks. The system can select appropriate prompts, updates, and stopping methods based on real-time error conditions to ensure the security and effectiveness of the verification process.
[0060] Optionally, the method further includes:
[0061] The reaction time threshold is determined based on the intersection of the verification star map data corresponding to the target verification code;
[0062] If the verification is not completed within the specified reaction time threshold, an updated verification code is generated.
[0063] In the above implementation process, considering the complex differences in intersection patterns within the verification star map data, a corresponding reaction time threshold can be set for each target CAPTCHA based on the intersection patterns. If the user fails to complete verification within the specified reaction time threshold, it is considered a timeout, and an updated CAPTCHA can be generated for re-verification. The ability to set appropriate time thresholds to limit the user's verification process effectively ensures the timeliness of the verification process.
[0064] Optionally, the method further includes:
[0065] Set the notification time threshold;
[0066] If the user still has not started connecting after the specified prompt time threshold is exceeded, a prompt connection will be generated on the target verification code.
[0067] In the above implementation process, considering the differences in users' comprehension abilities, a corresponding prompt time threshold can be set for each verification process. If the user has not started connecting the lines after the prompt time threshold has expired, it is possible that the user has not understood the process. In this case, a corresponding prompt line can be generated on the target verification code to indicate the connection verification method. Providing prompts on the connection method after a period of inactivity effectively improves the verification success rate.
[0068] Fourthly, embodiments of this application also provide a verification code verification device, the device comprising: an acquisition module and a verification module;
[0069] The acquisition module is used to acquire connection data generated in real time by the user based on the target verification code; wherein, the target verification code is an image verification code generated by the verification code generation method described above; the connection data includes at least one connection.
[0070] The verification module is used to perform verification based on the connection data and obtain the verification result.
[0071] In the above implementation process, the acquisition module obtains the connection data generated by the user in real time based on the target verification code. The connection data includes at least one connection. The verification module performs verification based on the acquired real-time connection data to obtain the corresponding verification result.
[0072] Fifthly, embodiments of this application also provide a verification code processing system, the system comprising: a generator and a verifier;
[0073] The generator is configured to: determine verification star map data from a star map database based on the obtained verification code request; wherein the verification star map data includes n constellation points, where n is a positive integer greater than 2; draw lines connecting the n constellation points in the verification star map data to determine the verification code question; perform conversion processing on the verification star map data to obtain planar data; and generate a target verification code based on the verification code question and the planar data.
[0074] The verification method is used to: obtain connection data generated in real time by the user based on the target verification code; wherein the connection data includes at least one connection; perform verification based on the connection data to obtain a verification result.
[0075] In the above implementation process, the generator and verifier in the CAPTCHA processing system can be the same device or different devices. The generator can design CAPTCHAs based on star charts, effectively improving the randomness and security of the CAPTCHAs. Furthermore, by determining the CAPTCHA questions based on the star charts, explicit textual hints are not required, effectively increasing the difficulty of cracking the CAPTCHAs. The verifier can obtain the connection data generated by the user in real time based on the target CAPTCHA and perform verification based on the obtained real-time connection data to obtain the corresponding verification results.
[0076] Sixthly, embodiments of this application also provide an electronic device, which includes a memory and a processor. The memory stores program instructions, and when the processor reads and runs the program instructions, it executes the steps in any of the above-described verification code generation method and / or verification code verification method.
[0077] In a seventh aspect, embodiments of this application also provide a computer-readable storage medium storing computer program instructions, which, when read and executed by a processor, perform steps in any of the above-described verification code generation method and / or verification code verification method.
[0078] In summary, the embodiments of this application provide a verification code generation method, a verification code verification method, and a verification code processing system, which can generate image verification codes without explicit text prompts to improve the security of verification codes and perform real-time verification during verification, thereby improving the security of users when using verification codes for verification. Attached Figure Description
[0079] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0080] Figure 1 A block diagram illustrating an electronic device provided in an embodiment of this application;
[0081] Figure 2 A flowchart illustrating a verification code generation method provided in an embodiment of this application;
[0082] Figure 3 A detailed flowchart of step S210 provided for an embodiment of this application;
[0083] Figure 4 A detailed flowchart of step S230 provided for an embodiment of this application;
[0084] Figure 5 A detailed flowchart of step S240 provided for an embodiment of this application;
[0085] Figure 6 A schematic diagram of a target verification code provided in an embodiment of this application;
[0086] Figure 7 This is a schematic diagram of the structure of a verification code generation device provided in an embodiment of this application;
[0087] Figure 8 A flowchart illustrating a verification code verification method provided in an embodiment of this application;
[0088] Figure 9 A detailed flowchart illustrating the first step S420 provided in the embodiments of this application;
[0089] Figure 10 A detailed flowchart illustrating the second step S420 provided in this application embodiment;
[0090] Figure 11 A detailed flowchart illustrating the third step S420 provided in the embodiments of this application;
[0091] Figure 12 A flowchart illustrating another verification code verification method provided in this application embodiment;
[0092] Figure 13 A flowchart illustrating yet another verification code verification method provided in this application embodiment;
[0093] Figure 14 This is a schematic diagram of the structure of a verification code verification device provided in an embodiment of this application;
[0094] Figure 15 This is a schematic diagram of the operational structure of a verification code processing system provided in an embodiment of this application.
[0095] Icons: 100 - Electronic device; 111 - Memory; 112 - Memory controller; 113 - Processor; 114 - Peripheral interface; 115 - Input / output unit; 116 - Display unit; 300 - CAPTCHA generation device; 310 - Star map module; 320 - Question module; 330 - Conversion module; 340 - Generation module; 500 - CAPTCHA verification device; 510 - Acquisition module; 520 - Verification module; 600 - CAPTCHA processing system; 610 - Generator; 620 - Verifier. Detailed Implementation
[0096] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of the embodiments of this application.
[0097] Existing image CAPTCHAs typically require corresponding prompts to indicate the verification method, such as sliding a square to a specific position or selecting a particular image type. However, because these verification methods directly explain the verification process through text, attackers only need to focus on the CAPTCHA itself. Therefore, attackers can directly crack the CAPTCHAs through text extraction and image parsing. For example, they can use OCR to analyze images to crack character-based CAPTCHAs or detect the position of sliding CAPTCHAs based on pixel color values.
[0098] Therefore, the current verification method of CAPTCHA has low security and is prone to misuse, resulting in low security for users when using CAPTCHA for verification, which may have an adverse impact on users' private property and account security.
[0099] To address the aforementioned issues, this application provides a verification code generation method and a verification code verification method, applicable to electronic devices such as servers, personal computers (PCs), tablets, smartphones, and personal digital assistants (PDAs) with logical computing capabilities. These methods generate and verify image verification codes without explicit prompts, effectively improving verification security.
[0100] It should be noted that the electronic device implementing the method can be the generator, the verifier, or both, and can be handled accordingly based on the actual situation and requirements.
[0101] Optionally, please refer to Figure 1 , Figure 1 This is a block diagram illustrating an electronic device according to an embodiment of this application. The electronic device 100 may include a memory 111, a memory controller 112, a processor 113, a peripheral interface 114, an input / output unit 115, and a display unit 116. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device 100. For example, the electronic device 100 may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0102] The aforementioned memory 111, memory controller 112, processor 113, peripheral interface 114, input / output unit 115, and display unit 116 are electrically connected directly or indirectly to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The aforementioned processor 113 is used to execute executable modules stored in the memory.
[0103] The memory 111 can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory 111 stores programs. After receiving execution instructions, the processor 113 executes the programs. The methods executed by the electronic device 100 as defined in any embodiment of this application can be applied to the processor 113, or implemented by the processor 113.
[0104] The aforementioned processor 113 may be an integrated circuit chip with signal processing capabilities. The processor 113 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a digital signal processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor.
[0105] The peripheral interface 114 described above couples various input / output devices to the processor 113 and the memory 111. In some embodiments, the peripheral interface 114, the processor 113, and the memory controller 112 can be implemented on a single chip. In other instances, they can be implemented on separate chips.
[0106] The input / output unit 115 described above is used to provide user input data. The input / output unit 115 can be, but is not limited to, a mouse and a keyboard.
[0107] The aforementioned display unit 116 provides an interactive interface (e.g., a user interface) between the electronic device 100 and the user, or displays image data for the user's reference. In this embodiment, the display unit can be a liquid crystal display (LCD) or a touch display. If it is a touch display, it can be a capacitive touchscreen or a resistive touchscreen that supports single-point and multi-point touch operations. Supporting single-point and multi-point touch operations means that the touch display can sense touch operations generated simultaneously from one or more locations on the touch display and pass the sensed touch operations to the processor for calculation and processing. In this embodiment, the display unit 116 can display various information such as the generated target verification code or verification result.
[0108] The electronic device in this embodiment can be used to execute various steps in the various verification code generation methods and / or verification code verification methods provided in the embodiments of this application. The implementation process of the verification code generation methods and / or verification code verification methods is described in detail below through several embodiments.
[0109] Please see Figure 2 , Figure 2 This is a flowchart illustrating a verification code generation method provided in an embodiment of this application. The method may include steps S210-S240.
[0110] Step S210: Based on the obtained verification code request, determine the verification star map data from the star map database.
[0111] The verification star map data can include n constellation points, where n is a positive integer greater than 2; for example, n could be 5. When generating the image verification code, verification star map data with multiple constellation points can be randomly selected from the star map database as the image basis for generating the verification code, effectively improving the randomness of the verification code.
[0112] It should be noted that the star map database can be determined in the following way: Multiple star maps collected under different preset conditions are acquired; the preset conditions include at least one of latitude / longitude conditions and time conditions; parameter data in each star map is determined; the parameter data includes at least one of constellation name, path points, and latitude / longitude coordinates; the multiple star maps and their corresponding parameter data are stored in the database to obtain the star map database. To improve the randomness of the target CAPTCHA, multiple star maps under different latitude / longitude conditions and time conditions can be pre-collected. Latitude / longitude conditions can include different longitudes or latitudes, and time conditions can include different seasons or specific times, etc. The acquired star maps can be processed to determine various types of parameter data such as constellation names, path points, and latitude / longitude coordinates in each star map, so that the star maps and parameter data can be stored in the database, forming a star map database with multiple star maps. The ability to collect star maps under various conditions and extract parameters to serve as the data basis for CAPTCHAs effectively improves the randomness and security of the target CAPTCHA.
[0113] Step S220: Connect the n constellation points in the verification star map data to determine the verification code question.
[0114] Based on the verified star map data, lines can be drawn connecting n constellation points according to the corresponding constellation path to obtain the image's verification code question, which will then provide a hint on the verification method.
[0115] Step S230: The verification star map data is transformed to obtain planar data.
[0116] Since the verification star map data is three-dimensional, in order to generate a two-dimensional image verification code, the verification star map data can be transformed into two-dimensional planar data.
[0117] Step S240: Generate the target CAPTCHA based on the CAPTCHA question and the planar data.
[0118] This involves combining the CAPTCHA question with planar data to obtain a target CAPTCHA containing both the CAPTCHA question and the verification content.
[0119] exist Figure 2 In the illustrated embodiment, CAPTCHAs can be designed based on star charts, which effectively improves the randomness and security of CAPTCHAs. Furthermore, by determining the CAPTCHA questions based on star charts, there is no need to generate explicit text prompts as questions, which effectively increases the difficulty of cracking CAPTCHAs. This enhances the security of users when using CAPTCHAs for verification, effectively protecting users' private property and account security, and is applicable to various verification scenarios.
[0120] Optionally, please refer to Figure 3, Figure 3 The following is a detailed flowchart of step S210 provided in an embodiment of this application. Step S210 may include steps S211-S212.
[0121] Step S211: Based on the obtained verification code request, randomly select the target star map from multiple star maps in the star map database.
[0122] Each star map in the star map database can include multiple constellation points and constellation paths composed of these points. When a corresponding verification code request is received, a target star map containing multiple constellation points and constellation paths composed of these points is randomly selected from among the multiple star maps in the preset star map database.
[0123] Step S212: Based on the point requirements and constellation path, determine the corresponding verification constellation data among multiple constellation points in the target constellation.
[0124] Since the required verification difficulty varies, the difficulty parameters carried in the verification code requests also differ. The required number of points can be determined based on the difficulty parameters in the verification code request. Based on the determined number of points, and combined with the corresponding star map path on the target star map, a corresponding number of constellation points are selected from multiple constellation points in the target star map as the corresponding verification star map data.
[0125] For example, to increase the difficulty of cracking CAPTCHAs and enrich the user experience, users can select the corresponding verification difficulty on the client. For instance, users can choose whether to add a difficulty parameter below the CAPTCHA. The difficulty parameter can include different difficulty levels such as low, medium, and high. The client can add the difficulty parameter to the verification request and send it to the corresponding generator for processing. The generator can parse the difficulty parameter and determine the corresponding point request. For example, when the difficulty parameter is low, 2-8 points can be set; when the difficulty parameter is medium, 9-18 points can be set; and when the difficulty parameter is high, 19-30 points can be set, etc.
[0126] Optionally, when making a selection, if the required number of points is 5, there may be three situations: (1) the constellation points on the selected constellation path include exactly 5 points, which can be used directly without processing; (2) if the constellation points on the selected constellation path are less than 5 points, a constellation path can be randomly selected again, with a total of 5 points. In this case, the two constellation paths may not intersect or may intersect; (3) if the constellation points on the selected constellation path are more than 5 points, the line connecting 5 adjacent points can be randomly intercepted.
[0127] exist Figure 3In the illustrated embodiment, the star map can be randomly selected, and the number of constellation points can be limited according to the difficulty requirements. The location of the constellation points is selected according to the star map path, thereby determining the corresponding number and path of verification star map data, which effectively improves the randomness and effectiveness of the verification star map data, thereby improving the randomness and security of the verification code.
[0128] Optionally, please refer to Figure 4 , Figure 4 The following is a detailed flowchart of step S230 provided in an embodiment of this application. Step S230 may include steps S231-S234.
[0129] Step S231: Based on a preset coordinate transformation algorithm, the latitude and longitude coordinates of each constellation point in the verification star map data are converted into corresponding two-dimensional plane coordinates.
[0130] Since the constellation points in the verification star map data are in three-dimensional latitude and longitude coordinates, in order to generate a two-dimensional image verification code, a corresponding coordinate transformation algorithm can be used to convert the three-dimensional latitude and longitude coordinates into corresponding two-dimensional planar coordinates.
[0131] It should be noted that while conventional coordinate transformation algorithms can be used for coordinate system transformation, self-developed or customized coordinate transformation algorithms can also be used for encrypted CAPTCHA generation and verification to increase the difficulty for attackers to crack the CAPTCHA.
[0132] Optionally, the multiple constellation points in the verification star map data correspond to geographic coordinates (e.g., the Arctic Circle 66°33'38"N), which are three-dimensional coordinates drawn on an ellipse. The most common geographic coordinate system is currently WGS84. Since the verification image CAPTCHA is displayed as a two-dimensional image on a plane, a projected coordinate system can be used as the coordinate transformation algorithm to project the three-dimensional geographic coordinate system onto the two-dimensional plane, forming a projected coordinate system. There are many projection methods, commonly including the UTM projected coordinate system, the Mars coordinate system (GCJ-02), and the Miller coordinate projection system.
[0133] Step S232: Determine the edge coordinates in all two-dimensional plane coordinates.
[0134] Step S233: Expand the region based on the edge coordinates to obtain the target region.
[0135] In order to ensure the integrity and connectivity of the points, the corresponding edge coordinates can be determined from all two-dimensional plane coordinates, and the region can be expanded according to the edge coordinates to obtain the corresponding target region.
[0136] Optionally, to ensure that all two-dimensional plane coordinates are displayed and properly connected, the maximum and minimum values of the x-axis and y-axis can be found in the two-dimensional plane coordinates to obtain multiple edge coordinates. Based on each edge coordinate, m lengths are randomly generated backward (the actual value of m can be set and modified according to the actual situation and needs). Using the latest generated coordinates as the boundary value, a rectangular interval is drawn as the corresponding target area.
[0137] Step S234: Add the target number of obfuscation points to the target area to obtain planar data.
[0138] This involves filling the target area with a corresponding number of obfuscation points to obtain the corresponding planar data. It should be noted that each added obfuscation point is non-overlapping, and the target number of obfuscation points is determined based on the number of constellation points; for example, the target number may differ from n, but be proportional to n.
[0139] Optionally, a random number of distinct confusion points can be generated within the target area, and the confusion points and two-dimensional plane coordinates can be combined, merged, and shuffled to form a new point array, resulting in a corresponding scatter plot as planar data.
[0140] For example, verify that the constellation points n=5 in the star map data have the following two-dimensional plane coordinates after transformation: [{10,13},{16,8},{23,11},{24,17},{33,6}. Among the determined edge coordinates, the smallest coordinate is {10,6} and the largest coordinate is {33,17}. Therefore, we can expand outward by, for example, 5 lengths to obtain a rectangular range [{5,1},{38,22}] as the target area. Then, within the target area, generate 10-20 random and distinct obfuscation points. Finally, shuffle and mix the randomly generated obfuscation points and the two-dimensional plane coordinates into a new array to obtain a scatter plot of 15-25 points as the planar data.
[0141] exist Figure 4 In the illustrated embodiment, coordinate transformation can be performed to determine the location of points in a two-dimensional plane, the region can be expanded to improve the availability of the points, and the number of obfuscated points can be filled to increase the difficulty of verification and cracking.
[0142] Optionally, please refer to Figure 5 , Figure 5 The following is a detailed flowchart of step S240 provided in an embodiment of this application. Step S240 may include steps S241-S242.
[0143] Step S241: Add planar data to the background image to obtain a scatter image.
[0144] When combining data, planar data can be added to the corresponding background image to obtain a scatter plot. The background image has a larger area than the planar data to completely encompass the entire planar data.
[0145] Optionally, the color, pattern, etc. of the background image can be selected and set according to the actual situation and needs. An image that does not affect the number of observation points of the user can be selected as the background image.
[0146] Step S242: Add the verification code question to the blank area in the scatter image to obtain the target verification code.
[0147] Since the area of the background image is larger than that of the planar data, after obtaining the corresponding scatter image, there is a corresponding blank area at the edge of the scatter image. A CAPTCHA question can be added to the blank area of the scatter image to provide a prompt for the verification method without obscuring the planar data.
[0148] For example, see [link / reference] Figure 6 , Figure 6 This is a schematic diagram of a target verification code provided in an embodiment of this application, wherein planar data is set in the middle area of the background image, and the verification code question is set in the blank area in the lower right corner of the scatter image.
[0149] exist Figure 5 In the illustrated embodiment, a corresponding target verification code can be generated by combining the question and the points on the plane, and the user is prompted to perform the connection verification in an image manner. This effectively increases the difficulty of cracking the target verification code, thereby improving the security of the target verification code and thus improving the security of the verification process.
[0150] Please see Figure 7 , Figure 7 This is a schematic diagram of a verification code generation device provided in an embodiment of the present application. The verification code generation device 300 may include: a star map module 310, a question module 320, a conversion module 330, and a generation module 340.
[0151] The star map module 310 is used to determine the verification star map data from the star map database based on the obtained verification code request; wherein, the verification star map data includes n constellation points, where n is a positive integer greater than 2;
[0152] The question module 320 is used to draw lines connecting n constellation points in the verification star map data to determine the verification code question;
[0153] The conversion module 330 is used to convert the verification star map data to obtain planar data;
[0154] The generation module 340 is used to generate target CAPTCHAs based on CAPTCHA questions and planar data.
[0155] In an optional implementation, the star map module 310 is specifically used to: randomly determine a target star map from multiple star maps in the star map database according to the obtained verification code request; wherein the target star map includes multiple constellation points and constellation paths composed of multiple constellation points; and determine the corresponding verification star map data from the multiple constellation points in the target star map according to the point requirement and constellation path; wherein the point requirement is determined according to the difficulty parameter in the verification code request.
[0156] In an optional implementation, the conversion module 330 is specifically used to: convert the latitude and longitude coordinates of each constellation point in the verification star map data into corresponding two-dimensional plane coordinates based on a preset coordinate conversion algorithm; determine the edge coordinates among all two-dimensional plane coordinates; expand the region according to the edge coordinates to obtain the target region; add a target number of obfuscation points to the target region to obtain planar data; wherein each obfuscation point does not overlap; the target number is determined based on the number of constellation points.
[0157] In an optional implementation, the generation module 340 is specifically used to: add planar data to a background image to obtain a scatter image; wherein the area of the background image is larger than the area of the planar data; and add a verification code question to the blank area in the scatter image to obtain a target verification code.
[0158] In an optional implementation, the verification code generation device 300 may further include a construction module for acquiring multiple star charts collected under different preset conditions; wherein the preset conditions include at least one of latitude and longitude conditions and time conditions; determining parameter data in each star chart; wherein the parameter data includes at least one of constellation name, path point number and latitude and longitude coordinate data; storing the multiple star charts and corresponding parameter data in a database to obtain a star chart database.
[0159] Since the principle of the verification code generation device 300 in this embodiment is similar to that of the aforementioned verification code generation method, the implementation of the verification code generation device 300 in this embodiment can refer to the description in the above-mentioned verification code generation method, and the repeated parts will not be described again.
[0160] Please see Figure 8 , Figure 8 This is a flowchart illustrating a verification code verification method provided in an embodiment of this application. The method may include steps S410-S420.
[0161] Step S410: Obtain connection data generated in real time by the user based on the target verification code.
[0162] On the verification page, users can draw the corresponding path based on the verification code question in the target verification code. The target verification code is an image verification code generated according to the verification code generation method described above. When verifying, users need to connect multiple lines. Each line can be connected individually or in one stroke. To improve the real-time performance of the verification, the connection data generated by the user based on the target verification code in real time can be obtained. The connection data includes at least one line, meaning that the connection data can be partial data rather than the complete data after the user completes the connection.
[0163] Optionally, during the verification process, when the user starts drawing, the user's client can detect mouse or gesture operations. If the mouse or gesture remains stationary for a certain period of time (e.g., 1 second), the connection data of the current connection will be sent to the verifier for processing. 3) During the user's input process, the correctness of the connection can be fed back in a timely manner, which not only improves the user experience but also verifies whether it is a machine simulation test.
[0164] Optionally, before verification, corresponding restrictions can be set for the user's verification process, such as: not restricting the order in which the path is drawn; adding different time limits to each verification code; allowing each verification code three attempts; changing the line color when the connection between two points is incorrect to prompt the user of the connection error; and replacing the verification code after three attempts.
[0165] Step S420: Verify based on the connection data to obtain the verification result.
[0166] Among these, verification can be performed based on the acquired real-time connection data to obtain the corresponding verification results.
[0167] exist Figure 8 In the illustrated embodiment, the connection data generated by the user can be acquired and verified in real time during the verification process, instead of acquiring and verifying it only after the user has completed all the connections. This effectively improves the efficiency and real-time performance of the verification. In the event of a verification error, the verification code can be replaced and the verification can be re-performed in a timely manner.
[0168] Optionally, please refer to Figure 9 , Figure 9 The following is a detailed flowchart of the first step S420 provided in the embodiments of this application. Step S420 may include steps S4211-S4216.
[0169] Step S4211: Extract the corresponding point information from the connection data.
[0170] Step S4212: Convert the point information into latitude and longitude coordinates according to the preset coordinate transformation algorithm.
[0171] To ensure security, the connection data can be encrypted during verification. A preset coordinate transformation algorithm is used to encrypt and transform the point information extracted from the connection data into corresponding latitude and longitude coordinates.
[0172] It should be noted that when performing encrypted verification, both the generator and the verifier can use self-developed or customized coordinate transformation algorithms for processing. Other parties cannot directly process the original two-dimensional coordinate data, which increases the difficulty of cracking the verification code.
[0173] Step S4213: Verify whether each latitude and longitude coordinate point belongs to the corresponding array in the verification star map data corresponding to the target verification code.
[0174] Specifically, each latitude and longitude coordinate point is verified to see if it belongs to the corresponding array in the verification star map data corresponding to the target verification code. This verifies whether the current point has the same coordinate value in the verification star map data. If it does, and it is in the corresponding array of the verification star map data, the verification is successful, indicating that the user's selected point and the connection method are correct. The latitude and longitude coordinate points of the current connection can be saved for subsequent processing.
[0175] Step S4214: If each latitude and longitude coordinate point is determined to belong to the verification star map data, then calculate the corresponding latitude and longitude length based on the two latitude and longitude coordinate points corresponding to each line.
[0176] Step S4215: Compare the latitude and longitude lengths with the constellation path lengths in the verification star map data to obtain the sub-verification results for each connection.
[0177] After a point is successfully verified, the latitude and longitude length between the two points of the line can be calculated to determine whether the latitude and longitude length is consistent with the constellation path length in the verification star map data, thus obtaining the sub-verification result for each line.
[0178] Step S4216: Integrate all sub-verification results to obtain the verification result of the target verification code.
[0179] After obtaining the sub-verification results corresponding to all connections, the final verification result can be obtained by integrating all the sub-verification results.
[0180] exist Figure 9 In the illustrated embodiment, a coordinate transformation algorithm can be used to convert planar points into latitude and longitude coordinates for encrypted verification. Furthermore, during verification, the correctness of the points is verified first, and the correctness of the connections is verified second. This dual verification method allows for independent verification of each connection, enabling real-time verification of each connection. The final verification result can also be determined based on multiple sub-verification results, effectively improving the confidentiality and real-time performance of the verification.
[0181] Optionally, please refer to Figure 10 , Figure 10 The following is a detailed flowchart of the second step S420 provided in the embodiments of this application. Step S420 may include steps S4221-S4225.
[0182] Step S4221: Extract the corresponding point information from the connection data.
[0183] Step S4222: Verify whether each point information belongs to the corresponding array of two-dimensional plane coordinates in the plane data corresponding to the target verification code.
[0184] To improve verification efficiency, two-dimensional plane verification can be performed directly on the connection data. The point information extracted from the connection data is directly verified to see if it belongs to the corresponding array in the two-dimensional plane coordinates of the target verification code. This verifies whether the current point has the same coordinate value in the two-dimensional plane coordinates. If it does, and the corresponding array exists, the verification is successful, indicating that the user-selected points and connection method are correct. The point information of the current connection can then be saved for subsequent processing.
[0185] Step S4223: If it is determined that each point information belongs to two-dimensional plane coordinates, then calculate the corresponding plane length based on the two point information corresponding to each line.
[0186] Step S4224: Compare the plane length with the two-dimensional coordinate path length in the plane data to obtain the sub-verification result of each connection.
[0187] After successful point verification, the plane length between the two points of the connection can be calculated to determine whether the plane length is consistent with the two-dimensional coordinate path length in the plane data, thus obtaining the sub-verification result for each connection.
[0188] Step S4225: Integrate all sub-verification results to obtain the verification result of the target verification code.
[0189] After obtaining the sub-verification results corresponding to all connections, all sub-verification results can be integrated to obtain the final verification result.
[0190] For example, suppose the two-dimensional coordinates in the planar data corresponding to the target verification code are [[{47,23},{41,25}],[{41,25},{38,48}],[{38,48},{26,38}],[{26,38},{33,15}],[{33,15},{41,25]]. During verification, if the user connects {33,15} to {26,38} and then stops connecting, [{33,15},{26,38}] will be sent to the verifier as connection data. The verifier can first verify whether these two points exist in the two-dimensional coordinates. If they exist, it compares whether they are in the same array. If they are in the same array, the connection is correct, and the current point coordinates are saved. When the user connects {41,25} and {43,18}, the two-dimensional coordinates do not contain {43,18}, so the connection is incorrect. If a user directly connects more than two points, such as {26,38}, {38,48}, {41,25}, and {33,15}, the coordinates of these four points can be sent sequentially to the verifier for pairwise verification. After successful verification, the currently verified pairwise points can be saved. All successfully verified points are merged; verification is successful when the plane length corresponding to a point matches the length of the two-dimensional coordinate path.
[0191] exist Figure 10 In the illustrated embodiment, verification can be performed directly using two-dimensional point coordinates. Furthermore, during verification, the correctness of the point location can be verified first, followed by the correctness of the connection. This dual verification method allows for independent verification of each connection, enabling real-time verification of each connection. The final verification result can also be determined based on multiple sub-verification results, effectively improving the efficiency and real-time performance of the verification.
[0192] Optionally, please refer to Figure 11 , Figure 11 The following is a detailed flowchart of the third step S420 provided in the embodiments of this application. Step S420 may also include steps S4231-S4233.
[0193] Step S4231: Prompt the verification error of the sub-verification result and record the source of the error sub-verification result to obtain error record data.
[0194] When any sub-verification result is a verification error, a prompt can be made regarding this error, and the source of the error can be recorded to obtain the corresponding error record data.
[0195] Optionally, if any sub-verification result represents a point information that does not exist in the verification star map data / two-dimensional plane coordinates or is not in the same array, a color can be added to indicate an error. For example, the line can be highlighted in red to indicate an error, and the current request interface source of the connection data corresponding to this sub-verification result can be recorded.
[0196] Step S4232: If the number of verification errors in the sub-verification result exceeds the error count threshold, an updated verification code is generated.
[0197] When the number of errors in the sub-verification result exceeds the error threshold, it indicates that multiple connections were incorrect during user verification. In this case, an updated verification code can be generated for re-verification. For the method of generating the updated verification code, please refer to the verification code generation method provided in the embodiments of this application, which will not be repeated here.
[0198] Optionally, the error count threshold can be set and adjusted according to actual conditions and needs, and can also be adjusted with reference to the difficulty parameters. For example, it can be set to 3 times for low difficulty, 5 times for medium difficulty, and 8 times for high difficulty.
[0199] Step S4233: If the error record data is determined to be abnormal, then stop the verification.
[0200] When abnormal error data is recorded, it indicates a possible abnormal attack situation, and verification can be stopped to prevent the attack.
[0201] For example, if multiple data entries from the same source are recorded in the error log within a short period of time, it indicates a possible attack. In this case, the connection can be disconnected and access blocked to stop the verification process.
[0202] exist Figure 11 In the illustrated embodiment, appropriate prompts, updates, and stop methods can be selected based on real-time error conditions to ensure the security and effectiveness of the verification process.
[0203] Optionally, please refer to Figure 12 , Figure 12 This is a flowchart illustrating another verification code verification method provided in an embodiment of this application. The method may further include steps S431-S432.
[0204] Step S431: Determine the reaction time threshold based on the intersection of the verification star map data corresponding to the target verification code.
[0205] In particular, considering the complex differences in the intersection of the verification star map data, a corresponding reaction time threshold can be set for each target CAPTCHA based on the intersection situation.
[0206] Optionally, when setting the reaction time threshold, it can be set based on the number of constellation points in the verification star map data and the intersection status of constellation paths to determine a reasonable time value. For example, a reaction time of 5 seconds can be set for each constellation point, resulting in a time limit of 25 seconds for 5 points. If there is no intersection, the time can be increased accordingly; if there is an intersection, the time can be decreased accordingly.
[0207] Step S432: If it is determined that the verification has not been completed within the reaction time threshold, an updated verification code is generated.
[0208] If the user fails to complete the verification within the specified response time threshold, it is considered a timeout and an updated verification code can be generated for re-verification. For details on how to generate the updated verification code, please refer to the verification code generation method provided in the embodiments of this application, which will not be repeated here.
[0209] exist Figure 12 In the illustrated embodiment, a corresponding time threshold can be set to limit the time required for user verification, effectively ensuring the timeliness of the verification process.
[0210] Optionally, please refer to Figure 13 , Figure 13 This is a flowchart illustrating another verification code verification method provided in an embodiment of this application. The method may further include steps S441-S442.
[0211] Step S441: Set the prompt time threshold.
[0212] In order to improve the user experience, considering the differences in users' comprehension abilities, a corresponding prompt time threshold can be set for each verification process. The prompt time threshold can be set according to the user's actual situation and needs. For example, the prompt time threshold can be set to 1 second.
[0213] Step S442: If it is determined that the prompt time threshold has been exceeded and the user has not started connecting, then a prompt connection is generated on the target verification code.
[0214] If the user has not started connecting by the time limit specified in the prompt, there may be a situation where the user does not understand the prompt. In this case, a corresponding prompt line can be generated on the target verification code to indicate the connection verification method.
[0215] Optionally, the system can detect the user's actual situation. If the user's mouse or gestures are not active within 1 second, a highlight can be added to any path. Since the human eye connects lines based on the spatial position of the points in the image, it can prompt the user to draw the remaining line segments.
[0216] exist Figure 13 In the illustrated embodiment, the connection method for verification can be prompted even if there is no processing for a period of time, which effectively improves the success rate of verification.
[0217] Please see Figure 14 , Figure 14 This is a schematic diagram of the structure of a verification code verification device provided in an embodiment of the present application. The verification code verification device 500 may include: an acquisition module 510 and a verification module 520;
[0218] The acquisition module 510 is used to acquire connection data generated in real time by the user based on the target verification code; wherein, the target verification code is an image verification code generated by the above-mentioned verification code generation method; the connection data includes at least one connection.
[0219] The verification module 520 is used to perform verification based on the connection data and obtain the verification result.
[0220] In an optional implementation, the verification module 520 is specifically used for: extracting the corresponding point information from the connection data; converting the point information into latitude and longitude coordinates according to a preset coordinate transformation algorithm; verifying whether each latitude and longitude coordinate point belongs to the corresponding array in the verification star map data corresponding to the target verification code; if it is determined that each latitude and longitude coordinate point belongs to the verification star map data, then calculating the corresponding latitude and longitude length based on the two latitude and longitude coordinates corresponding to each connection; comparing the latitude and longitude length with the constellation path length in the verification star map data to obtain the sub-verification result of each connection; and integrating all sub-verification results to obtain the verification result of the target verification code.
[0221] In an optional implementation, the verification module 520 is specifically used to: extract the corresponding point information from the connection data; verify whether each point information belongs to the corresponding array in the two-dimensional plane coordinates in the plane data corresponding to the target verification code; if it is determined that each point information belongs to the two-dimensional plane coordinates, calculate the corresponding plane length based on the two point information corresponding to each connection; compare the plane length with the two-dimensional coordinate path length in the plane data to obtain the sub-verification result of each connection; and integrate all the sub-verification results to obtain the verification result of the target verification code.
[0222] In an optional implementation, the verification module 520 is further configured to: prompt for the verification error of the sub-verification result and record the source of the error sub-verification result to obtain error record data; if the number of verification errors of the sub-verification result exceeds the error count threshold, generate an updated verification code; if the error record data is determined to be abnormal, stop the verification.
[0223] In an optional implementation, the verification code verification device 500 may further include a timeout module, which is used to determine a reaction time threshold based on the intersection of the verification star map data corresponding to the target verification code; if it is determined that the verification has not been completed after the reaction time threshold, an updated verification code is generated.
[0224] In an optional implementation, the verification code verification device 500 may further include a prompt module for setting a prompt time threshold; if it is determined that the prompt time threshold has been exceeded and the user has not yet started connecting, a prompt connection line is generated on the target verification code.
[0225] Since the principle of the verification code verification device 500 in this embodiment is similar to that of the aforementioned verification code verification method, the implementation of the verification code verification device 500 in this embodiment can refer to the description in the above-mentioned verification code verification method, and the repeated parts will not be described again.
[0226] Please see Figure 15 , Figure 15 This is a schematic diagram of the operation structure of a verification code processing system provided in an embodiment of this application. The verification code processing system 600 may include a generator 610 and a verifier 620.
[0227] Generator 610 is used to: determine verification star map data from the star map database based on the obtained verification code request; wherein the verification star map data includes n constellation points, where n is a positive integer greater than 2; draw lines connecting the n constellation points in the verification star map data to determine the verification code question; perform transformation processing on the verification star map data to obtain planar data; and generate the target verification code based on the verification code question and the planar data.
[0228] Verifier 620 is used to: obtain connection data generated in real time by the user based on the target verification code; wherein the connection data includes at least one connection; perform verification based on the connection data, and obtain the verification result.
[0229] Optionally, the generator 610 and the verifier 620 in the CAPTCHA processing system 600 can be the same device or different devices. This application Figure 13 The diagram only shows one scenario where the generator 610 and the verifier 620 are different devices. The case where the generator 610 and the verifier 620 are the same device will not be described in detail.
[0230] The generator 610 is specifically used to: randomly determine a target star map from multiple star maps in the star map database based on the obtained verification code request; wherein, the target star map includes multiple constellation points and constellation paths composed of multiple constellation points; and determine the corresponding verification star map data from multiple constellation points in the target star map based on the point requirement and constellation path; wherein, the point requirement is determined based on the difficulty parameter in the verification code request.
[0231] The generator 610 is specifically used to: convert the latitude and longitude coordinates of each constellation point in the verification star map data into corresponding two-dimensional plane coordinates based on a preset coordinate transformation algorithm; determine the edge coordinates in all two-dimensional plane coordinates; expand the region according to the edge coordinates to obtain the target region; add the target number of obfuscation points in the target region to obtain planar data; wherein, each obfuscation point does not overlap; the target number is determined based on the number of constellation points.
[0232] Generator 610 is specifically used to: add planar data to a background image to obtain a scatter image; wherein the area of the background image is larger than the area of the planar data; add a CAPTCHA question to the blank area in the scatter image to obtain the target CAPTCHA.
[0233] The generator 610 is specifically used to: acquire multiple star charts collected under different preset conditions; wherein the preset conditions include at least one of latitude and longitude conditions and time conditions; determine the parameter data in each star chart; wherein the parameter data includes at least one of constellation name, path point number and latitude and longitude coordinate data; and store the multiple star charts and corresponding parameter data in a database to obtain a star chart database.
[0234] Verification Unit 620 is specifically used for: extracting the corresponding point information from the connection data; converting the point information into latitude and longitude coordinates according to a preset coordinate transformation algorithm; verifying whether each latitude and longitude coordinate point belongs to the corresponding array in the verification star map data corresponding to the target verification code; if it is determined that each latitude and longitude coordinate point belongs to the verification star map data, then calculating the corresponding latitude and longitude length based on the two latitude and longitude coordinates corresponding to each connection; comparing the latitude and longitude length with the constellation path length in the verification star map data to obtain the sub-verification result of each connection; and integrating all sub-verification results to obtain the verification result of the target verification code.
[0235] Verification Unit 620 is specifically used for: extracting the corresponding point information from the connection data; verifying whether each point information belongs to the corresponding array in the two-dimensional plane coordinates of the plane data corresponding to the target verification code; if it is determined that each point information belongs to the two-dimensional plane coordinates, then calculating the corresponding plane length based on the two point information corresponding to each connection; comparing the plane length with the two-dimensional coordinate path length in the plane data to obtain the sub-verification result of each connection; and integrating all sub-verification results to obtain the verification result of the target verification code.
[0236] Verifier 620 is specifically used to: provide prompts for sub-verification results that have failed verification, record the source of the erroneous sub-verification results, and obtain error record data; if the number of verification errors of the sub-verification results exceeds the error count threshold, generate an updated verification code; if the error record data is determined to be abnormal, stop verification.
[0237] Verifier 620 is specifically used to: determine the reaction time threshold based on the intersection of the verification star map data corresponding to the target verification code; if the verification is not completed after the reaction time threshold is exceeded, an updated verification code is generated.
[0238] Verifier 620 is specifically used to: set a prompt time threshold; if it is determined that the prompt time threshold has been exceeded and the user has not yet started connecting, then a prompt connection is generated on the target verification code.
[0239] This application also provides a computer-readable storage medium storing computer program instructions. When the computer program instructions are read and executed by a processor, they perform the steps of any one of the verification code generation method and / or verification code verification method provided in this embodiment.
[0240] In the several embodiments provided in this application, it should be understood that the disclosed device can also be implemented in other ways. The device embodiments described above are merely illustrative; for example, the block diagrams in the accompanying drawings illustrate the possible architecture, functions, and operations of the device according to various embodiments of this application. In this regard, each block in the block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram, and combinations of block diagrams, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0241] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0242] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0243] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0244] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
[0245] It should be noted that, in this document, 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. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A method for generating verification codes, characterized in that, The method includes: Based on the obtained verification code request, the verification star map data is determined from the star map database; wherein, the verification star map data includes n constellation points, where n is a positive integer greater than 2; Connect the n constellation points in the verification star map data to draw a line and determine the verification code question; The verification star map data is transformed to obtain planar data; Based on the CAPTCHA question and the planar data, generate the target CAPTCHA; The step of determining verification star map data from the star map database based on the obtained verification code request includes: randomly determining a target star map from multiple star maps in the star map database based on the obtained verification code request; wherein the target star map includes multiple constellation points and constellation paths composed of multiple constellation points; determining the corresponding verification star map data from the multiple constellation points in the target star map based on the point requirement and the constellation path; wherein the point requirement is determined based on the difficulty parameter in the verification code request; The process of converting the verification star map data to obtain planar data includes: converting the latitude and longitude coordinates of each constellation point in the verification star map data into corresponding two-dimensional planar coordinates based on a preset coordinate transformation algorithm; determining edge coordinates among all the two-dimensional planar coordinates; expanding the region according to the edge coordinates to obtain a target region; adding a target number of obfuscation points to the target region to obtain the planar data; wherein each obfuscation point does not overlap; the target number is determined based on the number of constellation points.
2. The method according to claim 1, characterized in that, The step of generating a target verification code based on the verification code question and the planar data includes: The planar data is added to the background image to obtain a scatter image; wherein the area of the background image is larger than the area of the planar data. The CAPTCHA question is added to a blank area in the scatter plot to obtain the target CAPTCHA.
3. The method according to any one of claims 1-2, characterized in that, in, The star map database is determined in the following way: Multiple star images acquired under different preset conditions are obtained; wherein, the preset conditions include at least one of latitude and longitude conditions and time conditions; Determine the parameter data for each of the star charts; wherein the parameter data includes at least one of: constellation name, number of path points, and latitude and longitude coordinates; Multiple star charts and their corresponding parameter data are stored in a database to obtain the star chart database.
4. A verification code verification method, characterized in that, The method includes: The system acquires connection data generated in real time by the user based on a target verification code; wherein the target verification code is an image verification code generated by the verification code generation method according to any one of claims 1-3; and the connection data includes at least one connection. The verification is performed based on the connection data to obtain the verification result; The verification based on the connection data to obtain the verification result includes: extracting the corresponding point information from the connection data; converting the point information into latitude and longitude coordinates according to a preset coordinate transformation algorithm; verifying whether each latitude and longitude coordinate belongs to the corresponding array in the verification star map data corresponding to the target verification code; if it is determined that each latitude and longitude coordinate belongs to the verification star map data, calculating the corresponding latitude and longitude length based on the two latitude and longitude coordinates corresponding to each connection; comparing the latitude and longitude length with the constellation path length in the verification star map data to obtain the sub-verification result of each connection; and integrating all the sub-verification results to obtain the verification result of the target verification code.
5. The method according to claim 4, characterized in that, The verification based on the connection data to obtain the verification result also includes: Extract the corresponding point information from the connection data; Verify whether each of the aforementioned point information belongs to the corresponding array of two-dimensional plane coordinates in the plane data corresponding to the target verification code; If it is determined that each of the point information belongs to the two-dimensional plane coordinates, then the corresponding plane length is calculated based on the two point information corresponding to each line. The plane length is compared with the two-dimensional coordinate path length in the plane data to obtain the sub-verification result for each of the connected lines; All the sub-verification results are integrated to obtain the verification result of the target verification code.
6. The method according to claim 4 or 5, characterized in that, The verification based on the connection data to obtain the verification result also includes: The system displays a prompt for the sub-verification result that is incorrect and records the source of the incorrect sub-verification result, thus obtaining error record data. If the number of verification errors in the sub-verification result exceeds the error count threshold, an updated verification code is generated. If the erroneous record data is determined to be abnormal, the verification process will stop.
7. The method according to claim 4 or 5, characterized in that, The method further includes: The reaction time threshold is determined based on the intersection of the verification star map data corresponding to the target verification code; If the verification is not completed within the specified reaction time threshold, an updated verification code is generated.
8. The method according to claim 4 or 5, characterized in that, The method further includes: Set the notification time threshold; If the user still has not started connecting after the specified prompt time threshold is exceeded, a prompt connection will be generated on the target verification code.
9. A verification code processing system, characterized in that, The system includes: a generator and a verifier; The generator is configured to: determine verification star map data from a star map database based on the obtained verification code request; wherein the verification star map data includes n constellation points, where n is a positive integer greater than 2; draw lines connecting the n constellation points in the verification star map data to determine the verification code question; perform conversion processing on the verification star map data to obtain planar data; and generate a target verification code based on the verification code question and the planar data. The verification method is used to: obtain connection data generated in real time by the user based on the target verification code; wherein the connection data includes at least one connection; perform verification based on the connection data to obtain a verification result; The generator is specifically used for: randomly determining a target star map from multiple star maps in the star map database based on the obtained verification code request; wherein the target star map includes multiple constellation points and constellation paths composed of multiple constellation points; determining the corresponding verification star map data from the multiple constellation points in the target star map based on the point requirement and the constellation path; wherein the point requirement is determined based on the difficulty parameter in the verification code request; converting the latitude and longitude coordinates of each constellation point in the verification star map data into corresponding two-dimensional plane coordinates based on a preset coordinate transformation algorithm; determining edge coordinates from all the two-dimensional plane coordinates; performing region expansion based on the edge coordinates to obtain a target region; adding a target number of obfuscation points to the target region to obtain the plane data; wherein each obfuscation point does not overlap; the target number is determined based on the number of constellation points; The verification method is specifically used for: extracting the corresponding point information from the connection data; converting the point information into latitude and longitude coordinates according to a preset coordinate transformation algorithm; verifying whether each latitude and longitude coordinate belongs to the corresponding array in the verification star map data corresponding to the target verification code; if it is determined that each latitude and longitude coordinate belongs to the verification star map data, then calculating the corresponding latitude and longitude length based on the two latitude and longitude coordinates corresponding to each connection; comparing the latitude and longitude length with the constellation path length in the verification star map data to obtain the sub-verification result of each connection; and integrating all the sub-verification results to obtain the verification result of the target verification code.
10. A computer-readable storage medium, characterized in that, The readable storage medium stores computer program instructions, which, when executed by a processor, perform the steps of the method according to any one of claims 1-8.
Citation Information
Patent Citations
Field data acquisition system and method for land quality geological survey
CN111582729A
Verification code verification method, device and electronic equipment
CN111753280A
