[go: up one dir, main page]

CN108734099A - Auth method and device, electronic equipment, computer program and storage medium - Google Patents

Auth method and device, electronic equipment, computer program and storage medium Download PDF

Info

Publication number
CN108734099A
CN108734099A CN201810339543.4A CN201810339543A CN108734099A CN 108734099 A CN108734099 A CN 108734099A CN 201810339543 A CN201810339543 A CN 201810339543A CN 108734099 A CN108734099 A CN 108734099A
Authority
CN
China
Prior art keywords
face image
identification code
identity verification
person
verified
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.)
Pending
Application number
CN201810339543.4A
Other languages
Chinese (zh)
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.)
Shenzhen Sensetime Technology Co Ltd
Original Assignee
Shenzhen Sensetime Technology Co 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 Shenzhen Sensetime Technology Co Ltd filed Critical Shenzhen Sensetime Technology Co Ltd
Priority to CN201810339543.4A priority Critical patent/CN108734099A/en
Publication of CN108734099A publication Critical patent/CN108734099A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Collating Specific Patterns (AREA)

Abstract

本发明实施例公开了一种身份验证方法和装置、电子设备、计算机程序和存储介质。其中,方法包括获取所述标识码中的第一人脸图像;获取待验证人的第二人脸图像;根据所述第一人脸图像与所述第二人脸图像进行人脸比对,得到比对结果;根据所述比对结果得到最终的身份验证结果。本发明实施例提高了身份验证的灵活性,扩大了身份验证的应用场景。

The embodiment of the invention discloses an identity verification method and device, electronic equipment, computer program and storage medium. Wherein, the method includes obtaining the first face image in the identification code; obtaining the second face image of the person to be verified; performing face comparison according to the first face image and the second face image, A comparison result is obtained; and a final identity verification result is obtained according to the comparison result. The embodiments of the present invention improve the flexibility of identity verification and expand the application scenarios of identity verification.

Description

身份验证方法和装置、电子设备、计算机程序和存储介质Authentication method and device, electronic device, computer program and storage medium

技术领域technical field

本发明属于计算机视觉技术领域,特别是涉及一种身份验证方法和装置、电子设备、计算机程序和存储介质。The invention belongs to the technical field of computer vision, and in particular relates to an identity verification method and device, electronic equipment, a computer program and a storage medium.

背景技术Background technique

人脸识别,也称为人像识别或者面部识别,是一种基于人的脸部特征信息进行身份识别的生物识别技术,是通过对包含人脸的图像或者视频流,自动检测和跟踪人脸,对检测到的人脸进行脸部的一系列相关技术。近年来,随着机器学习技术的兴起和在人脸识别领域的普及和应用,促进了人脸识别技术的发展和成熟。Face recognition, also known as portrait recognition or facial recognition, is a biometric technology for identifying people based on facial feature information. It automatically detects and tracks faces through images or video streams containing faces. A series of related techniques for performing face detection on detected faces. In recent years, with the rise of machine learning technology and the popularization and application in the field of face recognition, the development and maturity of face recognition technology has been promoted.

由于人的脸部特征是人本身固有的生物特征之一,因此可以将人脸识别作为一项身份鉴别技术应用于人的身份验证。Since a person's facial features are one of the inherent biological characteristics of a person, face recognition can be used as an identification technology for people's identity verification.

发明内容Contents of the invention

本发明实施例提供一种身份验证技术方案。An embodiment of the present invention provides an identity verification technical solution.

根据本发明实施例的一个方面,提供一种身份验证方法,包括:According to an aspect of an embodiment of the present invention, an identity verification method is provided, including:

获取标识码中的第一人脸图像;Obtain the first face image in the identification code;

获取待验证人的第二人脸图像;Obtain the second face image of the person to be verified;

根据所述第一人脸图像与所述第二人脸图像进行人脸比对,得到比对结果;performing face comparison according to the first face image and the second face image to obtain a comparison result;

根据所述比对结果得到最终的身份验证结果。A final identity verification result is obtained according to the comparison result.

可选地,在本发明上述方法实施例中,所述根据所述第一人脸图像与所述第二人脸图像进行人脸比对,得到比对结果,包括:Optionally, in the above method embodiment of the present invention, performing face comparison according to the first face image and the second face image to obtain a comparison result includes:

对所述第一人脸图像进行特征提取,得到第一人脸特征数据;performing feature extraction on the first face image to obtain first face feature data;

对所述第二人脸图像进行特征提取,得到第二人脸特征数据;performing feature extraction on the second face image to obtain second face feature data;

确定所述第一人脸特征数据与所述第二人脸特征数据之间的相似度;determining the similarity between the first facial feature data and the second facial feature data;

将所述相似度作为所述比对结果。The similarity is taken as the comparison result.

可选地,在本发明上述任一方法实施例中,所述根据所述比对结果得到最终的身份验证结果,包括:Optionally, in any of the above-mentioned method embodiments of the present invention, said obtaining the final identity verification result according to the comparison result includes:

将所述相似度大于预设阈值确定为身份验证成功;Determining that the similarity is greater than a preset threshold as successful identity verification;

将所述相似度小于或等于所述预设阈值确定为身份验证失败。Determining that the similarity is less than or equal to the preset threshold as identity verification failure.

可选地,在本发明上述任一方法实施例中,所述根据所述比对结果得到最终的身份验证结果之后,还包括:Optionally, in any of the above-mentioned method embodiments of the present invention, after the final identity verification result is obtained according to the comparison result, it further includes:

显示所述第一人脸图像、所述第二人脸图像和所述身份验证结果。displaying the first face image, the second face image and the identity verification result.

可选地,在本发明上述任一方法实施例中,在所述获取所述标识码中的第一人脸图像之前,还包括:Optionally, in any of the above-mentioned method embodiments of the present invention, before the acquisition of the first face image in the identification code, further includes:

生成所述标识码,并将所述标识码发送至移动终端设备上显示,或者将所述标识码设置于证卡上。Generate the identification code, and send the identification code to the mobile terminal device for display, or set the identification code on the card.

可选地,在本发明上述任一方法实施例中,当所述标识码印制于证卡上时,所述获取标识码中的第一人脸图像之前,还包括:Optionally, in any of the above method embodiments of the present invention, when the identification code is printed on the card, before acquiring the first face image in the identification code, further includes:

获取当前证卡的属性,所述属性包括内置芯片型证卡和非内置芯片型证卡;Acquiring the attributes of the current card, the attributes include a built-in chip-type card and a non-built-in chip-type card;

当所述当前证卡为非内置芯片型证卡时,获取所述标识码中的第一人脸图像。When the current card is a card without a built-in chip, the first face image in the identification code is acquired.

可选地,在本发明上述任一方法实施例中,所述生成所述标识码,包括:Optionally, in any one of the above method embodiments of the present invention, the generating the identification code includes:

获取待验证人的身份信息;Obtain the identity information of the person to be verified;

根据所述身份信息生成所述标识码。The identification code is generated according to the identity information.

可选地,在本发明上述任一方法实施例中,所述获取待验证人的身份信息,包括:Optionally, in any one of the above method embodiments of the present invention, the acquiring the identity information of the person to be verified includes:

利用芯片识别器获取待验证人的身份证中的内置人脸图像;Use the chip recognizer to obtain the built-in face image in the ID card of the person to be verified;

获取所述待验证人的当前人脸图像;Obtain the current face image of the person to be verified;

将所述内置人脸图像与所述当前人脸图像进行人脸比对,获取比对结果;Perform face comparison between the built-in face image and the current face image to obtain a comparison result;

当所述比对结果大于预设阈值时,将所述当前人脸图像作为所述待验证人的身份信息。When the comparison result is greater than a preset threshold, the current face image is used as the identity information of the person to be verified.

可选地,在本发明上述任一方法实施例中,所述获取待验证人的身份信息,还包括:Optionally, in any one of the above method embodiments of the present invention, said obtaining the identity information of the person to be verified further includes:

利用所述芯片识别器获取待验证人的身份证中的内置文字信息;Using the chip identifier to obtain the built-in text information in the ID card of the person to be verified;

将所述内置文字信息作为所述待验证人的身份信息。The built-in text information is used as the identity information of the person to be verified.

可选地,在本发明上述任一方法实施例中,还包括:Optionally, in any of the above method embodiments of the present invention, further comprising:

获取所述标识码中的文字信息;Obtain the text information in the identification code;

显示所述文字信息。Display the text information.

可选地,在本发明上述任一方法实施例中,所述生成所述标识码,包括:Optionally, in any one of the above method embodiments of the present invention, the generating the identification code includes:

获取预先存储的待验证人的人脸照片;Obtain the pre-stored face photo of the person to be verified;

根据所述人脸照片生成所述标识码。The identification code is generated according to the face photo.

可选地,在本发明上述任一方法实施例中,所述标识码包括二维码和条形码。Optionally, in any one of the foregoing method embodiments of the present invention, the identification code includes a two-dimensional code and a barcode.

根据本发明实施例的另一个方面,提供一种身份验证装置,包括:According to another aspect of the embodiments of the present invention, an identity verification device is provided, including:

标识码识别器,用于获取所述标识码中的第一人脸图像;An identification code recognizer, configured to obtain the first face image in the identification code;

图像采集器,用于获取待验证人的第二人脸图像;An image collector, used to obtain the second face image of the person to be verified;

图像比对单元,用于根据所述第一人脸图像与所述第二人脸图像进行人脸比对,得到比对结果;An image comparison unit, configured to perform face comparison based on the first face image and the second face image to obtain a comparison result;

身份验证单元,用于根据所述比对结果得到最终的身份验证结果。An identity verification unit, configured to obtain a final identity verification result according to the comparison result.

可选地,在本发明上述装置实施例中,所述图像比对单元,用于对所述第一人脸图像进行特征提取,得到第一人脸特征数据;对所述第二人脸图像进行特征提取,得到第二人脸特征数据;确定所述第一人脸特征数据与所述第二人脸特征数据之间的相似度;以及将所述相似度作为所述比对结果。Optionally, in the above device embodiment of the present invention, the image comparison unit is configured to perform feature extraction on the first face image to obtain first face feature data; Perform feature extraction to obtain second facial feature data; determine the similarity between the first facial feature data and the second facial feature data; and use the similarity as the comparison result.

