WO2017067398A1 - 一种基于用户填写验证码来进行图片识别的方法及装置 - Google Patents

一种基于用户填写验证码来进行图片识别的方法及装置 Download PDF

Info

Publication number
WO2017067398A1
WO2017067398A1 PCT/CN2016/101731 CN2016101731W WO2017067398A1 WO 2017067398 A1 WO2017067398 A1 WO 2017067398A1 CN 2016101731 W CN2016101731 W CN 2016101731W WO 2017067398 A1 WO2017067398 A1 WO 2017067398A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
user
identification
identified
noun
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2016/101731
Other languages
English (en)
French (fr)
Inventor
王曜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Publication of WO2017067398A1 publication Critical patent/WO2017067398A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/36User authentication by graphic or iconic representation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication

Definitions

  • the invention belongs to the technical field of computers, and in particular relates to a method and a device for performing picture recognition based on a user filling in a verification code.
  • An object of the present invention is to provide a method for performing picture recognition based on a user filling in a verification code, and using the picture to be identified as a verification code picture to identify the picture to be recognized by identifying the picture of the verification code in the process of user identity verification.
  • a method for performing picture recognition based on a user filling in a verification code comprising:
  • the picture nouns of the picture to be recognized are identified according to all the recorded identification records corresponding to the picture to be identified and their weighted scores.
  • the method further includes:
  • the method also includes the steps of:
  • the weighted score of the identification record also includes the additional weighted score.
  • the method further includes:
  • the identification record whose weighted score is less than or equal to the set threshold is deleted.
  • the method further includes the steps of:
  • the weighted score is corrected according to the user historical credit score, and the correction formula is as follows:
  • F is the corrected weighted score
  • F 0 is the weighted score before correction
  • Y is the user's historical credit score
  • Z is the base score.
  • the picture nouns of the picture to be recognized are identified, including:
  • the user identification noun of the merged identification record with the largest number of identical user identification nouns is selected as the picture noun of the picture to be recognized, and when there are more than two combined identification records with the same number of identical user identification nouns, The user identification noun of the combined identification record with the weighted average score is used as the picture noun of the picture to be recognized, and when the combined weighted average scores of the two or more identical user-identified nouns are the same, the manual identification is submitted.
  • the to-be-identified picture corresponds to a display number set for the user
  • the sending to the user includes at least one picture to be identified and a plurality of known pictures as the verification code picture, and further includes the steps of:
  • the present invention also provides an apparatus for performing picture recognition based on a user filling in a verification code, the apparatus comprising:
  • a verification code picture sending module configured to send, to the user, at least one picture to be identified and a plurality of known pictures as the verification code picture;
  • a receiving module configured to receive a user identification noun input by the user after identifying the verification code picture, and record an identification record corresponding to the picture to be identified, where the identification record includes a picture ID of the picture to be identified and a user identification noun input by the user;
  • a weighting module configured to determine, according to the known picture and its picture noun, whether the user-identified noun input by the user matches the known picture, and set a weighted score for the identification record according to the number of matches with the known picture;
  • the identification module is configured to identify a picture noun of the picture to be recognized according to all the recorded identification records corresponding to the picture to be identified and the weighted score thereof.
  • the receiving module is further configured to record a result of whether the user successfully logs in this time;
  • the weighting module further sets an additional weighted score for the identification record according to the number of consecutive successful logins by the user; the weighted score of the identification record further includes the additional weighted score.
  • the weighting module is further configured to delete the identification record whose weighted score is less than or equal to the set threshold.
  • the weighting module is further configured to correct the weighted score according to a user historical credit score, and the correction formula is as follows:
  • F is the corrected weighted score
  • F 0 is the weighted score before correction
  • Y is the user's historical credit score
  • Z is the base score.
  • the identifying module identifies the picture noun of the picture to be recognized according to all the recorded identification records corresponding to the picture to be identified and the weighted score thereof, and performs the following operations:
  • the user identification noun of the merged identification record with the largest number of identical user identification nouns is selected as the picture noun of the picture to be recognized, and when there are more than two combined identification records with the same number of identical user identification nouns, The user identification noun of the combined identification record with the weighted average score is used as the picture noun of the picture to be recognized, and when the combined weighted average scores of the two or more identical user-identified nouns are the same, the manual identification is submitted.
  • the to-be-identified picture corresponds to the number of times of the display
  • the verification code picture sending module is further configured to verify whether the number of times the picture to be identified is submitted as the verification code picture reaches the number of times of display, when When the number of times of display is displayed, the picture is no longer submitted as a verification code picture.
  • the invention provides a method and a device for performing picture recognition based on a user filling in a verification code, and using the picture to be identified as a verification code picture, and determining the picture to be recognized by identifying the picture of the verification code in the process of user identity verification.
  • Picture nouns, clever use of user identification identify a large number of images to be identified, saving manpower and material resources.
  • the speed of picture recognition processing is accelerated, the machine learning experience is increased, and the recognition processing capability for massive pictures is effectively improved.
  • FIG. 1 is a flow chart of a method for performing picture recognition based on a user filling in a verification code according to the present invention
  • FIG. 2 is a schematic structural diagram of an apparatus for performing picture recognition based on a user filling in a verification code according to the present invention.
  • the general idea of the present invention is to use the verification code in the verification process when the user logs in, and the picture to be identified is mixed in the verification picture and sent to the user.
  • the user needs to select the picture for verification, and the user can treat The selected picture is selected for analysis to identify the picture to be identified.
  • This embodiment sets up four data tables for this purpose: data table A, data table B, data table C, and data table D, where:
  • the data table A is used to store pictures that are not recognized by the machine, and is also a picture to be identified that needs to be identified by the present invention
  • Data table B is used to store known pictures and corresponding names
  • the data table C is used to store the identification record
  • the data table D is used to store the final recognition result of the picture to be recognized.
  • the user is required to recognize the picture and return the user identification noun of the four pictures. After receiving the user identification noun returned by the user, the user's answer is verified. If the user fills in three picture nouns from the data table B, it is considered that the user can pass the verification.
  • the method for performing picture recognition based on the user filling in the verification code includes:
  • Step S1 Send at least one picture to be identified and a plurality of known pictures to the user as the verification code picture.
  • the authentication is in the form of a picture verification code, and the picture that is the verification code needs to be sent to the user. For example, if the total number of verification code pictures is four, three known pictures are taken from the data table B, and one picture to be identified is taken from the data table A, and sent to the user as a verification code picture.
  • What the present invention has to do is to identify a picture noun corresponding to the picture to be identified, and the picture noun may be the name of an object included in the picture.
  • the verification code picture As an example, and more verification code pictures can be provided in actual use, including at least one picture to be identified and multiple known pictures, and identification according to known pictures.
  • the number of pictures to be identified included does not affect the authentication.
  • Step S2 Receiving a user identification noun input by the user after identifying the verification code picture, and recording an identification record corresponding to the picture to be identified, where the identification record includes a picture ID ((identification) of the picture to be identified and a user input by the user. Identify nouns.
  • This embodiment requires the user to identify the verification code picture and return the user identification noun of the four pictures. After receiving the verification code picture, the user inputs the user identification noun of each picture one by one. In this embodiment, the picture noun input by the user is referred to as a user identification noun.
  • the three known pictures selected from the data table B are an electric fan, a television set, and a washing machine, and one picture selected from the data table A is the picture to be recognized, and the four pictures are sent to the user in a disordered order for verification.
  • Code image Assume that the electric fan is ranked first, the picture to be identified is ranked second, the TV is ranked third, and the washing machine is ranked fourth.
  • the user identification noun returned by the user wherein the user noun corresponding to the three known pictures, the user identification noun returned by the user is consistent with the known picture noun, that is, the first picture returns the electric fan, and the third picture
  • the TV is returned, and the fourth picture returns the washing machine, and the verification is passed.
  • the image to be recognized does not affect the judgment result, but the user will still return the corresponding user identification noun, and can analyze the recognition of the recognized image according to the user identification noun returned by the user, and give the recognized picture noun.
  • the embodiment records an identification record to the data table C, the identification record including the picture ID of the picture to be recognized and the user identification input by the user. noun.
  • This embodiment also records the result of the success or failure of the user's current login, so as to perform weighting calculation in the subsequent steps.
  • Step S3 judging whether the user-identified noun input by the user matches the known picture according to the known picture and the picture noun, and setting a weighted score for the identification record according to the number of matches with the known picture.
  • the present embodiment determines the correct number of user identification nouns input by the user according to the known picture, and sets a weighted score for the identification record, that is, the weighted score and the user correctly return the known number.
  • the user identification of the picture is related.
  • this embodiment has three known pictures, and the following table sets the weight f 1 for the identification record:
  • Table 1 is a data schema for calculating weighted scores.
  • the weighted score is -1; one is correctly identified, the weighted score is 1; the two are correctly identified, and the weighted score is 2; all three are correctly identified, and the weighted score is 5. It can be seen that if the user passes the verification, the weighted score of the identification record corresponding to this verification is 5. At each verification, an identification record is recorded to the data table C regardless of whether or not the verification is passed.
  • the weighted score obtained in Table 1 can be used as the weighted score of the identification record, and other factors such as the user history credit, the number of consecutive user login successes, etc. can be further added to further Improve the credibility of identifying record weighted scores.
  • the number of consecutive successful logins of the user can be known, and an additional weighted score can be set for the identification record according to the number of consecutive successful logins by the user.
  • the specific additional weighted score f 2 can be calculated according to the following table:
  • Table 2 is another data schema for calculating the weighted score.
  • the weighted score of the identification record also includes the additional weighted score. Calculated as follows:
  • the method in this embodiment further includes:
  • the identification record whose weighted score F is less than or equal to the set threshold is filtered out.
  • the embodiment further introduces a user history credit score to correct the weighted score F, and the calculation formula is as follows:
  • Y is the user's historical credit score
  • Z is the base score
  • F is the corrected weighted score
  • F 0 is the weighted score before the correction. It can be seen that after averaging F 0 , Y, and Z, the corrected weighted score F can be obtained after rounding off the decimal point. The corrected weighted score F is used to perform the calculation of the subsequent steps, and the obtained result is more reliable.
  • Step S4 Identify, according to all the recorded identification records corresponding to the picture to be identified and the weighted score thereof, the picture noun of the picture to be recognized.
  • the identification record of the picture to be identified in the data table C is more and more, and all the recorded identification records corresponding to the picture to be identified and their weighted scores can be analyzed and found to be Identify the exact picture noun of the picture.
  • the user identification noun in the identification record with the largest weighted score in the recorded identification record may be directly selected as the picture noun of the to-be-identified picture.
  • the solution adopted in this embodiment is as follows:
  • the user identification noun of the merged identification record with the largest number of identical user identification nouns is selected as the picture noun of the picture to be recognized, and when there are more than two combined identification records with the same number of identical user identification nouns, The user identification noun of the combined identification record with the weighted average score is used as the picture noun of the picture to be recognized, and when the combined weighted average scores of the two or more identical user-identified nouns are the same, the manual identification is submitted.
  • Table 3 is a plurality of identification record schematic tables of the picture to be identified in one example.
  • F 0 is the weighted score before correction
  • F is the corrected weighted score
  • Y is the user history score
  • Table 4 is a table of identification records of the merged pictures to be recognized in one example.
  • the noun corresponds to the average of the weighted scores of the recognition records.
  • the merged identification records are sorted according to the number of identical user identification nouns corresponding to each merged identification record, and the user identification noun corresponding to the first merged identification record is obtained as the picture noun of the picture to be recognized; when there are more than two merges
  • the user identification noun of the combined identification record with the weighted average score is taken as the picture noun of the picture to be recognized; when the number of identical user identification nouns of the two or more combined identification records is the same, If the weighted average score is still the same, it is sent to the operation and maintenance personnel for manual identification.
  • the method according to the present invention can be surely identified, and then it is not required to be submitted to the user for identification again, so the present invention is for each to be identified.
  • the picture sets the number of times of display. When the number of times the image to be recognized is submitted as the verification code image reaches the number of times of display, the picture to be recognized is not submitted, and is deleted from the data table A.
  • the device for performing picture recognition based on the user filling in the verification code is as shown in FIG. 2, and the device includes:
  • a verification code picture sending module configured to send, to the user, at least one picture to be identified and a plurality of known pictures as the verification code picture;
  • a receiving module configured to receive a user identification noun input by the user after identifying the verification code picture, and record an identification record corresponding to the picture to be identified, where the identification record includes a picture ID of the picture to be identified and a user identification noun input by the user;
  • a weighting module configured to determine, according to the known picture and its picture noun, whether the user-identified noun input by the user matches the known picture, and set a weighted score for the identification record according to the number of matches with the known picture;
  • the identification module is configured to identify a picture noun of the picture to be recognized according to all the recorded identification records corresponding to the picture to be identified and the weighted score thereof.
  • the receiving module is further configured to record a result of the success or failure of the current login by the user;
  • the weighting module further sets an additional weighted score for the identification record according to the number of consecutive successful logins by the user; the weighted score of the identification record further includes the additional weighted score.
  • the weighting module is further configured to delete the identification record whose weighted score is less than or equal to the set threshold.
  • the weighting module is further configured to perform the weighted score according to a user historical credit score. Corrected, the correction formula is as follows:
  • F is the corrected weighted score
  • F 0 is the weighted score before correction
  • Y is the user's historical credit score
  • Z is the base score.
  • the identification module identifies the picture noun of the picture to be recognized according to all the recorded identification records corresponding to the picture to be identified and its weighted score, and performs the following operations:
  • the user identification noun of the merged identification record with the largest number of identical user identification nouns is selected as the picture noun of the picture to be recognized, and when there are more than two combined identification records with the same number of identical user identification nouns, The user identification noun of the combined identification record with the weighted average score is used as the picture noun of the picture to be recognized, and when the combined weighted average scores of the two or more identical user-identified nouns are the same, the manual identification is submitted.
  • the picture to be identified corresponds to the number of times of the display
  • the verification code picture sending module is further configured to verify whether the number of times the picture to be recognized is submitted as the verification code image reaches the number of times of display, when the number of times of display is reached, The image will no longer be submitted as a captcha image.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Collating Specific Patterns (AREA)
  • Image Analysis (AREA)

Abstract

一种基于用户填写验证码来进行图片识别的方法及装置,该方法包括:向用户发送包括至少一张待识别图片和多张已知图片作为验证码图片(S1);接收用户对验证码图片识别后输入的用户识别名词,记录一条待识别图片对应的识别记录,该识别记录包括该待识别图片的图片ID及用户输入的用户识别名词(S2);根据已知图片及其图片名词判断用户输入的用户识别名词是否与已知图片匹配,并根据与已知图片的匹配次数,为识别记录设置加权分数(S3);最后根据待识别图片对应的所有已记录的识别记录及其加权分数,识别出待识别图片的图片名词(S4)。所述装置包括验证码图片发送模块、接收模块、加权模块和识别模块。所述方法及装置,加快了图片识别处理速度,增加了机器学习经验,有效提高对海量图片的识别处理能力。

Description

一种基于用户填写验证码来进行图片识别的方法及装置
本申请要求2015年10月20日递交的申请号为201510683529.2、发明名称为“一种基于用户填写验证码来进行图片识别的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明属于计算机技术领域,尤其涉及一种基于用户填写验证码来进行图片识别的方法及装置。
背景技术
互联网的发展始终在“创新与改变”中跨越前行,从联系平台到浏览平台,到交互平台,到工作平台,互联网正逐步深入人们的生活。随着互联网的不断发展,逐步进入大数据时代,城市数据、企业数据、医疗数据、网站数据成为我们虚拟与现实生活的重要组成部分。
互联网应用的后台服务器在对大数据进行机器学习的过程中,往往会遇到机器无法准确识别图片的情况,需要大量人力进行标注和纠正。而对于海量的互联网数据,对无法机器学习的图片进行人工处理,是极其繁重和枯燥的工作。
发明内容
本发明的目的是提供一种基于用户填写验证码来进行图片识别的方法,将待识别图片作为验证码图片,通过用户身份验证过程中对该验证码图片的识别,来确定该待识别图片的图片名词,巧妙借助用户的识别,对大量待识别图片进行了识别,节省了人力物力。
为了实现上述目的,本发明技术方案如下:
一种基于用户填写验证码来进行图片识别的方法,所述方法包括:
向用户发送包括至少一张待识别图片和多张已知图片作为验证码图片;
接收用户对验证码图片识别后输入的用户识别名词,记录一条待识别图片对应的识别记录,该识别记录包括该待识别图片的图片ID及用户输入的用户识别名词;
根据已知图片及其图片名词判断用户输入的用户识别名词是否与已知图片匹配,并根据与已知图片的匹配次数,为识别记录设置加权分数;
根据待识别图片对应的所有已记录的识别记录及其加权分数,识别出待识别图片的图片名词。
进一步地,所述接收用户对验证码图片识别后输入的用户识别名词之后,还包括:
记录用户本次登录成功与否的结果;
所述方法还包括步骤:
根据用户连续登录成功的次数,为识别记录设置额外加权分数;
所述识别记录的加权分数还包括所述额外加权分数。
进一步地,所述根据待识别图片对应的所有已记录的识别记录及其加权分数,识别出待识别图片的图片名词之前,还包括:
删除加权分数小于等于设定阈值的识别记录。
进一步地,所述方法还包括步骤:
根据用户历史信用评分,对所述加权分数进行修正,修正公式如下:
F=round((F0+Y+Z)/3,2)
其中F为修正后的加权分数,F0为修正前的加权分数,Y为用户历史信用评分,Z为基础分。
本发明所述根据待识别图片对应的所有已记录的识别记录及其加权分数,识别出待识别图片的图片名词,包括:
获取待识别图片对应的所有识别记录中加权分数排名靠前的M条识别记录,将相同用户识别名词的识别记录进行合并,得到合并的识别记录,合并的识别记录包括该待识别图片的图片ID、对应的用户识别名词、相同用户识别名词次数及加权平均分数;
根据合并的识别记录,筛选出相同用户识别名词次数最大的合并的识别记录的用户识别名词作为待识别图片的图片名词,当有两条以上相同用户识别名词次数最大的合并的识别记录时,以加权平均分数大的合并的识别记录的用户识别名词作为待识别图片的图片名词,当两条以上相同用户识别名词次数最大的合并的加权平均分数相同时,提交给人工识别。
进一步地,所述待识别图片对应有为其设置的显示次数,所述向用户发送包括至少一张待识别图片和多张已知图片作为验证码图片,还包括步骤:
验证所述待识别图片提交作为验证码图片的次数是否达到所述显示次数,当达到所述显示次数时,不再提交该图片作为验证码图片。
本发明还提出了一种基于用户填写验证码来进行图片识别的装置,所述装置包括:
验证码图片发送模块,用于向用户发送包括至少一张待识别图片和多张已知图片作为验证码图片;
接收模块,用于接收用户对验证码图片识别后输入的用户识别名词,记录一条待识别图片对应的识别记录,该识别记录包括该待识别图片的图片ID及用户输入的用户识别名词;
加权模块,用于根据已知图片及其图片名词判断用户输入的用户识别名词是否与已知图片匹配,并根据与已知图片的匹配次数,为识别记录设置加权分数;
识别模块,用于根据待识别图片对应的所有已记录的识别记录及其加权分数,识别出待识别图片的图片名词。
进一步地,所述接收模块还用于记录用户本次登录成功与否的结果;
则,所述加权模块还根据用户连续登录成功的次数,为识别记录设置额外加权分数;所述识别记录的加权分数还包括所述额外加权分数。
进一步地,所述加权模块还用于删除加权分数小于等于设定阈值的识别记录。
进一步地,所述加权模块还用于根据用户历史信用评分,对所述加权分数进行修正,修正公式如下:
F=round((F0+Y+Z)/3,2)
其中F为修正后的加权分数,F0为修正前的加权分数,Y为用户历史信用评分,Z为基础分。
进一步地,所述识别模块根据待识别图片对应的所有已记录的识别记录及其加权分数,识别出待识别图片的图片名词,执行如下操作:
获取待识别图片对应的所有识别记录中加权分数排名靠前的M条识别记录,将相同用户识别名词的识别记录进行合并,得到合并的识别记录,合并的识别记录包括该待识别图片的图片ID、对应的用户识别名词、相同用户识别名词次数及加权平均分数;
根据合并的识别记录,筛选出相同用户识别名词次数最大的合并的识别记录的用户识别名词作为待识别图片的图片名词,当有两条以上相同用户识别名词次数最大的合并的识别记录时,以加权平均分数大的合并的识别记录的用户识别名词作为待识别图片的图片名词,当两条以上相同用户识别名词次数最大的合并的加权平均分数相同时,提交给人工识别。
进一步地,所述待识别图片对应有为其设置的显示次数,所述验证码图片发送模块还用于验证所述待识别图片提交作为验证码图片的次数是否达到所述显示次数,当达到 所述显示次数时,不再提交该图片作为验证码图片。
本发明提出的一种基于用户填写验证码来进行图片识别的方法及装置,将待识别图片作为验证码图片,通过用户身份验证过程中对该验证码图片的识别,来确定该待识别图片的图片名词,巧妙借助用户的识别,对大量待识别图片进行了识别,节省了人力物力。通过本发明的方法和装置,加快了图片识别处理速度,增加了机器学习经验,有效提高对海量图片的识别处理能力。
附图说明
图1为本发明基于用户填写验证码来进行图片识别的方法流程图;
图2为本发明基于用户填写验证码来进行图片识别的装置结构示意图。
具体实施方式
下面结合附图和实施例对本发明技术方案做进一步详细说明,以下实施例不构成对本发明的限定。
本发明的总体思路是利用用户登录时的验证过程中,需要输入验证码的这一环节,将待识别的图片夹杂在验证图片中发送给用户,用户需要选择图片进行验证,就可以根据用户对待识别的图片的选择来进行分析,识别出待识别的图片。
本实施例为此设置了四个数据表:数据表A,数据表B,数据表C,和数据表D,其中:
数据表A用来存储机器无法识别的图片,也是需要通过本发明进行识别的待识别图片;
数据表B用来存储已知的图片及对应的名称;
数据表C用来存储识别记录;
数据表D用来存储对待识别图片的最终识别结果。
本实施例在用户登录时,向用户发送4张图片作为验证码,其中3张来自数据表B,1张来自数据表A。需要说明的是,用于作为验证码的图片的具体数量不限,但是仅包括一张待识别图片,本实施例以4张为例来进行说明。
要求用户对图片进行识别,返回4张图片的用户识别名词。接收到用户返回的用户识别名词后,验证用户的答案,如果用户填对了三张来自数据表B的图片名词,就认为其可以通过验证。
基于上述验证过程,本实施例一种基于用户填写验证码来进行图片识别的方法,如图1所示,包括:
步骤S1、向用户发送包括至少一张待识别图片和多张已知图片作为验证码图片。
当用户登录时,需要对其进行身份验证,身份验证通过图片验证码的形式,则需要向用户发送作为验证码的图片。例如假设验证码图片的总数为4张,则从数据表B中取三个已知图片,以及从数据表A中取一张待识别图片,作为验证码图片发送给用户。
本发明所要做的事情就是识别出该待识别图片对应的图片名词,所述图片名词可以是图片中包含的物体的名称。本实施例以4张图片作为验证码图片为例,在实际使用中可以提供更多的验证码图片,其中包括至少一张待识别图片以及多张已知的图片,并根据已知图片的识别结果进行身份验证,所包括的待识别图片的多少对身份验证不影响。
步骤S2、接收用户对验证码图片识别后输入的用户识别名词,记录一条待识别图片对应的识别记录,该识别记录包括该待识别图片的图片ID((identification,身份标识)及用户输入的用户识别名词。
本实施例要求用户对验证码图片进行识别,返回4张图片的用户识别名词。用户收到验证码图片后,一一输入各个图片的用户识别名词,本实施例将用户输入的图片名词称为用户识别名词。
在接收到返回的4张图片的用户识别名词后,与已知的图片名词进行对比,如果用户填对了三张来自数据表B的已知图片的图片名词时,就认为其可以通过验证。
例如从数据表B中选取的三张已知图片分别为电风扇、电视机和洗衣机,而从数据表A中选取的一张图片为待识别图片,四张图片打乱次序发送给用户作为验证码图片。假设电风扇排在第一,待识别图片排在第二,电视机排在第三,洗衣机排在第四。
则根据用户返回的用户识别名词,其中对应三张已知图片的图片名词,用户返回的用户识别名词都与已知的图片名词一致,即第一张图片返回的是电风扇,第三张图片返回的是电视机,第四张图片返回的是洗衣机,则判断验证通过。显然待识别图片不会影响判断结果,但是用户还是会返回对应的用户识别名词,能够根据用户返回的用户识别名词进行分析完成对待识别图片的识别,给出其识别的图片名词。
然而虽然用户给出了对于待识别图片的用户识别名词,也并不能就此确定该用户给出的用户识别名词就是该待识别图片的真正图片名词,为此需要进一步进行分析。
为了便于对用户返回的对应待识别图片的用户识别名词进行分析,本实施例记录一条识别记录到数据表C,该识别记录包括该待识别图片的图片ID及用户输入的用户识别 名词。
本实施例还记录用户本次登录成功与否的结果,以便于后续步骤进行加权计算。
步骤S3、根据已知图片及其图片名词判断用户输入的用户识别名词是否与已知图片匹配,并根据与已知图片的匹配次数,为识别记录设置加权分数。
为了对用户返回的对应待识别图片的用户识别名词进行分析,本实施例根据已知图片判断用户输入的用户识别名词正确数量,为识别记录设置加权分数,即加权分数与用户正确地返回已知图片的用户识别名词有关。
例如:本实施例有三张已知图片,按下表为识别记录设置加权f1
正确数量 加权分数
0 -1
1 1
2 2
3 5
表1
表1是计算加权分数的一种数据示意表。
即三张都识别错误,加权分数为-1;一张识别正确,加权分数为1;两张识别正确,加权分数为2;三张都识别正确,加权分数为5。可见如果用户验证通过,则本次验证对应的识别记录的加权分数为5。在每次验证时,不论是否验证通过,都记录一条识别记录到数据表C。
容易理解的是,对应每条识别记录的加权分数,可以以表1得到的加权分数为识别记录的加权分数,还可以进一步加入其他因数,如用户历史信用、用户连续登录成功次数等,来进一步提高识别记录加权分数的可信度。
例如,根据记录的用户本次登录成功与否的结果,可以得知用户连续登录成功的次数,则可以根据用户连续登录成功的次数,为识别记录设置额外加权分数。具体的额外加权分数f2可以根据下表来计算:
连续登录次数 额外加权分数
连续5次失败 -1
没有连续成功 2
连续十次 5
表2
表2是计算加权分数的另一种数据示意表。
至此,当考虑用户连续登录次数时,识别记录的加权分数还包括该额外加权分数, 计算公式如下:
F=f1+f2
需要说明的是,当识别记录的加权分数F小于等于设定的阈值(例如-1)时,该识别记录已经不可信,不需要再参与后续的计算,因此本实施例的方法还包括:
筛选掉加权分数F小于等于设定阈值的识别记录。
进一步,本实施例还引入用户历史信用评分来对加权分数F进行修正,计算公式如下:
F=round((F0+Y+Z)/3,2)
其中,Y为用户历史信用评分,Z为基础分,F为修正后的加权分数,F0为修正前的加权分数。可见通过对F0、Y、Z求平均后,经四舍五入取小数点后两位可得修正后的加权分数F。采用修正后的加权分数F来进行后续步骤的计算,得到的结果更加可信。
步骤S4、根据待识别图片对应的所有已记录的识别记录及其加权分数,识别出待识别图片的图片名词。
随着待识别图片被多个用户识别后,数据表C中对应该待识别图片的识别记录越来越多,可以对待识别图片对应的所有已记录的识别记录及其加权分数进行分析,找到待识别图片的准确图片名词。
简单地,可以直接选取已记录的识别记录中加权分数最大的识别记录中的用户识别名词作为该待识别图片的图片名词。
优选地,本实施例采用的方案如下:
获取待识别图片对应的所有识别记录中加权分数排名靠前的M条识别记录,将相同用户识别名词的识别记录进行合并,得到合并的识别记录,合并的识别记录包括该待识别图片的图片ID、对应的用户识别名词、相同用户识别名词次数及加权平均分数;
根据合并的识别记录,筛选出相同用户识别名词次数最大的合并的识别记录的用户识别名词作为待识别图片的图片名词,当有两条以上相同用户识别名词次数最大的合并的识别记录时,以加权平均分数大的合并的识别记录的用户识别名词作为待识别图片的图片名词,当两条以上相同用户识别名词次数最大的合并的加权平均分数相同时,提交给人工识别。
以下进行详细说明:
根据步骤S1-S3步骤的计算,不难得到对待识别图片的识别记录及其对应的加权分 数,假设对于一个待识别图片的多条识别记录如下表,表中F按照大小顺序排列:
图片ID 用户识别名词 F0 Y F
111 冰箱 F0-1 Y1 F1
111 微波炉 F0-2 Y2 F2
111 保险箱 F0-3 Y3 F3
111 冰箱 F0-4 Y4 F4
111 微波炉 F0-5 Y5 F5
111 烤箱 F0-6 Y6 F6
111 空调 F0-7 Y7 F7
111 木柜 F0-8 Y8 F8
111 洗衣机 F0-9 Y9 F9
111 海尔 F0-10 Y10 F10
表3
表3是一个示例中待识别图片的多条识别记录示意表。
其中F0为修正前的加权分数,F为修正后的加权分数,Y为用户历史评分。
取该待识别图片111的前M个(M=10)条识别记录,将相同的用户识别名词对应的识别记录进行合并,得到如下的合并的识别记录:
Figure PCTCN2016101731-appb-000001
表4
表4是一个示例中合并后的待识别图片的识别记录示意表。
其中,平均加权分数P1=round((F1+F3)/2,2),P2=round((F2+F5)/2,2),即加权平均分数为相同的用户识别名词对应的识别记录的加权分数的平均。
对合并的识别记录按照每条合并的识别记录对应的相同用户识别名词次数进行排序,获取排名第一的合并的识别记录对应的用户识别名词作为待识别图片的图片名词;当有两条以上合并的识别记录的相同用户识别名词次数相同时,取加权平均分数大的合并的识别记录的用户识别名词作为待识别图片的图片名词;当两条以上合并的识别记录的相同用户识别名词次数相同,且加权平均分数还是相同,则推送给运维人员,进行人工识别。
最后将识别结果写入数据表D,作为后续机器学习或者其他业务使用。
需要说明的是,当一个待识别图片经过多次用户识别后,根据本发明的方法已经能确定地进行了识别,则不需要再次将其提交给用户进行识别,因此本发明为每个待识别图片设置了显示次数,当一个待识别图片作为验证码图片提交显示的次数达到该显示次数时,不再提交该待识别图片,将其从数据表A中删除。
与上述方法对应地,本实施例一种基于用户填写验证码来进行图片识别的装置如图2所述,该装置包括:
验证码图片发送模块,用于向用户发送包括至少一张待识别图片和多张已知图片作为验证码图片;
接收模块,用于接收用户对验证码图片识别后输入的用户识别名词,记录一条待识别图片对应的识别记录,该识别记录包括该待识别图片的图片ID及用户输入的用户识别名词;
加权模块,用于根据已知图片及其图片名词判断用户输入的用户识别名词是否与已知图片匹配,并根据与已知图片的匹配次数,为识别记录设置加权分数;
识别模块,用于根据待识别图片对应的所有已记录的识别记录及其加权分数,识别出待识别图片的图片名词。
与上述方法对应地,接收模块还用于记录用户本次登录成功与否的结果;
则,加权模块还根据用户连续登录成功的次数,为识别记录设置额外加权分数;所述识别记录的加权分数还包括所述额外加权分数。
与上述方法对应地,加权模块还用于删除加权分数小于等于设定阈值的识别记录。
与上述方法对应地,加权模块还用于根据用户历史信用评分,对所述加权分数进行 修正,修正公式如下:
F=round((F0+Y+Z)/3,2)
其中F为修正后的加权分数,F0为修正前的加权分数,Y为用户历史信用评分,Z为基础分。
与上述方法对应地,识别模块根据待识别图片对应的所有已记录的识别记录及其加权分数,识别出待识别图片的图片名词,执行如下操作:
获取待识别图片对应的所有识别记录中加权分数排名靠前的M条识别记录,将相同用户识别名词的识别记录进行合并,得到合并的识别记录,合并的识别记录包括该待识别图片的图片ID、对应的用户识别名词、相同用户识别名词次数及加权平均分数;
根据合并的识别记录,筛选出相同用户识别名词次数最大的合并的识别记录的用户识别名词作为待识别图片的图片名词,当有两条以上相同用户识别名词次数最大的合并的识别记录时,以加权平均分数大的合并的识别记录的用户识别名词作为待识别图片的图片名词,当两条以上相同用户识别名词次数最大的合并的加权平均分数相同时,提交给人工识别。
同样,待识别图片对应有为其设置的显示次数,验证码图片发送模块还用于验证所述待识别图片提交作为验证码图片的次数是否达到所述显示次数,当达到所述显示次数时,不再提交该图片作为验证码图片。
以上实施例仅用以说明本发明的技术方案而非对其进行限制,在不背离本发明精神及其实质的情况下,熟悉本领域的技术人员当可根据本发明作出各种相应的改变和变形,但这些相应的改变和变形都应属于本发明所附的权利要求的保护范围。

Claims (12)

  1. 一种基于用户填写验证码来进行图片识别的方法,其特征在于,所述方法包括:
    向用户发送包括至少一张待识别图片和多张已知图片作为验证码图片;
    接收用户对验证码图片识别后输入的用户识别名词,记录一条待识别图片对应的识别记录,该识别记录包括该待识别图片的图片ID及用户输入的用户识别名词;
    根据已知图片及其图片名词判断用户输入的用户识别名词是否与已知图片匹配,并根据与已知图片的匹配次数,为识别记录设置加权分数;
    根据待识别图片对应的所有已记录的识别记录及其加权分数,识别出待识别图片的图片名词。
  2. 根据权利要求1所述的基于用户填写验证码来进行图片识别的方法,其特征在于,所述接收用户对验证码图片识别后输入的用户识别名词之后,还包括:
    记录用户本次登录成功与否的结果;
    所述方法还包括步骤:
    根据用户连续登录成功的次数,为识别记录设置额外加权分数;
    所述识别记录的加权分数还包括所述额外加权分数。
  3. 根据权利要求1或2所述的基于用户填写验证码来进行图片识别的方法,其特征在于,所述根据待识别图片对应的所有已记录的识别记录及其加权分数,识别出待识别图片的图片名词之前,还包括:
    删除加权分数小于等于设定阈值的识别记录。
  4. 根据权利要求3所述的基于用户填写验证码来进行图片识别的方法,其特征在于,所述方法还包括步骤:
    根据用户历史信用评分,对所述加权分数进行修正,修正公式如下:
    F=round((F0+Y+Z)/3,2)
    其中F为修正后的加权分数,F0为修正前的加权分数,Y为用户历史信用评分,Z为基础分。
  5. 根据权利要求1所述的基于用户填写验证码来进行图片识别的方法,其特征在于,所述根据待识别图片对应的所有已记录的识别记录及其加权分数,识别出待识别图片的图片名词,包括:
    获取待识别图片对应的所有识别记录中加权分数排名靠前的M条识别记录,将相 同用户识别名词的识别记录进行合并,得到合并的识别记录,合并的识别记录包括该待识别图片的图片ID、对应的用户识别名词、相同用户识别名词次数及加权平均分数;
    根据合并的识别记录,筛选出相同用户识别名词次数最大的合并的识别记录的用户识别名词作为待识别图片的图片名词,当有两条以上相同用户识别名词次数最大的合并的识别记录时,以加权平均分数大的合并的识别记录的用户识别名词作为待识别图片的图片名词,当两条以上相同用户识别名词次数最大的合并的加权平均分数相同时,提交给人工识别。
  6. 根据权利要求1所述的基于用户填写验证码来进行图片识别的方法,其特征在于,所述待识别图片对应有为其设置的显示次数,所述向用户发送包括至少一张待识别图片和多张已知图片作为验证码图片,还包括步骤:
    验证所述待识别图片提交作为验证码图片的次数是否达到所述显示次数,当达到所述显示次数时,不再提交该图片作为验证码图片。
  7. 一种基于用户填写验证码来进行图片识别的装置,其特征在于,所述装置包括:
    验证码图片发送模块,用于向用户发送包括至少一张待识别图片和多张已知图片作为验证码图片;
    接收模块,用于接收用户对验证码图片识别后输入的用户识别名词,记录一条待识别图片对应的识别记录,该识别记录包括该待识别图片的图片ID及用户输入的用户识别名词;
    加权模块,用于根据已知图片及其图片名词判断用户输入的用户识别名词是否与已知图片匹配,并根据与已知图片的匹配次数,为识别记录设置加权分数;
    识别模块,用于根据待识别图片对应的所有已记录的识别记录及其加权分数,识别出待识别图片的图片名词。
  8. 根据权利要求7所述的基于用户填写验证码来进行图片识别的装置,其特征在于,所述接收模块还用于记录用户本次登录成功与否的结果;
    则所述加权模块还根据用户连续登录成功的次数,为识别记录设置额外加权分数;所述识别记录的加权分数还包括所述额外加权分数。
  9. 根据权利要求7或8所述的基于用户填写验证码来进行图片识别的装置,其特征在于,所述加权模块还用于删除加权分数小于等于设定阈值的识别记录。
  10. 根据权利要求9所述的基于用户填写验证码来进行图片识别的装置,其特征在于,所述加权模块还用于根据用户历史信用评分,对所述加权分数进行修正,修正公式 如下:
    F=round((F0+Y+Z)/3,2)
    其中F为修正后的加权分数,F0为修正前的加权分数,Y为用户历史信用评分,Z为基础分。
  11. 根据权利要求7所述的基于用户填写验证码来进行图片识别的装置,其特征在于,所述识别模块根据待识别图片对应的所有已记录的识别记录及其加权分数,识别出待识别图片的图片名词,执行如下操作:
    获取待识别图片对应的所有识别记录中加权分数排名靠前的M条识别记录,将相同用户识别名词的识别记录进行合并,得到合并的识别记录,合并的识别记录包括该待识别图片的图片ID、对应的用户识别名词、相同用户识别名词次数及加权平均分数;
    根据合并的识别记录,筛选出相同用户识别名词次数最大的合并的识别记录的用户识别名词作为待识别图片的图片名词,当有两条以上相同用户识别名词次数最大的合并的识别记录时,以加权平均分数大的合并的识别记录的用户识别名词作为待识别图片的图片名词,当两条以上相同用户识别名词次数最大的合并的加权平均分数相同时,提交给人工识别。
  12. 根据权利要求7所述的基于用户填写验证码来进行图片识别的装置,其特征在于,所述待识别图片对应有为其设置的显示次数,所述验证码图片发送模块还用于验证所述待识别图片提交作为验证码图片的次数是否达到所述显示次数,当达到所述显示次数时,不再提交该图片作为验证码图片。
PCT/CN2016/101731 2015-10-20 2016-10-11 一种基于用户填写验证码来进行图片识别的方法及装置 Ceased WO2017067398A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510683529.2 2015-10-20
CN201510683529.2A CN106599671B (zh) 2015-10-20 2015-10-20 一种基于用户填写验证码来进行图片识别的方法及装置

Publications (1)

Publication Number Publication Date
WO2017067398A1 true WO2017067398A1 (zh) 2017-04-27

Family

ID=58554792

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/101731 Ceased WO2017067398A1 (zh) 2015-10-20 2016-10-11 一种基于用户填写验证码来进行图片识别的方法及装置

Country Status (2)

Country Link
CN (1) CN106599671B (zh)
WO (1) WO2017067398A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107301342A (zh) * 2017-08-10 2017-10-27 佛山市三水区彦海通信工程有限公司 一种触摸屏解锁方法
CN108461129B (zh) * 2018-03-05 2022-05-20 余夏夏 一种基于图像认证的医学影像标注方法、装置和用户终端
CN110808961B (zh) * 2019-10-16 2022-02-01 上海易点时空网络有限公司 用于安全验证的数据处理方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060274369A1 (en) * 2005-06-03 2006-12-07 Yohei Yamamoto Document-management device and document-management method
CN101388078A (zh) * 2008-09-27 2009-03-18 腾讯科技(深圳)有限公司 基于验证的文本识别的方法及装置
CN102467653A (zh) * 2010-10-29 2012-05-23 方正国际软件(北京)有限公司 一种图文识别方法及系统
CN103186781A (zh) * 2011-12-31 2013-07-03 北京新媒传信科技有限公司 文本识别方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060274369A1 (en) * 2005-06-03 2006-12-07 Yohei Yamamoto Document-management device and document-management method
CN101388078A (zh) * 2008-09-27 2009-03-18 腾讯科技(深圳)有限公司 基于验证的文本识别的方法及装置
CN102467653A (zh) * 2010-10-29 2012-05-23 方正国际软件(北京)有限公司 一种图文识别方法及系统
CN103186781A (zh) * 2011-12-31 2013-07-03 北京新媒传信科技有限公司 文本识别方法

Also Published As

Publication number Publication date
CN106599671A (zh) 2017-04-26
CN106599671B (zh) 2020-02-07

Similar Documents

Publication Publication Date Title
CN111859140B (zh) 一种知识推荐的方法、装置、推荐设备及可读存储介质
US10810499B2 (en) Method and apparatus for recommending social media information
US9390378B2 (en) System and method for high accuracy product classification with limited supervision
US10606987B2 (en) Role-based access control assignment
US9262642B1 (en) Adaptive client-aware session security as a service
US9501580B2 (en) Method and apparatus for automated selection of interesting content for presentation to first time visitors of a website
US20190132352A1 (en) Nearline clustering and propagation of entity attributes in anti-abuse infrastructures
CN106815515A (zh) 一种基于轨迹验证的验证码实现方法及装置
US11403387B2 (en) Systems and methods for authenticating user information
CN106485261B (zh) 一种图像识别的方法和装置
US11989964B2 (en) Techniques for graph data structure augmentation
CN107807941A (zh) 信息处理方法和装置
WO2019061664A1 (zh) 电子装置、基于用户上网数据的产品推荐方法及存储介质
US8351688B2 (en) Categorization quality through the combination of multiple categorizers
CN113326368A (zh) 作答数据的处理方法、装置、设备以及存储介质
CN104239285A (zh) 文章新章节的检测方法及装置
WO2017067398A1 (zh) 一种基于用户填写验证码来进行图片识别的方法及装置
CN111984848A (zh) 一种基于分布式的网络自适应分类爬虫方法
CN114386013B (zh) 学籍自动认证方法、装置、计算机设备及存储介质
CN109194689A (zh) 异常行为识别方法、装置、服务器及存储介质
CN113066024B (zh) 图像模糊检测模型的训练方法、图像模糊检测方法及装置
CN108804501A (zh) 一种检测有效信息的方法及装置
WO2019056501A1 (zh) 个性化Wi-Fi热点推送方法、装置及存储介质
EP4160553B1 (en) Large pose facial recognition based on 3d facial model
CN107704580A (zh) 基于用户时期的问答推送方法、装置、服务器及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16856831

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16856831

Country of ref document: EP

Kind code of ref document: A1