Verification code picture generation method and device, equipment and storage medium
By introducing a risk level evaluation mechanism, dynamically adjusting the scrambling strength of verification code pictures, the problem that existing verification code technologies are difficult to find a balance between security protection and user experience, and a safe, efficient and user-friendly verification code generation method is realized.
Patent Information
- Application Number
- CN202411945510.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-05-02
AI Technical Summary
Existing verification code technology is difficult to find a balance between security protection and user experience. Verification code is too simple and easy to be cracked, and too complex will increase the difficulty of user identification and affect the user experience.
A risk level evaluation mechanism is introduced to dynamically adjust the scrambling intensity of the verification code picture, select the corresponding level of scrambling strategies from the scrambling policy library according to the user's risk level, and generate a verification code picture with moderate difficulty.
While improving the security protection effect, optimize the user verification experience, achieve a balance between security protection and user experience, effectively resist attacks from automated programs, and avoid providing users with overly difficult verification code pictures.
Smart Images

Figure CN119918034A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to deep learning and image processing in artificial intelligence, and in particular to a method, device, equipment and storage medium for generating a verification code image. Background Art
[0002] When users operate application functions, they often need to pass a verification code image to prevent automated programs from maliciously operating the application functions and protect user accounts and data security.
[0003] Therefore, there is an urgent need for a method that can provide users with a verification code image with appropriate recognition difficulty, so as to provide protection for users in application functions. Summary of the invention
[0004] The present disclosure provides a method, apparatus, device and storage medium for generating a verification code image.
[0005] According to a first aspect of the present disclosure, a method for generating a verification code image is provided, comprising:
[0006] In response to a trigger operation of a user, determining user level information of the user; wherein the user level information represents the risk of the user operating the application function and / or the personal needs of the user operating the application function;
[0007] According to the user level information, a verification code picture corresponding to the user level information is generated, and the verification code picture is displayed.
[0008] According to a second aspect of the present disclosure, a device for generating a verification code image is provided, comprising:
[0009] A determination unit, configured to determine user level information of the user in response to a trigger operation of the user; wherein the user level information represents the risk of the user operating the application function and / or the user's personal needs for operating the application function;
[0010] A generating unit is used to generate a verification code picture corresponding to the user level information according to the user level information, and display the verification code picture.
[0011] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0012] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor so that the at least one processor can execute the method of any one of claims 1-13.
[0013] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method described in the first aspect.
[0014] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising: a computer program, wherein the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program so that the electronic device executes the method described in the first aspect.
[0015] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0017] Figure 1 is a schematic diagram according to a first embodiment of the present disclosure;
[0018] Figure 2 is a schematic diagram according to a second embodiment of the present disclosure;
[0019] Figure 3 is a schematic diagram according to a first embodiment of the present disclosure;
[0020] Figure 4 is a schematic diagram according to a second embodiment of the present disclosure;
[0021] Figure 5 is a schematic diagram according to a first embodiment of the present disclosure;
[0022] Figure 6 is a schematic diagram according to a second embodiment of the present disclosure;
[0023] Figure 7 is a schematic diagram according to a first embodiment of the present disclosure;
[0024] Figure 8 is a schematic diagram according to a second embodiment of the present disclosure;
[0025] Fig. 9 is a schematic block diagram of an electronic device for implementing an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0027] At present, before using application functions that require online identity authentication, such as website login, payment verification, and information confirmation, verification code images are usually used for human-machine verification to prevent automated programs from maliciously operating application functions. Existing human-machine verification code technologies usually use fixed verification code image scrambling methods, such as character distortion, background noise addition, etc. However, if the verification code image set in this way is too simple, it is easy to be cracked by automated programs. If the verification code image is too complex, it will increase the difficulty of user recognition and affect the user experience. Therefore, there is an urgent need for a method that can provide users with verification code images with appropriate recognition difficulty.
[0028] In order to solve the above problems, the present disclosure introduces a risk level assessment mechanism in the process of generating a verification code image, realizes the dynamic adjustment of the scrambling strength of the verification code image, optimizes the user verification experience while improving the security protection effect, and realizes the balance between security protection and user experience. The generation method of the verification code image disclosed in the present disclosure can select the scrambling strategy of the corresponding level from the verification code image scrambling strategy library by calculating the risk level of each login attempt of the user, and realizes the dynamic generation of the verification code image according to the risk level. Among them, the higher the risk level, the greater the potential security threat. Among them, each scrambling strategy can set the degree of character distortion, background noise density, color confusion degree, graphic complexity, etc. Each scrambling strategy corresponds to a different scrambling strength. After the verification code image is displayed to the user, the user's recognition result of the verification code image can also be obtained, and the recognition result and the user behavior during the recognition process are recorded. According to the recognition result and the user behavior during the recognition process, the recognition difficulty and user experience of the verification code image are analyzed. Then, according to the analysis results, the risk assessment algorithm and the verification code image scrambling strategy library are continuously optimized to improve the security protection effect and user experience of the system.
[0029] The present invention discloses a method, device, equipment and storage medium for generating a verification code image, which are applied to deep learning and image processing in the field of artificial intelligence, so as to provide users with verification code images with appropriate recognition difficulty, improve the protection effect of application functions, and improve the effect of user experience.
[0030] It should be noted that the data in this embodiment is not targeted at a specific user and cannot reflect the personal information of a specific user. It should be noted that the data in this embodiment comes from a public data set.
[0031] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0032] In order to enable readers to more deeply understand the implementation principle of the present disclosure, the following Figure 2-Figure 6 right Figure 1 The illustrated embodiment is further refined.
[0033] Figure 1 is a schematic diagram according to the first embodiment of the present disclosure, such as Figure 1 As shown, the present disclosure provides a method for generating a verification code image, the method comprising:
[0034] 101. In response to a triggering operation of a user, determine user level information of the user, wherein the user level information represents the risk of the user operating an application function and / or the user's personal needs for operating an application function.
[0035] In this embodiment, in response to the trigger operation of entering the application function, the user's level information can be obtained. Optionally, the trigger operation can be triggered when the user clicks the login button of the mini-program, application, webpage, etc. Optionally, in addition to being used to trigger the acquisition of the user's user level information, the trigger operation can also be used to instruct the user to log in to the mini-program, application, webpage, etc. In order to better prevent automated programs from performing malicious operations on mini-programs, applications, webpages, etc., a human-machine verification interface can also be entered in response to the trigger operation. The human-machine verification interface may include a verification code image. Furthermore, in order to avoid the verification code image being too difficult to affect user verification, or the difficulty being too low to filter the automated program, the present disclosure can dynamically generate a verification code image of corresponding difficulty based on the user level information to improve the security of human-machine verification and improve user experience.
[0036] Among them, the obtained level information of the user may specifically include the risk of the user operating the application function. The risk of the user operating the application function is the user risk level. The user risk level can be used to indicate the risk level corresponding to the abnormal operation during the user's operation of the application function. For example, the abnormal operation may include frequent login and logout, abnormal operation track, abnormal viewing record, etc. And / or, the user's level information may also include the user's personal needs for operating the application function. The user's personal needs for operating the application function are the user difficulty level. The user difficulty level represents the difficulty level corresponding to the personal needs during the user's operation of the application function. For example, the personal needs may be an elderly mode, a youth mode, etc.
[0037] 102. Generate a verification code image corresponding to the user level information according to the user level information, and display the verification code image.
[0038] In this embodiment, after determining the user level information, the difficulty or scrambling degree of the verification code image to be generated can be determined according to the user level information, and then the verification code image corresponding to the user level information can be generated. After the verification code image is generated, the verification code image can be displayed so that the user can view and complete the verification. When the user completes the verification and passes the verification, the application function can be entered.
[0039] In this embodiment, a trigger operation of generating a verification code image is performed before the user enters the application function, and the user level information of the user is determined in response to the trigger operation; then, based on the user level information, a verification code image corresponding to the user level information is dynamically generated, so that the user can enter the application function after passing the verification of the verification code image; thereby, by dynamically adjusting the verification code image, the attack of automated programs can be effectively resisted, and the security protection capability can be improved; and, it is avoided that normal users are provided with verification code images that are too difficult, thereby affecting the user experience; and, through the flexible adjustment of the verification code image, it can adapt to different users and improve the flexibility and scalability of the system.
[0040] Figure 2 is a schematic diagram according to the second embodiment of the present disclosure, such as Figure 2 As shown, the present disclosure provides a method for generating a verification code image. The method describes how to determine the final user risk level in the case where the user level information includes the user risk level, the user difficulty level, the user risk level and the user difficulty level. The method includes:
[0041] 201. When the user level information includes a user risk level, in response to a trigger operation of the user, retrieve the user's historical abnormal operation behavior; and determine the user risk level according to the historical abnormal operation behavior.
[0042] In this embodiment, when the user level information only includes the user risk level, the user risk level can be further determined in response to the user's triggering operation, and then the user risk level can be used as the user level information. Specifically, the user risk level can be determined by retrieving the user's historical abnormal operation behavior. Optionally, the historical abnormal operation behavior can be recorded in the database when the user performs an abnormal operation. Optionally, the historical abnormal operation behavior can be analyzed after the user behavior is considered to be an operation that may belong to an automated program, and the user behavior will be recorded as an abnormal behavior. Through the historical abnormal operation behavior, the risks of the user can be analyzed. If the user has a large number of historical abnormal operation behaviors, it means that the user is likely to be a high-risk user. That is, in most cases, the user may be operated by an automated program, and there are unsafe factors. If the user has fewer historical abnormal operation behaviors, it means that the user is likely to be a self-use user and has higher security.
[0043] In one implementation, the specific execution process of step 201 may include:
[0044] 2011. Determine the user's security score based on the number and type of historical abnormal operation behaviors.
[0045] In this embodiment, after obtaining the historical abnormal operation behavior, the historical abnormal operation behavior can be processed to obtain the security score of the user. The processing may include obtaining the historical abnormal operation behavior within a preset time period. For example, the preset time period may be 1 day, 1 week, 1 month, etc. The number and type of the historical abnormal operation behavior are counted. For example, the type may be login abnormality, logout abnormality, sliding track, viewing behavior abnormality, etc. According to each type of historical abnormal operation behavior, the number of times of this type can be counted. According to the weight of each type, the number can be weighted summed to obtain the final security score.
[0046] 2012. Determine the user risk level corresponding to the security score according to a preset first mapping relationship, wherein the preset first mapping relationship is a mapping relationship between the security score and the user risk level.
[0047] In this embodiment, the preset first mapping relationship includes a mapping relationship between a security score and a user risk level. According to the preset first mapping relationship, the corresponding user risk level can be determined according to the security score calculated in step 2011.
[0048] Through the above steps 2011 and 2012, the security score can be determined based on the historical abnormal operation behavior, and then the user risk level can be determined based on the first mapping relationship, thereby achieving the effect of predicting the user's behavior based on the user's historical abnormal operation behavior, and improving the user's personalized settings.
[0049] In another implementation, based on the above implementation, the specific execution process of step 201 may further include:
[0050] 2013. Obtain device information of a device operated by a user, and obtain an operation track when the user operates an application function and application information of an application to which the application function belongs.
[0051] In this embodiment, the device information of the device operated by the user can also be obtained. Based on the device information, the operation track of the user when operating the application function through the device can be obtained. And the application information of the application program to which the application function belongs can be obtained.
[0052] 2014. Determine the user's security score based on historical abnormal operation behavior, device information, operation trajectory and application information.
[0053] In this embodiment, based on the historical abnormal operation behavior, device information, operation track and application information, the user's security score can be calculated. Specifically, the historical abnormal operation behavior, device information, operation track and application information can be calculated respectively to obtain the historical behavior score, device score, track score and application score. Based on the historical behavior score, device score, track score and application score, the final security score can be calculated by weighted summation and other methods.
[0054] 2015. Determine the user risk level corresponding to the security score according to a preset first mapping relationship, wherein the preset first mapping relationship is a mapping relationship between the security score and the user risk level.
[0055] In this embodiment, similar to the above step 2012, the corresponding risk level can be determined according to the preset first mapping relationship and the security score, which will not be repeated here.
[0056] Through the above steps 2013 to 2015, it is achieved to further add device information, operation trajectory and application information on the basis of historical abnormal operation behavior, to achieve a more comprehensive judgment of the user risk level, and further improve the accuracy of the user risk level.
[0057] 202. When the user level information includes the user difficulty level, in response to the user's triggering operation, the interface setting parameters corresponding to the application function operated by the user are obtained, and the user's questionnaire information and the user's feedback information are obtained. The questionnaire information indicates the user's historical personal needs for operating the application function. The interface setting parameters indicate the user's current personal needs for operating the application function. The user's feedback information indicates the user's feedback content on the verification code image. The user difficulty level is determined based on the interface setting parameters, the questionnaire information, and the user's feedback information.
[0058] In this embodiment, when the user level information only includes the user difficulty level, in response to the user's triggering operation, the user difficulty level can be further determined, and then the user difficulty level is used as the user level information. Specifically, the user difficulty level can be determined by obtaining the interface setting parameters corresponding to the application function operated by the user, questionnaire information, user feedback information, and other information.
[0059] Optionally, the interface setting parameters corresponding to the application function may be the current personal needs of the user for operating the application function. The personal needs may specifically be the settings of modes such as the elderly mode and the youth mode, the settings of the fonts, the settings of the page background, the settings of the page style, etc. The questionnaire information may be the personal needs of the user for operating the application function in history. The personal needs may include the difficulty evaluation of the verification code image filled in and submitted by the user, and / or the preference information of the verification code image filled in and submitted by the user. The user's feedback information may be the user's feedback content on the verification code image. The feedback content may include information such as the operation behavior and verification results generated by the user during the verification process of the received verification code image.
[0060] Based on the interface setting parameters, questionnaire information and user feedback information, the user difficulty level can be processed and calculated. Optionally, the interface score, questionnaire score and feedback score can be obtained for the interface setting parameters, questionnaire information and user feedback information, respectively. Furthermore, according to the weights of the interface setting parameters, questionnaire information and user feedback information, the interface score, questionnaire score and feedback score can be weighted and summed to obtain a difficulty score. According to the difficulty score, the corresponding user difficulty level can be determined based on a preset mapping relationship.
[0061] By calculating the user difficulty level in this step, a more personalized verification code image can be generated, so that the verification code obtained by the user is more in line with the user's personal preferences and personal needs, further improving the user experience.
[0062] Optionally, the user's feedback information can be recorded when the user recognizes the verification code image. Specifically, the feedback information can include the user's feedback content on the verification code image. The feedback content can include the user's recognition result, the user's operation behavior, the operation track, etc.
[0063] On the basis of the above steps 201 and 202, when the user level information includes the user risk level and the user difficulty level, the user risk level and the user difficulty level can be obtained based on the above steps 201 and 202, respectively.
[0064] In this embodiment, the user level information is generated by calculating the user risk level and the user difficulty level, which further improves the personalized settings for the user, so that the final verification code image can better avoid being recognized by automated programs, and provide users with verification code images that are more in line with their personal preferences, thereby improving the security of application functions and user experience.
[0065] Figure 3 is a schematic diagram according to the third embodiment of the present disclosure, Figure 3 As shown, the present disclosure provides a method for generating a verification code image. When the user level information includes the user risk level and the user difficulty level, the specific process of generating a verification code image corresponding to the user level information may include:
[0066] 301. According to the user risk level, determine a base map corresponding to the user risk level from a preset material library, wherein the preset material library includes base maps corresponding to different user risk levels.
[0067] In this embodiment, different preset material libraries may be set for different user risk levels. Different preset material libraries may include different base maps. Optionally, the base maps in the preset material libraries for different user risk levels may be of different styles. For example, the base map in the preset material library corresponding to a lower user risk level is a solid color picture or a low-complexity picture with fewer patterns. The base map in the preset material library corresponding to a higher user risk level is a picture with a more complex picture. Optionally, the operation of classifying the base map into its corresponding user risk level can be implemented through a preset classification model.
[0068] 302. Determine a scrambling value according to the user risk level and the user difficulty level; scramble the determined base image according to the scrambling value to generate a verification code image.
[0069] In this embodiment, a preset formula can be used to calculate the user risk level and the user difficulty level to obtain a scrambling value. The scrambling value is used to indicate the degree of adding verification information and adding interference items for verification information judgment on the basis of the base map. According to the scrambling value, the determined base map can be scrambled to generate a verification code image.
[0070] Optionally, in order to better generate a verification code image that fits the user risk level and the user difficulty level, the scrambling value determination process can be any of the following two methods:
[0071] First, the user risk level and the user difficulty level are weighted and summed to obtain a scrambled value. In this process, the user risk level and the user difficulty level can be preset with weights respectively. According to the result of the weighted summation, the scrambled value can be obtained.
[0072] Secondly, according to the preset second mapping relationship, the initial scrambling information corresponding to the user risk level is determined, and the numerical value represented by the initial scrambling information is corrected according to the user difficulty level to obtain the scrambling value. Among them, the preset second mapping relationship is the mapping relationship between the user risk level and the initial scrambling information. In this process, a second mapping relationship can be set first. The second mapping relationship can realize the mapping of the user risk level to the initial scrambling information. Based on the second mapping relationship, the initial scrambling information corresponding to the user risk level can be mapped. Based on the initial scrambling information, the initial scrambling information can be corrected and optimized according to the user difficulty level to obtain a scrambling value that is more suitable for the individual user.
[0073] Through the above two scrambling value calculation methods, a scrambling value that is more in line with user needs can be obtained, thereby generating a verification code image that is more in line with user level information, improving the flexibility of verification code image generation, and improving verification security and user experience.
[0074] In this embodiment, by obtaining the user risk level and the user difficulty level, a more accurate calculation of the scrambling value of the verification code image is achieved, so that the generated verification code image is more in line with user needs, the flexibility of verification code image generation is improved, it can adapt to different security risk levels and user characteristics, and improve the scalability of the system.
[0075] Figure 4 is a schematic diagram according to a fourth embodiment of the present disclosure, Figure 4 As shown, the present disclosure provides a method for generating a verification code image. After determining the scrambling value, a specific strategy for scrambling the base image can be determined, so that the verification code image is generated through the scrambling process. The method includes:
[0076] 401. Determine at least one scrambling method from a plurality of preset scrambling methods according to the scrambling value, and determine a scrambling parameter of the obtained scrambling method according to the scrambling value.
[0077] In this embodiment, the scrambling process may include two parts: selecting a scrambling method and determining a scrambling parameter. Optionally, each scrambling method may correspond to a numerical value. According to the scrambling value, at least one scrambling method may be determined from a plurality of preset scrambling methods so that the combination result of its numerical value matches the scrambling value. Further, the numerical value of the scrambling method may be adjusted by adjusting the scrambling parameter of the scrambling method so that the combination of the numerical values of the selected plurality of scrambling methods may better match the scrambling value.
[0078] For example, when the scrambling value is 60, a scrambling mode with a value of 55 can be selected. The scrambling parameter of the scrambling mode can be set to 5, so that the value of the scrambling mode can be adjusted to 60 according to the scrambling parameter. The adjusted value of the scrambling mode can better match the scrambling value. For another example, when the scrambling value is 60, a scrambling mode A with a value of 30 and a scrambling mode B with a value of 25 can be selected. The scrambling parameter of the scrambling mode A can be set to 5, and the scrambling parameter of the scrambling mode B is not adjusted, so that the value of the scrambling mode A can be adjusted to 35 according to the scrambling parameter. After adjustment, the combination of the values of the scrambling mode A and the scrambling mode B can be 60, thereby better matching the scrambling value.
[0079] 402. Perform scrambling processing on the determined base image according to the obtained scrambling method and the obtained scrambling parameters of the scrambling method to generate a verification code image.
[0080] In this embodiment, after obtaining the scrambling mode and scrambling parameters, the base image can be scrambled according to at least one scrambling mode and the scrambling parameters of each scrambling mode. Specifically, the base image can be scrambled one by one according to each scrambling mode and scrambling parameter to obtain the final verification code image. In this way, the selection and combination of scrambling modes can be realized more flexibly, thereby realizing the generation of more types of verification code images, further avoiding the verification code image from being recognized by automated equipment, and improving the security of the application function. At the same time, in this way, the types of verification code images of users can be enriched, the sense of freshness can be increased, and the user experience can be improved.
[0081] On the basis of steps 401 and 402, the difficulty of the verification code image can also be verified during the generation process, so as to ensure that the difficulty of the verification code image matches the interference value. The specific process may include:
[0082] 4021. Perform scrambling processing on the determined base image according to the obtained scrambling method and the obtained scrambling parameters of the scrambling method to generate an initial image.
[0083] In this embodiment, the base image can be processed to obtain an initial image according to the scrambling method and the scrambling parameters of the scrambling method obtained in the above step 401. The initial image is the verification code image obtained by processing according to the scrambling method and scrambling parameters indicated in 401.
[0084] 4022. Process the initial image according to a preset evaluation model to obtain difficulty score information of the verification code image.
[0085] In this embodiment, after the initial image is generated, the initial image can be input into a preset evaluation model. The evaluation model can be used to score the difficulty of the initial image and obtain difficulty scoring information. The difficulty scoring information is used to indicate the difficulty of the initial image. Since there may be a combination of partial base images and scrambling methods, the difficulty of recognizing the verification code image is reduced, or the difficulty of recognizing the verification code image is increased. Therefore, this embodiment can realize the recognition of the difficulty of the verification code image by using a muscle-building preset evaluation model, thereby ensuring that the verification code image can better match the interference value.
[0086] Optionally, after the user completes the recognition of the verification code image, the recognition accuracy and recognition speed of the user in the recognition process can be obtained. Among them, the recognition accuracy rate represents the accuracy of the user's recognition of the verification code image. The accuracy rate can be specifically obtained according to the inverse of the number of user recognition times. The recognition speed represents the speed at which the user recognizes the verification code image. If the user has multiple recognitions, the speed can be the average of the speeds of multiple recognitions of the verification code image. According to the recognition accuracy rate and the recognition speed, the preset evaluation model is adjusted. Specifically, according to the recognition accuracy rate and the recognition speed, the difficulty score can be calculated. Based on the difficulty score and the verification code image, the preset evaluation model can be periodically trained to achieve the optimization of the preset evaluation model, thereby further improving the accuracy of the judgment of the difficulty of the verification code image.
[0087] 4023. If it is determined that the difficulty score information matches the scrambled value, the initial image is determined to be a verification code image.
[0088] In this embodiment, after obtaining the difficulty score information through the evaluation model, the difficulty score information and the scrambled value can be matched. If the difficulty score information matches the scrambled value, the initial image can be a verification code image, and the verification code image is output. Otherwise, if the difficulty score information does not match the scrambled value, continue to perform the following steps to regenerate the verification code image.
[0089] By executing the above steps 4021 to 4023, the matching of the verification code image and the interference value can be further guaranteed, thereby further ensuring the user experience and the security of the application function.
[0090] Based on steps 4021 to 4023, if the difficulty score information does not match the scrambled value, it is necessary to regenerate the verification code image, and match the difficulty score information with the scrambled value for the regenerated verification code image. This includes:
[0091] 4024. If it is determined that the difficulty score information does not match the scrambled value, re-execute the step of generating a verification code image corresponding to the user level information according to the user level information.
[0092] In this embodiment, if it is determined that the difficulty score information does not match the scrambled value, the verification code image is regenerated according to the scrambling method and scrambling parameters determined in step 401.
[0093] 4025. If, after re-executing the step of generating a verification code image corresponding to the user level information according to the user level information, it is determined that the currently obtained difficulty score information does not match the current scrambling value, the current scrambling value is adjusted, and the currently determined base image is scrambled according to the adjusted current scrambling value to generate a verification code image.
[0094] In this embodiment, after the verification code image is regenerated according to step 4023, the difficulty score information of the verification code image and the current scrambling value may be judged by the evaluation model to be inconsistent. If they match, step 4023 is executed to output the verification code image. If they do not match, the current scrambling value is adjusted.
[0095] Optionally, the verification code image may be regenerated for multiple times in succession, and when it is determined that the difficulty score information of the verification code image does not match the current scrambling value, the current scrambling value may be adjusted. Optionally, the multiple times may specifically be 3 times, 5 times, etc.
[0096] Optionally, the adjustment of the scrambling value can be determined based on the difficulty rating information and the scrambling value. If the difficulty rating information is higher than the scrambling value, it means that the difficulty of the verification code image is too high, and at this time, the scrambling value is lowered. If the difficulty rating information is lower than the scrambling value, it means that the difficulty of the verification code image is too low, and at this time, the scrambling value is increased. Optionally, the amount of increase or decrease of the scrambling value can be determined based on the difference between the difficulty rating information and the scrambling value. Optionally, when multiple unmatched difficulty rating information is included, the average of the multiple difficulty rating information can be calculated first, and the average can be compared with the scrambling value.
[0097] According to the adjusted scrambling value, a verification code image can be generated again and output.
[0098] By executing the above steps 4024 and 4025, it is possible to further ensure that the difficulty level of the verification code image matches the interference value, thereby further improving the user experience.
[0099] In this embodiment, by obtaining the scrambling value and determining the scrambling mode and scrambling parameters according to the scrambling value, the difficulty of the verification code image can be accurately controlled, further ensuring the user experience and the security of the application function.
[0100] Figure 5 is a schematic diagram according to a fifth embodiment of the present disclosure, Figure 5 As shown, the present disclosure provides a method for generating a verification code image. According to different user risk levels, different numbers of verification code images can be set for users to verify. The method includes:
[0101] 501. When the user risk level is less than or equal to the preset level threshold, the number of verification code images obtained is one.
[0102] In this embodiment, a preset level threshold may be set. If the user risk level is less than or equal to the preset level threshold, it means that the user risk level is not high. At this time, a verification code picture may be set for the user for verification. Through this setting, normal verification of the user may be achieved, and the verification of the verification code picture may prevent the automated program from using the application function, thereby improving the security of the application function.
[0103] 502. When the user risk level is greater than a preset level threshold, the number of verification code images obtained is multiple.
[0104] In this embodiment, if the user risk level is greater than the preset level threshold, it means that the user risk level is high. At this time, multiple verification code pictures can be set for the user for verification, so as to further improve the security of the application function. The number of the verification code pictures can be determined according to the risk level. Optionally, a preset mapping relationship can be set for the user risk level greater than the preset level threshold, and the mapping relationship can be used to indicate the number of verification code pictures corresponding to each user risk level. In the case of multiple verification code pictures, the multiple verification code pictures are different. The generation process of the multiple verification code pictures can include the following implementation methods.
[0105] In one implementation, after obtaining the scrambling value determined in step 302, multiple scrambling values can be generated according to the scrambling value determined in step 302 and the number of verification code images to be generated. Each verification code image can correspond to a scrambling value. The setting of the scrambling value can be set according to a preset step length. For example, when the scrambling value determined in step 302 is 60 and the step length is 5, the scrambling value of the second verification code image can be 65, the scrambling value of the third verification code image can be 70, and so on. Furthermore, according to each scrambling value, a stamp verification code image can be specifically generated. Optionally, the multiple verification code images can have the same base map. Based on the base map and the scrambling value, the verification code image can be generated according to the fourth embodiment. In this way, multiple verification code images with the same base map and different difficulties can be generated. According to the difficulty, the multiple verification code images can be sequentially output in order from easy to difficult, so that the user can perform security verification, further ensure the security of the application function, and avoid the operation of the application function by the automated program.
[0106] In another implementation, when the user risk level is greater than a preset level threshold, multiple base maps can be determined from a preset material library. The multiple base maps determined are of the same type, or the multiple base maps determined are associated with each other. Furthermore, the scrambling value determined in step 302 can be used to scramble the multiple base maps respectively, and generate verification code images corresponding to the base maps. The generation of the multiple verification code images allows users to perform multiple security verifications, further ensuring the security of the application functions and avoiding the use of the application functions by automated programs.
[0107] In this embodiment, by dynamically adjusting the number of generated verification code images according to the user risk level, the verification effect is improved, the use of application functions by automated programs is further avoided, and the security of application functions is improved.
[0108] Figure 6 is a schematic diagram according to a sixth embodiment of the present disclosure, Figure 6 As shown, the present disclosure provides a method for generating a verification code image. Since multiple material libraries are set according to the user risk level, the multiple material libraries can be managed separately to achieve the update of the material. The method includes:
[0109] 601. According to the user risk level, determine an update frequency corresponding to the user risk level, and update the base map corresponding to the user risk level in the preset material library according to the update frequency.
[0110] In this embodiment, an update frequency corresponding to each user risk level can be set according to the user risk level. When there is a material library corresponding to the user risk level, the material library can be updated according to the update frequency. The update content can specifically include updating the base map in the material library.
[0111] 602. If it is determined that the acquisition frequency of the base map at the same user risk level in the preset material library is greater than the preset frequency, the base map at the user risk level is updated in the preset material library.
[0112] In this embodiment, the acquisition frequency and the number of base maps in each material library can also be recorded. If the acquisition frequency is greater than the preset frequency, it means that the material library may be acquired by an automated program. The process of being acquired by the automated program is abnormal acquisition. If there is abnormal acquisition, the material library can be updated. This is to reduce the probability that a large number of base maps are acquired and increase the probability that the verification code image is recognized by the automated program. Optionally, the material library can also be updated when the number of acquisitions reaches a threshold value. The update can avoid the appearance of a large number of repeated base maps, thereby increasing the probability that the verification code image is recognized by the automated program.
[0113] In this embodiment, by setting up a material library corresponding to different user risk levels and updating the material library, the risk of automatic program identification after a large number of base maps in the material library are acquired is further avoided, and the security of application functions is further improved.
[0114] Figure 7 is a schematic diagram according to the seventh embodiment of the present disclosure, Figure 7 As shown, the present disclosure provides a device 700 for generating a verification code image, the method comprising:
[0115] The determination unit 701 is used to determine the user level information of the user in response to the trigger operation of the user. The trigger operation represents the user operating the application function, and the trigger operation represents the need to generate a verification code image. The user level information represents the risk of the user operating the application function and / or the user's personal needs for operating the application function.
[0116] The generating unit 702 is used to generate a verification code picture corresponding to the user level information according to the user level information, and display the verification code picture.
[0117] The device of this embodiment can execute the technical solution in the above method. Its specific implementation process and technical principles are the same and will not be repeated here.
[0118] Figure 8 is a schematic diagram according to an eighth embodiment of the present disclosure, Figure 8As shown, the present disclosure provides a device 800 for generating a verification code image, the method comprising:
[0119] The determination unit 810 is used to determine the user level information of the user in response to the user's triggering operation, wherein the user level information represents the risk of the user operating the application function and / or the user's personal needs for operating the application function.
[0120] The generating unit 820 is used to generate a verification code picture corresponding to the user level information according to the user level information, and display the verification code picture.
[0121] Optionally, the user level information includes a user risk level and / or a user difficulty level, wherein the user risk level represents the risk level of abnormal operation of the user in operating the application function, and the user difficulty level represents the difficulty level corresponding to the personal needs of the user in operating the application function.
[0122] Optionally, when the user level information is a user risk level, the user risk level represents the risk level of abnormal operation of the user operating the application function. The determination unit 810 includes:
[0123] The retrieving module 811 is used to retrieve the user's historical abnormal operation behaviors in response to the user's triggering operation.
[0124] The first determination module 812 is used to determine the user risk level according to historical abnormal operation behaviors.
[0125] Optionally, the first determining module 812 includes:
[0126] The first determination submodule 8121 is used to determine the user's security score according to the number and type of historical abnormal operation behaviors.
[0127] The second determination submodule 8122 is used to determine the user risk level corresponding to the security score according to a preset first mapping relationship, wherein the preset first mapping relationship is a mapping relationship between the security score and the user risk level.
[0128] Optionally, the determining module 812 further includes:
[0129] The acquisition submodule 8123 is used to acquire device information of the device operated by the user, and acquire the operation track of the application function operated by the user and the application information of the application program to which the application function belongs.
[0130] The third determination submodule 8124 is used to determine the user's security score based on historical abnormal operation behaviors, device information, operation tracks and application information.
[0131] The fourth determination submodule 8125 is used to determine the user risk level corresponding to the security score according to a preset first mapping relationship, wherein the preset first mapping relationship is a mapping relationship between the security score and the user risk level.
[0132] Optionally, when the user level information is a user difficulty level, the user difficulty level represents the difficulty level of the user's personal needs for operating the application function. The determination unit 810 includes:
[0133] The acquisition module 813 is used to respond to the user's trigger operation, obtain the interface setting parameters corresponding to the application function operated by the user, and obtain the user's questionnaire information and user feedback information. The questionnaire information indicates the user's historical personal needs for operating the application function. The interface setting parameters indicate the user's current personal needs for operating the application function. The user's feedback information indicates the user's feedback content on the verification code image.
[0134] The second determination module 814 is used to determine the user difficulty level according to the interface setting parameters, questionnaire information and user feedback information.
[0135] Optionally, when the user level information includes a user risk level and a user difficulty level, the user risk level represents the risk level of abnormal operation of the user operating the application function, and the user difficulty level represents the difficulty level of the user's personal needs for operating the application function. The generating unit 820 includes:
[0136] The first determination module 821 is used to determine the base map corresponding to the user risk level from the preset material library according to the user risk level. The preset material library includes base maps corresponding to different user risk levels.
[0137] The second determination module 822 is used to determine the scrambling value according to the user risk level and the user difficulty level.
[0138] The generating module 823 is used to perform scrambling processing on the determined base image according to the scrambling value to generate a verification code image.
[0139] Optionally, when the user risk level is less than or equal to a preset level threshold, the number of verification code images obtained is one.
[0140] Optionally, when the user risk level is greater than a preset level threshold, the obtained scrambling value is multiple. The generating module 823 includes:
[0141] The first generating submodule 8231 is used to perform scrambling processing on the determined same base image according to different scrambling values, and generate a verification code image corresponding to the scrambling value.
[0142] Optionally, when the user risk level is greater than a preset level threshold, multiple base maps are determined from the preset material library. The multiple base maps determined are of the same type, or the multiple base maps determined are related to each other. The generation module 823 includes:
[0143] The second generating submodule 8232 is used to perform scrambling processing on the determined multiple base images respectively according to the same scrambling value, and generate verification code images corresponding to the base images.
[0144] Optionally, the second determining module 822 includes:
[0145] The first determination submodule 8221 is used to perform weighted sum processing on the user risk level and the user difficulty level to obtain a scrambled value.
[0146] or,
[0147] The first determination submodule 8222 is used to determine the initial scrambling information corresponding to the user risk level according to the preset second mapping relationship, and to correct the value represented by the initial scrambling information according to the user difficulty level to obtain the scrambling value. The preset second mapping relationship is the mapping relationship between the user risk level and the initial scrambling information.
[0148] Optionally, the generating module 823 includes:
[0149] The first determination submodule 8233 is used to determine at least one scrambling method from a plurality of preset scrambling methods according to the scrambling value, and determine the scrambling parameters of the obtained scrambling method according to the scrambling value.
[0150] The second determination submodule 8234 is used to perform scrambling processing on the determined base image according to the obtained scrambling method and the obtained scrambling parameters of the scrambling method to generate a verification code image.
[0151] Optionally, the second determining submodule 8234 is configured to:
[0152] According to the obtained scrambling method and the scrambling parameters of the obtained scrambling method, the determined base image is scrambled to generate an initial image.
[0153] The initial image is processed according to the preset evaluation model to obtain the difficulty score information of the verification code image.
[0154] If it is determined that the difficulty score information matches the scrambled value, the initial image is determined to be a verification code image.
[0155] Optionally, the second determining submodule 8234 is further configured to:
[0156] If it is determined that the difficulty rating information does not match the scrambled value, the step of generating a verification code image corresponding to the user level information is re-executed according to the user level information.
[0157] If after re-executing the step of generating a verification code image corresponding to the user level information according to the user level information, it is determined that the currently obtained difficulty score information does not match the current scrambling value, the current scrambling value is adjusted, and the currently determined base image is scrambled according to the adjusted current scrambling value to generate a verification code image.
[0158] Optionally, the generating device 800 further includes:
[0159] The model optimization unit 830 is used to obtain the recognition accuracy and recognition speed of the user. The recognition accuracy represents the accuracy of the user's recognition of the verification code picture, and the recognition speed represents the speed at which the user recognizes the verification code picture. According to the recognition accuracy and recognition speed, the preset evaluation model is adjusted.
[0160] Optionally, the generating device 800 further includes a material library updating unit 840, further including:
[0161] The first material library updating module 841 is used to determine an update frequency corresponding to the user risk level according to the user risk level, and update the base map corresponding to the user risk level in the preset material library according to the update frequency.
[0162] Optionally, the material library updating unit 840 further includes:
[0163] The second material library updating module 842 is used to update the base map at the same user risk level in the preset material library if it is determined that the acquisition frequency of the base map at the same user risk level in the preset material library is greater than the preset frequency.
[0164] Optionally, the generating device 800 further includes:
[0165] The recording unit 850 is used to record the user's feedback information, wherein the feedback information represents the user's feedback content on the verification code image. The user's feedback information is used to determine the user's difficulty level.
[0166] The device of this embodiment can execute the technical solution in the above method. Its specific implementation process and technical principles are the same and will not be repeated here.
[0167] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0168] According to an embodiment of the present disclosure, the present disclosure also provides a computer program product, which includes: a computer program, the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.
[0169] Fig. 9 A schematic block diagram of an example electronic device 900 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0170] like Figure 8 As shown, the device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0171] A number of components in the device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0172] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 901 performs the various methods and processes described above, such as the method for generating a verification code image. For example, in some embodiments, the method for generating a verification code image may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the method for generating the verification code image described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the method for generating a verification code image in any other appropriate manner (e.g., by means of firmware).
[0173] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0174] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0175] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0176] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0177] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0178] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
[0179] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0180] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for generating a verification code image, comprising: In response to a trigger operation of a user, determining user level information of the user; wherein the trigger operation represents that the user operates an application function, and the trigger operation represents that a verification code image needs to be generated; wherein the user level information represents the risk of the user operating the application function, and / or the user's personal need to operate the application function; According to the user level information, a verification code picture corresponding to the user level information is generated, and the verification code picture is displayed.
2. The method according to claim 1, wherein: The user level information includes user risk level and / or user difficulty level; The user risk level represents the risk level of abnormal operation of the user in operating the application function, and the user difficulty level represents the difficulty level corresponding to the personal needs of the user in operating the application function.
3. The method according to claim 1 or 2, wherein: When the user level information is a user risk level, wherein the user risk level represents the risk level of abnormal operation of the user operating the application function; The step of determining the user level information of the user in response to a trigger operation of the user includes: In response to a user's trigger operation, retrieve the user's historical abnormal operation behavior; The user risk level is determined based on the historical abnormal operation behavior.
4. The method according to claim 3, wherein: Determining the user risk level according to the historical abnormal operation behavior includes: Determining a security score of the user according to the number and type of the historical abnormal operation behaviors; According to a preset first mapping relationship, a user risk level corresponding to the security score is determined; wherein the preset first mapping relationship is a mapping relationship between the security score and the user risk level.
5. The method according to claim 3, wherein: Determining the user risk level according to the historical abnormal operation behavior includes: Obtain device information of the device operated by the user, and obtain the operation track when the user operates the application function and application information of the application to which the application function belongs; Determining a security score of the user according to the historical abnormal operation behavior, the device information, the operation track, and the application information; According to a preset first mapping relationship, a user risk level corresponding to the security score is determined; wherein the preset first mapping relationship is a mapping relationship between the security score and the user risk level.
6. The method according to any one of claims 1 to 5, wherein: When the user level information is a user difficulty level, wherein the user difficulty level represents the difficulty level of the user's personal needs for operating the application function; The step of determining the user level information of the user in response to a trigger operation of the user includes: In response to a trigger operation by a user, an interface setting parameter corresponding to an application function operated by the user is obtained, and questionnaire information and feedback information of the user are obtained; wherein the questionnaire information indicates a historical personal need of the user to operate the application function; the interface setting parameter indicates a current personal need of the user to operate the application function; and the feedback information of the user indicates a feedback content of the user on the verification code image; The user difficulty level is determined according to the interface setting parameters, the questionnaire information and the user's feedback information.
7. The method according to any one of claims 1 to 6, wherein: When the user level information includes a user risk level and a user difficulty level, wherein the user risk level represents the risk level of abnormal operation of the user operating the application function, and the user difficulty level represents the difficulty level of the user's personal needs for operating the application function; The step of generating a verification code image corresponding to the user level information according to the user level information includes: According to the user risk level, determining a base map corresponding to the user risk level from a preset material library; wherein the preset material library includes base maps corresponding to different user risk levels; A scrambling value is determined according to the user risk level and the user difficulty level; and the determined base image is scrambled according to the scrambling value to generate the verification code image.
8. The method according to claim 7, wherein: When the user risk level is less than or equal to the preset level threshold, the number of verification code pictures obtained is one.
9. The method according to claim 7, wherein: When the user risk level is greater than a preset level threshold, the obtained scrambling value is multiple; The step of scrambling the determined base image according to the scrambling value to generate the verification code image includes: The determined same base image is scrambled respectively according to different scrambling values to generate a verification code image corresponding to the scrambling value.
10. The method according to claim 7, wherein: When the user risk level is greater than a preset level threshold, multiple base maps are determined from the preset material library; wherein the multiple base maps determined are base maps of the same type, or the multiple base maps determined are associated with each other; The step of scrambling the determined base image according to the scrambling value to generate the verification code image includes: According to the same scrambling value, the determined multiple base images are scrambled respectively to generate verification code images corresponding to the base images.
11. The method according to any one of claims 7 to 10, wherein: The determining of the scrambling value according to the user risk level and the user difficulty level includes: Performing weighted sum processing on the user risk level and the user difficulty level to obtain the scrambled value; Alternatively, according to a preset second mapping relationship, initial scrambling information corresponding to the user risk level is determined, and the numerical value represented by the initial scrambling information is corrected according to the user difficulty level to obtain the scrambling value; wherein the preset second mapping relationship is a mapping relationship between the user risk level and the initial scrambling information.
12. The method according to any one of claims 7 to 11, wherein: The step of scrambling the determined base image according to the scrambling value to generate the verification code image comprises: Determine at least one scrambling method from a plurality of preset scrambling methods according to the scrambling value, and determine a scrambling parameter of the obtained scrambling method according to the scrambling value; According to the obtained scrambling method and the scrambling parameters of the obtained scrambling method, the determined base image is scrambled to generate the verification code image.
13. The method according to claim 12, wherein: The step of scrambling the determined base image according to the obtained scrambling method and the obtained scrambling parameters of the scrambling method to generate the verification code image includes: According to the obtained scrambling method and the obtained scrambling parameters of the scrambling method, the determined base image is scrambled to generate an initial image; Processing the initial image according to a preset evaluation model to obtain difficulty score information of the verification code image; If it is determined that the difficulty rating information matches the scrambled value, the initial image is determined to be the verification code image.
14. The method according to claim 13, further comprising: If it is determined that the difficulty rating information does not match the scrambled value, re-performing the step of generating a verification code image corresponding to the user level information according to the user level information; If, after re-executing the step of generating a verification code image corresponding to the user level information according to the user level information, it is determined that the currently obtained difficulty score information does not match the current scrambling value, the current scrambling value is adjusted, and the currently determined base image is scrambled according to the adjusted current scrambling value to generate the verification code image.
15. The method according to claim 13 or 14, further comprising: Obtaining the user's recognition accuracy and recognition speed; wherein the recognition accuracy represents the accuracy of the user's recognition of the verification code picture, and the recognition speed represents the speed at which the user recognizes the verification code picture; The preset evaluation model is adjusted according to the recognition accuracy and recognition speed.
16. The method according to any one of claims 7 to 15, further comprising: According to the user risk level, an update frequency corresponding to the user risk level is determined, and according to the update frequency, a base map corresponding to the user risk level in the preset material library is updated.
17. The method according to any one of claims 7 to 16, further comprising: If it is determined that the acquisition frequency of the base map under the same user risk level in the preset material library is greater than the preset frequency, the base map under the user risk level is updated in the preset material library.
18. The method according to any one of claims 1 to 17, further comprising: The user's feedback information is recorded, wherein the feedback information represents the user's feedback content on the verification code image; the user's feedback information is used to determine the user's difficulty level.
19. A device for generating a verification code image, comprising: A determination unit, configured to determine the user level information of the user in response to a trigger operation of the user; wherein the trigger operation indicates that the user operates an application function, and the trigger operation indicates that a verification code image needs to be generated; wherein the user level information indicates the risk of the user operating the application function and / or the user's personal need to operate the application function; A generating unit is used to generate a verification code picture corresponding to the user level information according to the user level information, and display the verification code picture.
20. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 18.
21. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-18.
22. A computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 18.