可选地,在本发明上述任一装置实施例中,所述身份验证单元,用于将所述相似度大于预设阈值确定为身份验证成功;以及将所述相似度小于或等于所述预设阈值确定为身份验证失败。Optionally, in any of the above-mentioned device embodiments of the present invention, the identity verification unit is configured to determine that the similarity is greater than a preset threshold as successful identity verification; and determine that the similarity is less than or equal to the preset threshold. Let the threshold determine authentication failures.

可选地,在本发明上述任一装置实施例中,还包括:Optionally, in any of the above-mentioned device embodiments of the present invention, it also includes:

信息显示单元,用于显示所述第一人脸图像、所述第二人脸图像和所述身份验证结果。An information display unit, configured to display the first face image, the second face image and the identity verification result.

可选地,在本发明上述任一装置实施例中,还包括:Optionally, in any of the above-mentioned device embodiments of the present invention, it also includes:

标识码生成单元,用于生成所述标识码,并将所述标识码发送至移动终端设备上显示,或者将所述标识码设置于证卡上。The identification code generation unit is configured to generate the identification code, and send the identification code to the mobile terminal device for display, or set the identification code on the card.

可选地,在本发明上述任一装置实施例中,还包括:Optionally, in any of the above-mentioned device embodiments of the present invention, it also includes:

属性获取单元,用于获取当前证卡的属性,所述属性包括内置芯片型证卡和非内置芯片型证卡;An attribute acquiring unit, configured to acquire the attributes of the current card, the attributes including built-in chip-type cards and non-built-in chip-type cards;

所述标识码识别器,用于当所述当前证卡为非内置芯片型证卡时,获取所述标识码中的第一人脸图像。The identification code recognizer is used to obtain the first human face image in the identification code when the current card is a card without a built-in chip.

可选地,在本发明上述任一装置实施例中,所述标识码生成单元,用于获取用户的身份信息;以及根据所述身份信息生成所述标识码。Optionally, in any one of the above device embodiments of the present invention, the identification code generation unit is configured to obtain identity information of the user; and generate the identification code according to the identity information.

可选地,在本发明上述任一装置实施例中,还包括:Optionally, in any of the above-mentioned device embodiments of the present invention, it also includes:

芯片识别器,用于获取待验证人的身份证中的内置人脸图像;The chip recognizer is used to obtain the built-in face image in the ID card of the person to be verified;

所述图像采集器,还用于获取所述待验证人的当前人脸图像;The image collector is also used to acquire the current face image of the person to be verified;

所述图像比对单元,还用于将所述内置人脸图像与所述当前人脸图像进行人脸比对,获取比对结果;The image comparison unit is also used to perform face comparison between the built-in face image and the current face image to obtain a comparison result;

所述标识码生成单元,用于当所述比对结果大于预设阈值时,将所述当前人脸图像作为所述待验证人的身份信息。The identification code generating unit is configured to use the current face image as the identity information of the person to be verified when the comparison result is greater than a preset threshold.

可选地,在本发明上述任一装置实施例中,所述芯片识别器,还用于获取待验证人的身份证中的内置文字信息;Optionally, in any of the above-mentioned device embodiments of the present invention, the chip identifier is also used to obtain the built-in text information in the ID card of the person to be verified;

所述标识码生成单元,还用于将所述内置文字信息作为所述待验证人的身份信息。The identification code generating unit is further configured to use the built-in text information as the identity information of the person to be verified.

可选地,在本发明上述任一装置实施例中,所述标识码识别器,还用于获取所述标识码中的文字信息。Optionally, in any one of the above device embodiments of the present invention, the identification code recognizer is further configured to obtain text information in the identification code.

所述信息显示单元,还用于显示所述文字信息。The information display unit is also used to display the text information.

可选地,在本发明上述任一装置实施例中,所述标识码生成单元,用于获取预先存储的用户的人脸照片;以及根据所述人脸照片生成所述标识码。Optionally, in any one of the above-mentioned device embodiments of the present invention, the identification code generation unit is configured to obtain a pre-stored face photo of the user; and generate the identification code according to the face photo.

可选地,在本发明上述任一装置实施例中,所述标识码包括二维码和条形码。Optionally, in any one of the above device embodiments of the present invention, the identification code includes a two-dimensional code and a barcode.

根据本发明实施例的又一个方面,提供的一种电子设备,包括上述任一实施例所述的装置。According to yet another aspect of the embodiments of the present invention, there is provided an electronic device, including the apparatus described in any one of the foregoing embodiments.

根据本发明实施例的再一个方面,提供的一种电子设备,包括:According to still another aspect of the embodiments of the present invention, an electronic device is provided, including:

存储器,用于存储可执行指令;以及memory for storing executable instructions; and

处理器,用于与所述存储器通信以执行所述可执行指令从而完成上述任一实施例所述的方法。A processor, configured to communicate with the memory to execute the executable instructions so as to complete the method described in any one of the above embodiments.

根据本发明实施例的再一个方面,提供的一种计算机程序,包括计算机可读代码,当所述计算机可读代码在设备上运行时,所述设备中的处理器执行用于实现上述任一实施例所述方法的指令。According to still another aspect of the embodiments of the present invention, a computer program is provided, including computer readable codes. When the computer readable codes run on a device, a processor in the device executes any of the above Instructions for the methods described in the Examples.

根据本发明实施例的再一个方面,提供的一种计算机程序产品,用于存储计算机可读指令,所述指令被执行时使得计算机执行上述任一实施例所述的方法。According to still another aspect of the embodiments of the present invention, a computer program product is provided, which is used for storing computer-readable instructions, and when the instructions are executed, the computer executes the method described in any of the above-mentioned embodiments.

在一个可选实施方式中,所述计算机程序产品具体为计算机存储介质,在另一个可选实施方式中,所述计算机程序产品具体为软件产品,例如SDK等。In an optional implementation manner, the computer program product is specifically a computer storage medium, and in another optional implementation manner, the computer program product is specifically a software product, such as an SDK.

基于本发明上述实施例提供的身份验证方法和装置、电子设备、计算机程序和存储介质,通过将采集的标识码中的人脸图像,与实时采集的人脸图像进行人脸比对,可以在需要多次进行身份验证时,不使用身份证而直接通过标识码进行身份验证,从而可以有效避免由于身份证多次使用而容易造成身份证遗失的问题,同时也可以实现在没有芯片读卡器的情况下对持证人身份的验证,从而可以有效防止人证不一致,盗用他人身份的情况。由于可以脱离证件以及使用未内置芯片的证件进行身份验证,因此可以使身份验证更加灵活,扩大身份验证的应用场景。Based on the identity verification method and device, electronic equipment, computer program and storage medium provided by the above-mentioned embodiments of the present invention, by comparing the face image in the collected identification code with the face image collected in real time, it can be When identity verification is required for multiple times, identity verification is performed directly through the identification code without using the ID card, which can effectively avoid the problem of ID card loss due to the multiple use of the ID card, and can also be implemented without a chip card reader. The verification of the identity of the certificate holder under the circumstances, which can effectively prevent the inconsistency of the witness certificate and the theft of other people's identity. Since it can be separated from the certificate and the certificate without a built-in chip can be used for identity verification, it can make the identity verification more flexible and expand the application scenarios of the identity verification.

附图说明Description of drawings

构成说明书的一部分的附图描述了本发明的实施例,并且连同描述一起用于解释本发明的原理。The accompanying drawings, which constitute a part of this specification, illustrate embodiments of the invention and, together with the description, serve to explain principles of the invention.

参照附图,根据下面的详细描述,可以更加清楚地理解本发明,其中:The present invention can be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:

图1是本发明一些实施例提供的身份验证方法的流程图;Fig. 1 is a flowchart of an identity verification method provided by some embodiments of the present invention;

图2是本发明另一些实施例提供的身份验证方法的流程图;Fig. 2 is a flowchart of an identity verification method provided by another embodiment of the present invention;

图3是本发明一些实施例提供的身份验证装置的结构示意图;Fig. 3 is a schematic structural diagram of an identity verification device provided by some embodiments of the present invention;

图4是本发明另一些实施例提供的身份验证装置的结构示意图;Fig. 4 is a schematic structural diagram of an identity verification device provided by another embodiment of the present invention;

图5是本发明实施例电子设备一个实施例的结构示意图。Fig. 5 is a schematic structural diagram of an embodiment of an electronic device according to an embodiment of the present invention.

具体实施方式Detailed ways

现在将参照附图来详细描述本发明的各种示例性实施例。应注意到:除非另外具体说明,否则在这些实施例中阐述的部件的相对布置、数字表达式和数值不限制本发明的范围。Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.

同时,应当明白,为了便于描述,附图中所示出的各个部分的尺寸并不是按照实际的比例关系绘制的。At the same time, it should be understood that, for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本发明及其应用或使用的任何限制。The following description of at least one exemplary embodiment is merely illustrative in nature and in no way taken as limiting the invention, its application or uses.

对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,所述技术、方法和设备应当被视为说明书的一部分。Techniques, methods and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, such techniques, methods and devices should be considered part of the description.

应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。It should be noted that like numerals and letters denote like items in the following figures, therefore, once an item is defined in one figure, it does not require further discussion in subsequent figures.

本发明实施例可以应用于计算机系统/服务器,其可与众多其它通用或专用计算系统环境或配置一起操作。适于与计算机系统/服务器一起使用的众所周知的计算系统、环境和/或配置的例子包括但不限于:个人计算机系统、服务器计算机系统、瘦客户机、厚客户机、手持或膝上设备、基于微处理器的系统、机顶盒、可编程消费电子产品、网络个人电脑、小型计算机系统﹑大型计算机系统和包括上述任何系统的分布式云计算技术环境,等等。Embodiments of the invention may be applied to computer systems/servers that are operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well-known computing systems, environments and/or configurations suitable for use with computer systems/servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, Microprocessor-based systems, set-top boxes, programmable consumer electronics, networked personal computers, minicomputer systems, mainframe computer systems, and distributed cloud computing technology environments including any of the above, etc.

