HK40062631B - Method and device for detecting authenticity of certificate - Google Patents
Method and device for detecting authenticity of certificate Download PDFInfo
- Publication number
- HK40062631B HK40062631B HK42022050352.8A HK42022050352A HK40062631B HK 40062631 B HK40062631 B HK 40062631B HK 42022050352 A HK42022050352 A HK 42022050352A HK 40062631 B HK40062631 B HK 40062631B
- Authority
- HK
- Hong Kong
- Prior art keywords
- document
- image
- content
- detected
- brightness
- Prior art date
Links
Description
技术领域Technical Field
本说明书一个或多个实施例涉及信息安全领域,尤其涉及一种检测证件真伪的方法及装置。This specification relates to one or more embodiments in the field of information security, and in particular to a method and apparatus for detecting the authenticity of documents.
背景技术Background Technology
在金融、政务、社交等诸多业务中,通常需要通过第二代居民身份证、社保卡等卡片类证件对用户进行身份验证。例如在金融领域的EKYC(Know Your Customer,了解你的客户)、AML(Anti Money Laundering,反洗钱)等场景下,金融平台对应的验证方需要用户通过终端设备现场采集自身证件的证件图像,以通过该图像验证用户的真实性和合法性。In many business sectors, including finance, government affairs, and social networking, identity verification of users is often required through card-based documents such as second-generation resident ID cards and social security cards. For example, in financial scenarios such as EKYC (Know Your Customer) and AML (Anti-Money Laundering), the verification party of the financial platform requires users to collect images of their own documents on-site through terminal devices in order to verify the user's authenticity and legitimacy.
在验证过程中,可能存在非法用户使用真实证件的复印件等虚假证件伪装真实证件,以企图欺骗检测方(或称假证攻击)。要保证用户身份验证结果的可靠性,首先要保证用户所提供证件的真实性,因此检测方需要对上述卡片类证件的真伪进行检测。During the verification process, unauthorized users may use photocopies of genuine identification documents or other fake documents to impersonate real documents in an attempt to deceive the testing party (a situation known as a fake document attack). To ensure the reliability of user identity verification results, the authenticity of the documents provided by the user must first be guaranteed. Therefore, the testing party needs to verify the authenticity of the aforementioned card-type identification documents.
发明内容Summary of the Invention
有鉴于此,本说明书一个或多个实施例提供一种检测证件真伪的方法及装置。In view of this, one or more embodiments of this specification provide a method and apparatus for detecting the authenticity of documents.
为实现上述目的,本说明书一个或多个实施例提供技术方案如下:To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:
根据本说明书一个或多个实施例的第一方面,提出了一种检测证件真伪的方法,包括:According to a first aspect of one or more embodiments of this specification, a method for detecting the authenticity of an identification document is provided, comprising:
获取待检测证件的证件图像,所述证件图像在待检测证件的旋转过程中采集得到;Acquire an image of the document to be inspected, the image being captured during the rotation of the document to be inspected;
基于所述证件图像获取待检测证件的证件表面信息;The surface information of the document to be detected is obtained based on the document image;
在所述证件表面信息满足预设检测条件的情况下,确定所述待检测证件为真实证件。If the information on the surface of the document meets the preset detection conditions, the document to be tested is determined to be a genuine document.
根据本说明书一个或多个实施例的第二方面,提出了一种检测证件真伪的装置,包括:According to a second aspect of one or more embodiments of this specification, an apparatus for detecting the authenticity of identification documents is provided, comprising:
图像获取单元,用于获取待检测证件的证件图像,所述证件图像在待检测证件的旋转过程中采集得到;An image acquisition unit is used to acquire an image of the document to be inspected, wherein the image is acquired during the rotation of the document to be inspected.
信息获取单元,用于基于所述证件图像获取待检测证件的证件表面信息;An information acquisition unit is used to acquire surface information of the document to be detected based on the document image;
真实确定单元,用于在所述证件表面信息满足预设检测条件的情况下,确定所述待检测证件为真实证件。The authenticity determination unit is used to determine that the document to be tested is an authentic document when the surface information of the document meets the preset detection conditions.
根据本说明书一个或多个实施例的第三方面,提出了一种电子设备,包括:According to a third aspect of one or more embodiments of this specification, an electronic device is provided, comprising:
处理器;processor;
用于存储处理器可执行指令的存储器;Memory used to store processor-executable instructions;
其中,所述处理器通过运行所述可执行指令以实现如第一方面所述的方法。The processor implements the method as described in the first aspect by running the executable instructions.
根据本说明书一个或多个实施例的第四方面,提出了一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现如第一方面所述方法的步骤。According to a fourth aspect of one or more embodiments of this specification, a computer-readable storage medium is provided that stores computer instructions thereon, which, when executed by a processor, implement the steps of the method as described in the first aspect.
附图说明Attached Figure Description
图1是一示例性实施例提供的一种证件真伪检测系统的架构示意图。Figure 1 is a schematic diagram of the architecture of a document authenticity detection system provided in an exemplary embodiment.
图2是一示例性实施例提供的一种检测证件真伪的方法的流程图。Figure 2 is a flowchart of a method for detecting the authenticity of a document, provided in an exemplary embodiment.
图3是一示例性实施例提供的一种待检测证件的旋转过程的示意图。Figure 3 is a schematic diagram of the rotation process of a document to be tested provided in an exemplary embodiment.
图4是一示例性实施例提供的一种标准证件内容的排版示意图。Figure 4 is a schematic diagram of the layout of standard document content provided in an exemplary embodiment.
图5是一示例性实施例提供的一种设备的结构示意图。Figure 5 is a schematic diagram of the structure of a device provided in an exemplary embodiment.
图6是一示例性实施例提供的一种检测证件真伪的装置的框图。Figure 6 is a block diagram of an exemplary embodiment of a device for detecting the authenticity of a document.
具体实施方式Detailed Implementation
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本说明书一个或多个实施例相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本说明书一个或多个实施例的一些方面相一致的装置和方法的例子。Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
需要说明的是:在其他实施例中并不一定按照本说明书示出和描述的顺序来执行相应方法的步骤。在一些其他实施例中,其方法所包括的步骤可以比本说明书所描述的更多或更少。此外,本说明书中所描述的单个步骤,在其他实施例中可能被分解为多个步骤进行描述;而本说明书中所描述的多个步骤,在其他实施例中也可能被合并为单个步骤进行描述。It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
为识别复印件的假证攻击,相关技术中提出两类方法。一类是通过数据驱动的深度学习方法对待检测证件进行识别,但这类方法对逼真程度高的彩色复印件,尤其是裁剪后的彩色复印件的识别准确度较低。另一类是通过采集明暗程度不同的双帧图片,分析待检测证件表面否能够反光判定其是否为复印件,但是这类方法所采用的闪光灯可能照射不到待检测证件,因而导致真实证件的识别通过率较低。To address forgery attacks using photocopies, two main approaches have been proposed. One approach uses data-driven deep learning to identify the document in question; however, this method has low accuracy when dealing with highly realistic color photocopies, especially cropped ones. The other approach involves acquiring two frames of images with varying brightness and analyzing the reflectivity of the document's surface to determine if it's a photocopy. However, the flash used in this method may not illuminate the document, resulting in a low success rate for identifying genuine documents.
为此,本说明书实施例提出一种检测证件真伪的方法,以通过检测待检测证件是否为真实证件,高效识别复印件的假证攻击。该方法可以应用于如图1所示的证件真伪检测系统。如图1所示,该系统可以包括网络10,若干服务端,比如第一服务器11、第二服务器12,若干电子设备,比如手机13、手机14和手机15等。Therefore, this specification proposes a method for detecting the authenticity of documents, which can efficiently identify fake document attacks using photocopies by detecting whether the document to be detected is genuine. This method can be applied to the document authenticity detection system shown in Figure 1. As shown in Figure 1, the system may include a network 10, several servers, such as a first server 11 and a second server 12, and several electronic devices, such as mobile phones 13, 14, and 15.
其中,第一服务器11和第二服务器12中的任一服务器可以为包含一独立主机的物理服务器,或者也可以为主机集群承载的虚拟服务器、云服务器等。在运行过程中,第一服务器11和第二服务器12可以分别运行相同或不同应用的服务器侧的程序,以实现该应用的相关业务功能。比如当第一服务器11运行业务平台的程序时,可以实现为该业务平台的服务端(下称业务服务端);再比如,当第二服务器12运行身份验证平台的程序时,可以实现为该身份验证平台的服务端(下称验证服务端)。其中,本说明书所述的检测证件真伪的方法即可以应用于上述验证服务端。当然,上述验证服务端也可以集成在业务服务端中,以作为运行在业务服务端中用于实现证件真伪检测功能的功能组件。Either the first server 11 or the second server 12 can be a physical server containing an independent host, or it can be a virtual server, cloud server, etc., hosted in a host cluster. During operation, the first server 11 and the second server 12 can run server-side programs of the same or different applications to implement the relevant business functions of those applications. For example, when the first server 11 runs a program for a business platform, it can act as the server-side application for that business platform (hereinafter referred to as the business server); similarly, when the second server 12 runs a program for an identity verification platform, it can act as the server-side application for that identity verification platform (hereinafter referred to as the verification server). The method for detecting the authenticity of documents described in this specification can be applied to the aforementioned verification server. Of course, the verification server can also be integrated into the business server as a functional component running within the business server to implement the document authenticity detection function.
手机13~15只是用户可以使用的一种类型的电子设备。实际上,用户显然还可以使用诸如下述类型的电子设备:平板设备、笔记本电脑、掌上电脑(PDAs,Personal DigitalAssistants)、可穿戴设备(如智能眼镜、智能手表等)等,本说明书一个或多个实施例并不对此进行限制。其中,上述任一电子设备均具备图像拍摄和/或视频拍摄功能。在运行过程中,该电子设备可以运行某一应用的客户端侧的程序,以实现该应用的相关业务功能,比如当该电子设备运行上述身份验证平台的程序时,可以实现为该平台的客户端。需要指出的是:身份验证平台的客户端的应用程序可以被预先安装在电子设备上,使得该客户端可以在该电子设备上被启动并运行;当然,当采用诸如HTML5技术的在线“客户端”时,无需在电子设备上安装相应的应用程序,即可获得并运行该客户端。Mobile phones 13-15 are just one type of electronic device that users can use. In reality, users can obviously also use electronic devices such as tablets, laptops, PDAs (Personal Digital Assistants), wearable devices (such as smart glasses, smartwatches, etc.), etc., and one or more embodiments in this specification do not limit this. All of the above-mentioned electronic devices have image capture and/or video capture functions. During operation, the electronic device can run a client-side program of an application to implement the relevant business functions of that application. For example, when the electronic device runs the aforementioned authentication platform program, it can act as a client of that platform. It should be noted that the client application of the authentication platform can be pre-installed on the electronic device, allowing the client to be launched and run on the electronic device; of course, when using online "clients" such as HTML5 technology, it is not necessary to install the corresponding application on the electronic device to obtain and run the client.
在本说明书所述实施例的技术方案中,可由第二服务器12通过与手机13~15上运行的客户端配合,以实现对待检测证件的真伪检测过程。其中,上述手机13~15用于采集待检测证件的证件图像或者旋转视频,并将该证件图像或者旋转视频上传至第二服务器12,以由第二服务器12通过本说明书实施例所述的检测证件真伪的方法检测待检测证件的真伪。In the technical solution of the embodiments described in this specification, the second server 12 can cooperate with the client running on mobile phones 13-15 to realize the authenticity detection process of the document to be tested. Specifically, the mobile phones 13-15 are used to capture images or rotated videos of the document to be tested and upload them to the second server 12, so that the second server 12 can detect the authenticity of the document to be tested using the document authenticity detection method described in the embodiments of this specification.
或者,本说明书实施例所述的检测证件真伪的方法也可以由于上述手机13~15分别实现,即该方法可以作为端侧检测方案运行在终端设备中,以在端侧实现对待检测证件的真伪检测。可见,本说明书实施例所述的检测证件真伪的方法的执行主体可以为第一服务器11、第二服务器12等服务端,也可以为手机13~15等终端设备,本说明书实施例并不对此进行限制。Alternatively, the method for detecting the authenticity of documents described in the embodiments of this specification can also be implemented by the aforementioned mobile phones 13-15 respectively. That is, the method can be run as an end-side detection scheme in the terminal device to realize the authenticity detection of the document to be detected on the end side. It can be seen that the executing entity of the method for detecting the authenticity of documents described in the embodiments of this specification can be a server such as the first server 11 or the second server 12, or a terminal device such as mobile phones 13-15. The embodiments of this specification do not limit this.
在本实施例中,证件真伪检测系统不仅可以实现检测证件真伪的功能,还可以作为诸多其他功能的集成化功能平台。比如拍摄证件图像、拍摄旋转视频、展示定位标识、确定证件表面信息、查询标准内容、执行预设操作等,本说明书一个或多个实施例并不对此进行限制。另外,该证件真伪检测系统也可以实现为身份检测系统的中的一个子系统,本说明书实施例并不对此进行限制。In this embodiment, the document authenticity detection system can not only detect the authenticity of documents, but also serve as an integrated functional platform for many other functions. For example, it can capture document images, capture rotating videos, display positioning markers, determine document surface information, query standard content, and execute preset operations. This specification does not limit the scope of this embodiment. Furthermore, the document authenticity detection system can also be implemented as a subsystem within an identity verification system; this specification does not limit the scope of this embodiment.
对于网络10,可以包括多种类型的有线或无线网络。Network 10 can include various types of wired or wireless networks.
图2是本说明书一示例性实施例示出的一种检测证件真伪的方法的流程图。如图2所示,该方法可以应用于验证方,如前述的验证服务端或者客户端等。该方法可以包括以下步骤:Figure 2 is a flowchart illustrating an exemplary embodiment of a method for detecting the authenticity of an identification document. As shown in Figure 2, this method can be applied to a verification party, such as the aforementioned verification server or client. The method may include the following steps:
步骤202,获取待检测证件的证件图像,所述证件图像在待检测证件的旋转过程中采集得到。Step 202: Obtain the image of the document to be tested, which is acquired during the rotation of the document to be tested.
本说明书所述实施例中,待检测证件可能为真实证件,真实证件为第二代居民身份证、社保卡、公交卡等卡片类证件,这类证件的外观可以为片状的长方形、矩形、不规则形状等。或者,终端设备的用户也可能使用任一真实证件的复印件伪装真实证件进行身份识别,其中,该复印件可以由拍摄真实证件所得的照片打印得到,如可以被打印在纸张、布料等素材的表面,具体可以为黑白复印件、彩色复印件等。本说明书实施例对于待检测证件的形状、用途等并不进行限制。In the embodiments described in this specification, the document to be detected may be a genuine document, such as a second-generation resident ID card, social security card, public transport card, or other card-type document. These documents can be rectangular, flat, or irregularly shaped. Alternatively, the user of the terminal device may use a photocopy of any genuine document to disguise it for identity verification. This photocopy can be printed from a photograph of the genuine document, and can be printed on materials such as paper or fabric, specifically as a black-and-white or color photocopy. The embodiments in this specification do not limit the shape or purpose of the document to be detected.
通常情况下,真实证件和其复印件的材质并不相同,所以对二者进行拍摄所得的证件图像也有所不同,证件图像能够反映出被拍摄对象(即真实证件或者其复印件)的某些表面信息(如亮度、内容、厚度等)。正是基于这一事实,本方案在获取到待检测证件的证件图像后,可以基于证件图像获得的证件表面信息对待检测证件的真伪进行检测。Typically, genuine documents and their copies are made of different materials, resulting in different images of the documents when photographed. The document image can reflect certain surface information (such as brightness, content, and thickness) of the object being photographed (i.e., the genuine document or its copy). Based on this fact, this solution, after obtaining an image of the document to be tested, can detect the authenticity of the document based on the surface information obtained from the image.
需要说明的是,本方案中检测待检测证件的真伪,即为确定待检测证件为真实证件还是复印件。其中,真实证件应当被理解为上述目标证件对应的真实的卡片类证件,至于待检测证件与用户的真实身份是否匹配(即该待检测证件是否确实为用户所持有的真实证件),可以通过其他方式进行进一步判断,本方案则并不关注。而上述复印件的复印对象可以为用户自身的真实证件,也可以为他人的真实证件,甚至可以为任何真实证件的图像(如复印的是翻拍证件图像得到的二次图像),本说明书实施例并不对此进行限制。It should be noted that in this solution, detecting the authenticity of the document to be tested means determining whether the document is a genuine document or a photocopy. A genuine document should be understood as a real card-type document corresponding to the target document. Whether the document to be tested matches the user's real identity (i.e., whether the document to be tested is indeed a genuine document held by the user) can be further determined through other methods, and this solution does not focus on that. The photocopy can be of the user's own genuine document, another person's genuine document, or even an image of any genuine document (such as a photocopy of a secondary image obtained from photographing a document image). This embodiment does not impose any limitations on this.
在本实施例中,验证方可以响应于操作请求获取待检测证件的证件图像。例如,用户在使用(运行在终端设备中的)客户端访问业务平台(如金融平台、社交平台等)注册账户、修改账户信息或者实施转账等操作的情况下,金融平台即需要对用户身份进行验证。在这种情况下,金融平台的服务端可以向验证方发起身份验证请求(即操作请求),该请求可以用于触发验证方对用户身份进行验证。相应地,若验证方为检测服务端,则该检测服务端可以响应于接收到的上述身份验证请求,指示客户端获取待检测证件的证件图像;若验证方为客户端,则该客户端可以响应于接收到的上述身份验证请求,自行获取待检测证件的证件图像。In this embodiment, the verification party can obtain the image of the document to be detected in response to an operation request. For example, when a user uses a client (running on a terminal device) to access a business platform (such as a financial platform, social platform, etc.) to register an account, modify account information, or perform operations such as transferring funds, the financial platform needs to verify the user's identity. In this case, the financial platform's server can initiate an identity verification request (i.e., an operation request) to the verification party, which can be used to trigger the verification party to verify the user's identity. Accordingly, if the verification party is a detection server, the detection server can, in response to the received identity verification request, instruct the client to obtain the image of the document to be detected; if the verification party is a client, the client can, in response to the received identity verification request, obtain the image of the document to be detected itself.
当然,因为用户往往拥有多种证件,所以上述身份验证请求中可以指定需要检测的是哪种证件(下称目标证件),从而客户端可以向用户输出目标证件(如金融平台需要验证的证件)的证件名称等目标证件信息,以便用户获知应该使用哪种证件作为待检测证件。例如,可以在客户端展示“请出示第二代居民身份证”字样,以便用户知晓需要使用自己的第二代居民身份证继续后续验证。再例如,也可以在客户端展示社保卡的样卡照片,以便用户知晓需要使用自己的社保卡继续后续验证。再例如,客户端还可以通过播放语音等形式输出目标证件信息,如播放“请拍摄您的第二代居民身份证”等语音,不再赘述。Of course, since users often possess multiple identification documents, the aforementioned identity verification request can specify which document (hereinafter referred to as the target document) needs to be detected. The client can then output the target document information (such as the document required for verification by a financial platform) to the user, including the document name, so that the user knows which document to use for verification. For example, the client can display the message "Please present your second-generation resident ID card" to inform the user that they need to use their second-generation resident ID card for further verification. Another example is displaying a sample photo of a social security card on the client, so the user knows they need to use their social security card for further verification. Furthermore, the client can also output the target document information through voice prompts, such as playing a message like "Please take a picture of your second-generation resident ID card," which will not be elaborated further.
其中,上述身份验证请求可以关联第一预设操作。例如,在用户注册账户的情况下,该请求可以关联新账户注册操作,如跳转至账户信息录入页面、展示平台针对新账户的注册协议、跳转至新账户登录页面等。再例如,在用户修改账户信息的情况下,该请求可以关联账户信息修改操作,如跳转至账户信息修改页面、展示信息修改规则,展示修改后的账户信息等。又例如,在用户实施转账操作的情况下,该请求可以关联转账操作,如提示用户指定目标账户,向目标账户转账等。相应地,在通过本说明书所述方法确定待检测证件为真实证件的情况下,验证方可以执行对应于身份验证请求的上述第一预设操作。或者,身份验证请求还可以关联告警操作、日志备份操作、证件图像存证操作等第二预设操作,从而在确定待检测证件并非真实证件(即为复印件)的情况下,验证方可以拒绝执行上述第一预设操作,而执行第二预设操作,以便对身份伪造事件进行妥善地处理。The aforementioned identity verification request can be associated with a first preset operation. For example, in the case of a user registering an account, the request can be associated with a new account registration operation, such as redirecting to the account information entry page, displaying the platform's registration agreement for new accounts, or redirecting to the new account login page. As another example, in the case of a user modifying account information, the request can be associated with an account information modification operation, such as redirecting to an account information modification page, displaying the information modification rules, or displaying the modified account information. Yet another example, in the case of a user performing a transfer operation, the request can be associated with a transfer operation, such as prompting the user to specify a target account and transferring funds to that account. Accordingly, if the method described in this specification determines that the document to be detected is a genuine document, the verifier can execute the aforementioned first preset operation corresponding to the identity verification request. Alternatively, the identity verification request can also be associated with a second preset operation, such as an alarm operation, a log backup operation, or a document image storage operation. Therefore, if it is determined that the document to be detected is not a genuine document (i.e., a photocopy), the verifier can refuse to execute the aforementioned first preset operation and instead execute the second preset operation to properly handle identity forgery incidents.
为保证所获取证件图像的真实性和后续检测结果的准确性,本方案所获取的证件图像需要在待检测证件的旋转过程中采集得到。例如,本实施例所述的客户端可以具有图像拍摄功能或视频拍摄功能,从而该证件图像可以由客户端拍摄得到。其中,可以将待检测证件作为被拍摄对象,由客户端直接拍摄该证件以得到证件图像,或者由客户端拍摄该证件得到旋转视频,以便验证方从该旋转视频中提取视频图像帧作为证件图像。其中,若验证方为客户端,则客户端可以直接拍摄得到证件图像,或者从拍摄得到的旋转视频中提取的视频图像帧作为证件图像。若验证方为检测服务端,则客户端可以将拍摄得到的证件图像上传至检测服务端,或者将从拍摄得到的旋转视频中提取的视频图像帧作为证件图像上传至检测服务端。To ensure the authenticity of the acquired document images and the accuracy of subsequent detection results, the document images acquired in this solution need to be captured during the rotation of the document to be detected. For example, the client described in this embodiment can have image capture or video capture functions, so that the document image can be captured by the client. Specifically, the document to be detected can be used as the subject of the photograph, and the client can directly photograph the document to obtain an document image, or the client can photograph the document to obtain a rotating video, so that the verification party can extract video image frames from the rotating video as the document image. If the verification party is the client, the client can directly photograph the document image, or extract video image frames from the photographed rotating video as the document image. If the verification party is the detection server, the client can upload the photographed document image to the detection server, or upload the video image frames extracted from the photographed rotating video as the document image to the detection server.
在验证方为客户端的情况下,可以由客户端拍摄证件图像。例如,在客户端开启摄像头并保持该摄像头面对待检测证件的情况下,客户端的拍摄预览画面中可以展示出被拍摄的该待检测证件。此时用户可以手持并旋转待检测证件,或者也可以将待检测证件放置在旋转物体上随之旋转,相应地,客户端可以在其拍摄预览画面中展示有处于旋转过程中的待检测证件的情况下,拍摄所述待检测证件的证件图像。通过该方式,客户端可以在待检测证件的旋转过程中采集至少一张证件图像用于后续的检测过程。When the verification party is the client, the client can capture an image of the identification document. For example, with the client's camera turned on and facing the document to be verified, the client's preview screen can display the document being scanned. The user can then hold and rotate the document, or place it on a rotating object and rotate it. Correspondingly, the client can capture an image of the document while its preview screen shows the document rotating. In this way, the client can acquire at least one image of the document during its rotation for subsequent verification.
在拍摄证件图像过程中,用户可能按照多种不同的旋转方式旋转待检测证件。如对于矩形的待检测证件,用户可能以长边中心点的连线为轴旋转待检测证件,也可能以短边中心点的连线为轴旋转待检测证件,还可能以不规则方式旋转待检测证件。为便于后续基于证件图像获取相应的证件表面信息,并提升证件真伪的检测准确度,可以向用户指定某种特定的旋转方式。例如,客户端可以在展示界面(如前述拍摄预览画面对应的展示界面)中展示用于介绍旋转方式的旋转提示信息。该旋转提示信息可以采用文字、gif动图、动画、实拍视频等至少一种形式,简单易懂地告知用户应该怎样旋转待检测证件。其中,上述旋转提示信息可以包含旋转方向、旋转速度、证件与客户端之间的距离范围等的至少一个。进一步的,在检测到待检测证件的实际旋转方式不符合旋转提示信息指示的旋转方式的情况下,客户端可以更换另一种形式(如将文字形式更换为动画形式)的旋转提示信息再次提醒用户,以便用户按照旋转提示信息指示的旋转方式旋转待检测证件,保证客户端拍摄到预设角度或位置的证件图像。当然,为避免多次打扰用户,也可以不再展示旋转提示信息,而直接采集证件图像并进行后续处理。During the process of capturing an ID document image, the user may rotate the document to be detected in various ways. For example, for a rectangular document, the user may rotate it around the line connecting the center points of the longer side, or around the line connecting the center points of the shorter side, or even rotate it in an irregular manner. To facilitate the subsequent acquisition of relevant document surface information based on the document image and improve the accuracy of document authenticity detection, a specific rotation method can be specified to the user. For example, the client can display rotation prompts in the display interface (such as the display interface corresponding to the aforementioned shooting preview screen) to explain the rotation method. These rotation prompts can take at least one form, such as text, GIF animation, animation, or live video, to simply and clearly inform the user how to rotate the document. The rotation prompts may include at least one of the following: rotation direction, rotation speed, and the distance range between the document and the client. Furthermore, if the actual rotation of the document under inspection does not match the rotation prompt message, the client can replace the prompt with another form (e.g., changing from text to animation) to remind the user again. This allows the user to rotate the document according to the prompt message, ensuring the client captures an image of the document at the preset angle or position. Alternatively, to avoid repeatedly disturbing the user, the rotation prompt message can be omitted, and the document image can be directly captured for subsequent processing.
下面结合图3对待检测证件的旋转过程进行举例说明。如图3中的(1)所示,终端设备301位于待检测证件302上方,终端设备301的后置摄像头正对待检测证件302的正面,其拍摄预览画面303中展示有证件画面304。此时,终端设备301正对待检测证件302,拍摄预览画面303中展示的证件画面304为矩形的证件正面。需要说明的是,图3中各图所示的终端设备301和待检测证件302均为从终端设备301的右侧观察对应的右视图,即从拍摄预览画面303右侧观察到的终端设备301和待检测证件302的侧面图。The following example illustrates the rotation process of the document to be tested, using Figure 3 as an example. As shown in (1) of Figure 3, the terminal device 301 is positioned above the document to be tested 302. The rear camera of the terminal device 301 faces the front of the document to be tested 302, and the document image 304 is displayed in its preview screen 303. At this time, the terminal device 301 faces the document to be tested 302, and the document image 304 displayed in the preview screen 303 is a rectangular front of the document. It should be noted that the terminal device 301 and the document to be tested 302 shown in each figure in Figure 3 are right views viewed from the right side of the terminal device 301, that is, side views of the terminal device 301 and the document to be tested 302 viewed from the right side of the preview screen 303.
不妨记(1)所示的旋转角度为0°,则在用户的手指305以待检测证件302的短轴中点连线306按照顺时针方向(如箭头所示)旋转待检测证件302的过程中,各个旋转角度分别对应的证件画面和相应的右视图依次如图3中的(2)、(3)、(4)、(5)和(6)所示。其中,(3)对应于旋转90°,此时终端设备的摄像头正对待检测证件的侧边,相应的证件画面即为待检测证件的侧边画面。(5)对应于旋转180°,此时终端设备的摄像头正对待检测证件的背面,相应的证件画面即为待检测证件矩形的证件背面。在旋转角度属于(0°,90°)、(90°,180°)和(180°,270°)的情况下,相应的证件画面分别如图3中的(2)、(4)和(6)所示。当然,用户还可以继续旋转待检测证件,如在旋转角度为[0°,360°](即旋转一周)的过程中,客户端依次采集多张证件图像。上述旋转过程通常是连续的,客户端在采集到的任一张客户端无法提取证件表面信息(如旋转速度过快导致证件图像不清晰等)的情况下,还可以指示用户再次旋转待检测证件,以在待检测证件被旋转多周的过程中采集全部证件图像。Let's assume that the rotation angle shown in (1) is 0°. Then, as the user's finger 305 rotates the document 302 to be tested in a clockwise direction (as shown by the arrow) with the line 306 connecting the midpoint of the short axis of the document 302 to be tested, the document images and corresponding right views corresponding to each rotation angle are shown in Figure 3 (2), (3), (4), (5), and (6), respectively. Among them, (3) corresponds to a rotation of 90°. At this time, the camera of the terminal device is facing the side of the document to be tested, and the corresponding document image is the side image of the document to be tested. (5) corresponds to a rotation of 180°. At this time, the camera of the terminal device is facing the back of the document to be tested, and the corresponding document image is the back of the rectangular document to be tested. When the rotation angle is (0°, 90°), (90°, 180°), and (180°, 270°), the corresponding document images are shown in Figure 3 (2), (4), and (6), respectively. Of course, the user can continue to rotate the document to be detected. For example, during a rotation of [0°, 360°] (i.e., one full rotation), the client can sequentially capture multiple images of the document. The above rotation process is usually continuous. If the client cannot extract the surface information of the document from any of the captured images (e.g., the rotation speed is too fast, resulting in an unclear image), the user can be instructed to rotate the document again to capture all the document images during the multiple rotations.
为便于后续基于证件图像获取证件表面信息,客户端可以拍摄处于预设倾斜角度下的待检测证件以获取证件图像。其中,上述预设倾斜角度为待检测证件与客户端之间的相对角度,例如可以为待检测证件正面或背面所在平面与待检测证件的拍摄预览画面所在平面(如屏幕所在平面)之间的夹角。To facilitate the subsequent acquisition of document surface information based on the document image, the client can capture an image of the document to be inspected at a preset tilt angle. This preset tilt angle is the relative angle between the document and the client, and can be, for example, the angle between the plane containing the front or back of the document and the plane containing the preview image of the document (such as the screen).
为此,客户端可以识别拍摄预览画面中展示的证件画面的特征点,并根据所述特征点确定证件的预览角度,然后在识别到的预览角度处于预设角度范围的情况下,拍摄相应的证件图像。例如,在证件旋转过程中,客户端可以实时检测拍摄预览画面中展示的证件画面的特征点,如证件侧面的中心点,证件四个角的顶点和/或证件画面的中心点等,进而可以根据检测到的上述特征点、特征点之间的连线等识别出待检测证件的预览角度。如在该预览角度处于预设角度范围的情况下,可以拍摄相应的证件图像。如在预设角度范围为[-5°,5°]的情况下,客户端可以将拍摄得到的位于该范围的证件图像作为待检测证件的正面图像,类似于图3中的(1);而在预设角度范围为[87°,93°]的情况下,客户端可以将拍摄得到的位于该范围的证件图像作为待检测证件的侧面图像,类似于图3中的(3)。通过该方式,客户端可以在证件旋转过程中灵活拍摄处于预设角度范围的待检测图像对应的证件图像。To this end, the client can identify feature points of the document image displayed in the preview screen and determine the preview angle of the document based on the feature points. Then, if the identified preview angle is within a preset angle range, the client can capture the corresponding document image. For example, during the document rotation process, the client can detect feature points of the document image displayed in the preview screen in real time, such as the center point of the side of the document, the vertices of the four corners of the document and/or the center point of the document image, etc., and then identify the preview angle of the document to be detected based on the detected feature points and the lines connecting the feature points. If the preview angle is within a preset angle range, the client can capture the corresponding document image. If the preset angle range is [-5°, 5°], the client can use the captured document image within this range as the front image of the document to be detected, similar to (1) in Figure 3; while if the preset angle range is [87°, 93°], the client can use the captured document image within this range as the side image of the document to be detected, similar to (3) in Figure 3. In this way, the client can flexibly capture the image of the document corresponding to the image to be detected within a preset angle range during the document rotation process.
在待检测证件的旋转过程中,待检测证件和/或客户端往往会发生晃动,所以为保证拍摄角度的准确,客户端可以在拍摄预览画面中展示定位标识,以由用户根据该定位标识调整待检测证件的姿态,使待检测证件与客户端之间的相对角度满足上述预设倾斜角度。在用户调整待检测证件姿态的过程中,拍摄预览画面中的证件预览位置(即证件画面在拍摄预览画面中所处的位置)会发生相应变化。从而客户端可以在待检测证件的证件预览位置匹配于定位标记的情况下,拍摄证件图像。其中,上述定位标识即对应于上述预设倾斜角度。During the rotation of the document to be inspected, the document and/or the client often shake. Therefore, to ensure the accuracy of the shooting angle, the client can display a positioning marker in the shooting preview screen. The user can then adjust the posture of the document according to this positioning marker, ensuring that the relative angle between the document and the client meets the aforementioned preset tilt angle. As the user adjusts the posture of the document, the document preview position in the shooting preview screen (i.e., the position of the document image within the shooting preview screen) will change accordingly. Thus, the client can capture an image of the document when its preview position matches the positioning marker. The aforementioned positioning marker corresponds to the aforementioned preset tilt angle.
如图3所示,在预设倾斜角度为0°和90°的情况下,定位标识分别如(1)和(3)所示。以(1)为例,(1)所示的4个定位标识307构成矩形,该矩形的长宽比与前述目标证件的长宽比相同。在预设倾斜角度为180°的情况下,如(5)所示的定位标识与(1)类似,不再赘述。在预设倾斜角度为30°的情况下,定位标识如(2)中的4个定位标识308所示。因为相对于片状的证件来说,手机摄像头为点状,所以摄像头在拍摄过程中实现的是点状视角,故4个定位标识308构成等腰梯形,该等腰梯形所在平面与待检测证件的拍摄预览画面所在平面之间的夹角即为30°。As shown in Figure 3, the positioning marks are as shown in (1) and (3) respectively when the preset tilt angle is 0° and 90°. Taking (1) as an example, the four positioning marks 307 shown in (1) form a rectangle, and the aspect ratio of this rectangle is the same as that of the target document. When the preset tilt angle is 180°, the positioning marks shown in (5) are similar to those in (1), and will not be described again. When the preset tilt angle is 30°, the positioning marks are as shown in (2) with four positioning marks 308. Since the mobile phone camera is point-shaped relative to the sheet-like document, the camera achieves a point-shaped perspective during the shooting process. Therefore, the four positioning marks 308 form an isosceles trapezoid, and the angle between the plane of the isosceles trapezoid and the plane of the shooting preview screen of the document to be tested is 30°.
对于拍摄预览画面中展示的上述定位标识,用户可以在旋转证件的过程中调整其旋转角度,以使证件画面贴合于定位标识所构成的矩形或等腰梯形,此时的证件预览位置即匹配于相应的定位标记。客户端可以在检测到证件预览位置匹配于相应的定位标记时,拍摄此刻的证件图像,拍摄时的待检测证件与终端设备之间的夹角即为定位标识对应的预设角度。例如,在证件画面位于上述定位标识307构成的矩形中的情况下,拍摄时的待检测证件与终端设备之间的夹角为0°;再例如,在证件画面位于上述定位标识308构成的等腰梯形中的情况下,拍摄时的待检测证件与终端设备之间的夹角为30°。其中,上述定位标识所表征的预设角度可以根据证件图像进行设置,本说明书对其展示位置、具体对应的预设角度等并不进行限制。Regarding the positioning markers displayed in the preview screen, users can adjust their rotation angle while rotating the ID card to align the ID card image with the rectangle or isosceles trapezoid formed by the positioning markers. At this point, the ID card preview position matches the corresponding positioning marker. The client can capture an image of the ID card when it detects that the ID card preview position matches the corresponding positioning marker. The angle between the ID card and the terminal device at the time of capture is the preset angle corresponding to the positioning marker. For example, if the ID card image is located within the rectangle formed by the positioning markers 307, the angle between the ID card and the terminal device at the time of capture is 0°; as another example, if the ID card image is located within the isosceles trapezoid formed by the positioning markers 308, the angle between the ID card and the terminal device at the time of capture is 30°. The preset angle represented by the positioning markers can be set according to the ID card image; this manual does not limit its display position or specific preset angle.
当然,在验证方为客户端的情况下,也可以由客户端拍摄待检测证件的旋转过程对应的旋转视频,并从该旋转视频的视频图像帧中选取证件图像。因为旋转视频中记录有待检测证件的旋转过程,所以该视频的某些视频图像帧中的证件画面同样满足上述预设倾斜角度、证件位置等条件,进而客户端可以通过检测视频图像帧中的证件画面,选取其中证件画面满足上述条件的视频图像帧作为证件图像,具体过程与前述实施例并无本质区别,不再赘述。Of course, when the verification party is the client, the client can also capture a rotation video of the document to be detected during its rotation process, and select the document image from the video frame of the rotation video. Because the rotation video records the rotation process of the document to be detected, the document image in some video frame also meets the above-mentioned preset tilt angle, document position, and other conditions. Therefore, the client can select the video frame that meets the above conditions as the document image by detecting the document image in the video frame. The specific process is not essentially different from the aforementioned embodiment, and will not be described again.
步骤204,基于所述证件图像获取待检测证件的证件表面信息。Step 204: Obtain the surface information of the document to be detected based on the document image.
步骤206,在所述证件表面信息满足预设检测条件的情况下,确定所述待检测证件为真实证件。Step 206: If the surface information of the document meets the preset detection conditions, determine that the document to be detected is a genuine document.
在本实施例中,在获取到待检测证件的证件图像之后,验证方可以进一步基于该证件图像获取待检测证件的证件表面信息,然后通过判断该证件表面信息是否满足预设检测条件,确定待检测证件的真伪。具体的,可以在证件表面信息满足预设检测条件的情况下,确定待检测证件为真实证件;而在证件表面信息不满足预设检测条件的情况下,确定待检测证件为伪造的复印件。In this embodiment, after obtaining the image of the document to be tested, the verifier can further obtain the surface information of the document based on the image, and then determine the authenticity of the document by judging whether the surface information meets preset detection conditions. Specifically, if the surface information meets the preset detection conditions, the document to be tested can be determined to be a genuine document; if the surface information does not meet the preset detection conditions, the document to be tested can be determined to be a counterfeit copy.
其中,待检测证件的证件表面信息可以具有多种形式,如证件厚度、证件亮度或证件内容等。对于不同形式的证件表面信息,其对应的预设检测条件也有所不同。验证方可以采用上述至少一种形式的证件表面信息,确定待检测证件是否为真实证件。下面分别对通过不同形式的证件表面信息确定待检测证件真伪的过程进行说明。The surface information of the document to be tested can take various forms, such as document thickness, document brightness, or document content. The corresponding preset testing conditions also differ for different forms of document surface information. The verifier can use at least one of the above forms of document surface information to determine whether the document to be tested is genuine. The process of determining the authenticity of the document to be tested using different forms of document surface information is explained below.
A、证件表面信息为证件厚度A. The information on the surface of the document is the document thickness.
真实证件通常被复印在纸张上,即使复印件为清晰度较高的彩色复印件,甚至复印出的证件图像为真实证件的等比例图像(即证件图像与真实证件的尺寸大小为1:1),或者复印件被按照证件图像边缘裁剪过,作为复印件的纸张的厚度通常也远小于真实证件的厚度。基于这一事实,验证方可以通过证件厚度对待检测证件的证件真伪进行检测。例如,验证方可以将待检测证件的证件厚度作为证件表面信息,相应的预设检测条件可以为证件厚度不小于预设的厚度阈值。Genuine identification documents are typically photocopied onto paper. Even if the photocopy is a high-resolution color copy, or even if the copied image is a 1:1 scale image of the genuine document, or if the photocopy has been cropped to match the edges of the original image, the thickness of the paper used for photocopying is usually much less than the thickness of the genuine document. Based on this fact, the verifier can use the document's thickness to determine its authenticity. For example, the verifier can use the document's thickness as surface information, with a preset detection condition that the document thickness is not less than a preset thickness threshold.
例如,验证方可以先从前述证件图像中确定待检测证件的侧面图像,其中,该侧面图像中包含待检测证件的侧面(即待检测证件的侧面视角对应的画面)对应的证件画面。当然,在获取上述证件图像的过程中,验证方即可以获取包含待检测证件的侧面对应的证件画面的图像,以作为待检测证件的侧面图像。以待检测证件的倾斜角度为90°为例,相应的侧面图像如图3中的(3)所示,其中的证件图像309即为当前时刻待检测证件的侧面。当然,待检测证件的倾斜角度也可以为270°,还可以为临近90°或270°的预设角度区间范围(如[80°,100°]、或者[265°,275°]等)内,本说明书实施例对此并不进行限制,只要上述侧面图像中包含待检测证件的侧面对应的证件画面即可。For example, the verifier can first determine the side image of the document to be tested from the aforementioned document image, wherein the side image contains the document image corresponding to the side view of the document to be tested (i.e., the image corresponding to the side view of the document to be tested). Of course, during the process of obtaining the aforementioned document image, the verifier can obtain an image containing the document image corresponding to the side view of the document to be tested, as the side image of the document to be tested. Taking the tilt angle of the document to be tested as 90° as an example, the corresponding side image is shown in Figure 3 (3), where document image 309 is the side view of the document to be tested at the current moment. Of course, the tilt angle of the document to be tested can also be 270°, or it can be within a preset angle range adjacent to 90° or 270° (such as [80°, 100°], or [265°, 275°], etc.). This embodiment of the specification does not limit this, as long as the aforementioned side image contains the document image corresponding to the side view of the document to be tested.
进一步的,验证方可以通过多种方式确定上述证件厚度。作为一示例性实施例,验证方可以根据侧面图像确定待检测证件的侧面的长度和宽度,并将宽度与长度的比值作为待检测证件的证件厚度。其中,验证方可以将侧面图像的长边和短边分别对应的像素点的个数与单像素点宽度的乘积分别作为上述长度和宽度。当然,因为证件厚度为上述宽度和长度的比值,所以也可以直接将侧面图像的长边和短边分别对应的像素点的个数的比值作为证件厚度,从而加快证件厚度的确定速度。相应地,上述厚度阈值可以根据目标证件的标准证件尺寸预先设置,验证方可以在确定出的证件厚度不小于该厚度阈值的情况下确定待检测证件为真实证件。以目标证件的标准证件尺寸为80mm×50mm×1mm为例,考虑到1/80=1.25%<1/50=2%,此时验证方可以预设厚度阈值为1.25%。从而,在检测到证件厚度不小于该厚度阈值的情况下,验证方即可以确定待检测证件为真实证件;否则,在检测到证件厚度小于该厚度阈值的情况下,验证方即可以确定待检测证件为伪造的复印件。或者,验证方也可以预设证件长边对应的第一厚度阈值为1.25%(或者1.2%等),证件短边对应的第二厚度阈值为2%(或者1.99%等)。进而在检测到待检测证件的长边对应的第一证件厚度不小于上述第一厚度阈值的情况下,或在检测到待检测证件的短边对应的第二证件厚度不小于上述第二厚度阈值的情况下,验证方即可以确定待检测证件为真实证件。而在检测到第一证件厚度小于上述第一厚度阈值,且第二证件厚度小于上述第二厚度阈值的情况下,验证方即可以确定待检测证件为伪造的复印件。Furthermore, the verifier can determine the document thickness in various ways. As an exemplary embodiment, the verifier can determine the length and width of the side of the document to be tested based on the side image, and use the ratio of width to length as the document thickness. Specifically, the verifier can use the product of the number of pixels corresponding to the long and short sides of the side image and the width of a single pixel as the length and width, respectively. Of course, since the document thickness is the ratio of width to length, the ratio of the number of pixels corresponding to the long and short sides of the side image can also be directly used as the document thickness, thereby speeding up the determination of the document thickness. Correspondingly, the thickness threshold can be preset based on the standard document size of the target document. The verifier can determine that the document to be tested is a genuine document if the determined document thickness is not less than this thickness threshold. Taking the standard document size of the target document as 80mm × 50mm × 1mm as an example, considering that 1/80 = 1.25% < 1/50 = 2%, the verifier can preset the thickness threshold to 1.25%. Therefore, if the thickness of the document is detected to be not less than the thickness threshold, the verifier can determine that the document under test is genuine; otherwise, if the thickness of the document is detected to be less than the thickness threshold, the verifier can determine that the document under test is a forged copy. Alternatively, the verifier can preset a first thickness threshold of 1.25% (or 1.2%, etc.) for the long side of the document and a second thickness threshold of 2% (or 1.99%, etc.) for the short side. Then, if the thickness of the document under test corresponding to the long side is detected to be not less than the first thickness threshold, or if the thickness of the document under test corresponding to the short side is detected to be not less than the second thickness threshold, the verifier can determine that the document under test is genuine. Conversely, if the thickness of the document under test is less than both the first and second thickness thresholds, the verifier can determine that the document under test is a forged copy.
作为另一示例性实施例,验证方可以根据上述侧面图像确定待检测证件的侧面的宽度和当前旋转角度,并根据确定出的宽度和当前旋转角度确定待检测证件的实际厚度值,以作为所述证件厚度。相应地,上述厚度阈值可以根据目标证件的标准证件尺寸预先设置,验证方可以在确定出的证件厚度不小于该厚度阈值的情况下确定待检测证件为真实证件。仍以目标证件的标准证件尺寸为80mm×50mm×1mm为例,可以预先设置厚度阈值为1mm(或者0.95mm、0.8mm等)。在检测到实际厚度值不小于该厚度阈值的情况下,验证方即可以确定待检测证件为真实证件;否则,在检测到证件厚度小于该厚度阈值的情况下,验证方即可以确定待检测证件为伪造的复印件。As another exemplary embodiment, the verifier can determine the width and current rotation angle of the side of the document to be tested based on the aforementioned side image, and determine the actual thickness value of the document to be tested based on the determined width and current rotation angle, as the document thickness. Accordingly, the aforementioned thickness threshold can be preset according to the standard document size of the target document. The verifier can determine that the document to be tested is a genuine document if the determined document thickness is not less than the thickness threshold. Taking the standard document size of the target document as 80mm × 50mm × 1mm as an example, the thickness threshold can be preset to 1mm (or 0.95mm, 0.8mm, etc.). If the detected actual thickness value is not less than the thickness threshold, the verifier can determine that the document to be tested is a genuine document; otherwise, if the detected document thickness is less than the thickness threshold, the verifier can determine that the document to be tested is a counterfeit copy.
由上述实施例可知,验证方可以仅通过一张侧面图像确定待检测证件的证件厚度。当然,为尽量避免误差,验证方也可以获取多张侧面图像分别确定多个独立证件厚度,并将多个独立证件厚度的平均值作为对待检测证件的证件厚度的最终检测结果,不再赘述。As can be seen from the above embodiments, the verification party can determine the thickness of the document to be tested using only a single side image. Of course, to minimize errors, the verification party can also obtain multiple side images to determine multiple independent document thicknesses, and use the average of the multiple independent document thicknesses as the final detection result of the document thickness to be tested, which will not be elaborated further.
另外,验证方可以获取待检测证件在多种旋转角度下分别对应的多张证件图像,并基于获取到的多张证件图像获取待检测证件的证件厚度和/或证件亮度等证件表面信息,进而基于这类证件表面信息检测待检测证件的真伪。下面分别进行说明:In addition, the verifier can acquire multiple images of the document under inspection at various rotation angles, and based on these images, obtain surface information such as the document's thickness and/or brightness. This surface information can then be used to detect the authenticity of the document. These details are explained below:
B、证件表面信息为证件亮度B. The information on the surface of the document is the brightness of the document.
真实证件通常由PVC(Polyvinyl Chloride,聚氯乙烯)、ABS(AcrylnitrileButadiene Styrene,丙烯腈-丁二烯-苯乙烯共聚物)、PET(Polyethylene Terephthalate,聚对苯二甲酸乙二醇酯)等材质的素材制作而成,而且证件表面通常印制有高反射率的激光纹等防伪标记。而在打印真实证件的图像时,通常会将其打印在纸张上,即伪造的复印件的材质通常为纸张。一般情况下,相对于表面比较粗糙的纸张印制的复印件,由PVC等光滑材质制作的真实证件对于光线的反射率更高,因此在待检测证件旋转过程中,真实证件的亮度变化往往大于复印件的亮度变化。如真实证件中的激光纹亮度变化显著,而复印件中整体亮度变化不明显。基于这一事实,验证方可以通过证件亮度对待检测证件的证件真伪进行检测。例如,验证方可以将待检测证件的证件亮度作为证件表面信息,相应的预设检测条件可以为根据多张证件图像分别确定的多个证件亮度之间的亮度变化量不小于预设的变化量阈值。Genuine identification documents are typically made of materials such as PVC (Polyvinyl Chloride), ABS (Acrylonitrile Butadiene Styrene), and PET (Polyethylene Terephthalate). Furthermore, the surface of these documents usually features anti-counterfeiting marks such as highly reflective laser patterns. When printing images of genuine documents, they are typically printed on paper; therefore, counterfeit copies are usually made of paper. Generally, compared to copies printed on rougher paper, genuine documents made of smooth materials like PVC have a higher reflectivity. Therefore, when the document being tested is rotated, the brightness change of a genuine document is often greater than that of a copy. For example, the brightness change of the laser patterns on a genuine document is significant, while the overall brightness change in a copy is not obvious. Based on this fact, the verifier can determine the authenticity of the document by its brightness. For example, the verifier can use the brightness of the document to be tested as the surface information of the document. The corresponding preset detection condition can be that the brightness variation among multiple document brightness values determined based on multiple document images is not less than a preset variation threshold.
其中,验证方可以根据多张证件图像的证件亮度确定上述亮度变化量。例如,验证方可以根据上述多张图像分别确定待检测证件在相应旋转角度下的证件亮度,然后计算相邻旋转角度下的证件亮度之间的亮度差值,以作为所述亮度变化量。其中,上述多张证件图像分别对应的旋转角度之间的角度差可以设置得比较小,如在待检测证件旋转过程中,可以在较短时间内连续拍摄多张证件图像,如每隔0.5s或0.2s拍摄一张,以避免角度变化过大导致的亮度变化掩盖材质因素导致的亮度变化。另外,上述各张证件图像的像素点颜色值属于同一色彩空间,如各个像素点的颜色值均为RGB(Red-Green-Blue,红色-绿色-蓝色)值或者灰度值等。如验证方可以将各张RGB图像统一转换为灰度图像,以使用像素点的灰度值计算证件亮度。The verifier can determine the aforementioned brightness change based on the brightness of multiple document images. For example, the verifier can determine the brightness of the document under test at corresponding rotation angles based on the multiple images, and then calculate the brightness difference between adjacent rotation angles as the brightness change. The angle difference between the rotation angles corresponding to the multiple document images can be set relatively small. For example, during the rotation of the document under test, multiple images can be continuously captured in a short period, such as every 0.5s or 0.2s, to avoid brightness changes caused by excessive angle changes masking brightness changes caused by material factors. Furthermore, the pixel color values of all the document images belong to the same color space, such as RGB (Red-Green-Blue) values or grayscale values for each pixel. The verifier can convert all RGB images to grayscale images to calculate the document brightness using the grayscale values of the pixels.
以灰度化处理后的两张证件图像为例,验证方可以先确定第一张证件图像中的证件画面对应的第一画面区域和第二张证件图像中的证件画面对应的第二画面区域,然后分别计算第一画面区域中各个像素点灰度值的第一灰度均值和第二画面区域中各个像素点灰度值的第二灰度均值,进而,可以将第一灰度均值与第二灰度均值之间的灰度差值作为这两张证件图像之间的亮度变化量。相应地,在该亮度变化量不小于预设的变化量阈值的情况下,验证方可以确定待检测证件为真实证件。Taking two grayscale-processed ID card images as an example, the verifier can first determine the first image region corresponding to the ID card image in the first image and the second image region corresponding to the ID card image in the second image. Then, the verifier calculates the first grayscale mean of each pixel in the first image region and the second grayscale mean of each pixel in the second image region. The grayscale difference between the first and second grayscale mean values can then be used as the brightness change between the two ID card images. Accordingly, if this brightness change is not less than a preset threshold, the verifier can determine that the ID card to be detected is genuine.
当然,上述亮度变化量也可以使用其他色彩空间中的颜色值进行计算,如对于任一RGB图像,可以分别计算相应画面区域中各个像素点的R均值、G均值和B均值,并将三者的平均值作为该图像的亮度值,并将该亮度值与其他RGB图像的亮度值的差值作为两图像之间的亮度变化量。或者,还可以通过三张以上的证件图像分别计算多个亮度变化量,并在各个亮度变化量均不小于预设的变化量阈值的情况下,确定待检测证件为真实证件,不再赘述。Of course, the aforementioned brightness change can also be calculated using color values in other color spaces. For example, for any RGB image, the average R, average G, and average B values of each pixel in the corresponding image area can be calculated separately, and the average of the three can be used as the brightness value of the image. The difference between this brightness value and the brightness values of other RGB images can be used as the brightness change between the two images. Alternatively, multiple brightness changes can be calculated from three or more document images, and if each brightness change is not less than a preset change threshold, the document to be detected is determined to be a genuine document. Further details are omitted here.
C、证件表面信息为证件内容C. The information on the surface of the document is the content of the document.
对于身份验证请求指定的目标证件,其证件内容(如证件上印制的文字、照片等)通常是固定的。而且对于同一目标证件,其正面和背面的证件内容是相互匹配的。同样的,真实证件的正面和背面对应的证件内容也是相互匹配的。但是在将真实证件打印在纸张上时,通常仅会将证件正面或背面的某一面打印纸张的某一面上,或者将证件的两面均打印在纸张的同一面上——复印件所在纸张的另一面即为空白或者其他内容——此时复印件两面的证件内容并不匹配。基于这一事实,验证方可以通过证件内容对待检测证件的证件真伪进行检测。例如,验证方可以将待检测证件的证件亮度作为证件表面信息,该证件内容包括对应于待检测证件的任一面的第一内容和对应于另一面的第二内容,相应的预设检测条件可以为所述第一内容匹配于所述第二内容。For the target document specified in the authentication request, its content (such as the text and photo printed on the document) is usually fixed. Furthermore, for the same target document, the content on the front and back matches each other. Similarly, the content on the front and back of a genuine document also matches each other. However, when a genuine document is printed on paper, usually only one side of the document (either the front or back) is printed on one side of the paper, or both sides are printed on the same side of the paper—the other side of the paper containing the photocopy is blank or contains other content—in this case, the content on the two sides of the photocopy does not match. Based on this fact, the verifier can detect the authenticity of the document by examining its content. For example, the verifier can use the brightness of the document as surface information, and the document content includes a first content corresponding to one side of the document and a second content corresponding to the other side. The corresponding preset detection condition can be that the first content matches the second content.
其中,验证方可以预先获取标准证件内容集合,该集合中包括至少一种类型的证件分别对应的多个相互关联的标准内容。如任一所述标准内容可以包括:按照预设位置排版的文字和/或图片。如图4所示,该证件的正面包含三个正面标准内容:位于左上方区域的图标401、位于正上方至右上方区域的文字402和于下方中间区域的文字403。该证件的背面包含三个背面标准内容:位于所测上方区域的文字404、位于由上方区域的照片405和位于正下方区域的文字406。其中,上述正面标准内容和背面标准内容分别表征同一证件的正面和反面包含的内容,二者相互关联。标准证件内容集合中可以记录各个证件内容所在证件画面的形状(如图4所示的矩形)、各个证件内容在证件画面中的位置坐标、各个证件内容的类型(图像或文字)等。该标准证件内容集合中可以记录身份证、社保卡、公交卡等多种证件的标准内容,任一证件的多个标准内容(如上述正面标准内容和背面标准内容)之间相互关联。可以理解的是,该结合中可以记录尽可能多的证件对应的标准内容,以提升证件真伪检测系统的适用范围。The verification party can pre-obtain a set of standard document content, which includes multiple interrelated standard contents corresponding to at least one type of document. Any of the standard contents may include text and/or images arranged in a preset position. As shown in Figure 4, the front of the document contains three front standard contents: an icon 401 in the upper left area, text 402 in the upper right area, and text 403 in the lower middle area. The back of the document contains three back standard contents: text 404 in the upper area, a photo 405 in the upper area, and text 406 in the lower area. The aforementioned front and back standard contents represent the content contained on the front and back of the same document, respectively, and are interrelated. The set of standard document content can record the shape of the document image containing each document content (a rectangle as shown in Figure 4), the position coordinates of each document content within the document image, and the type of each document content (image or text), etc. This standard document content set can record the standard content of various documents such as ID cards, social security cards, and public transport cards. Multiple standard content sections of any document (such as the front and back standard content mentioned above) are interconnected. Understandably, this set can record the standard content corresponding to as many documents as possible to broaden the applicability of the document authenticity verification system.
验证方在获取到包含待检测证件任一面(正面或者表面)的证件画面的第一证件图像和包含待检测证件另一面的证件画面的第二证件图像后,可以分别从第一证件图像和第二证件图像中提取第一内容和第二内容。可以理解的是,在上述任一面为待检测证件的正面的情况下,另一面即为待检测证件的背面;或者,在上述任一面为待检测证件的背面的情况下,另一面即为待检测证件的正面。例如,可以在待检测证件的倾斜角度为0°时拍摄对应于待检测证件正面的第一证件图像,并在待检测证件的倾斜角度为180°时拍摄对应于待检测证件背面的第二证件图像。其中,可以采用相关技术中的OCR(Optical CharacterRecognition,光学字符识别)技术从任一证件图像中提取内容,具体过程不再赘述。After obtaining a first image of the document containing either side (front or surface) of the document to be tested and a second image of the document containing the other side of the document to be tested, the verifying party can extract first content and second content from the first and second images, respectively. It is understood that if either side is the front of the document to be tested, the other side is the back; or, if either side is the back, the other side is the front. For example, a first image corresponding to the front of the document to be tested can be taken when the tilt angle of the document to be tested is 0°, and a second image corresponding to the back of the document to be tested can be taken when the tilt angle of the document to be tested is 180°. Content can be extracted from either image using OCR (Optical Character Recognition) technology, the specific process of which will not be elaborated here.
进而,在提取到待检测证件的第一内容和第二内容后,验证方可以在标准证件内容集合中查询匹配于第一内容的第一标准内容,在未查询到第一标准内容(表明标准证件内容集合中并未记录待检测证件对应的标准证件的标准内容)的情况下,可以直接终止针对待检测证件的证件内容处理过程,而通过其他方式确定待检测证件的真伪。而在查询到第一标准内容的情况下,可以确定关联至所述第一标准内容的第二标准内容,然后进一步判断第二内容是否匹配于第二标准内容:在第二内容匹配于第二标准内容的情况下,即可以确定第一内容匹配于所述第二内容。Furthermore, after extracting the first and second contents of the document to be tested, the verifier can query the set of standard document contents for the first standard content that matches the first content. If no first standard content is found (indicating that the set of standard document contents does not record the standard content of the standard document corresponding to the document to be tested), the document content processing for the document to be tested can be terminated directly, and the authenticity of the document to be tested can be determined through other methods. If the first standard content is found, the second standard content associated with the first standard content can be determined, and then it can be further determined whether the second content matches the second standard content: if the second content matches the second standard content, then it can be determined that the first content matches the second content.
以图4为例,在提取出待检测证件的第一内容和第二内容后,可以在标准证件内容集合中查询第一内容所匹配的标准内容。若查询到待检测证件的第一内容匹配于图4所示的正面标准内容,则可以确定该正面标准内容所关联的背面标准内容;并进一步判断待检测证件的第二内容是否匹配于该背面标准内容:若二者匹配,则可以确定待检测证件为真实证件;否则,若二者不匹配,则可以确定待检测证件为伪造的复印件。或者,若查询到待检测证件的第一内容匹配于图4所示的背面标准内容,则可以确定该背面标准内容所关联的正面标准内容;并进一步判断待检测证件的第二内容是否匹配于该正面标准内容:若二者匹配,则可以确定待检测证件为真实证件;否则,若二者不匹配,则可以确定待检测证件为伪造的复印件。Taking Figure 4 as an example, after extracting the first and second contents of the document to be tested, the standard content matching the first content can be queried in the standard document content set. If the first content of the document to be tested matches the front standard content shown in Figure 4, the back standard content associated with the front standard content can be determined; and further, it can be determined whether the second content of the document to be tested matches the back standard content: if they match, the document to be tested is determined to be a genuine document; otherwise, if they do not match, the document to be tested is determined to be a forged photocopy. Alternatively, if the first content of the document to be tested matches the back standard content shown in Figure 4, the front standard content associated with the back standard content can be determined; and further, it can be determined whether the second content of the document to be tested matches the front standard content: if they match, the document to be tested is determined to be a genuine document; otherwise, if they do not match, the document to be tested is determined to be a forged photocopy.
至此,对分别仅将证件厚度、证件亮度和证件内容作为证件表面信息检测待检测证件的真伪的过程描述完毕。可以理解的是,所述证件表面信息中也可以同时包含上述证件厚度、证件亮度和证件内容中的多个表面信息,在这种情况下,验证方可以分别根据证件图像提取各个表面信息,并分别单独使用各个证件厚度检测待检测证件的真伪以得到各个独立检测结果,然后根据各个独立检测结果共同判定待检测证件的真伪,该判定结果即被作为针对待检测证件真伪的最终检测结果。其中,使用任一表面信息单独对待检测证件进行真伪检测的具体过程可以参见上述A、B和C的记载,此处不再赘述。This concludes the description of the process for detecting the authenticity of a document by using only its thickness, brightness, and content as surface information. It is understood that the surface information may also include multiple surface information elements such as thickness, brightness, and content. In this case, the verifier can extract each surface information element from the document image and use each thickness element individually to detect the authenticity of the document, obtaining independent detection results. These independent results are then used to jointly determine the authenticity of the document, and this determination is taken as the final detection result. The specific process of using any one surface information element individually to detect the authenticity of the document can be found in sections A, B, and C above, and will not be repeated here.
例如,在同时将证件厚度、证件亮度和证件内容中的多个表面信息作为证件表面信息的情况下,若上述多个表面信息分别对应的独立检测结果均表明待检测证件为真实证件,则可以判定待检测证件为真实证件;反之,若存在任一表面信息对应的独立检测结果表明待检测证件为伪造的复印件,则可以判定待检测证件为伪造的复印件。或者,在上述独立检测结果以概率值表示的情况下,可以根据历史检测记录统计证件厚度、证件亮度和证件内容分别对应的独立检测结果的准确度,并为各个独立检测结果分别设置与其准确度呈正相关的权重值。进而验证方可以根据该权重值计算各个独立检测结果的加权平均值,以根据该值判定待检测证件的真伪。For example, when considering multiple surface information elements—including document thickness, brightness, and content—as surface information, if the independent test results for each of these surface elements all indicate that the document is genuine, then the document can be determined to be genuine. Conversely, if any independent test result for any surface element indicates that the document is a counterfeit copy, then the document can be determined to be a counterfeit copy. Alternatively, if the independent test results are expressed as probability values, the accuracy of the independent test results for document thickness, brightness, and content can be statistically analyzed based on historical test records, and a weight value positively correlated with the accuracy can be assigned to each independent test result. The verifying party can then calculate a weighted average of the independent test results based on these weight values to determine the authenticity of the document.
通过上述实施例,验证方可以获取到在待检测证件的旋转过程中针对待检测证件采集得到的证件图像,并基于该证件图像获取证件图像的证件表面信息,从而在该证件表面信息满足预设检测条件的情况下,确定待检测证件为真实证件。可以理解的是,因为真实证件的材质、尺寸等与复印件存在较大差异,而这些差异又导致二者的表面信息存在区别,所以本方案在获取到待检测证件的证件图像并获取到证件表面信息后,可以根据该信息准确区分待检测证件是否为真实证件,具有较高的检测准确度,即能够高效识别复印件的假证攻击。Through the above embodiments, the verifier can obtain an image of the document under test captured during the rotation of the document, and obtain the document surface information based on this image. If the document surface information meets preset detection conditions, the verifier can determine that the document under test is genuine. It is understood that because genuine documents differ significantly from photocopies in material, size, etc., and these differences lead to differences in their surface information, this solution, after obtaining the document image and its surface information, can accurately distinguish whether the document under test is genuine based on this information, exhibiting high detection accuracy and effectively identifying counterfeit document attacks using photocopies.
图5是一示例性实施例提供的一种设备的示意结构图。请参考图5,在硬件层面,该设备包括处理器502、内部总线504、网络接口506、内存508以及非易失性存储器510,当然还可能包括其他业务所需要的硬件。本说明书一个或多个实施例可以基于软件方式来实现,比如由处理器502从非易失性存储器510中读取对应的计算机程序到内存508中然后运行。当然,除了软件实现方式之外,本说明书一个或多个实施例并不排除其他实现方式,比如逻辑器件抑或软硬件结合的方式等等,也就是说以下处理流程的执行主体并不限定于各个逻辑单元,也可以是硬件或逻辑器件。Figure 5 is a schematic structural diagram of a device provided in an exemplary embodiment. Referring to Figure 5, at the hardware level, the device includes a processor 502, an internal bus 504, a network interface 506, a memory 508, and a non-volatile memory 510, and may also include other hardware required for services. One or more embodiments of this specification can be implemented in software, for example, the processor 502 reads the corresponding computer program from the non-volatile memory 510 into the memory 508 and then runs it. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
请参考图6,在一软件实施方式中,该检测证件真伪的装置可以包括:Please refer to Figure 6. In one software implementation, the device for detecting the authenticity of documents may include:
图像获取单元601,用于获取待检测证件的证件图像,所述证件图像在待检测证件的旋转过程中采集得到;Image acquisition unit 601 is used to acquire an image of the document to be inspected, the image of which is acquired during the rotation of the document to be inspected;
信息获取单元602,用于基于所述证件图像获取待检测证件的证件表面信息;The information acquisition unit 602 is used to acquire the surface information of the document to be detected based on the document image;
真实确定单元603,用于在所述证件表面信息满足预设检测条件的情况下,确定所述待检测证件为真实证件。The authenticity determination unit 603 is used to determine that the document to be tested is an authentic document when the surface information of the document meets the preset detection conditions.
可选地,所述图像获取单元601还用于:Optionally, the image acquisition unit 601 is further configured to:
获取所述待检测证件在多种旋转角度下的多张证件图像。Acquire multiple images of the document to be detected at various rotation angles.
可选地,所述证件表面信息包括证件亮度,所述预设检测条件包括:根据所述多张证件图像分别确定的多个证件亮度之间的亮度变化量不小于预设的变化量阈值。Optionally, the document surface information includes document brightness, and the preset detection condition includes: the brightness variation among the multiple document brightness values determined based on the multiple document images is not less than a preset variation threshold.
可选地,所述信息获取单元602还用于:Optionally, the information acquisition unit 602 is further configured to:
根据所述多张图像分别确定所述待检测证件在相应旋转角度下的证件亮度;The brightness of the document to be detected at the corresponding rotation angle is determined based on the multiple images.
计算相邻旋转角度下的证件亮度之间的亮度差值,以作为所述亮度变化量。Calculate the brightness difference between the document brightness at adjacent rotation angles, and use it as the brightness change.
可选地,所述证件表面信息包括证件内容,所述证件内容包括对应于所述待检测证件的任一面的第一内容和对应于另一面的第二内容;所述预设检测条件包括:所述第一内容匹配于所述第二内容。Optionally, the document surface information includes document content, which includes first content corresponding to one side of the document to be tested and second content corresponding to the other side; the preset detection conditions include: the first content matches the second content.
可选地,所述真实确定单元603还用于:Optionally, the real determination unit 603 is further configured to:
在标准证件内容集合中查询匹配于所述第一内容的第一标准内容,以及关联至所述第一标准内容的第二标准内容,所述标准证件内容集合中包括至少一种类型的证件分别对应的多个相互关联的标准内容;The standard document content set is used to query a first standard content that matches the first content and a second standard content that is associated with the first standard content. The standard document content set includes multiple interrelated standard contents corresponding to at least one type of document.
在所述第二内容匹配于所述第二标准内容的情况下,确定所述第一内容匹配于所述第二内容。If the second content matches the second standard content, then the first content is determined to match the second content.
可选地,任一标准内容包括:按照预设位置排版的文字和/或图片。Optionally, any standard content includes: text and/or images arranged in preset positions.
可选地,所述证件表面信息包括证件厚度;所述预设检测条件包括:所述证件厚度不小于预设的厚度阈值。Optionally, the document surface information includes the document thickness; the preset detection conditions include: the document thickness is not less than a preset thickness threshold.
可选地,所述信息获取单元602还用于:Optionally, the information acquisition unit 602 is further configured to:
确定所述证件图像中的侧面图像;Determine the side view in the document image;
根据所述侧面图像确定所述待检测证件的侧面的长度和宽度,并将所述宽度与长度的比值作为所述证件厚度;或者,The length and width of the side of the document to be inspected are determined based on the side image, and the ratio of the width to the length is taken as the thickness of the document; or,
根据所述侧面图像确定所述待检测证件的侧面的宽度和当前旋转角度,并根据所述宽度和所述当前旋转角度确定所述待检测证件的实际厚度值,以作为所述证件厚度。The width and current rotation angle of the side of the document to be inspected are determined based on the side image, and the actual thickness value of the document to be inspected is determined based on the width and the current rotation angle, which is used as the thickness of the document.
可选地,所述图像获取单元601还用于:Optionally, the image acquisition unit 601 is further configured to:
在拍摄预览画面中展示有处于旋转过程中的待检测证件的情况下,拍摄所述证件图像。If the document to be inspected is shown rotating in the preview screen, take an image of the document.
可选地,还包括:Optionally, it also includes:
信息展示单元604,用于展示旋转提示信息,所述旋转提示信息用于介绍所述待检测证件的旋转方式。The information display unit 604 is used to display rotation prompt information, which describes the rotation method of the document to be inspected.
可选地,所述图像获取单元601还用于:Optionally, the image acquisition unit 601 is further configured to:
在所述拍摄预览画面中展示定位标识,并在所述待检测证件的证件预览位置匹配于所述定位标识的情况下,拍摄所述证件图像。A location marker is displayed in the shooting preview screen, and the document image is captured when the document preview position matches the location marker.
可选地,所述图像获取单元601还用于:Optionally, the image acquisition unit 601 is further configured to:
识别所述拍摄预览画面中展示的证件画面的特征点,并根据所述特征点确定证件的预览角度;Identify the feature points of the ID card image displayed in the shooting preview screen, and determine the preview angle of the ID card based on the feature points;
在所述预览角度处于预设角度范围的情况下,拍摄所述证件图像。When the preview angle is within a preset angle range, the image of the document is captured.
可选地,所述图像获取单元601还用于:Optionally, the image acquisition unit 601 is further configured to:
获取所述待检测证件的旋转过程对应的旋转视频,并从所述旋转视频的视频图像帧中选取所述证件图像。Obtain the rotation video corresponding to the rotation process of the document to be detected, and select the document image from the video image frames of the rotation video.
可选地,还包括:Optionally, it also includes:
伪造确定单元605,用于在所述证件表面信息不满足预设检测条件的情况下,确定所述待检测证件为伪造的复印件。The forgery determination unit 605 is used to determine that the document to be tested is a forged photocopy when the surface information of the document does not meet the preset detection conditions.
可选地,所述待检测证件的证件图像被响应于操作请求而获取,所述装置还包括:Optionally, the image of the document to be detected is acquired in response to an operation request, and the device further includes:
操作执行单元606,用于在确定所述待检测证件为真实证件的情况下,执行对应于所述操作请求的预设操作。The operation execution unit 606 is used to perform a preset operation corresponding to the operation request when it is determined that the document to be detected is a genuine document.
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.
在一个典型的配置中,计算机包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computer includes one or more processors (CPU), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带、磁盘存储、量子存储器、基于石墨烯的存储介质或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
在本说明书一个或多个实施例使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书一个或多个实施例。在本说明书一个或多个实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this specification. The singular forms “a,” “described,” and “the” used in one or more embodiments of this specification and in the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and/or” as used herein refers to and includes any or all possible combinations of one or more associated listed items.
应当理解,尽管在本说明书一个或多个实施例可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书一个或多个实施例范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of one or more embodiments of this specification, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "in response to a determination," or "when," or "in the event of a determination."
以上所述仅为本说明书一个或多个实施例的较佳实施例而已,并不用以限制本说明书一个或多个实施例,凡在本说明书一个或多个实施例的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本说明书一个或多个实施例保护的范围之内。The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit the scope of one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this specification should be included within the scope of protection of one or more embodiments of this specification.
Claims (16)
Publications (2)
| Publication Number | Publication Date |
|---|---|
| HK40062631A HK40062631A (en) | 2022-06-17 |
| HK40062631B true HK40062631B (en) | 2024-01-05 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP3522072B1 (en) | Method and apparatus for verifying certificates and identities | |
| JP7165746B2 (en) | ID authentication method and device, electronic device and storage medium | |
| CN111652223B (en) | Certificate identification method and device | |
| EP3678049B1 (en) | Identity verification method and device using verification of identity document of a user | |
| CN110263775B (en) | Image recognition method, device, and device, and authentication method, device, and device | |
| CN107832679B (en) | A kind of certificate verification, identity verification method and device | |
| US20160267494A1 (en) | Tactile anti-forgery method using random raised structures | |
| CN113743396B (en) | Method and device for identifying injection attacks during document recognition process | |
| CN110263805A (en) | Certificate verification, auth method, device and equipment | |
| CN110705350B (en) | Document recognition method and device | |
| CN111767845B (en) | Certificate identification method and device | |
| CN113837026B (en) | Method and device for detecting authenticity of certificate | |
| CN113705486B (en) | Methods and devices for detecting authenticity of documents | |
| HK40062631B (en) | Method and device for detecting authenticity of certificate | |
| HK40062631A (en) | Method and device for detecting authenticity of certificate | |
| CN112434687B (en) | Image detection method, device, equipment and storage medium | |
| US10796199B1 (en) | Image recognition and authentication | |
| CN114999004B (en) | Attack Identification Methods | |
| US12555401B2 (en) | Auto-document detection and capture | |
| US20230316795A1 (en) | Auto-Document Detection & Capture | |
| CN119090568A (en) | Store authenticity verification method, device, storage medium and computer equipment | |
| HK40033014A (en) | Method and apparatus for card recognition | |
| HK40033014B (en) | Method and apparatus for card recognition | |
| HK40037365A (en) | Certificate authenticity identification method and apparatus, computer readable medium, and electronic device | |
| CN112784833A (en) | Certificate identification method and device and server |