Search

CN-122027132-A - Method for generating image verification code

CN122027132ACN 122027132 ACN122027132 ACN 122027132ACN-122027132-A

Abstract

The application discloses a method for generating an image verification code. The method comprises the steps of determining a first interference characteristic parameter set in a plurality of initial interference characteristic parameter sets according to initial evaluation index description information corresponding to the initial interference characteristic parameter sets, adjusting the initial interference characteristic parameter sets of the initial interference characteristic parameter sets according to the first interference characteristic parameter sets corresponding to the first interference characteristic parameter sets to obtain reference interference characteristic parameter sets corresponding to the initial interference characteristic parameter sets, determining the reference interference characteristic parameter sets corresponding to the reference evaluation index description information meeting target recognition conditions as target interference characteristic parameter sets, wherein the target recognition conditions are used for indicating recognition accuracy, and generating an image verification code according to the target interference characteristic parameter sets indicated by the target interference characteristic parameter sets. The application solves the problem of poor security of the generated image verification code in the related technology.

Inventors

  • TAN BO
  • ZHOU XINHENG
  • LU TING
  • Lin Shaoyin

Assignees

  • 中国工商银行股份有限公司

Dates

Publication Date
20260512
Application Date
20260212

Claims (11)

  1. 1. A method of generating an image verification code, comprising: Determining a first interference characteristic parameter set in a plurality of initial interference characteristic parameter sets according to initial evaluation index description information corresponding to the initial interference characteristic parameter sets, wherein the initial evaluation index description information is used for indicating an identification error rate for identifying a first image verification code corresponding to the initial interference characteristic parameter set indicated by the initial interference characteristic parameter set; According to a first interference characteristic parameter set corresponding to the first interference characteristic parameter set, respectively adjusting the initial interference characteristic parameter sets of the initial interference characteristic parameter sets to obtain reference interference characteristic parameter sets corresponding to the initial interference characteristic parameter sets; Determining the reference interference characteristic parameter set corresponding to the reference evaluation index description information meeting the target identification condition as a target interference characteristic parameter set, wherein the target identification condition is used for indicating identification accuracy; And generating an image verification code according to the target interference characteristic parameter set indicated by the target interference characteristic parameter set.
  2. 2. The method of claim 1, wherein after obtaining the reference interference characteristic parameter sets corresponding to the plurality of initial interference characteristic parameter sets, respectively, the method comprises: determining a second interference characteristic parameter set matched with a first sequence position according to the initial evaluation index description information of the initial interference characteristic parameter set corresponding to the first sequence position and the reference evaluation index description information of the reference interference characteristic parameter set obtained based on adjustment under the first sequence position; And repeating the steps, and sequentially determining the second interference characteristic parameter sets matched with each sequence position in the sequence where the plurality of initial interference characteristic parameter sets are located.
  3. 3. The method of claim 2, further comprising, after determining the second set of interference characteristic parameters that match each sequence position: Adjusting a plurality of reference interference feature subsets in a reference interference feature parameter set corresponding to the reference interference feature parameter set of the first sequence position according to a plurality of first interference feature subsets in the first interference feature parameter set corresponding to the first interference feature parameter set and a plurality of second interference feature subsets in a second interference feature parameter set corresponding to the second interference feature parameter set of the first sequence position; repeating the steps, and adjusting the reference interference characteristic parameter set of the reference interference characteristic parameter set at each sequence position in sequence.
  4. 4. A method according to claim 3, wherein before adjusting the respective initial set of interference characteristic parameters of the plurality of initial sets of interference characteristic parameters according to a first set of interference characteristic parameters corresponding to the first set of interference characteristic parameters, respectively, comprises: The plurality of first interference feature subsets in the first interference feature parameter set corresponding to the first interference feature parameter set include a first geometrically deformed feature subset, a first noise interference feature subset, a first stuck feature subset, and a first anti-interference feature subset; The plurality of second interference feature subsets in the second interference feature parameter set corresponding to the second interference feature parameter set include a second geometrically deformed feature subset, a second noise interference feature subset, a second stuck feature subset, and a second anti-interference feature subset.
  5. 5. A method according to claim 3, wherein said adjusting a plurality of reference interference feature subsets in a reference interference feature parameter set corresponding to said reference interference feature parameter set in said first sequence position based on a plurality of first interference feature subsets in said first interference feature parameter set corresponding to said first interference feature parameter set and a plurality of second interference feature subsets in a second interference feature parameter set corresponding to said second interference feature parameter set in said first sequence position comprises: determining a first set of differences between a plurality of the first interference feature subsets and the corresponding reference interference feature subsets; determining a plurality of second interference feature subsets in the second interference feature parameter set matched with the first sequence position, and a second difference value set between the corresponding plurality of reference interference feature subsets in the reference interference feature parameter set matched with the first sequence position after parameter adjustment; and adjusting a plurality of the reference interference feature subsets in the reference interference feature parameter set according to the first difference value set and the second difference value set.
  6. 6. The method of claim 1, wherein the determining a first set of interference characteristic parameters from the plurality of initial set of interference characteristic parameters based on the initial evaluation index description information corresponding to each of the plurality of initial set of interference characteristic parameters comprises: Determining the machine recognition error rate and the user recognition error rate indicated by the initial evaluation index description information corresponding to a plurality of initial interference characteristic parameter sets; The first set of interference characteristic parameters is determined from a plurality of the initial set of interference characteristic parameters in accordance with the machine identification error rate and the user identification error rate corresponding to each of the plurality of the initial set of interference characteristic parameters.
  7. 7. The method according to claim 1, wherein the determining the set of reference interference characteristic parameters corresponding to the reference evaluation index description information satisfying the target recognition condition as the set of target interference characteristic parameters includes at least one of: determining a first fitness value according to the initial evaluation index description information of the initial interference characteristic parameter sets, determining a second fitness value according to the adjusted reference evaluation index description information of the reference interference characteristic parameter sets, determining a fitness change rate based on the first fitness value and the corresponding second fitness value, determining that the target recognition condition is met when the fitness change rate is smaller than a first threshold value, and determining the reference interference characteristic parameter sets meeting the target recognition condition as the target interference characteristic parameter sets; And when the second fitness value of the reference interference characteristic parameter set is larger than a second threshold value, determining that the target identification condition is met, and determining the reference interference characteristic parameter set meeting the target identification condition as the target interference characteristic parameter set.
  8. 8. An apparatus for generating an image verification code, comprising: The first determining unit is used for determining a first interference characteristic parameter set in the initial interference characteristic parameter sets according to initial evaluation index description information corresponding to the initial interference characteristic parameter sets, wherein the initial evaluation index description information is used for indicating an identification error rate for identifying a first image verification code corresponding to the initial interference characteristic parameter set indicated by the initial interference characteristic parameter set; The parameter adjustment unit is used for respectively adjusting the initial interference characteristic parameter sets of the initial interference characteristic parameter sets according to the first interference characteristic parameter set corresponding to the first interference characteristic parameter set to obtain reference interference characteristic parameter sets corresponding to the initial interference characteristic parameter sets respectively; A second determining unit, configured to determine the reference interference characteristic parameter set corresponding to the reference evaluation index description information satisfying a target recognition condition as a target interference characteristic parameter set, where the target recognition condition is used to indicate recognition accuracy; and the image verification code generating unit is used for generating an image verification code according to the target interference characteristic parameter set indicated by the target interference characteristic parameter set.
  9. 9. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored executable program, wherein the executable program when run controls a device in which the computer readable storage medium is located to perform the method according to any one of claims 1 to 7.
  10. 10. An electronic device, comprising: A memory storing an executable program; A processor for executing the program, wherein the program when run performs the method of any of claims 1 to 7.
  11. 11. A computer program product comprising computer instructions which, when executed by a processor, implement the steps of the method of any one of claims 1 to 7.