计算机系统/服务器可以在由计算机系统执行的计算机系统可执行指令(诸如程序模块)的一般语境下描述。通常,程序模块可以包括例程、程序、目标程序、组件、逻辑、数据结构等等,它们执行特定的任务或者实现特定的抽象数据类型。计算机系统/服务器可以在分布式云计算环境中实施,分布式云计算环境中,任务是由通过通信网络链接的远程处理设备执行的。在分布式云计算环境中,程序模块可以位于包括存储设备的本地或远程计算系统存储介质上。Computer systems/servers may be described in the general context of computer system-executable instructions, such as program modules, being executed by the computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc., that perform particular tasks or implement particular abstract data types. The computer system/server can be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computing system storage media including storage devices.

目前,电信行业营业厅、银行、酒店、网吧、机场、车站等广泛使用身份验证的场所,大多是通过芯片识别器获取身份证内置的芯片信息,然后将芯片信息中内存的照片与摄像头现场采集的持证人的图像进行比对,来验证人证的一致性,这种身份验证速度快,准确率高,可以有效防止人证不一致,盗用他人身份的情况。然而,在一些场景中,往往需要多次进行身份验证,这样就需要多次使用身份证,很容易造成身份证遗失。另外,当未随身携带身份证件时,无法使用其他无芯片证卡进行身份验证。At present, places such as business halls in the telecommunications industry, banks, hotels, Internet cafes, airports, and stations are widely used for identity verification. Most of them use chip identifiers to obtain the chip information built into the ID card. Compare the images of the certificate holders to verify the consistency of the witnesses. This kind of identity verification is fast and accurate, and can effectively prevent the inconsistency of the witnesses and the theft of other people's identities. However, in some scenarios, identity verification often needs to be performed multiple times, so that the ID card needs to be used multiple times, and the ID card is easily lost. Also, other chipless cards cannot be used for authentication when ID is not with you.

为了解决上述问题,本发明实施例提出了一种身份验证方法,下面将结合图1,详细描述本发明实施例提出的身份验证方法的流程。In order to solve the above problems, an embodiment of the present invention proposes an identity verification method. The flow of the identity verification method proposed in the embodiment of the present invention will be described in detail below with reference to FIG. 1 .

应理解,图1所示的例子仅仅是为了帮助本领域技术人员更好地理解本发明的技术方案,而不应理解成对本发明的限定。本领域技术人员可以在图1的基础上进行各种变换,而这种变换也应理解成本发明技术方案的一部分。It should be understood that the example shown in FIG. 1 is only intended to help those skilled in the art better understand the technical solutions of the present invention, and should not be construed as limiting the present invention. Those skilled in the art can perform various transformations on the basis of FIG. 1 , and such transformations should also be understood as part of the technical solution of the present invention.

如图1所示,该方法包括:As shown in Figure 1, the method includes:

102,获取标识码中的第一人脸图像。102. Acquire the first face image in the identification code.

可选地,标识码可以是指二维码和条形码等,按照一定的码制进行编码,并通过扫描进行自动识别的,具有唯一标识性的代码,本发明实施例对于标识码的类型和设置位置不做限定。Optionally, the identification code may refer to a two-dimensional code and a bar code, etc., which are coded according to a certain code system and automatically identified by scanning, and have a unique identification code. The embodiment of the present invention is concerned with the type and setting of the identification code The location is not limited.

在一个可选的例子中,标识码可以是固定的标识码,可以将该标识码以图片的形式存储于移动终端设备中,在使用时调取图片并将其显示于移动终端设备上,也可以在使用时获取随机的标识码并显示于移动终端设备上,例如:在使用时可以通过小程序或者APP等获取随机的标识码。In an optional example, the identification code can be a fixed identification code, and the identification code can be stored in the mobile terminal device in the form of a picture, and the picture can be called and displayed on the mobile terminal device during use, or A random identification code can be obtained during use and displayed on the mobile terminal device. For example, a random identification code can be obtained through a small program or APP during use.

在另一个可选的例子中,标识码可以是印制于证卡上的标识码,证卡可以是指各种证件、卡片、执照和票证的总称,也可以是印制于除证卡外的其它物体上标识码,例如:标识码可以印制于纸张上。In another optional example, the identification code can be the identification code printed on the card, and the card can refer to the general name of various certificates, cards, licenses and tickets, or it can be printed on other than the card. Identification codes on other objects, for example: identification codes can be printed on paper.

可选地,在标识码中可以包含第一人脸图像或者第一人脸图像的存储地址链接。Optionally, the identification code may include the first face image or a storage address link of the first face image.

104,获取待验证人的第二人脸图像。104. Acquire a second face image of the person to be verified.

可选地,第二人脸图像可以是现场实时采集的图像,可以通过摄像头或者数码相机等拍摄待验证人,获取第二人脸图像,本发明实施例对此不做限定。Optionally, the second face image may be an image collected in real time on site, and the person to be verified may be photographed by a camera or a digital camera to obtain the second face image, which is not limited in this embodiment of the present invention.

106,根据第一人脸图像与第二人脸图像进行人脸比对,得到比对结果。106. Perform face comparison according to the first face image and the second face image, and obtain a comparison result.

可选地,可以对第一人脸图像进行特征提取,得到第一人脸特征数据,以及对第二人脸图像进行特征提取,得到第二人脸特征数据,确定第一人脸特征数据与第二人脸特征数据之间的相似度,将相似度作为比对结果。Optionally, feature extraction can be performed on the first face image to obtain the first face feature data, and feature extraction can be performed on the second face image to obtain the second face feature data, and determine the first face feature data and The similarity between the second face feature data is used as the comparison result.

可选地,可以通过神经网络或者其他机器学习的方法对第一人脸图像和第二人脸图像进行人脸比对。在一个可选的例子中,神经网络可以采用卷积神经网络。可选地,也可以采用其它类型的神经网络,本发明实施例对此不做限定。Optionally, face comparison may be performed on the first face image and the second face image by using a neural network or other machine learning methods. In an optional example, the neural network may be a convolutional neural network. Optionally, other types of neural networks may also be used, which is not limited in this embodiment of the present invention.

可选地,可以通过欧氏距离或者其它的相似度确定原则确定相似度,本发明实施例对此不做限定。Optionally, the similarity may be determined by Euclidean distance or other similarity determination principles, which is not limited in this embodiment of the present invention.

108,根据比对结果得到最终的身份验证结果。108. Obtain a final identity verification result according to the comparison result.

可选地,可以通过将相似度与预设阈值进行比较,得到最终的身份验证结果。例如,当将相似度大于预设阈值时,确定为身份验证成功,即待验证人与标识码中人脸图像中的人为同一人,当相似度小于或等于预设阈值时,确定为身份验证失败,即待验证人与标识码中人脸图像中的人为不同人。其中,预设阈值可以根据统计确定或者通过其它方法确定,本发明实施例对此不做限定。Optionally, the final identity verification result can be obtained by comparing the similarity with a preset threshold. For example, when the similarity is greater than the preset threshold, it is determined that the identity verification is successful, that is, the person to be verified is the same person as the person in the face image in the identification code, and when the similarity is less than or equal to the preset threshold, it is determined as identity verification Failed, that is, the person to be verified is different from the person in the face image in the identification code. Wherein, the preset threshold may be determined according to statistics or through other methods, which is not limited in this embodiment of the present invention.

可选地,在根据第一人脸图像与第二人脸图像的人脸比对结果,得到最终的身份验证结果之后,还可以显示第一人脸图像、第二人脸图像和身份验证结果。例如:以“验证成功/验证失败”的文字信息,或者图标标识身份验证结果。Optionally, after the final identity verification result is obtained according to the face comparison result of the first face image and the second face image, the first face image, the second face image and the identity verification result can also be displayed . For example: the text information of "authentication successful/authentication failed" or an icon to identify the authentication result.

在一个可选的例子中,在显示第一人脸图像、第二人脸图像和身份验证结果的同时,还可以显示第一人脸图像与第二人脸图像进行人脸比对的结果,例如:以百分数的形式表示的相似度值。In an optional example, while displaying the first face image, the second face image and the identity verification result, the face comparison result of the first face image and the second face image may also be displayed, Example: similarity value expressed as a percentage.

基于本发明上述实施例提供的身份验证方法,通过获取标识码中的第一人脸图像,以及获取待验证人的第二人脸图像,根据第一人脸图像与第二人脸图像进行人脸比对,得到比对结果,根据比对结果得到最终的身份验证结果,利用采集的标识码中的人脸图像,与实时采集的人脸图像进行人脸比对,可以在需要多次进行身份验证时,不使用身份证而直接通过标识码进行身份验证,从而可以有效避免由于身份证多次使用而容易造成身份证遗失的问题,同时也可以实现在没有芯片读卡器的情况下对持证人身份的验证,从而可以有效防止人证不一致,盗用他人身份的情况。由于可以脱离证件进行身份验证,因此可以使身份验证更加灵活,扩大身份验证的应用场景。Based on the identity verification method provided by the above-mentioned embodiments of the present invention, by obtaining the first face image in the identification code and the second face image of the person to be verified, the identity verification process is performed according to the first face image and the second face image. Face comparison, get the comparison result, get the final identity verification result according to the comparison result, use the face image in the collected identification code, and carry out face comparison with the face image collected in real time, which can be performed multiple times when needed In identity verification, identity verification is performed directly through the identification code without using the ID card, which can effectively avoid the problem of ID card loss due to the multiple use of the ID card, and can also realize authentication without a chip card reader. The verification of the identity of the certificate holder can effectively prevent the inconsistency of the witness certificate and the theft of other people's identity. Since identity verification can be performed without certificates, it can make identity verification more flexible and expand the application scenarios of identity verification.

可选地,在上述各实施例中,在当标识码印制于证卡上时,在获取标识码中的第一人脸图像之前,还可以获取当前证卡的属性,其中证卡的属性包括内置芯片型证卡和非内置芯片型证卡。当当前证卡为非内置芯片型证卡时,可以执行上述各实施例中的操作进行身份验证,即从获取标识码中的第一人脸图像,开始执行直至得到最终的身份验证结果。通过对证卡的属性按照是否内置芯片进行区分,可以根据当前证卡的属性来确定身份验证的方法,从而使所采用的身份验证方法与当前证卡相匹配。Optionally, in the above embodiments, when the identification code is printed on the card, before acquiring the first face image in the identification code, the attributes of the current card can also be obtained, wherein the attributes of the card Includes both chip-on and non-chip-on cards. When the current card is a card without a built-in chip, the operations in the above embodiments can be performed for identity verification, that is, starting from obtaining the first face image in the identification code until the final identity verification result is obtained. By distinguishing the attributes of the card according to whether there is a built-in chip, the identity verification method can be determined according to the attributes of the current card, so that the adopted identity verification method matches the current card.

