The present invention relates to a verification method, and in particular, to a verification method for user identity and age.
With the rapid development of intelligent mobile devices and e-commerce, people of all ages each have at least one smart mobile device, and as online shopping is quite popular, any user can use his/her smart mobile device to connect and to log into a shopping host, the shopping host serves as a medium of the online transactions between the consumers and the suppliers to allow the consumers to do online shopping anytime, anywhere; through online shopping, the consumers can buy various kinds of merchandizes, including those that have a statutory age limit, such as tobacco and alcoholic beverages, etc.
However, a consumer needs only an account and a password to log into the shopping host. In other words, the shopping host verifies the consumer's identity only through the account and password, as long as the account and password are verified, even an under-age consumer can purchase tobacco and alcoholic beverages through operating a smart mobile device. It is clear from the aforementioned, the verification procedure using only account and password is neither sufficient nor effective to comply with the governmental regulations.
In view of the above, the main purpose of the present invention is to provide a method for verifying user identity and age to overcome the insufficiency of the present technology of authentication in verifying identify only through the account and password.
The present invention provides a method for verifying user identity and age, executed on a mobile device which includes a front camera and a rear camera and connects to a server to perform an online transaction, and the method comprises the steps as follows: taking a photograph of a user's face to receive a human face's frontal image by the front camera; taking a photograph of a physical identification document by the rear camera to receive an image of the identification document; analyzing the image of the identification document to extract a headshot and a birthday code; comparing the human face's frontal image and the headshot to determine whether there is a coincidence or not; calculating an age value based on the birthday code and a current date, so as to determine whether the age value is greater than or equal to a threshold value; when the human face's frontal image and the headshot coincide, plus the age value is greater than or equal to the threshold value, then the verification is passed and the online transaction proceeds; when the human face's frontal image and the headshot do not coincide or the age value is smaller than the threshold value, then the verification fails and the online transaction is terminated.
The verifying method of the present invention has the following functions and effects.
The front camera and the rear camera are the basic equipment for the mobile device, so the verification method can be widely applied on mobile devices on the market.
The present invention, through a mobile device, takes photographs for a user and a physical identification document, thereby the photographed frontal image of the user and the photographed image of the identification document are bound together for verifying whether or not the user and the headshot on the identification document are the same person, thus avoiding fraud of the physical identification document by other users.
The present invention calculates an age value based on the date of birth code and a present date, and thus, the calculated age value is the actual age of the user's, which serves as an objective basis for judging the age, then, and when the age value is smaller than the threshold value, the online transaction will be terminated, thus effectively preventing the consumers who do not meet the statutory age limit from purchasing merchandise that they are not eligible to buy.
The technical solutions of the present invention are described in detail below, with reference to the accompanying drawings.
Referring to
The mobile device 10 may be connected to a server via the Internet for an online transaction. Referring to
The rear camera 12 takes a photograph of a physical identification document (Step S11) to receive an image of the identification document (step S12); the front camera 11 takes a photograph of the face 31 of a user 30 (step S21) to receive a human face's frontal image 110 (step S22), wherein, referring to
The identification document image 120 and the human face's frontal image 110 can be taken at the same time by the mobile device 10 that supports the front camera 11 and the rear camera 12 which can take photographs simultaneously. For a mobile device 10 that does not support the front camera 11 and the rear camera 12 taking photographs at the same time, the application program may first direct the user 30 to photograph the human face's frontal image 110 through the front camera 11, and after receiving the human face's frontal image 110, the application program directs the user 30 to photograph the identification document image 120 through the rear camera 12 within a time limit (for example, several seconds); similarly, the application program may first direct the user 30 to photograph the identification document image 120 through the rear camera 12, and then within the time limit, photograph and receive the human face's frontal image 110 through the front camera 11.
Upon obtaining the identification document image 120, the document image 120 is analyzed to extract a headshot and a date of birth code from the document image 120 or to further extract an identity number (Step S13); it is to be noted that extracting part of the image or text from the image is general knowledge in the field of image processing technology. For example, the mobile device 10 may store in advance or may download from the Internet the information of identification document formats of various countries or various types, each identification document format's information can be based on the boundaries of the identification document image 120 to cut and to locate the positions of the headshot, the date of birth and ID number fields, and through the means of optical characters recognition (OCR), characters can be extracted from the identification document image 120. Therefore the characters recognized in the date of birth field are the date of birth, and the characters identified in the ID number field are the ID number.
Hereinafter, the processing of the image of the identification document will be described with examples. With reference to
After recognizing the date of birth code, an age value is calculated based on the date of birth code and a current date (step S14), that is, the difference between the current date and the date of birth is defined as the age value. The current date is synchronized from the Internet, e.g., the mobile device 10 may be connected to a server through the Internet to synchronize the current date via the server, or the current date may be the date generated by the mobile device 10's own clock program.
After calculating the age value, it is determined whether or not the age value is greater than or equal to a threshold value (step S15), wherein the threshold value may either be a value preset in the application program, or an updated value downloaded from a server. When it is determined that the age value is greater than or equal to the threshold value, then the age indicated by the identification document image 120 satisfies one condition. On the other hand, according to
As mentioned earlier, when the age value is greater than or equal to the threshold value and the human face's frontal image coincides with the headshot image, both judgment results thereof are required to be positive (Step S31) for the network transaction to proceed; conversely, when the age value is less than the threshold value, or the human face's image is not consistent with the headshot image (i.e., if the similarity value between the two images is lower than the threshold percentage value.), either one of the judgment results thereof is required to be negative for the verification to fail (step S32), thereby the network transaction is terminated. In addition to the initial identification of the user identity through the human face recognition, the present invention can further determine whether or not the identity number 530 recognized in step S13 qualifies, so as to further provide anti-forgery effects. Take the ID card of the Republic of China as an example, which follows some standardization that allows the application program to execute a checking procedure for the ID number of the ID card to determine whether the identity number 530 is acceptable. If not, it may indicate that the physical identification document is a forged one and the verification fails.
In summary, for example, the user 30 may operate the mobile device 10 to connect to a server of a wine supplier to purchase alcoholic goods online. As the consumer who purchases the alcoholic goods may be restricted by a statutory age limit; the threshold value in step S15 may be, for example, 18 years old. When the age value calculated in step S14 is greater than or equal to 18 years old, it means that the age indicated by the identification document image 120 has reached the statutory age eligible to purchase alcoholic goods; on the contrary, when the calculated age value is less than 18 years old, it means that the age indicated by the identification document image 120 does not yet reach the statutory age eligible to purchase alcoholic goods, and the verification fails and the step of purchasing alcoholic goods is terminated. On the other hand, the present invention also uses the means of human face recognition to determine if the user and the headshot image of the physical identification document coincide or not; if not, the verification also fails.
In addition to the above-mentioned actions of purchasing alcoholic goods, the present invention can also be carried out in an age-restricted online transaction, such as using the mobile device 10 to purchase tobacco products, to rent cars, to purchase cars, and so on.