Description

Method for generating image verification code Technical Field The application relates to the field of artificial intelligence, in particular to a method for generating an image verification code. Background Along with the acceleration of the digitizing process of each industry, the internet virtualization access and interaction of each scene are accelerated, and higher requirements are provided for the internet interaction security under the background. To prevent malicious access attacks on a network by automated machine programs, the verification code technology that is now widely used is a combination of numbers and letters, and adds static image verification codes with fixed parameters of interference features, including distortion (non-linear deformation of characters, such as wavy, rotating), noise interference (addition of random noise points, lines or background textures), sticky overlap (partial overlap or sticky between characters), resistive interference (against samples of machine learning models, such as against disturbances). However, the prior art mostly adopts fixed parameter combination, lacks dynamic optimization capability, specifically, static interference parameter setting is easy to crack a machine learning model through massive sample training by an attacker, exposes security vulnerability, lacks a dynamic response mechanism, and cannot effectively cope with rapid evolution of novel attack technologies such as an anti-generation network and the like. That is, the prior art has a technical problem that the generated image verification code has poor security. Aiming at the problem of poor security of the generated image verification code in the related technology, no effective solution is proposed at present. Disclosure of Invention The application mainly aims to provide a method for generating an image verification code, which aims to solve the technical problem that the image verification code generated in the related technology is poor in safety. To achieve the above object, according to one aspect of the present application, there is provided a method of generating an image authentication code. The method comprises the steps of determining a first interference characteristic parameter set in a plurality of initial interference characteristic parameter sets according to initial evaluation index description information corresponding to the initial interference characteristic parameter sets, wherein the initial evaluation index description information is used for indicating an identification error rate for identifying a first image verification code corresponding to initial interference characteristic parameter set generation indicated by the initial interference characteristic parameter set, adjusting the initial interference characteristic parameter sets of the initial interference characteristic parameter sets according to the first interference characteristic parameter set corresponding to the first interference characteristic parameter set to obtain reference interference characteristic parameter sets corresponding to the initial interference characteristic parameter sets, determining the reference interference characteristic parameter set corresponding to the reference evaluation index description information meeting target identification conditions as a target interference characteristic parameter set, wherein the target identification conditions are used for indicating identification accuracy, and generating the image verification code according to the target interference characteristic parameter set indicated by the target interference characteristic parameter set. To achieve the above object, according to another aspect of the present application, there is provided an apparatus for generating an image authentication code. The device comprises a first determining unit, a parameter adjusting unit and a second determining unit, wherein the first determining unit is used for determining a first interference characteristic parameter set in a plurality of initial interference characteristic parameter sets according to initial evaluation index description information corresponding to the initial interference characteristic parameter sets, the initial evaluation index description information is used for indicating an identification error rate for identifying a first image verification code corresponding to generation of the initial interference characteristic parameter set indicated by the initial interference characteristic parameter set, the parameter adjusting unit is used for adjusting the initial interference characteristic parameter set of the initial interference characteristic parameter sets according to the first interference characteristic parameter set corresponding to the first interference characteristic parameter set to obtain reference interference characteristic parameter sets corresponding to the initial interference characteristic parameter sets respectively, the se