可选地,当当前证卡为内置芯片型证卡时,还可以利用芯片识别器获取当前证卡的芯片信息,其中芯片信息中包含内存的人脸图像,以及获取待验证人的第二人脸图像,将第二人脸图像与芯片信息中内存的人脸图像进行人脸比对,得到比对结果,根据比对结果得到身份验证结果。Optionally, when the current card is a built-in chip type card, the chip identifier of the current card can also be obtained by using the chip identifier, wherein the chip information includes the face image in the memory, and the second person to be verified can be obtained. For the face image, compare the second face image with the face image stored in the chip information to obtain a comparison result, and obtain an identity verification result according to the comparison result.

可选地,当当前证卡为内置芯片型证卡时,还可以利用芯片识别器获取当前证卡的芯片信息,其中芯片信息中包含内存的人脸图像,以及获取标识码中的第一人脸图像,将第一人脸图像与芯片信息中内存的人脸图像进行人脸比对,得到比对结果,根据比对结果获取当前证卡的真伪性。当当前证卡为真实证件时,可以获取待验证人的第二人脸图像,然后将芯片信息中内存的人脸图像或第一人脸图像与第二人脸图像进行比对,得到比对结果,并根据比对结果确定最终的身份验证结果。基于对证卡按照是否内置芯片进行区分,可以针对不同类型的证卡采用不同的身份验证方法进行身份验证,使得身份验证更加灵活。Optionally, when the current card is a card with a built-in chip, the chip identifier of the current card can also be used to obtain the chip information of the current card, wherein the chip information includes the face image in the memory, and the first person in the identification code can be obtained. The face image is compared with the first face image and the face image stored in the chip information to obtain a comparison result, and the authenticity of the current card is obtained according to the comparison result. When the current ID card is a real ID card, the second face image of the person to be verified can be obtained, and then the face image stored in the chip information or the first face image is compared with the second face image to obtain a comparison result, and determine the final identity verification result based on the comparison result. Based on the identification of cards based on whether they have a built-in chip, different authentication methods can be used for different types of cards, making identity verification more flexible.

可选地,在上述各实施例中,在获取标识码中的第一人脸图像之前,还可以生成标识码,并将标识码发送至移动终端设备上显示,或者将标识码设置于证卡上。Optionally, in each of the above embodiments, before acquiring the first face image in the identification code, the identification code can also be generated and sent to the mobile terminal device for display, or the identification code can be set on the card superior.

在一个可选的例子中,可以获取预先存储的待验证人的人脸照片,然后根据人脸照片生成标识码。在另一个可选的例子中,可以获取待验证人的身份信息,然后根据待验证人的身份信息生成标识码。下面将结合图2,详细描述本发明实施例提出的身份验证方法在生成标识码时获取待验证人的的身份信息的流程。In an optional example, a pre-stored face photo of the person to be verified can be obtained, and then an identification code is generated according to the face photo. In another optional example, the identity information of the person to be verified can be obtained, and then an identification code is generated according to the identity information of the person to be verified. The flow of obtaining the identity information of the person to be verified when the identity verification method proposed by the embodiment of the present invention is generated in the identification code will be described in detail below with reference to FIG. 2 .

应理解,图2所示的例子仅仅是为了帮助本领域技术人员更好地理解本发明的技术方案,而不应理解成对本发明的限定。本领域技术人员可以在图2的基础上进行各种变换,而这种变换也应理解成本发明技术方案的一部分。It should be understood that the example shown in FIG. 2 is only intended to help those skilled in the art better understand the technical solutions of the present invention, and should not be construed as limiting the present invention. Those skilled in the art can perform various transformations on the basis of FIG. 2 , and such transformations should also be understood as part of the technical solution of the present invention.

如图2所示,该方法包括:As shown in Figure 2, the method includes:

202,利用芯片识别器获取待验证人的身份证中的内置人脸图像。202. Use the chip recognizer to obtain the built-in face image in the ID card of the person to be verified.

可选地,芯片识别器可以采用非接触IC卡阅读技术,在通过内嵌的安全控制模块(Secure Access Module,SAM)以无线传输方式与卡证内专用的芯片进行安全认证后,将芯片中的信息读出。Optionally, the chip identifier can use non-contact IC card reading technology, and after security authentication with the dedicated chip in the card through the embedded security control module (Secure Access Module, SAM), the information is read out.

204,获取待验证人的当前人脸图像。204. Acquire the current face image of the person to be verified.

可选地,可以利用摄像头或者数码相机等拍摄待验证人,获取待验证人的当前人脸图像,本发明实施例对此不做限定。Optionally, a camera or a digital camera may be used to photograph the person to be verified to obtain a current face image of the person to be verified, which is not limited in this embodiment of the present invention.

206,将内置人脸图像与当前人脸图像进行人脸比对,获取比对结果。206. Perform face comparison between the built-in face image and the current face image, and obtain a comparison result.

可选地,可以对内置人脸图像进行特征提取,得到第三人脸特征数据,以及对当前人脸图像进行特征提取,得到第四人脸特征数据,确定第三人脸特征数据与第四人脸特征数据之间的相似度,将相似度作为比对结果。Optionally, feature extraction can be performed on the built-in face image to obtain the third face feature data, and feature extraction can be performed on the current face image to obtain the fourth face feature data, and the third face feature data and the fourth face feature data can be determined. The similarity between facial feature data is used as the comparison result.

可选地,可以通过神经网络或者其他机器学习的方法对内置人脸图像和当前人脸图像进行人脸比对。在一个可选的例子中,神经网络可以采用卷积神经网络。可选地,也可以采用其它类型的神经网络,本发明实施例对此不做限定。Optionally, the face comparison between the built-in face image and the current face image can be performed through a neural network or other machine learning methods. In an optional example, the neural network may be a convolutional neural network. Optionally, other types of neural networks may also be used, which is not limited in this embodiment of the present invention.

可选地,可以通过欧氏距离或者其它的相似度确定原则确定相似度,本发明实施例对此不做限定。Optionally, the similarity may be determined by Euclidean distance or other similarity determination principles, which is not limited in this embodiment of the present invention.

208,当比对结果大于预设阈值时,将当前人脸图像作为用户的身份信息。208. When the comparison result is greater than the preset threshold, use the current face image as the identity information of the user.

可选地,可以通过将比对结果与预设阈值进行比较,得到身份验证结果,根据身份验证结果确定用户的身份信息。例如,当将比对结果大于预设阈值时,确定为身份验证成功,当相似度小于或等于预设阈值的情况,确定为身份验证失败,可以将身份验证成功的当前人脸图像作为待验证人的身份信息。采用身份验证成功的当前人脸图像作为待验证人的身份信息,可以使标识码中的人脸图像为近期的人脸图像,并且可以与第二人脸图像的整体效果比较接近,以便于进行身份验证。其中,预设阈值可以根据统计确定或者通过其它方法确定,本发明实施例对此不做限定。Optionally, the identity verification result can be obtained by comparing the comparison result with a preset threshold, and the identity information of the user can be determined according to the identity verification result. For example, when the comparison result is greater than the preset threshold, it is determined that the identity verification is successful, and when the similarity is less than or equal to the preset threshold, it is determined that the identity verification has failed, and the current face image that has been successfully verified can be used as the image to be verified. person's identity information. Using the current face image successfully authenticated as the identity information of the person to be verified can make the face image in the identification code a recent face image, and can be closer to the overall effect of the second face image, so as to facilitate Authentication. Wherein, the preset threshold may be determined according to statistics or through other methods, which is not limited in this embodiment of the present invention.

上述通过采集待验证人身份证中的人脸图像,与实时采集的待验证人的人脸图像进行人脸比对,并将根据比对结果确定的人脸图像作为待验证人的身份信息,生成标识码,可以将标识码生成过程与身份验证过程统一起来,实现在首次通过身份证进行身份验证成功后,生成标识码,并利用标识码进行后续的身份验证,保证了身份验证的安全性。The above-mentioned face comparison is carried out by collecting the face image in the ID card of the person to be verified, and the face image of the person to be verified is collected in real time, and the face image determined according to the comparison result is used as the identity information of the person to be verified. Generating the identification code can unify the identification code generation process and the identity verification process, so that after the first identity verification through the ID card is successful, the identification code is generated and the identification code is used for subsequent identity verification to ensure the security of the identity verification .

可选地,在上述各实施例中,待验证人的身份信息还可以包括文字信息,因此,除了可以获取待验证人的身份证中的内置人脸图像外,还可以获取身份证中的内置文字信息,并将内置文字信息与当前人脸图像一起作为待验证人的身份信息,利用这些信息生成标识码。Optionally, in each of the above embodiments, the identity information of the person to be verified can also include text information. Therefore, in addition to obtaining the built-in face image in the ID card of the person to be verified, the built-in face image in the ID card can also be obtained. Text information, and use the built-in text information together with the current face image as the identity information of the person to be verified, and use these information to generate an identification code.

可选地,身份证中的内置文字信息可以包括但不限于用户的姓名、性别、民族、出生日期、住址、证件号码等个人信息。Optionally, the built-in text information in the ID card may include but not limited to personal information such as the user's name, gender, ethnicity, date of birth, address, and ID number.

可选地,除了可以获取识别码中的第一人脸图像外,还可以获取标识码中的文字信息。可选地,在获取标识码中的第一人脸图像和文字信息后,在显示第一人脸图像、第二人脸图像和身份验证结果的同时,还可以显示标识码中的文字信息。Optionally, besides the first face image in the identification code, text information in the identification code can also be acquired. Optionally, after the first face image and text information in the identification code are acquired, while displaying the first face image, the second face image and the identity verification result, the text information in the identification code can also be displayed.

基于本发明上述实施例提供的身份验证方法,通过使标识码中除了包含待验证人的人脸图像外,还包含内置文字信息,这样可以使利用标识码进行身份验证起到与身份证等同的作用。因此不仅可以通过标识码中的人脸图像进行身份验证,还可以在身份验证成功时,通过标识码中的文字信息进一步获得待验证人的身份信息。Based on the identity verification method provided by the above-mentioned embodiments of the present invention, by making the identification code include not only the face image of the person to be verified, but also built-in text information, it is possible to use the identification code to perform identity verification that is equivalent to an ID card. effect. Therefore, not only the identity verification can be performed through the face image in the identification code, but also the identity information of the person to be verified can be further obtained through the text information in the identification code when the identity verification is successful.

本发明实施例还提出了一种身份验证装置,图3是本发明一些实施例提供的身份验证装置的结构示意图。Embodiments of the present invention also provide an identity verification device, and FIG. 3 is a schematic structural diagram of the identity verification device provided by some embodiments of the present invention.

应理解,图3所示的例子仅仅是为了帮助本领域技术人员更好地理解本发明的技术方案,而不应理解成对本发明的限定。本领域技术人员可以在图3的基础上进行各种变换,而这种变换也应理解成本发明技术方案的一部分。It should be understood that the example shown in FIG. 3 is only intended to help those skilled in the art better understand the technical solutions of the present invention, and should not be construed as limiting the present invention. Those skilled in the art can perform various transformations on the basis of FIG. 3 , and such transformations should also be understood as part of the technical solution of the present invention.

如图3所示,该装置包括:标识码识别器301、图像采集器302、图像比对单元303和身份验证单元304。其中,As shown in FIG. 3 , the device includes: an identification code recognizer 301 , an image collector 302 , an image comparison unit 303 and an identity verification unit 304 . in,

标识码识别器301,用于获取标识码中的第一人脸图像。An identification code recognizer 301, configured to acquire the first face image in the identification code.

可选地,标识码可以是指二维码和条形码等,按照一定的码制进行编码,并通过扫描进行自动识别的,具有唯一标识性的代码,本发明实施例对于标识码的类型和设置位置不做限定。Optionally, the identification code may refer to a two-dimensional code and a bar code, etc., which are coded according to a certain code system and automatically identified by scanning, and have a unique identification code. The embodiment of the present invention is concerned with the type and setting of the identification code The location is not limited.

在一个可选的例子中,标识码可以是固定的标识码,可以将该标识码以图片的形式存储于移动终端设备中,在使用时调取图片并将其显示于移动终端设备上,也可以在使用时获取随机的标识码并显示于移动终端设备上,例如:在使用时可以通过小程序或者APP等获取随机的标识码。In an optional example, the identification code can be a fixed identification code, and the identification code can be stored in the mobile terminal device in the form of a picture, and the picture is called and displayed on the mobile terminal device during use, or A random identification code can be obtained during use and displayed on the mobile terminal device. For example, a random identification code can be obtained through a small program or APP during use.

在另一个可选的例子中,标识码可以是印制于证卡上的标识码,证卡可以是指各种证件、卡片、执照和票证的总称,也可以是印制于除证卡外的其它物体上标识码,例如:标识码可以印制于纸张上。In another optional example, the identification code can be the identification code printed on the card, and the card can refer to the general name of various certificates, cards, licenses and tickets, or it can be printed on other than the card. Identification codes on other objects, for example: identification codes can be printed on paper.

可选地,在标识码中可以包含第一人脸图像或者第一人脸图像的存储地址链接。Optionally, the identification code may include the first face image or a storage address link of the first face image.

图像采集器302,用于获取待验证人的第二人脸图像。An image collector 302, configured to acquire a second face image of the person to be verified.

可选地,第二人脸图像可以是现场实时采集的图像,图像采集器302可以是摄像头或者数码相机等,可以通过摄像头或者数码相机等拍摄待验证人,获取第二人脸图像,本发明实施例对此不做限定。Optionally, the second face image can be an image collected in real time on the spot, and the image collector 302 can be a camera or a digital camera, etc., and the person to be verified can be photographed by the camera or a digital camera to obtain the second face image. The embodiment does not limit this.

图像比对单元303,用于根据第一人脸图像与第二人脸图像进行人脸比对,得到比对结果。The image comparison unit 303 is configured to perform face comparison based on the first face image and the second face image to obtain a comparison result.

可选地,图像比对单元303可以对第一人脸图像进行特征提取,得到第一人脸特征数据,以及对第二人脸图像进行特征提取,得到第二人脸特征数据,确定第一人脸特征数据与第二人脸特征数据之间的相似度,将相似度作为比对结果。Optionally, the image comparison unit 303 may perform feature extraction on the first face image to obtain the first face feature data, and perform feature extraction on the second face image to obtain the second face feature data, and determine the first face feature data. The similarity between the facial feature data and the second facial feature data is used as a comparison result.

可选地,图像比对单元303可以通过神经网络或者其他机器学习的方法对第一人脸图像和第二人脸图像进行人脸比对。在一个可选的例子中,神经网络可以采用卷积神经网络。可选地,也可以采用其它类型的神经网络,本发明实施例对此不做限定。Optionally, the image comparison unit 303 may perform face comparison on the first human face image and the second human face image through a neural network or other machine learning methods. In an optional example, the neural network may be a convolutional neural network. Optionally, other types of neural networks may also be used, which is not limited in this embodiment of the present invention.

可选地,图像比对单元303可以通过欧氏距离或者其它的相似度确定原则确定相似度,本发明实施例对此不做限定。Optionally, the image comparison unit 303 may determine the similarity by Euclidean distance or other similarity determining principles, which is not limited in this embodiment of the present invention.

身份验证单元304,用于根据比对结果得到最终的身份验证结果。An identity verification unit 304, configured to obtain a final identity verification result according to the comparison result.

可选地,身份验证单元304可以通过将相似度与预设阈值进行比较,得到最终的身份验证结果。例如,当将相似度大于预设阈值时,确定为身份验证成功,即待验证人与标识码中人脸图像中的人为同一人,当相似度小于或等于预设阈值时,确定为身份验证失败,即待验证人与标识码中人脸图像中的人为不同人。其中,预设阈值可以根据统计确定或者通过其它方法确定,本发明实施例对此不做限定。Optionally, the identity verification unit 304 may obtain a final identity verification result by comparing the similarity with a preset threshold. For example, when the similarity is greater than the preset threshold, it is determined that the identity verification is successful, that is, the person to be verified is the same person as the person in the face image in the identification code, and when the similarity is less than or equal to the preset threshold, it is determined as identity verification Failed, that is, the person to be verified is different from the person in the face image in the identification code. Wherein, the preset threshold may be determined according to statistics or through other methods, which is not limited in this embodiment of the present invention.

可选地,该装置还可以包括:信息显示单元,用于显示第一人脸图像、第二人脸图像和身份验证结果。例如:以“验证成功/验证失败”的文字信息,或者图标标识身份验证结果。Optionally, the device may further include: an information display unit, configured to display the first face image, the second face image and the identity verification result. For example: the text information of "authentication successful/authentication failed" or an icon to identify the authentication result.

在一个可选的例子中,信息显示单元在显示第一人脸图像、第二人脸图像和身份验证结果的同时,还可以显示第一人脸图像与第二人脸图像进行人脸比对的结果,例如:以百分数的形式表示的相似度值。In an optional example, while displaying the first face image, the second face image and the identity verification result, the information display unit can also display the first face image and the second face image for face comparison The result of , for example: the similarity value expressed in the form of a percentage.

基于本发明上述实施例提供的身份验证装置,通过获取标识码中的第一人脸图像,以及获取待验证人的第二人脸图像,根据第一人脸图像与第二人脸图像进行人脸比对,得到比对结果,根据比对结果得到最终的身份验证结果,利用采集的标识码中的人脸图像,与实时采集的人脸图像进行人脸比对,可以在需要多次进行身份验证时,不使用身份证而直接通过标识码进行身份验证,从而可以有效避免由于身份证多次使用而容易造成身份证遗失的问题,同时也可以实现在没有芯片读卡器的情况下对持证人身份的验证,从而可以有效防止人证不一致,盗用他人身份的情况。由于可以脱离证件进行身份验证,因此可以使身份验证更加灵活,扩大身份验证的应用场景。Based on the identity verification device provided by the above-mentioned embodiments of the present invention, by obtaining the first face image in the identification code and the second face image of the person to be verified, the identity verification process is performed according to the first face image and the second face image. Face comparison, get the comparison result, get the final identity verification result according to the comparison result, use the face image in the collected identification code, and carry out face comparison with the face image collected in real time, which can be performed multiple times when needed In identity verification, identity verification is performed directly through the identification code without using the ID card, which can effectively avoid the problem of ID card loss due to the multiple use of the ID card, and can also realize authentication without a chip card reader. The verification of the identity of the certificate holder can effectively prevent the inconsistency of the witness certificate and the theft of other people's identity. Since identity verification can be performed without certificates, it can make identity verification more flexible and expand the application scenarios of identity verification.

图4是本发明另一些实施例提供的身份验证装置的结构示意图。应理解,图4所示的例子仅仅是为了帮助本领域技术人员更好地理解本发明的技术方案,而不应理解成对本发明的限定。本领域技术人员可以在图4的基础上进行各种变换,而这种变换也应理解成本发明技术方案的一部分。Fig. 4 is a schematic structural diagram of an identity verification device provided by another embodiment of the present invention. It should be understood that the example shown in FIG. 4 is only intended to help those skilled in the art better understand the technical solutions of the present invention, and should not be construed as limiting the present invention. Those skilled in the art can perform various transformations on the basis of FIG. 4 , and such transformations should also be understood as part of the technical solution of the present invention.

如图4所示,与图3的实施例相比较,不同之处在于,该实施例的装置还包括:属性获取单元405。属性获取单元405用于获取当前证卡的属性,其中属性包括内置芯片型证卡和非内置芯片型证卡。当当前证卡为非内置芯片型证卡时,标识码识别器401、图像采集器402、图像比对单元403和身份验证单元404执行与图3实施例中相同的操作。As shown in FIG. 4 , compared with the embodiment in FIG. 3 , the difference is that the device in this embodiment further includes: an attribute acquisition unit 405 . The attribute obtaining unit 405 is used to obtain the attributes of the current card, where the attributes include built-in chip-type cards and non-built-in chip-type cards. When the current card is a card without a built-in chip, the identification code recognizer 401 , the image collector 402 , the image comparison unit 403 and the identity verification unit 404 perform the same operations as those in the embodiment in FIG. 3 .

可选地,如图4所示,该装置还可以包括:芯片识别器406。当当前证卡为内置芯片型证卡时,芯片识别器406用于获取当前证卡的芯片信息,其中芯片信息中包含内存的人脸图像,此时,图像采集器402用于获取待验证人的第二人脸图像,图像比对单元403用于将第二人脸图像与芯片信息中内存的人脸图像进行人脸比对,得到比对结果,身份验证单元404用于根据比对结果得到最终的身份验证结果。Optionally, as shown in FIG. 4 , the device may further include: a chip identifier 406 . When the current card is a built-in chip type card, the chip recognizer 406 is used to obtain the chip information of the current card, wherein the chip information includes the face image of the memory, at this time, the image collector 402 is used to obtain the person to be verified. The second face image, the image comparison unit 403 is used to compare the second face image with the face image stored in the chip information to obtain the comparison result, and the identity verification unit 404 is used to compare the result according to the comparison result. Get the final authentication result.

可选地,当当前证卡为内置芯片型证卡时,还可以利用芯片识别器406获取当前证卡的芯片信息,其中芯片信息中包含内存的人脸图像,以及利用标识码识别器401获取标识码中的第一人脸图像,利用图像比对单元403将第一人脸图像与芯片信息中内存的人脸图像进行人脸比对,得到比对结果,并根据比对结果获取当前证卡的真伪性。当当前证卡为真实证件时,可以利用图像采集器402获取待验证人的第二人脸图像,然后利用图像比对单元403将芯片信息中内存的人脸图像或第一人脸图像与第二人脸图像进行比对,得到比对结果,并根据比对结果确定最终的身份验证结果。Optionally, when the current card is a card with a built-in chip, the chip information of the current card can also be obtained by using the chip recognizer 406, wherein the chip information includes a face image stored in memory, and the identification code recognizer 401 is used to obtain the chip information of the current card. For the first face image in the identification code, use the image comparison unit 403 to compare the first face image with the face image stored in the chip information to obtain the comparison result, and obtain the current certificate according to the comparison result. Card authenticity. When the current card is a real certificate, the image collector 402 can be used to obtain the second face image of the person to be verified, and then the image comparison unit 403 is used to compare the face image or the first face image stored in the chip information with the second face image. The face images of the two people are compared to obtain the comparison result, and the final identity verification result is determined according to the comparison result.

可选地,如图4所示,该装置还可以包括:标识码生成单元407。标识码生成单元407用于生成标识码,并将标识码发送至移动终端设备上显示,或者将标识码设置于证卡上。Optionally, as shown in FIG. 4 , the device may further include: an identification code generation unit 407 . The identification code generating unit 407 is configured to generate an identification code, and send the identification code to the mobile terminal device for display, or set the identification code on the card.

在一个可选的例子中,标识码生成单元407可以获取预先存储的待验证人的人脸照片,然后根据人脸照片生成标识码。在另一个可选的例子中,标识码生成单元407可以获取待验证人的身份信息,然后根据待验证人的身份信息生成标识码。In an optional example, the identification code generation unit 407 may obtain a pre-stored face photo of the person to be verified, and then generate the identification code according to the face photo. In another optional example, the identification code generating unit 407 may acquire the identity information of the person to be verified, and then generate the identification code according to the identity information of the person to be verified.

可选地,芯片识别器406,还用于获取待验证人的身份证中的内置人脸图像。Optionally, the chip identifier 406 is also used to obtain the built-in face image in the ID card of the person to be verified.

可选地,芯片识别器406可以采用非接触IC卡阅读技术,在通过内嵌的安全控制模块(Secure Access Module,SAM)以无线传输方式与卡证内专用的芯片进行安全认证后,将芯片中的信息读出。Optionally, the chip identifier 406 can use non-contact IC card reading technology, and after performing security authentication with the dedicated chip in the card through the embedded security control module (Secure Access Module, SAM), the chip The information in is read out.

可选地,图像采集器402,还用于获取待验证人的当前人脸图像。Optionally, the image collector 402 is also configured to acquire the current face image of the person to be verified.

可选地,待验证人的当前人脸图像可以是现场实时采集的图像,图像采集器402可以是摄像头或者数码相机等。在本实施例中,通过摄像头或者数码相机等拍摄待验证人,获取待验证人的当前人脸图像,本发明实施例对此不做限定。Optionally, the current face image of the person to be verified may be an image collected in real time on site, and the image collector 402 may be a camera or a digital camera. In this embodiment, the person to be verified is photographed by a camera or a digital camera to obtain a current face image of the person to be verified, which is not limited in this embodiment of the present invention.

可选地,图像比对单元403,还用于将内置人脸图像与当前人脸图像进行人脸比对,获取比对结果。Optionally, the image comparison unit 403 is further configured to perform face comparison between the built-in face image and the current face image to obtain a comparison result.

可选地,图像比对单元403可以对内置人脸图像进行特征提取,得到第三人脸特征数据,以及对当前人脸图像进行特征提取,得到第四人脸特征数据,确定第三人脸特征数据与第四人脸特征数据之间的相似度,将相似度作为比对结果。Optionally, the image comparison unit 403 can perform feature extraction on the built-in face image to obtain the third face feature data, and perform feature extraction on the current face image to obtain the fourth face feature data to determine the third face feature data. The similarity between the feature data and the fourth face feature data is used as the comparison result.

可选地,图像比对单元403可以通过神经网络或者其他机器学习的方法对内置人脸图像和当前人脸图像进行人脸比对。在一个可选的例子中,神经网络可以采用卷积神经网络。可选地,也可以采用其它类型的神经网络,本发明实施例对此不做限定。Optionally, the image comparison unit 403 may perform face comparison on the built-in face image and the current face image through a neural network or other machine learning methods. In an optional example, the neural network may be a convolutional neural network. Optionally, other types of neural networks may also be used, which is not limited in this embodiment of the present invention.

可选地,图像比对单元403可以通过欧氏距离或者其它的相似度确定原则确定相似度,本发明实施例对此不做限定。Optionally, the image comparing unit 403 may determine the similarity by Euclidean distance or other similarity determining principles, which is not limited in this embodiment of the present invention.

可选地,当比对结果大于预设阈值时,将当前人脸图像作为待验证人的身份信息,标识码生成单元407还用于根据该身份信息生成标识码。Optionally, when the comparison result is greater than the preset threshold, the current face image is used as the identity information of the person to be verified, and the identification code generation unit 407 is further configured to generate an identification code according to the identity information.

可选地,可以通过身份验证单元404将比对结果与预设阈值进行比较,得到身份验证结果,标识码生成单元407可以根据身份验证结果确定待验证人的身份信息。例如,当将比对结果大于预设阈值的情况,确定为身份验证成功,当相似度小于或等于预设阈值的情况,确定为身份验证失败,可以将身份验证成功的当前人脸图像作为待验证人的身份信息。其中,预设阈值可以根据统计确定或者通过其它方法确定,本发明实施例对此不做限定。Optionally, the identity verification unit 404 may compare the comparison result with a preset threshold to obtain an identity verification result, and the identification code generation unit 407 may determine the identity information of the person to be verified according to the identity verification result. For example, when the comparison result is greater than the preset threshold, it is determined that the identity verification is successful, and when the similarity is less than or equal to the preset threshold, it is determined that the identity verification has failed, and the current face image of the successful identity verification can be used as the waiting list. The identity information of the verifier. Wherein, the preset threshold may be determined according to statistics or through other methods, which is not limited in this embodiment of the present invention.

可选地,待验证人的身份信息还可以包括文字信息,因此,芯片识别器406除了可以获取待验证人的身份证中的内置人脸图像外,还可以获取待验证人的身份证中的内置文字信息,并将内置文字信息与当前人脸图像一起作为待验证人的身份信息,利用这些信息生成标识码。Optionally, the identity information of the person to be verified can also include text information. Therefore, in addition to obtaining the built-in face image in the ID card of the person to be verified, the chip recognizer 406 can also obtain the face image in the ID card of the person to be verified. Built-in text information, and use the built-in text information together with the current face image as the identity information of the person to be verified, and use these information to generate an identification code.

可选地,身份证中的内置文字信息可以包括但不限于用户的姓名、性别、民族、出生日期、住址、证件号码等个人信息。Optionally, the built-in text information in the ID card may include but not limited to personal information such as the user's name, gender, ethnicity, date of birth, address, and ID number.

可选地,标识码识别器401除了可以获取识别码中的第一人脸图像外,还可以获取标识码中的文字信息。Optionally, the identification code recognizer 401 may acquire text information in the identification code in addition to the first face image in the identification code.

可选地,该装置还可以包括:信息显示单元408。在标识码识别器401获取识别码中的第一人脸图像和文字信息后,信息显示单元408除了显示第一人脸图像、第二人脸图像和身份验证结果外,还可以显示标识码中的文字信息。Optionally, the device may further include: an information display unit 408 . After the identification code recognizer 401 acquires the first face image and text information in the identification code, the information display unit 408 can display the first face image, the second face image and the identity verification result, as well as the information in the identification code. text message.

另外,本发明实施例还提供了一种电子设备,例如可以是移动终端、个人确定机(PC)、平板电脑、服务器等,该电子设备设置有本发明上述任一实施例的身份验证装置。In addition, the embodiment of the present invention also provides an electronic device, such as a mobile terminal, a personal computer (PC), a tablet computer, a server, etc., the electronic device is provided with the identity verification device of any one of the above embodiments of the present invention.

本发明实施例还提供了一种电子设备,例如可以是移动终端、个人确定机(PC)、平板电脑、服务器等。下面参考图5,其示出了适于用来实现本申请实施例的终端设备或服务器的电子设备500的结构示意图:如图5所示,电子设备500包括一个或多个处理器、通信部等,所述一个或多个处理器例如:一个或多个中央处理单元(CPU)501,和/或一个或多个图像处理器(GPU)513等,处理器可以根据存储在只读存储器(ROM)502中的可执行指令或者从存储部分508加载到随机访问存储器(RAM)503中的可执行指令而执行各种适当的动作和处理。通信部512可包括但不限于网卡,所述网卡可包括但不限于IB(Infiniband)网卡。The embodiment of the present invention also provides an electronic device, which may be, for example, a mobile terminal, a personal computer (PC), a tablet computer, a server, and the like. Referring to FIG. 5 below, it shows a schematic structural diagram of an electronic device 500 suitable for implementing a terminal device or a server according to an embodiment of the present application: as shown in FIG. 5 , the electronic device 500 includes one or more processors, a communication unit etc., the one or more processors are for example: one or more central processing units (CPU) 501, and/or one or more image processors (GPU) 513, etc., and the processors can be stored in the read-only memory ( ROM) 502 or executable instructions loaded from storage 508 into random access memory (RAM) 503 to perform various appropriate actions and processes. The communication unit 512 may include but not limited to a network card, and the network card may include but not limited to an IB (Infiniband) network card.

处理器可与只读存储器502和/或随机访问存储器503中通信以执行可执行指令,通过总线504与通信部512相连、并经通信部512与其他目标设备通信,从而完成本申请实施例提供的任一项方法对应的操作,例如,利用标识码识别器扫描标识码,获取所述标识码中的第一人脸图像;利用图像采集器获取待验证人的第二人脸图像;根据所述第一人脸图像与所述第二人脸图像进行人脸比对,得到比对结果;根据所述比对结果得到最终的身份验证结果。The processor can communicate with the read-only memory 502 and/or random access memory 503 to execute executable instructions, connect to the communication unit 512 through the bus 504, and communicate with other target devices through the communication unit 512, so as to complete the implementation provided by the embodiment of the present application. Operations corresponding to any one of the methods, for example, using an identification code recognizer to scan the identification code to obtain the first face image in the identification code; using an image collector to obtain the second face image of the person to be verified; according to the Perform face comparison between the first face image and the second face image to obtain a comparison result; obtain a final identity verification result according to the comparison result.

此外,在RAM 503中,还可存储有装置操作所需的各种程序和数据。CPU501、ROM502以及RAM503通过总线504彼此相连。在有RAM503的情况下,ROM502为可选模块。RAM503存储可执行指令,或在运行时向ROM502中写入可执行指令,可执行指令使处理器501执行上述通信方法对应的操作。输入/输出(I/O)接口505也连接至总线504。通信部512可以集成设置,也可以设置为具有多个子模块(例如多个IB网卡),并在总线链接上。In addition, in the RAM 503, various programs and data necessary for device operation may also be stored. The CPU 501 , ROM 502 , and RAM 503 are connected to each other via a bus 504 . In the case of RAM503, ROM502 is an optional module. RAM503 stores executable instructions, or writes executable instructions into ROM502 during operation, and the executable instructions cause processor 501 to perform operations corresponding to the above communication methods. An input/output (I/O) interface 505 is also connected to the bus 504 . The communication unit 512 can be integrated, or can be configured to have multiple sub-modules (such as multiple IB network cards), and be connected on the bus.

以下部件连接至I/O接口405:包括键盘、鼠标等的输入部分506;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分507;包括硬盘等的存储部分508;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分509。通信部分509经由诸如因特网的网络执行通信处理。驱动器510也根据需要连接至I/O接口505。可拆卸介质511,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器510上,以便于从其上读出的确定机程序根据需要被安装入存储部分508。The following components are connected to the I/O interface 405: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 508 including a hard disk, etc. and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I/O interface 505 as needed. A removable medium 511, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is mounted on the drive 510 as necessary so that a computer program read therefrom is installed into the storage section 508 as necessary.

需要说明的,如图5所示的架构仅为一种可选实现方式,在具体实践过程中,可根据实际需要对上述图5的部件数量和类型进行选择、删减、增加或替换;在不同功能部件设置上,也可采用分离设置或集成设置等实现方式,例如GPU和CPU可分离设置或者可将GPU集成在CPU上,通信部可分离设置,也可集成设置在CPU或GPU上,等等。这些可替换的实施方式均落入本发明公开的保护范围。It should be noted that the architecture shown in Figure 5 is only an optional implementation, and in the actual practice process, the number and type of components in Figure 5 above can be selected, deleted, added or replaced according to actual needs; Different functional components can also be set separately or integrated. For example, the GPU and CPU can be set separately or the GPU can be integrated on the CPU. The communication part can be set separately or integrated on the CPU or GPU. and many more. These alternative implementations all fall within the scope of protection disclosed in the present invention.

特别地,根据本发明的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本发明的实施例包括一种计算机程序产品,其包括有形地包含在机器可读介质上的计算机程序,计算机程序包含用于执行流程图所示的方法的程序代码,程序代码可包括对应执行本申请实施例提供的方法步骤对应的指令,例如,利用第一图像采集器扫描标识码,获取所述标识码中的第一人脸图像;利用第二图像采集器获取待验证人的第二人脸图像;根据所述第一人脸图像与所述第二人脸图像进行人脸比对,得到比对结果;根据所述比对结果得到最终的身份验证结果。在这样的实施例中,该计算机程序可以通过通信部分509从网络上被下载和安装,和/或从可拆卸介质511被安装。在该计算机程序被中央处理单元(CPU)501执行时,执行本申请的方法中限定的上述功能。In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, the embodiments of the present invention include a computer program product, which includes a computer program tangibly embodied on a machine-readable medium, the computer program includes program code for executing the method shown in the flowchart, and the program code may include a corresponding Execute the instructions corresponding to the method steps provided in the embodiment of the present application, for example, use the first image collector to scan the identification code to obtain the first face image in the identification code; use the second image collector to obtain the first face image of the person to be verified. two face images; face comparison is performed according to the first face image and the second face image to obtain a comparison result; and a final identity verification result is obtained according to the comparison result. In such an embodiment, the computer program may be downloaded and installed from a network via communication portion 509 and/or installed from removable media 511 . When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the method of the present application are performed.

在一个或多个可选实施方式中,本发明实施例还提供了一种计算机程序程序产品,用于存储计算机可读指令,该指令被执行时使得计算机执行上述任一可能的实现方式中的身份验证方法。In one or more optional implementation manners, an embodiment of the present invention further provides a computer program product, which is used for storing computer-readable instructions, and when the instructions are executed, the computer executes the computer program in any of the above possible implementation manners. authentication method.

该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选例子中,该计算机程序产品具体体现为计算机存储介质,在另一个可选例子中,该计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。The computer program product can be specifically realized by means of hardware, software or a combination thereof. In an optional example, the computer program product is embodied as a computer storage medium, and in another optional example, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) and the like.

在一个或多个可选实施方式中,本发明实施例还提供了一种身份验证方法及其对应的装置和电子设备、计算机存储介质、计算机程序以及计算机程序产品,其中,该方法包括:第一装置向第二装置发送身份验证指示,该指示使得第二装置执行上述任一可能的实施例中的身份验证方法;第一装置接收第二装置发送的身份验证结果。In one or more optional implementation manners, an embodiment of the present invention also provides an identity verification method and its corresponding apparatus and electronic equipment, computer storage medium, computer program and computer program product, wherein the method includes: A device sends an identity verification instruction to the second device, and the instruction causes the second device to execute the identity verification method in any possible embodiment above; the first device receives the identity verification result sent by the second device.

在一些实施例中,该身份验证指示可以具体为调用指令,第一装置可以通过调用的方式指示第二装置执行身份验证,相应地,响应于接收到调用指令,第二装置可以执行上述身份验证方法中的任意实施例中的步骤和/或流程。In some embodiments, the identity verification instruction may specifically be a call instruction, the first device may instruct the second device to perform identity verification by calling, and correspondingly, in response to receiving the call instruction, the second device may perform the above identity verification Steps and/or processes in any embodiment of the method.

应理解,本发明实施例中的“第一”、“第二”等术语仅仅是为了区分,而不应理解成对本发明实施例的限定。It should be understood that terms such as "first" and "second" in the embodiments of the present invention are only for distinguishing, and should not be construed as limiting the embodiments of the present invention.

还应理解,在本发明中,“多个”可以指两个或两个以上,“至少一个”可以指一个、两个或两个以上。It should also be understood that in the present invention, "plurality" may refer to two or more than two, and "at least one" may refer to one, two or more than two.

还应理解,对于本发明中提及的任一部件、数据或结构,在没有明确限定或者在前后文给出相反启示的情况下,一般可以理解为一个或多个。It should also be understood that for any component, data or structure mentioned in the present invention, it can generally be understood as one or more unless there is a clear limitation or a contrary suggestion is given in the context.

还应理解,本发明对各个实施例的描述着重强调各个实施例之间的不同之处,其相同或相似之处可以相互参考,为了简洁,不再一一赘述。It should also be understood that the description of the various embodiments of the present invention emphasizes the differences between the various embodiments, and the same or similar points can be referred to each other, and for the sake of brevity, details are not repeated one by one.

可能以许多方式来实现本发明的方法和装置、设备。例如,可通过软件、硬件、固件或者软件、硬件、固件的任何组合来实现本发明的方法和装置、设备。用于方法的步骤的上述顺序仅是为了进行说明,本发明的方法的步骤不限于以上具体描述的顺序,除非以其它方式特别说明。此外,在一些实施例中,还可将本发明实施为记录在记录介质中的程序,这些程序包括用于实现根据本发明的方法的机器可读指令。因而,本发明还覆盖存储用于执行根据本发明的方法的程序的记录介质。It is possible to implement the method and apparatus, apparatus of the invention in many ways. For example, the method, device and equipment of the present invention can be realized by software, hardware, firmware or any combination of software, hardware and firmware. The above sequence of steps used in the method is for illustration only, and the steps of the method of the present invention are not limited to the sequence described above unless specifically stated otherwise. Furthermore, in some embodiments, the present invention can also be implemented as programs recorded in recording media including machine-readable instructions for realizing the method according to the present invention. Thus, the present invention also covers a recording medium storing a program for executing the method according to the present invention.

本发明的描述是为了示例和描述起见而给出的,而并不是无遗漏的或者将本发明限于所公开的形式。很多修改和变化对于本领域的普通技术人员而言是显然的。选择和描述实施例是为了更好说明本发明的原理和实际应用,并且使本领域的普通技术人员能够理解本发明从而设计适于特定用途的带有各种修改的各种实施例。The description of the present invention has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and changes will be apparent to those of ordinary skill in the art. The embodiment was chosen and described in order to better explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention and design various embodiments with various modifications as are suited to the particular use.

Claims (10)

1.一种身份验证方法,其特征在于,包括:1. An identity verification method, characterized in that, comprising: 获取标识码中的第一人脸图像;Obtain the first face image in the identification code; 获取待验证人的第二人脸图像;Obtain the second face image of the person to be verified; 根据所述第一人脸图像与所述第二人脸图像进行人脸比对,得到比对结果;performing face comparison according to the first face image and the second face image to obtain a comparison result; 根据所述比对结果得到最终的身份验证结果。A final identity verification result is obtained according to the comparison result. 2.根据权利要求1所述的方法,其特征在于,在所述获取所述标识码中的第一人脸图像之前,还包括:2. method according to claim 1, is characterized in that, before the first facial image in described acquisition described identification code, also comprises: 生成所述标识码,并将所述标识码发送至移动终端设备上显示,或者将所述标识码设置于证卡上。Generate the identification code, and send the identification code to the mobile terminal device for display, or set the identification code on the card. 3.根据权利要求2所述的方法,其特征在于,所述生成所述标识码,包括:3. The method according to claim 2, wherein said generating said identification code comprises: 获取待验证人的身份信息;Obtain the identity information of the person to be verified; 根据所述身份信息生成所述标识码。The identification code is generated according to the identity information. 4.根据权利要求3所述的方法,其特征在于,所述获取待验证人的身份信息,包括:4. The method according to claim 3, wherein said obtaining the identity information of the person to be verified comprises: 利用芯片识别器获取待验证人的身份证中的内置人脸图像;Use the chip recognizer to obtain the built-in face image in the ID card of the person to be verified; 获取所述待验证人的当前人脸图像;Obtain the current face image of the person to be verified; 将所述内置人脸图像与所述当前人脸图像进行人脸比对,获取比对结果;Perform face comparison between the built-in face image and the current face image to obtain a comparison result; 当所述比对结果大于预设阈值时,将所述当前人脸图像作为所述待验证人的身份信息。When the comparison result is greater than a preset threshold, the current face image is used as the identity information of the person to be verified. 5.根据权利要求2所述的方法,其特征在于,所述生成所述标识码,包括:5. The method according to claim 2, wherein said generating said identification code comprises: 获取预先存储的待验证人的人脸照片;Obtain the pre-stored face photo of the person to be verified; 根据所述人脸照片生成所述标识码。The identification code is generated according to the face photo. 6.一种身份验证装置,其特征在于,包括:6. An identity verification device, characterized in that it comprises: 标识码识别器,用于获取所述标识码中的第一人脸图像;An identification code recognizer, configured to obtain the first face image in the identification code; 图像采集器,用于获取待验证人的第二人脸图像;An image collector, used to obtain the second face image of the person to be verified; 图像比对单元,用于根据所述第一人脸图像与所述第二人脸图像进行人脸比对,得到比对结果;An image comparison unit, configured to perform face comparison based on the first face image and the second face image to obtain a comparison result; 身份验证单元,用于根据所述比对结果得到最终的身份验证结果。An identity verification unit, configured to obtain a final identity verification result according to the comparison result. 7.一种电子设备,其特征在于,包括权利要求6所述的装置。7. An electronic device, comprising the device according to claim 6. 8.一种电子设备,其特征在于,包括:8. An electronic device, characterized in that it comprises: 存储器,用于存储可执行指令;以及memory for storing executable instructions; and 处理器,用于与所述存储器通信以执行所述可执行指令从而实现权利要求1至5中任意一项所述的方法。A processor, configured to communicate with the memory to execute the executable instructions so as to implement the method according to any one of claims 1-5. 9.一种计算机程序,包括计算机可读代码,其特征在于,当所述计算机可读代码在设备上运行时,所述设备中的处理器执行用于实现权利要求1至5中任意一项所述方法的指令。9. A computer program comprising computer readable code, characterized in that, when said computer readable code is run on a device, a processor in said device executes any one of claims 1 to 5 Instructions for the method. 10.一种计算机存储介质,用于存储计算机可读取的指令,其特征在于,所述指令被执行时实现权利要求1至5中任意一项所述的方法。10. A computer storage medium for storing computer-readable instructions, wherein the method according to any one of claims 1 to 5 is implemented when the instructions are executed.
CN201810339543.4A 2018-04-16 2018-04-16 Auth method and device, electronic equipment, computer program and storage medium Pending CN108734099A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810339543.4A CN108734099A (en) 2018-04-16 2018-04-16 Auth method and device, electronic equipment, computer program and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810339543.4A CN108734099A (en) 2018-04-16 2018-04-16 Auth method and device, electronic equipment, computer program and storage medium

Publications (1)

Publication Number Publication Date
CN108734099A true CN108734099A (en) 2018-11-02

Family

ID=63938906

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810339543.4A Pending CN108734099A (en) 2018-04-16 2018-04-16 Auth method and device, electronic equipment, computer program and storage medium

Country Status (1)

Country Link
CN (1) CN108734099A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109598208A (en) * 2018-11-14 2019-04-09 阿里巴巴集团控股有限公司 Portrait verification method and device
CN110795714A (en) * 2019-09-10 2020-02-14 中国平安财产保险股份有限公司 Identity authentication method and device, computer equipment and storage medium
CN113704808A (en) * 2020-05-20 2021-11-26 中国移动通信集团浙江有限公司 User information processing method and device and computing equipment
CN116152975A (en) * 2023-02-21 2023-05-23 深圳市德翼智能科技有限公司 Intelligent early warning method, system, equipment and medium for safe passage based on channel gate
CN116956069A (en) * 2023-07-27 2023-10-27 桂林市啄木鸟医疗器械有限公司 Chip identification method, device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101465736A (en) * 2008-12-31 2009-06-24 北京中星微电子有限公司 Identification authentication method and system
CN104700014A (en) * 2015-02-16 2015-06-10 北京海鑫科金高科技股份有限公司 Verification device
CN104715271A (en) * 2015-03-23 2015-06-17 北京中盾安全技术开发公司 Witness verifying machine
CN104965927A (en) * 2015-07-14 2015-10-07 卢怀农 Method and system of verifying identity (ID) cards by using database
CN105184255A (en) * 2015-09-06 2015-12-23 天维尔信息科技股份有限公司 Man-card checking apparatus and card generation apparatus
CN105225307A (en) * 2015-09-06 2016-01-06 天维尔信息科技股份有限公司 Personnel's bayonet type gate and controller
CN106022418A (en) * 2016-05-17 2016-10-12 深圳泰首智能技术有限公司 Ticket-certificate-person-combined comparison device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101465736A (en) * 2008-12-31 2009-06-24 北京中星微电子有限公司 Identification authentication method and system
CN104700014A (en) * 2015-02-16 2015-06-10 北京海鑫科金高科技股份有限公司 Verification device
CN104715271A (en) * 2015-03-23 2015-06-17 北京中盾安全技术开发公司 Witness verifying machine
CN104965927A (en) * 2015-07-14 2015-10-07 卢怀农 Method and system of verifying identity (ID) cards by using database
CN105184255A (en) * 2015-09-06 2015-12-23 天维尔信息科技股份有限公司 Man-card checking apparatus and card generation apparatus
CN105225307A (en) * 2015-09-06 2016-01-06 天维尔信息科技股份有限公司 Personnel's bayonet type gate and controller
CN106022418A (en) * 2016-05-17 2016-10-12 深圳泰首智能技术有限公司 Ticket-certificate-person-combined comparison device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109598208A (en) * 2018-11-14 2019-04-09 阿里巴巴集团控股有限公司 Portrait verification method and device
CN110795714A (en) * 2019-09-10 2020-02-14 中国平安财产保险股份有限公司 Identity authentication method and device, computer equipment and storage medium
CN113704808A (en) * 2020-05-20 2021-11-26 中国移动通信集团浙江有限公司 User information processing method and device and computing equipment
CN113704808B (en) * 2020-05-20 2024-05-24 中国移动通信集团浙江有限公司 User information processing method and device and computing equipment
CN116152975A (en) * 2023-02-21 2023-05-23 深圳市德翼智能科技有限公司 Intelligent early warning method, system, equipment and medium for safe passage based on channel gate
CN116956069A (en) * 2023-07-27 2023-10-27 桂林市啄木鸟医疗器械有限公司 Chip identification method, device and storage medium

Similar Documents

Publication Publication Date Title
TW201944294A (en) Method and apparatus for identity verification, electronic device, computer program, and storage medium
US9946865B2 (en) Document authentication based on expected wear
CN106899567B (en) User authentication method, device and system
CN108833359A (en) Identity verification method, device, equipment, storage medium and program
CN108804884B (en) Identity authentication method, device and computer storage medium
WO2019075840A1 (en) Identity verification method and apparatus, storage medium and computer device
CN108734099A (en) Auth method and device, electronic equipment, computer program and storage medium
CN108229457A (en) Verification method, device, electronic equipment and the storage medium of certificate
CN110415113A (en) Finance data processing method, device, server and readable storage medium storing program for executing
CN110795714A (en) Identity authentication method and device, computer equipment and storage medium
CN108875582A (en) Auth method, device, equipment, storage medium and program
US20200218772A1 (en) Method and apparatus for dynamically identifying a user of an account for posting images
CN112650875A (en) House image verification method and device, computer equipment and storage medium
CN108734003A (en) Auth method, device, equipment, storage medium and program
CN108846968A (en) A kind of information processing method and its equipment, storage medium, electronic equipment
CN114612986A (en) Detection method, detection device, electronic equipment and storage medium
CN110033388B (en) Social relationship establishing method and device and server
CN108399401B (en) Method and device for detecting face image
CN108154070A (en) Face identification method and device
CN108764033A (en) Auth method and device, electronic equipment, computer program and storage medium
CN111047284A (en) Contract signing method and device and computer equipment
CN112613345B (en) User authentication method and system
CN109523408A (en) Identity identifying method, insurance institution's server and the user terminal of insured people
US20240028698A1 (en) System and method for perfecting and accelerating biometric identification via evolutionary biometrics via continual registration
US11810401B1 (en) Methods and systems for enhancing user liveness detection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181102