WO2020233009A1 - Identity authentication method and apparatus, computing device, and storage medium - Google Patents

Identity authentication method and apparatus, computing device, and storage medium Download PDF

Info

Publication number
WO2020233009A1
WO2020233009A1 PCT/CN2019/117696 CN2019117696W WO2020233009A1 WO 2020233009 A1 WO2020233009 A1 WO 2020233009A1 CN 2019117696 W CN2019117696 W CN 2019117696W WO 2020233009 A1 WO2020233009 A1 WO 2020233009A1
Authority
WO
WIPO (PCT)
Prior art keywords
identity verification
camera
identity
user
duration
Prior art date
Application number
PCT/CN2019/117696
Other languages
French (fr)
Chinese (zh)
Inventor
蒋旭昂
Original Assignee
平安普惠企业管理有限公司
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 平安普惠企业管理有限公司 filed Critical 平安普惠企业管理有限公司
Publication of WO2020233009A1 publication Critical patent/WO2020233009A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0861Network architectures or network communication protocols for network security for authentication of entities using biometrical features, e.g. fingerprint, retina-scan

Definitions

  • This application relates to the field of face recognition technology, and in particular to an identity verification method, device, computing device, and computer non-volatile readable storage medium.
  • User identity legality verification is one of the indispensable links in many network services. Therefore, user identity legality verification is the focus of network security.
  • the inventor of the present application realizes that at present, when users use software running on the terminal, such as an App (Application, application) or small program on a mobile phone terminal, to perform operations such as requesting to open a specific service, they often use fingerprints or signatures. In this way, the accuracy of identifying the user’s identity is low and the risk is high; in addition, the user’s identity can also be verified by calling the camera of the terminal, such as the front camera of the mobile phone. Face recognition is performed to verify whether the user's identity is legal. In this way, recording consumes more resources such as storage and bandwidth, and the cost is higher.
  • the purpose of this application is to provide an identity verification method, device, computing device, and computer non-volatile readable storage medium.
  • an identity verification method including:
  • the client When receiving the identity verification request from the client, returning to the client the protocol information containing the user identity verification means, wherein the user identity verification means in the protocol information includes video recording;
  • the pixel value of the camera determine the total duration of the recording and whether to start dual identity verification
  • an identity verification device including:
  • the return module is configured to, when receiving an identity verification request from the client, return to the client the protocol information including the means of user identity verification;
  • the obtaining module is configured to obtain the pixel value of the camera of the user end in response to receiving an instruction to accept the protocol information from the user end;
  • the first determining module is configured to determine the total duration of recording and whether to start dual identity verification according to the pixel value of the camera;
  • the indication module is configured to instruct the user terminal’s camera to record a video whose duration is the total duration in the background according to a predetermined rule, and instruct the client terminal to receive the dual identity verification from the user.
  • Identity verification information, the identity verification video returned by the client and the double identity verification information are obtained as identity verification information;
  • the receiving module is configured to receive the identity document information uploaded by the user terminal;
  • the second determining module is configured to determine that the user's identity is legal based on the identity verification information and the identity document information.
  • a computing device including a memory and a processor, the memory is used to store a program of the processor's identity verification method, and the processor is configured to execute the identity verification method via the program Perform the following processing: when receiving an identity verification request from the user end, return to the user end the protocol information containing the user identity verification means, wherein the user identity verification means in the protocol information includes a video recording;
  • the client’s instruction for accepting the protocol information obtains the pixel value of the user’s camera; according to the pixel value of the camera, the total duration of recording and whether to start dual identity verification is determined; when it is determined to start dual identity verification Next, according to a predetermined rule, instruct the camera of the user end to record a video of the total duration in the background, and instruct the user end to receive the dual identity verification information from the user to obtain the identity verification video and
  • the dual identity verification information is used as identity verification information; if it is determined that dual identity verification is not to be initiated, the user’s camera is instructed to record a video whose duration is
  • a computer non-volatile readable storage medium storing computer readable instructions
  • a program of an identity verification method is stored thereon.
  • the program of the identity verification method is executed by a processor, the following processing is implemented:
  • the protocol information containing the user identity verification means is returned to the client, wherein the user identity verification means in the protocol information includes video recording; in response to receiving the request from the client Accept the instructions of the protocol information to obtain the pixel value of the camera on the client side; determine the total recording time and whether to start dual identity verification according to the pixel value of the camera; in the case of determining to start dual identity verification,
  • the predetermined rule instructs the camera of the client to record a video with the total duration in the background, and instructs the client to receive the dual identity verification information from the user to obtain the identity verification video returned by the client and the second Re-identification information is used as identity verification information; in the case of determining not to start double-identity verification, instruct the camera of the user end to
  • the above-mentioned identity verification method, device, computing device and computer non-volatile readable storage medium use video recording for identity verification, which improves the security of identity verification.
  • the total recording volume is determined according to the pixel value of the camera. The length of time and whether to start the dual identity verification action achieves a balance between the security of identity verification and the resource consumption during identity verification.
  • Fig. 1 is a schematic diagram showing an application scenario of an identity verification method according to an exemplary embodiment
  • Fig. 2 is a flowchart showing an identity verification method according to an exemplary embodiment
  • FIG. 3 is a detailed flowchart of step 230 of an embodiment shown according to the embodiment corresponding to FIG. 2;
  • FIG. 4 is a flowchart of a predetermined rule according to an embodiment shown in the embodiment corresponding to FIG. 2;
  • FIG. 5 is a detailed flowchart of step 270 of an embodiment shown according to the embodiment corresponding to FIG. 2;
  • Fig. 6 is a block diagram showing an identity verification device according to an exemplary embodiment
  • Fig. 7 is an exemplary block diagram showing a computing device for implementing the aforementioned identity verification method according to an exemplary embodiment
  • Fig. 8 shows a computer non-volatile readable storage medium for implementing the above-mentioned identity verification method according to an exemplary embodiment.
  • This application first provides an identity verification method.
  • identity verification refers to the legitimacy of the identity information provided by the user to determine whether the user’s identity information is authentic and credible.
  • the method of this application can be fixed to various terminals, such as servers, cloud computing physical infrastructure, smart phones, tablet computers, desktop computers, notebook computers, iPads, self-service terminals, etc. Anything that has computing processing functions and can communicate with external devices Communication terminal.
  • Fig. 1 is a schematic diagram showing an application scenario of an identity verification method according to an exemplary embodiment. As shown in FIG. 1, it includes a user's mobile terminal, namely a smart phone 110, and an implementation terminal of the application, namely a server 120.
  • the server 120 is connected to the smart phone 110 through a communication link composed of a cellular network, a backbone network, and other network facilities, so as to complete the transfer of data and information.
  • the architecture between the smart phone 110 and the server 120 may be a C/S (Client/Server, client/server) architecture or a B/S (Brower/Server, browser/server) architecture.
  • Identity verification is used to ensure that user accounts are not stolen or to ensure that users are eligible to use specific services.
  • Common methods of identity verification can be online signature, fingerprint verification, video verification, etc. All of these methods require the user to use a smartphone 110 to communicate with the server 120.
  • Submitting information for identity verification, for example, video verification requires the user to use the smart phone 110 to record the user's own video and upload it to the server 120.
  • Fig. 2 is a flow chart showing an identity verification method according to an exemplary embodiment. As shown in Figure 2, it includes the following steps:
  • Step 210 When receiving the identity verification request from the client, the protocol information including the user's identity verification means is returned to the client.
  • the user identity verification means in the protocol information includes video recording.
  • the protocol information and the means of user authentication contained in it are all text information recorded in the form of words, symbols, etc.
  • the identity verification request is an Internet request sent by the client to the local end, and it can be a request based on various Internet protocols, for example, it can be a request under the HTTP/HTTPS protocol.
  • the received identity verification request from the client includes a service identifier, and when the identity verification request from the client is received, returning to the client the protocol information including the user identity verification means includes:
  • the acquired user identity verification means corresponding to the business identity includes video recording, adding the user identity verification means to a preset protocol information template to obtain protocol information including the user identity verification means;
  • Protocol information including the means of user identity verification to the client.
  • the specific method of returning the protocol information containing the user authentication means to the client is to return to the user a page recording the protocol information containing the user authentication means, for example, it may be written in HTML5 language Web page.
  • the specific method of returning the protocol information containing the user authentication means to the user terminal is to return to the user terminal a web page recorded with a link to the protocol information.
  • Step 220 In response to receiving an instruction from the client to accept the protocol information, obtain the pixel value of the camera of the client.
  • the user's action of accepting the agreement information at the user end triggers the sending of an instruction to accept the agreement information to the local end.
  • the user when the user accepts the protocol information on the client side, he will click a button or other control; when the local end monitors the action of the corresponding control, it is equivalent to getting an instruction from the client side to accept the protocol information.
  • the user communicates with the local terminal through an application installed on the user terminal.
  • the application When receiving an instruction from the user terminal to accept the protocol information, the application will be triggered to read the pixel value of the camera of the user terminal and Return to this end.
  • the system on the user side provides the Camera.getParameters() interface, which provides a way to obtain the camera parameters of the device.
  • the application installed on the user side contains an instruction to call the interface.
  • When receiving the The instructions of the protocol information will execute the instructions that call the interface to obtain the camera parameters of the device returned by the interface, where the camera parameters include the pixel value of the camera.
  • the user communicates with the local terminal through an application installed on the user terminal.
  • the user terminal installs the application
  • the user terminal sends the identifier of the user terminal and the pixel value of the camera to the local terminal
  • the local terminal transmits the The identification of the user end and the pixel value of the camera are correspondingly stored in the database.
  • Each instruction from the user end received by the local end carries the identification of the user end, and the response is to receiving an instruction from the user end to accept the protocol information ,
  • Obtaining the pixel value of the camera of the user end includes:
  • the user communicates with the local terminal through an application installed on the client terminal.
  • the application When receiving an instruction from the client terminal to accept the protocol information, the application will be triggered to read the model of the client terminal and return to the local terminal.
  • the obtaining the pixel value of the camera of the user end includes:
  • the pixel value of the camera corresponding to the model of the client terminal is acquired through the preset correspondence table of the client terminal model and the pixel value of the camera as the pixel value of the camera of the client terminal.
  • the user communicates with the local end through an application installed on the user end, and the application can read file information stored on the user end.
  • Obtaining the pixel value of the camera of the user end includes: in response to receiving an instruction from the user end to accept the protocol information, obtaining a request from the user end for the resolution of the photo stored on the user end; receiving the user end The terminal returns the resolution of the stored photo; according to the resolution, the pixel value of the camera of the user terminal is determined.
  • the resolution of the received photo is 3000 ⁇ 4000, it can be determined that the pixel value of the camera of the user end is 12 million pixels.
  • Step 230 Determine the total duration of recording and whether to start dual identity verification according to the pixel value of the camera.
  • Dual identity verification is an additional identity verification method based on the video.
  • the dual identity verification is: sending a prompt voice instruction information to the client terminal, instructing the user of the client terminal to take a predetermined action.
  • the predetermined action may be opening the mouth, blinking, nodding, etc.
  • step 230 is specifically performed in the following manner:
  • T out is the determined total recording duration
  • P is the pixel value of the camera
  • Pref is the first preset camera pixel reference value
  • T ref1 is the first predetermined duration
  • T ref2 is the second predetermined duration, where, T ref2 is less than or equal to T ref1 ;
  • the advantage of this embodiment is that, on the one hand, when the pixel value of the camera is less than or equal to the preset pixel reference value of the camera, the recording duration is inversely proportional to the pixel value of the camera, that is, the smaller the pixel value of the camera, the The higher the total duration of the recorded video, the total duration of the video obtained is different for different pixel values of the camera, so that when the pixel value of the camera is small, the total duration of the video can be increased to obtain an identity verification video that contains more information.
  • step 230 of an embodiment is shown, which specifically includes the following steps:
  • Step 231 When the pixel value of the camera reaches the first predetermined pixel value threshold, the preset first duration is used as the total duration of recording and it is determined not to start dual identity verification.
  • the first duration can be any duration, for example, it can be 10 minutes.
  • Step 232 When the pixel value of the camera is less than the first predetermined pixel value threshold and greater than or equal to the second predetermined pixel value threshold, use the preset second duration as the total duration of recording and determine not to start dual identity verification.
  • the second duration is greater than the first duration.
  • Step 233 In the case that the pixel value of the camera is less than the second predetermined pixel value threshold, use the preset third duration as the total duration of recording and determine to start dual identity verification, wherein the third duration is greater than the second duration .
  • the third duration is greater than the second duration.
  • the size relationship of the total duration selected as the recording is: third duration>second duration>first duration
  • the size relationship of the total duration selected as the recording corresponding to the required camera pixel value is The third duration ⁇ the second duration ⁇ the first duration, it can be seen that as the obtained pixel value of the camera of the user end increases, the total duration of the selected video recording becomes shorter and shorter.
  • the advantage of this embodiment is that the predetermined pixel value threshold is used to distinguish the recording duration, which ensures that when the pixel value of the camera is low, the video recording duration can be increased to obtain an identity verification video that contains more information.
  • the pixel value of the camera is very small, double identity verification must be started to ensure the reliability and security of identity verification.
  • Step 240 In the case where it is determined to start dual identity verification, instruct the camera of the client terminal to record a video with the total duration in the background according to a predetermined rule, and instruct the client terminal to receive dual identity verification information from the user To obtain the identity verification video and the double identity verification information returned by the client as identity verification information.
  • the user end is a smart phone
  • the camera of the user end is a front camera
  • the dual identity verification information is the action information received by the user terminal and merged into the identity verification video by the user according to an instruction.
  • the user terminal the user terminal’s camera is instructed to record in the background for the duration Video with a total length of time, and instruct the client to receive the dual identity verification information from the user, and obtain the identity verification video and the dual identity verification information returned by the client, as identity verification information, including: according to predetermined rules Instruct the camera of the client to record a video with the total duration in the background, and instruct the client to receive the dual identity verification information from the user, and obtain the dual identity returned by the client by means of a video stream
  • the authentication video of the authentication information is used as the authentication information.
  • the advantage of this embodiment is that by combining the data of the identity verification video and the double identity verification information at the same time, it is avoided that the two pieces of data are received separately and the resource consumption is reduced.
  • the way of receiving the identity verification video returned by the client is to receive the entire identity verification video obtained from the video returned by the client after the camera recording of the client ends.
  • the predetermined rule is a way to instruct the camera of the user end to record video in the background.
  • the predetermined rule includes: obtaining the current time and two random numbers; determining the larger random number from the two random numbers as the first random number, and using the smaller random number as the first random number.
  • the advantage of this embodiment is that when a random time is selected to instruct the client to start camera recording, a random time is selected to end the recording, which can further reduce the possibility of screen recording cheating due to the user's grasp of the recording start time in advance It further improves the authenticity of the obtained identity verification video, and improves the legality and security of identity verification.
  • the obtaining the current time and two random numbers includes:
  • the advantage of this embodiment is that the distance between the two random numbers is limited to ensure that the distance between the two random numbers is large enough, so that the continuous recording time of the camera based on the two random numbers is large enough , To a certain extent, to ensure the reliability and safety of obtaining video.
  • the predetermined rule includes:
  • Any one of the two random numbers is selected as the third random number, and the other random number is used as the fourth random number;
  • every second is the time period of the third random number, instructing the camera of the user side to record the video of the time period of the fourth random number for the number of seconds until the recorded video Reach the stated duration;
  • the video recorded by the user terminal during all the time periods corresponding to the fourth random number is used as the identity verification video.
  • the advantage of this embodiment is that since the recording time interval and recording duration of the identity verification video are random, the credibility of the obtained identity verification video is improved.
  • Step 250 In the case where it is determined not to start dual identity verification, instruct the camera of the client terminal to record a video with the total duration in the background according to a predetermined rule, and obtain the identity verification video returned by the client terminal as identity verification information.
  • the identity verification video returned by the client can be used as the identity verification information.
  • the method used in this step to instruct the camera of the client to record video is the same as the aforementioned predetermined
  • the specific implementation of the rules can be the same or different, and will not be repeated here.
  • Step 260 Receive the identity document information uploaded by the user terminal.
  • the ID information uploaded by the user may be various information that can determine the user's face image, such as the front photo of the resident ID card or the passport photo.
  • Step 270 Determine that the user's identity is legal based on the identity verification information and the identity document information.
  • step 270 specifically includes the following steps:
  • Step 271 In a case where the identity verification information includes dual identity verification information, verify whether the user's identity is legal based on the dual identity verification information.
  • the dual identity verification information is a blinking action
  • the verifying whether the user's identity is legal based on the dual identity verification information includes:
  • Step 272 If yes, determine that the user's identity is legal based on the identity verification video and the identity document information.
  • Step 273 In the case that the identity verification information does not include dual identity verification information, determine that the user's identity is legal based on the identity verification video and the identity document information.
  • the determining that the user's identity is legal based on the identity verification information and the identity document information includes: dividing the identity verification video into frames to obtain multiple image frames; and determining the divided image frames Whether the number of image frames in which the human face is consistent with the human face in the identity document information is greater than a predetermined image frame number threshold; if so, it is determined that the identity of the user is legal.
  • the method of dividing the authentication video into image frames can be achieved by calling tools such as Opencv and MATLAB.
  • the determining that the user’s identity is legal based on the identity verification information and the identity document information includes: dividing the identity verification video into frames to obtain multiple image frames; In determining whether the number of image frames with a human face consistent with the human face in the identity document information is greater than a predetermined image frame number threshold; if so, it is determined that the identity of the user is legal.
  • the judging whether the number of image frames in which the human face is consistent with the human face in the identity document information in the divided image frames is greater than a predetermined image frame number threshold includes:
  • the specific method of comparing whether the face in the image frame is consistent with the face in the ID information can be performed by using a trained neural network model, for example, a convolutional neural network model can be used to compare faces; It can also be done by calling an existing application programming interface.
  • a trained neural network model for example, a convolutional neural network model can be used to compare faces; It can also be done by calling an existing application programming interface.
  • the advantage of this embodiment is that, by judging all image frames by comparing faces, and then obtaining the number of image frames that record the faces consistent with the faces in the ID information, the identity verification video is legal Sex can be more guaranteed.
  • judging whether the number of image frames in which the human face is consistent with the human face in the ID information is greater than a predetermined image frame number threshold in the divided image frames includes:
  • the judgment is ended, and it is determined that the number of image frames in the divided image frames with the human face consistent with the human face in the ID information is greater than the predetermined image frame number threshold.
  • This embodiment improves the efficiency of verifying the legality of the user's identity to a certain extent, and reduces the calculation overhead.
  • the determining that the user's identity is legal based on the identity verification video and the identity document information includes:
  • the number of image frames divided into different identity verification videos may be different.
  • the advantage of this embodiment is that the number of image frames that match the human face with the human face in the ID information is sum The relative size relationship of the number of all image frames is used as a standard for determining the legality of the user's identity, which improves the rationality and accuracy of identity verification.
  • the determining that the user's identity is legal based on the identity verification video and the identity document information includes:
  • any random number within the range less than the predetermined fifth random number threshold is used as the fifth random number, and any random number within the range less than the predetermined sixth random number threshold is selected as the sixth random number;
  • the advantage of this embodiment is that the image frames are extracted by random sampling to verify whether the user's identity is legal, which reduces the amount of calculation, thereby improving the efficiency of user authentication. At the same time, the process of extracting image frames is completely random. , To ensure the security of identity verification.
  • Fig. 4 is a flowchart of a predetermined rule according to an embodiment shown in the embodiment corresponding to Fig. 2. As shown in Figure 4, it includes the following steps:
  • Step 410 Obtain the current time and a random number.
  • the random number is acquired within a predetermined range.
  • the predetermined range may be [0,100].
  • Step 420 Calculate the sum of the current time and the time period in which the number of seconds is the random number, as the time for starting the camera of the user end to start recording.
  • the current time is 20:18:09
  • Step 430 When the current time reaches the time when the camera of the client terminal is started to start recording, instruct the camera of the client terminal to start recording with the total duration to obtain an identity verification video.
  • the advantage of this embodiment is that since the time for instructing the camera on the user side to start recording is determined according to a random number, the time for instructing the camera on the user side to start recording is random.
  • the advantage of this is that it avoids screen recording cheating caused by the user in advance of the recording start time, such as illegal acts such as authentication by an intermediary or counterfeit authentication by others, and improves the authenticity of the obtained identity verification video.
  • This application also provides an identity verification device, and the following are device embodiments of this application.
  • Fig. 6 is a block diagram showing an identity verification device according to an exemplary embodiment. As shown in FIG. 6, the identity verification device 600 includes:
  • the return module 610 is configured to, when receiving an identity verification request from the client, return to the client the protocol information including the user's identity verification means.
  • the obtaining module 620 is configured to obtain the pixel value of the camera of the user end in response to receiving an instruction from the user end to accept the protocol information.
  • the first determining module 630 is configured to determine the total duration of recording and whether to start dual identity verification according to the pixel value of the camera.
  • the indicating module 640 is configured to instruct the user terminal’s camera to record a video with the total duration in the background in the background according to a predetermined rule, and instruct the user terminal to receive the secondary identity verification from the user. Re-identification information, obtaining the identity verification video returned by the user terminal and the double identity verification information as identity verification information; and
  • the receiving module 650 is configured to receive the identity document information uploaded by the user terminal.
  • the second determining module 660 is configured to determine that the user's identity is legal based on the identity verification information and the identity document information.
  • the determining the total duration of recording and whether to start dual identity verification according to the pixel value of the camera includes:
  • the pixel value of the camera reaches the first predetermined pixel value threshold, use the preset first duration as the total duration of recording and determine not to start dual identity verification;
  • the preset second duration is used as the total duration of the recording and the dual identity verification is determined not to be initiated, wherein The second duration is greater than the first duration
  • the preset third duration is used as the total duration of the recording and the dual identity verification is determined to be initiated, wherein the third duration is greater than the second duration.
  • the determining the total duration of recording and whether to start dual identity verification according to the pixel value of the camera includes:
  • T out is the determined total recording duration
  • P is the pixel value of the camera
  • Pref is the first preset camera pixel reference value
  • T ref1 is the first predetermined duration
  • T ref2 is the second predetermined duration, where, T ref2 is less than or equal to T ref1 ;
  • the predetermined rule includes:
  • the camera of the client terminal is instructed to start recording with the total duration to obtain an identity verification video.
  • the predetermined rule includes:
  • every second is the time period of the first random number, instruct the camera of the user end to record the video with the difference between the first random number and the second random number in seconds until it has been
  • the total length of the recorded video reaches the total length.
  • the determining that the user's identity is legal based on the identity verification information and the identity document information includes:
  • the identity verification information includes dual identity verification information, verifying whether the identity of the user is legal based on the dual identity verification information;
  • the identity verification information does not include dual identity verification information, it is determined that the user's identity is legal based on the identity verification video and the identity document information.
  • the determining that the user's identity is legal based on the identity verification information and the identity document information includes:
  • the computing equipment includes:
  • At least one processor At least one processor
  • a memory communicatively connected with the at least one processor; wherein,
  • the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute as shown in any one of the above exemplary embodiments.
  • Authentication method
  • the computing device 700 according to this embodiment of the present application will be described below with reference to FIG. 7.
  • the computing device 700 shown in FIG. 7 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present application.
  • the computing device 700 is represented in the form of a general-purpose computing device.
  • the components of the computing device 700 may include, but are not limited to: the aforementioned at least one processing unit 710, the aforementioned at least one storage unit 720, and a bus 730 connecting different system components (including the storage unit 720 and the processing unit 710).
  • the storage unit stores program code, and the program code can be executed by the processing unit 710, so that the processing unit 710 executes the various exemplary methods described in the "Embodiment Method" section of this specification. Implementation steps.
  • the storage unit 720 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 721 and/or a cache storage unit 722, and may further include a read-only storage unit (ROM) 723.
  • RAM random access storage unit
  • ROM read-only storage unit
  • the storage unit 720 may also include a program/utility tool 724 having a set of (at least one) program module 725.
  • program module 725 includes but is not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples or some combination may include the implementation of a network environment.
  • the bus 730 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local area using any bus structure among multiple bus structures. bus.
  • the computing device 700 may also communicate with one or more external devices 900 (such as keyboards, pointing devices, Bluetooth devices, etc.), and may also communicate with one or more devices that enable a user to interact with the computing device 700, and/or communicate with Any device (such as a router, modem, etc.) that enables the computing device 700 to communicate with one or more other computing devices. This communication can be performed through an input/output (I/O) interface 750.
  • the computing device 700 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 760.
  • networks such as a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet
  • the network adapter 760 communicates with other modules of the computing device 700 through the bus 730. It should be understood that although not shown in the figure, other hardware and/or software modules can be used in conjunction with the computing device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
  • the exemplary embodiments described herein can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which may be a personal computer, server, terminal device, or network device, etc.) execute the method according to the embodiment of the present application.
  • a non-volatile storage medium can be a CD-ROM, U disk, mobile hard disk, etc.
  • Including several instructions to make a computing device which may be a personal computer, server, terminal device, or network device, etc.
  • a computer non-volatile readable storage medium on which is stored a program product capable of implementing the above method of this specification.
  • various aspects of the present application can also be implemented in the form of a program product, which includes program code.
  • the program product runs on a terminal device, the program code is used to enable the The terminal device executes the steps according to various exemplary embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification.
  • a computer non-volatile readable storage medium 800 for implementing the above method according to an embodiment of the present application is described, which may adopt a portable compact disk read-only memory (CD-ROM) and includes program code , And can run on terminal devices, such as personal computers.
  • CD-ROM portable compact disk read-only memory
  • the program product of this application is not limited to this.
  • the computer non-volatile readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, device, or device. In conjunction with.
  • the program product can use any combination of one or more readable media.
  • the readable medium may be a readable signal medium or a readable storage medium.
  • the readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Type programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • the computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the readable signal medium may also be any readable medium other than a readable storage medium, and the readable medium may send, propagate, or transmit a program for use by or in combination with the instruction execution system, apparatus, or device.
  • the program code contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
  • the program code used to perform the operations of this application can be written in any combination of one or more programming languages.
  • the programming languages include object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural Programming language-such as "C" language or similar programming language.
  • the program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on.
  • the remote computing device can be connected to a user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using Internet service providers) Business to connect via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service providers Internet service providers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Collating Specific Patterns (AREA)

Abstract

An identity authentication method and apparatus, a computing device, and a storage medium, relating to the field of human face recognition. The method comprises: when an identity authentication request from a user terminal is received, returning protocol information to the user terminal; when an instruction of accepting the protocol information is received, obtaining a pixel value of a camera of the user terminal; according to the pixel value of the camera, determining the total time length of video recording and determining whether to start dual identity authentication; according to a predetermined rule, indicating a video of which the background recording time length of the camera of the user terminal is the total time length to serve as identity authentication information, wherein when it is determined to start dual identity authentication, the obtained dual identity authentication information received by the user terminal according to an indication is used as the identity authentication information; receiving the identity document information of the user terminal; and based on the identity authentication information and the identity document information, determining that the identity of a user is legal. By means of the method, the present invention improves the security of identity authentication, and achieves balance between the security of identity authentication and resource consumption during identity authentication.

Description

身份验证方法、装置、计算设备和存储介质Identity verification method, device, computing device and storage medium
本申请基于并要求2019年5月23日申请的、申请号为CN 201910434967.3、名称为“身份验证方法、装置、介质及电子设备”的中国专利申请的优先权,其全部内容在此并入作为参考。This application is based on and claims the priority of the Chinese patent application filed on May 23, 2019, with the application number CN 201910434967.3 and the name "Identity Verification Method, Device, Medium and Electronic Equipment", the entire content of which is hereby incorporated as reference.
技术领域Technical field
本申请涉及人脸识别技术领域,特别涉及一种身份验证方法、装置、计算设备和计算机非易失性可读存储介质。This application relates to the field of face recognition technology, and in particular to an identity verification method, device, computing device, and computer non-volatile readable storage medium.
背景技术Background technique
用户身份合法性验证是很多网络服务中不可缺少的环节之一,因此,用户身份合法性验证是网络安全领域的重点。User identity legality verification is one of the indispensable links in many network services. Therefore, user identity legality verification is the focus of network security.
本申请发明人意识到,目前,用户在使用终端上运行的软件,比如,手机终端上的App(Application,应用程序)或者小程序来进行请求开通特定业务等操作时,往往采用指纹或者签名的方式来验证用户身份,但在这种方式下,识别用户身份的准确率较低,风险较大;另外,验证用户身份还可以是通过调用终端的摄像头来进行,比如手机的前置摄像头对用户进行人脸识别,从而验证用户身份是否合法,这种方式下,录像消耗的存储、带宽等资源较多,成本较高。The inventor of the present application realizes that at present, when users use software running on the terminal, such as an App (Application, application) or small program on a mobile phone terminal, to perform operations such as requesting to open a specific service, they often use fingerprints or signatures. In this way, the accuracy of identifying the user’s identity is low and the risk is high; in addition, the user’s identity can also be verified by calling the camera of the terminal, such as the front camera of the mobile phone. Face recognition is performed to verify whether the user's identity is legal. In this way, recording consumes more resources such as storage and bandwidth, and the cost is higher.
发明内容Summary of the invention
为了解决或者至少部分解决上述技术问题,本申请的目的在于提供一种身份验证方法、装置、计算设备和计算机非易失性可读存储介质。In order to solve or at least partially solve the above technical problems, the purpose of this application is to provide an identity verification method, device, computing device, and computer non-volatile readable storage medium.
第一方面,提供了一种身份验证方法,包括:In the first aspect, an identity verification method is provided, including:
当接收到来自用户端的身份验证请求,向所述用户端返回包含用户身份验证手段的协议信息,其中,所述协议信息中的用户身份验证手段包括录像;When receiving the identity verification request from the client, returning to the client the protocol information containing the user identity verification means, wherein the user identity verification means in the protocol information includes video recording;
响应于接收到来自所述用户端的接受所述协议信息的指令,获取所述用户端的摄像头的像素值;In response to receiving an instruction from the client to accept the protocol information, acquiring the pixel value of the camera of the client;
根据所述摄像头的像素值确定录像的总时长以及是否启动二重身份验证;According to the pixel value of the camera, determine the total duration of the recording and whether to start dual identity verification;
在确定启动二重身份验证的情况下,根据预定规则指示所述用户端的摄像头在后台录制时长为所述总时长的视频,并指示所述用户端接收来自用户的二重身份验证信息,得到所述用户端返回的身份验证视频和所述二重身份验证信息,作为身份验证信息;In the case of determining to start the dual identity verification, instruct the user end's camera to record a video with the total duration in the background for the total duration according to a predetermined rule, and instruct the user end to receive the dual identity verification information from the user to obtain all The identity verification video and the dual identity verification information returned by the user terminal are used as identity verification information;
在确定不启动二重身份验证的情况下,根据预定规则指示所述用户端的摄像头在后台录制时长为所述总时长的视频,得到所述用户端返回的身份验证视频,作为身份验证信息;In the case of determining not to start dual identity verification, instruct the camera of the user end to record a video whose duration is the total duration in the background according to a predetermined rule, and obtain the identity verification video returned by the user end as the identity verification information;
接收所述用户端上传的身份证件信息;Receiving the ID information uploaded by the client;
基于所述身份验证信息和所述身份证件信息确定所述用户的身份合法。It is determined that the user's identity is legal based on the identity verification information and the identity document information.
第二方面,提供了一种身份验证装置,包括:In a second aspect, an identity verification device is provided, including:
返回模块,被配置为当接收到来自用户端的身份验证请求,向所述用户端返回包含用户身份验证手段的协议信息;The return module is configured to, when receiving an identity verification request from the client, return to the client the protocol information including the means of user identity verification;
获取模块,被配置为响应于接收到来自所述用户端的接受所述协议信息的指令,获取所述用户端的摄像头的像素值;The obtaining module is configured to obtain the pixel value of the camera of the user end in response to receiving an instruction to accept the protocol information from the user end;
第一确定模块,被配置为根据所述摄像头的像素值确定录像的总时长以及是否启动二重身份验证;The first determining module is configured to determine the total duration of recording and whether to start dual identity verification according to the pixel value of the camera;
指示模块,被配置为在确定启动二重身份验证的情况下,根据预定规则指示所述用户端的摄像头在后台录制时长为所述总时长的视频,并指示所述用户端接收来自用户的二重身份验证信息,得到所述用户端返回的身份验证视频和所述二重身份验证信息,作为身份验证信息;以及The indication module is configured to instruct the user terminal’s camera to record a video whose duration is the total duration in the background according to a predetermined rule, and instruct the client terminal to receive the dual identity verification from the user. Identity verification information, the identity verification video returned by the client and the double identity verification information are obtained as identity verification information; and
在确定不启动二重身份验证的情况下,根据预定规则指示所述用户端的摄像头在后台录制时长为所述总时长的视频,得到所述用户端返回的身份验证视频,作为身份验证信息;In the case of determining not to start dual identity verification, instruct the camera of the user end to record a video whose duration is the total duration in the background according to a predetermined rule, and obtain the identity verification video returned by the user end as the identity verification information;
接收模块,被配置为接收所述用户端上传的身份证件信息;The receiving module is configured to receive the identity document information uploaded by the user terminal;
第二确定模块,被配置为基于所述身份验证信息和所述身份证件信息确定所述用户的身份合法。The second determining module is configured to determine that the user's identity is legal based on the identity verification information and the identity document information.
第三方面,提供了一种计算设备,包括存储器和处理器,所述存储器用于存储所述处理器的身份验证方法的程序,所述处理器配置为经由执行所述身份验证方法的程序来执行以下处理:当接收到来自用户端的身份验证请求,向所述用户端返回包含用户身份验证手段的协议信息,其中,所述协议信息中的用户身份验证手段包括录像;响应于接收到来自所述用户端的接受所述协议信息的指令,获取所述用户端的摄像头的像素值;根据所述摄像头的像素值确定录像的总时长以及是否启动二重身份验证;在确定启动二重身份验证的情况下,根据预定规则指示所述用户端的摄像头在后台录制时长为所述总时长的视频,并指示所述用户端接收来自用户的二重身份验证信息,得到所述用户端返回的身份验证视频和所述二重身份验证信息,作为身份验证信息;在确定不启动二重身份验证的情况下,根据预定规则指示所述用户端的摄像头在后台录制时长为所述总时长的视频,得到所述用户端返回的身份验证视频,作为身份验证信息;接收所述用户端上传的身份证件信息;基于所述身份验证信息和所述身份证件信息确定所述用户的身份合法。In a third aspect, a computing device is provided, including a memory and a processor, the memory is used to store a program of the processor's identity verification method, and the processor is configured to execute the identity verification method via the program Perform the following processing: when receiving an identity verification request from the user end, return to the user end the protocol information containing the user identity verification means, wherein the user identity verification means in the protocol information includes a video recording; The client’s instruction for accepting the protocol information obtains the pixel value of the user’s camera; according to the pixel value of the camera, the total duration of recording and whether to start dual identity verification is determined; when it is determined to start dual identity verification Next, according to a predetermined rule, instruct the camera of the user end to record a video of the total duration in the background, and instruct the user end to receive the dual identity verification information from the user to obtain the identity verification video and The dual identity verification information is used as identity verification information; if it is determined that dual identity verification is not to be initiated, the user’s camera is instructed to record a video whose duration is the total duration in the background according to a predetermined rule to obtain the user The identity verification video returned by the terminal is used as identity verification information; the identity document information uploaded by the user terminal is received; the identity of the user is determined to be legal based on the identity verification information and the identity document information.
第四方面,提供了一种存储有计算机可读指令的计算机非易失性可读存储介质,其上存储有身份验证方法的程序,所述身份验证方法的程序被处理器执行时实现以下处理:当接收到来自用户端的身份验证请求,向所述用户端返回包含用户身份验证手段的协议信息,其中,所述协议信息中的用户身份验证手段包括录像;响应于接收到来自所述用户端的接受所述协议信息的指令,获取所述用户端的摄像头的像素值;根据所述摄像头的像素值确定录像的总时长以及是否启动二重身份验证;在确定启动二重身份验证的情况下,根据预定规则指示所述用户端的摄像头在后台录制时长为所述总时长的视频,并指示所述用户端接收来自用户的二重身份验证信息,得到所述用户端返回的身份验证视频和所述二重身份验证信息,作为身份验证信息;在确定不启动二重身份验证的情况下,根据预定规则指示所述用户端的摄像头在后台录制时长为所述总时长的视频,得到所述用户端返回的身份验证视频,作为身份验证信息;接收所述用户端上传的身份证件信息;基于所述身份验证信息和所述身份证件信息确定所述用户的身份合法。In a fourth aspect, a computer non-volatile readable storage medium storing computer readable instructions is provided, and a program of an identity verification method is stored thereon. When the program of the identity verification method is executed by a processor, the following processing is implemented : When receiving an identity verification request from the client, the protocol information containing the user identity verification means is returned to the client, wherein the user identity verification means in the protocol information includes video recording; in response to receiving the request from the client Accept the instructions of the protocol information to obtain the pixel value of the camera on the client side; determine the total recording time and whether to start dual identity verification according to the pixel value of the camera; in the case of determining to start dual identity verification, The predetermined rule instructs the camera of the client to record a video with the total duration in the background, and instructs the client to receive the dual identity verification information from the user to obtain the identity verification video returned by the client and the second Re-identification information is used as identity verification information; in the case of determining not to start double-identity verification, instruct the camera of the user end to record a video with the total duration in the background according to a predetermined rule, and obtain the return of the user end The identity verification video is used as identity verification information; receiving identity document information uploaded by the user terminal; and determining that the user's identity is legal based on the identity verification information and the identity document information.
上述身份验证方法、装置、计算设备和计算机非易失性可读存储介质,由于使用了视频录像的方式进行身份验证,提高了身份验证的安全性,同时通过根据摄像头的像素值来确定录像总时长以及是否启动二重身份验证的动作,实现了身份验证的安全性和身份验证时资源消耗之间的平衡。The above-mentioned identity verification method, device, computing device and computer non-volatile readable storage medium use video recording for identity verification, which improves the security of identity verification. At the same time, the total recording volume is determined according to the pixel value of the camera. The length of time and whether to start the dual identity verification action achieves a balance between the security of identity verification and the resource consumption during identity verification.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性的,并不能限制本申请。It should be understood that the above general description and the following detailed description are only exemplary and cannot limit the application.
附图说明Description of the drawings
图1是根据一示例性实施例示出的一种身份验证方法的应用场景示意图;Fig. 1 is a schematic diagram showing an application scenario of an identity verification method according to an exemplary embodiment;
图2是根据一示例性实施例示出的一种身份验证方法的流程图;Fig. 2 is a flowchart showing an identity verification method according to an exemplary embodiment;
图3是根据图2对应实施例示出的一实施例的步骤230的细节流程图;FIG. 3 is a detailed flowchart of step 230 of an embodiment shown according to the embodiment corresponding to FIG. 2;
图4是根据图2对应实施例示出的一实施例的预定规则的流程图;4 is a flowchart of a predetermined rule according to an embodiment shown in the embodiment corresponding to FIG. 2;
图5是根据图2对应实施例示出的一实施例的步骤270的细节流程图;FIG. 5 is a detailed flowchart of step 270 of an embodiment shown according to the embodiment corresponding to FIG. 2;
图6是根据一示例性实施例示出的一种身份验证装置的框图;Fig. 6 is a block diagram showing an identity verification device according to an exemplary embodiment;
图7是根据一示例性实施例示出的一种用于实现上述身份验证方法的计算设备的示例框图;Fig. 7 is an exemplary block diagram showing a computing device for implementing the aforementioned identity verification method according to an exemplary embodiment;
图8是根据一示例性实施例示出的一种用于实现上述身份验证方法的计算机非易失性可读存储介质。Fig. 8 shows a computer non-volatile readable storage medium for implementing the above-mentioned identity verification method according to an exemplary embodiment.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present application. On the contrary, they are only examples of devices and methods consistent with some aspects of the application as detailed in the appended claims.
此外,附图仅为本申请的示意性图解,并非一定是按比例绘制。图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。附图中所示的一些方框图是功能实体,不一定必须与物理或逻辑上独立的实体相对应。In addition, the drawings are only schematic illustrations of the application, and are not necessarily drawn to scale. The same reference numerals in the figures denote the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities.
本申请首先提供了一种身份验证方法。此处所谓的身份验证是指对用户提供的身份信息进行合法性校验以确定用户的身份信息是否真实可信。本申请的方法可以固定于各种终端,例如服务器、云计算的物理基础设施、智能手机、平板电脑、台式电脑、笔记本电脑、iPad、自助服务终端等任何具有运算处理功能并且能够与外部设备进行通信的终端。This application first provides an identity verification method. The so-called identity verification here refers to the legitimacy of the identity information provided by the user to determine whether the user’s identity information is authentic and credible. The method of this application can be fixed to various terminals, such as servers, cloud computing physical infrastructure, smart phones, tablet computers, desktop computers, notebook computers, iPads, self-service terminals, etc. Anything that has computing processing functions and can communicate with external devices Communication terminal.
图1是根据一示例性实施例示出的一种身份验证方法的应用场景示意图。如图1所示,包括用户的移动终端,即智能手机110,以及本申请的实施终端,即服务器120。服务器120与可以与智能手机110通过由蜂窝网络、骨干网络等网络设施组成的通信链路相连,从而完成数据和信息的传递。智能手机110和服务器120之间的体系架构可以是C/S(Client/Server,客户机/服务器)架构,也可以是B/S(Brower/Server,浏览器/服务器)架构。用户在通过使用安装在智能手机110上的浏览器或者App(Application,应用程序)访问服务器120时,如果要使用服务器120提供的某些业务(比如支付、转账等操作),可能就会需要进行身份验证来确保用户账户不被盗取或者确定用户有资格使用特定的业务,常见的身份验证方式可以是在线签名、指纹验证、视频验证等方式,这些方式都需要用户使用智能手机110向服务器120提交用于验证身份的信息,比如,视频验证这种方式就需要用户使用智能手机110录制用户本人的视频然后上传到服务器120。Fig. 1 is a schematic diagram showing an application scenario of an identity verification method according to an exemplary embodiment. As shown in FIG. 1, it includes a user's mobile terminal, namely a smart phone 110, and an implementation terminal of the application, namely a server 120. The server 120 is connected to the smart phone 110 through a communication link composed of a cellular network, a backbone network, and other network facilities, so as to complete the transfer of data and information. The architecture between the smart phone 110 and the server 120 may be a C/S (Client/Server, client/server) architecture or a B/S (Brower/Server, browser/server) architecture. When a user accesses the server 120 by using a browser or App (Application) installed on the smartphone 110, if he wants to use certain services provided by the server 120 (such as payment, transfer, etc.), he may need to perform Identity verification is used to ensure that user accounts are not stolen or to ensure that users are eligible to use specific services. Common methods of identity verification can be online signature, fingerprint verification, video verification, etc. All of these methods require the user to use a smartphone 110 to communicate with the server 120. Submitting information for identity verification, for example, video verification requires the user to use the smart phone 110 to record the user's own video and upload it to the server 120.
图2是根据一示例性实施例示出的一种身份验证方法的流程图。如图2所示,包括以下步骤:Fig. 2 is a flow chart showing an identity verification method according to an exemplary embodiment. As shown in Figure 2, it includes the following steps:
步骤210,当接收到来自用户端的身份验证请求,向所述用户端返回包含用户身份验证手段的协议信息。Step 210: When receiving the identity verification request from the client, the protocol information including the user's identity verification means is returned to the client.
其中,所述协议信息中的用户身份验证手段包括录像。Wherein, the user identity verification means in the protocol information includes video recording.
协议信息以及其所包含的用户身份验证手段都是用文字、符号等形式记录的文本信息。The protocol information and the means of user authentication contained in it are all text information recorded in the form of words, symbols, etc.
身份验证请求是用户端发送至本端的互联网请求,可以是基于各种互联网协议的请求,例如可以是HTTP/HTTPS协议下的请求。The identity verification request is an Internet request sent by the client to the local end, and it can be a request based on various Internet protocols, for example, it can be a request under the HTTP/HTTPS protocol.
在一个实施例中,接收到的来自用户端的身份验证请求中包含业务标识,所述当接收到来自用户端的身份验证请求,向所述用户端返回包含用户身份验证手段的协议信息,包括:In one embodiment, the received identity verification request from the client includes a service identifier, and when the identity verification request from the client is received, returning to the client the protocol information including the user identity verification means includes:
当接收到来自用户端的身份验证请求,获取所述身份验证请求中包含的业务标识;When receiving an identity verification request from the user end, obtain the business identifier included in the identity verification request;
利用预设的业务标识与用户身份验证手段对应关系表获取与所述业务标识对应的用户身份验证手段;Obtaining the user identity verification means corresponding to the business identity by using the preset correspondence table of the business identity and the user identity verification means;
在获取的与所述业务标识对应的用户身份验证手段中包括录像的情况下,将所述用户身份验证手段加入预设的协议信息模板,得到包含用户身份验证手段的协议信息;In the case where the acquired user identity verification means corresponding to the business identity includes video recording, adding the user identity verification means to a preset protocol information template to obtain protocol information including the user identity verification means;
向所述用户端返回所述包含用户身份验证手段的协议信息。Return the protocol information including the means of user identity verification to the client.
在一个实施例中,向所述用户端返回包含用户身份验证手段的协议信息的具体方式是向所述用户端返回记录着包含用户身份验证手段的协议信息的页面,比如可以是用HTML5语言编写的Web页面。In one embodiment, the specific method of returning the protocol information containing the user authentication means to the client is to return to the user a page recording the protocol information containing the user authentication means, for example, it may be written in HTML5 language Web page.
在一个实施例中,向所述用户端返回包含用户身份验证手段的协议信息的具体方式是向所述用户端返回记录着网页页面,该页面中记录着指向协议信息的链接,当用户在用户 端点击该链接,可以访问记录着包含用户身份验证手段的协议信息的页面。In one embodiment, the specific method of returning the protocol information containing the user authentication means to the user terminal is to return to the user terminal a web page recorded with a link to the protocol information. When the user is in the user The client clicks on the link to access the page where the protocol information containing the user's authentication method is recorded.
步骤220,响应于接收到来自所述用户端的接受所述协议信息的指令,获取所述用户端的摄像头的像素值。Step 220: In response to receiving an instruction from the client to accept the protocol information, obtain the pixel value of the camera of the client.
在一个实施例中,用户在用户端接受所述协议信息的动作会触发向本端发送接受所述协议信息的指令。In one embodiment, the user's action of accepting the agreement information at the user end triggers the sending of an instruction to accept the agreement information to the local end.
比如,用户在用户端接受所述协议信息时,会点击按钮等控件;当本端监听到相应控件的动作就相当于得到来自所述用户端的接受所述协议信息的指令。For example, when the user accepts the protocol information on the client side, he will click a button or other control; when the local end monitors the action of the corresponding control, it is equivalent to getting an instruction from the client side to accept the protocol information.
在一个实施例中,用户通过在用户端安装的应用与本端通信,当接收到来自所述用户端的接受所述协议信息的指令,会触发该应用读取所述用户端的摄像头的像素值并返回至本端。In one embodiment, the user communicates with the local terminal through an application installed on the user terminal. When receiving an instruction from the user terminal to accept the protocol information, the application will be triggered to read the pixel value of the camera of the user terminal and Return to this end.
比如,用户端的系统提供了Camera.getParameters()接口,该接口提供了获取设备的摄像头参数的途径,用户端安装的应用中包含调用该接口的指令,当接收到来自所述用户端的接受所述协议信息的指令,会执行调用该接口的指令,从而得到该接口返回的设备的摄像头参数,其中摄像头参数包含摄像头的像素值。For example, the system on the user side provides the Camera.getParameters() interface, which provides a way to obtain the camera parameters of the device. The application installed on the user side contains an instruction to call the interface. When receiving the The instructions of the protocol information will execute the instructions that call the interface to obtain the camera parameters of the device returned by the interface, where the camera parameters include the pixel value of the camera.
在一个实施例中,用户通过在用户端安装的应用与本端通信,用户端在安装该应用时,会将所述用户端的标识以及摄像头的像素值发送至本端,并由本端将所述用户端的标识和摄像头的像素值对应存储至数据库中,本端接收到的每一来自用户端的指令中携带有用户端的标识,所述响应于接收到来自所述用户端的接受所述协议信息的指令,获取所述用户端的摄像头的像素值,包括:In one embodiment, the user communicates with the local terminal through an application installed on the user terminal. When the user terminal installs the application, the user terminal sends the identifier of the user terminal and the pixel value of the camera to the local terminal, and the local terminal transmits the The identification of the user end and the pixel value of the camera are correspondingly stored in the database. Each instruction from the user end received by the local end carries the identification of the user end, and the response is to receiving an instruction from the user end to accept the protocol information , Obtaining the pixel value of the camera of the user end includes:
响应于接收到来自所述用户端的接受所述协议信息的指令,获取所述指令中的用户端的标识;In response to receiving an instruction from the client to accept the protocol information, acquiring the identifier of the client in the instruction;
查询所述数据库,获取与所述用户端的标识对应存储的摄像头的像素值。Query the database to obtain the pixel value of the camera stored corresponding to the identifier of the user terminal.
在一个实施例中,用户通过在用户端安装的应用与本端通信,当接收到来自所述用户端的接受所述协议信息的指令,会触发该应用读取所述用户端的型号并返回至本端,所述获取所述用户端的摄像头的像素值,包括:In one embodiment, the user communicates with the local terminal through an application installed on the client terminal. When receiving an instruction from the client terminal to accept the protocol information, the application will be triggered to read the model of the client terminal and return to the local terminal. At the end, the obtaining the pixel value of the camera of the user end includes:
当获取到所述用户端的型号,通过预设的用户端型号与摄像头像素值对应关系表,获取与所述用户端的型号对应的摄像头像素值,作为所述用户端的摄像头的像素值。When the model of the client terminal is obtained, the pixel value of the camera corresponding to the model of the client terminal is acquired through the preset correspondence table of the client terminal model and the pixel value of the camera as the pixel value of the camera of the client terminal.
在一个实施例中,用户通过在用户端安装的应用与本端通信,该应用可以读取用户端存储的文件信息,所述响应于接收到来自所述用户端的接受所述协议信息的指令,获取所述用户端的摄像头的像素值,包括:响应于接收到来自所述用户端的接受所述协议信息的指令,向所述用户端获取用户端存储的照片的分辨率的请求;接收所述用户端返回其存储的照片的分辨率;根据所述分辨率,确定所述用户端的摄像头的像素值。In one embodiment, the user communicates with the local end through an application installed on the user end, and the application can read file information stored on the user end. In response to receiving an instruction from the user end to accept the protocol information, Obtaining the pixel value of the camera of the user end includes: in response to receiving an instruction from the user end to accept the protocol information, obtaining a request from the user end for the resolution of the photo stored on the user end; receiving the user end The terminal returns the resolution of the stored photo; according to the resolution, the pixel value of the camera of the user terminal is determined.
比如,如果接收到的照片的分辨率为3000×4000,则可以确定所述用户端的摄像头的像素值为1200万像素。For example, if the resolution of the received photo is 3000×4000, it can be determined that the pixel value of the camera of the user end is 12 million pixels.
步骤230,根据所述摄像头的像素值确定录像的总时长以及是否启动二重身份验证。Step 230: Determine the total duration of recording and whether to start dual identity verification according to the pixel value of the camera.
二重身份验证是在录像的基础上附加的身份验证方式。Dual identity verification is an additional identity verification method based on the video.
在一个实施例中,二重身份验证为:向所述用户端发送提示语音指示信息,指示所述用户端的用户做出预定动作。例如,预定动作可以是张嘴、眨眼、点头等。In one embodiment, the dual identity verification is: sending a prompt voice instruction information to the client terminal, instructing the user of the client terminal to take a predetermined action. For example, the predetermined action may be opening the mouth, blinking, nodding, etc.
在一个实施例中,步骤230具体通过下列方式进行:In an embodiment, step 230 is specifically performed in the following manner:
基于所述摄像头的像素值和如下公式确定录像的总时长:Determine the total duration of recording based on the pixel value of the camera and the following formula:
Figure PCTCN2019117696-appb-000001
Figure PCTCN2019117696-appb-000001
其中,T out为确定出的录像的总时长,P为摄像头的像素值,P ref为第一预设摄像头像素基准值,T ref1为第一预定时长,T ref2为第二预定时长,其中,T ref2小于或等于T ref1Among them, T out is the determined total recording duration, P is the pixel value of the camera, Pref is the first preset camera pixel reference value, T ref1 is the first predetermined duration, and T ref2 is the second predetermined duration, where, T ref2 is less than or equal to T ref1 ;
在P大于或等于第二预设摄像头像素基准值的情况下,确定不启动二重身份验证,其中,所述第二预设摄像头像素基准值小于第一预设摄像头像素基准值;If P is greater than or equal to the second preset camera pixel reference value, determining not to start dual identity verification, wherein the second preset camera pixel reference value is less than the first preset camera pixel reference value;
在P小于第二预设摄像头像素基准值的情况下,确定启动二重身份验证。In the case where P is less than the second preset camera pixel reference value, it is determined to start dual identity verification.
本实施例的好处在于,一方面,在摄像头的像素值小于或等于预设的摄像头像素基准值的情况下,使录像的时长与摄像头的像素值呈反比关系,即摄像头像素值越小,确定出的录像的总时长越高,针对摄像头的不同的像素值,获得的录像的总时长是不同的,使得在摄像头像素值较小时可以通过提升录像的总时长获取包含更丰富信息的身份验证视频,保证了身份验证的可靠性和安全性;在另一方面,在摄像头的像素值超过预设的摄像头像素基准值的情况下,通过使确定出的录像的总时长保持在固定值,可以在保证身份验证的可靠性同时,使得录像的总时长足够小,从而可以降低带宽、存储空间等资源的消耗,另外,在摄像头的像素值足够低的情况下,即摄像头拍摄的身份视频的清晰度无法满足安全验证需要的情况下,通过启动二重身份验证,在一定程度上可以提高身份验证的安全性。The advantage of this embodiment is that, on the one hand, when the pixel value of the camera is less than or equal to the preset pixel reference value of the camera, the recording duration is inversely proportional to the pixel value of the camera, that is, the smaller the pixel value of the camera, the The higher the total duration of the recorded video, the total duration of the video obtained is different for different pixel values of the camera, so that when the pixel value of the camera is small, the total duration of the video can be increased to obtain an identity verification video that contains more information. , To ensure the reliability and security of identity verification; on the other hand, when the pixel value of the camera exceeds the preset camera pixel reference value, by keeping the determined total recording time at a fixed value, you can To ensure the reliability of identity verification, make the total recording time small enough to reduce the consumption of resources such as bandwidth and storage space. In addition, when the pixel value of the camera is low enough, that is, the clarity of the identity video taken by the camera In the case that the security verification needs cannot be met, the security of the identity verification can be improved to a certain extent by starting the dual identity verification.
参考图3所示,示出了一实施例的步骤230的细节流程图,具体包括以下步骤:Referring to FIG. 3, a detailed flowchart of step 230 of an embodiment is shown, which specifically includes the following steps:
步骤231,在摄像头的像素值达到第一预定像素值阈值的情况下,将预设的第一时长作为录像的总时长并确定不启动二重身份验证。Step 231: When the pixel value of the camera reaches the first predetermined pixel value threshold, the preset first duration is used as the total duration of recording and it is determined not to start dual identity verification.
第一时长可以是任意的时长,比如可以为10分钟。The first duration can be any duration, for example, it can be 10 minutes.
步骤232,在摄像头的像素值小于第一预定像素值阈值且大于或等于第二预定像素值阈值的情况下,将预设的第二时长作为录像的总时长并确定不启动二重身份验证。Step 232: When the pixel value of the camera is less than the first predetermined pixel value threshold and greater than or equal to the second predetermined pixel value threshold, use the preset second duration as the total duration of recording and determine not to start dual identity verification.
其中,所述第二时长大于第一时长。Wherein, the second duration is greater than the first duration.
步骤233,在摄像头的像素值小于第二预定像素值阈值的情况下,将预设的第三时长作为录像的总时长并确定启动二重身份验证,其中,所述第三时长大于第二时长。Step 233: In the case that the pixel value of the camera is less than the second predetermined pixel value threshold, use the preset third duration as the total duration of recording and determine to start dual identity verification, wherein the third duration is greater than the second duration .
其中,所述第三时长大于第二时长。Wherein, the third duration is greater than the second duration.
从本实施例中可以得知:选择作为录像的总时长的大小关系为:第三时长>第二时长>第一时长,而选择作为录像的总时长对应所需要的摄像头像素值的大小关系为第三时长<第二时长<第一时长,由此可见,随着获得的所述用户端的摄像头像素值的增大,选择出的录像的总时长越来越短。It can be seen from this embodiment that the size relationship of the total duration selected as the recording is: third duration>second duration>first duration, and the size relationship of the total duration selected as the recording corresponding to the required camera pixel value is The third duration<the second duration<the first duration, it can be seen that as the obtained pixel value of the camera of the user end increases, the total duration of the selected video recording becomes shorter and shorter.
因此,本实施例的好处在于,利用预定像素值阈值对录像时长进行了区分,保证了在摄像头的像素值较低时,可以通过提升录像时长来获得包含更丰富信息的身份验证视频,同时在摄像头的像素值很小的情况下,还要启动二重身份验证,保证了身份验证的可靠性和安全性。Therefore, the advantage of this embodiment is that the predetermined pixel value threshold is used to distinguish the recording duration, which ensures that when the pixel value of the camera is low, the video recording duration can be increased to obtain an identity verification video that contains more information. When the pixel value of the camera is very small, double identity verification must be started to ensure the reliability and security of identity verification.
步骤240,在确定启动二重身份验证的情况下,根据预定规则指示所述用户端的摄像头在后台录制时长为所述总时长的视频,并指示所述用户端接收来自用户的二重身份验证信息,得到所述用户端返回的身份验证视频和所述二重身份验证信息,作为身份验证信息。Step 240: In the case where it is determined to start dual identity verification, instruct the camera of the client terminal to record a video with the total duration in the background according to a predetermined rule, and instruct the client terminal to receive dual identity verification information from the user To obtain the identity verification video and the double identity verification information returned by the client as identity verification information.
在一个实施例中,所述用户端为智能手机,所述用户端的摄像头为前置摄像头。In one embodiment, the user end is a smart phone, and the camera of the user end is a front camera.
在一个实施例中,二重身份验证信息为所述用户端接收的用户根据指示融合进所述身份验证视频的动作信息,所述根据预定规则指示所述用户端的摄像头在后台录制时长为所述总时长的视频,并指示所述用户端接收来自用户的二重身份验证信息,得到所述用户端返回的身份验证视频和所述二重身份验证信息,作为身份验证信息,包括:根据预定规则指示所述用户端的摄像头在后台录制时长为所述总时长的视频,并指示所述用户端接收来自用户的二重身份验证信息,以视频流的方式获取所述用户端返回的包含二重身份验证信息的身份验证视频,作为身份验证信息。In one embodiment, the dual identity verification information is the action information received by the user terminal and merged into the identity verification video by the user according to an instruction. According to a predetermined rule, the user terminal’s camera is instructed to record in the background for the duration Video with a total length of time, and instruct the client to receive the dual identity verification information from the user, and obtain the identity verification video and the dual identity verification information returned by the client, as identity verification information, including: according to predetermined rules Instruct the camera of the client to record a video with the total duration in the background, and instruct the client to receive the dual identity verification information from the user, and obtain the dual identity returned by the client by means of a video stream The authentication video of the authentication information is used as the authentication information.
本实施例的好处在于,通过同时将身份验证视频和二重身份验证信息的数据结合在一起进行接收,避免了将两项数据单独进行接收,降低了资源消耗。The advantage of this embodiment is that by combining the data of the identity verification video and the double identity verification information at the same time, it is avoided that the two pieces of data are received separately and the resource consumption is reduced.
在一个实施例中,接收所述用户端返回的身份验证视频的方式是在所述用户端的摄像头录像结束后,接收所述用户端返回的录像得到的整个身份验证视频。In one embodiment, the way of receiving the identity verification video returned by the client is to receive the entire identity verification video obtained from the video returned by the client after the camera recording of the client ends.
预定规则是指示所述用户端的摄像头在后台录制视频的方式。The predetermined rule is a way to instruct the camera of the user end to record video in the background.
在一个实施例中,预定规则包括:获取当前时间和两个随机数;在所述两个随机数中确定出较大的随机数,作为第一随机数,并将较小的随机数作为第二随机数;从当前时间开始,每隔秒数为所述第一随机数的时间段,指示所述用户端的摄像头进行秒数为所述第一随机数与第二随机数的差值的视频录制,直至已录制的视频的总长度达到所述总时长。In one embodiment, the predetermined rule includes: obtaining the current time and two random numbers; determining the larger random number from the two random numbers as the first random number, and using the smaller random number as the first random number. Two random numbers; starting from the current time, every second is the time period of the first random number, instructing the camera of the user end to perform a video whose number of seconds is the difference between the first random number and the second random number Record until the total length of the recorded video reaches the total length.
本实施例的好处在于,在随机选择一个时间指示所述用户端启动摄像头录像的情况下,选择一个随机的时间结束录像,可以进一步降低由于用户提前掌握录像开始时间导致出现录屏作弊行为的可能性,进一步提高了获取的身份验证视频的真实性,提高了身份验证的合法性和安全性。The advantage of this embodiment is that when a random time is selected to instruct the client to start camera recording, a random time is selected to end the recording, which can further reduce the possibility of screen recording cheating due to the user's grasp of the recording start time in advance It further improves the authenticity of the obtained identity verification video, and improves the legality and security of identity verification.
在一个实施例中,所述获取当前时间和两个随机数,包括:In an embodiment, the obtaining the current time and two random numbers includes:
获取当前时间并任取一随机数;在与所述随机数之差的绝对值大于第一预定随机数阈值的范围内获取另一随机数。Obtain the current time and choose any random number; acquire another random number within the range where the absolute value of the difference with the random number is greater than the first predetermined random number threshold.
本实施例的好处在于,通过限制两个随机数之间的距离来保证获取的两个随机数的距离足够大,使得根据两个随机数得到的启动摄像头连续进行录制的录像时间是足够大的,在一定程度上保证了获取录像的可靠性和安全性。The advantage of this embodiment is that the distance between the two random numbers is limited to ensure that the distance between the two random numbers is large enough, so that the continuous recording time of the camera based on the two random numbers is large enough , To a certain extent, to ensure the reliability and safety of obtaining video.
在一个实施例中,所述预定规则包括:In one embodiment, the predetermined rule includes:
响应于接收到来自所述用户端的接受所述协议信息的指令,获取当前时间和两个随机数,其中,所述两个随机数为小于第二预定随机数阈值的整数;In response to receiving an instruction from the user terminal to accept the protocol information, obtain the current time and two random numbers, where the two random numbers are integers less than a second predetermined random number threshold;
在所述两个随机数中任取一随机数作为第三随机数,将另一随机数作为第四随机数;Any one of the two random numbers is selected as the third random number, and the other random number is used as the fourth random number;
从所述当前时间开始,每隔秒数为所述第三随机数的时间段,指示所述用户端的摄像头录制秒数为所述第四随机数的时间段的视频,直至已录制的视频的长度达到所述时长;Starting from the current time, every second is the time period of the third random number, instructing the camera of the user side to record the video of the time period of the fourth random number for the number of seconds until the recorded video Reach the stated duration;
将所述用户端在所有所述第四随机数对应的时间段内录像得到的视频作为身份验证视频。The video recorded by the user terminal during all the time periods corresponding to the fourth random number is used as the identity verification video.
本实施例的好处在于,由于身份验证视频的录制时间间隔以及录制时长都是随机的,提高了获取的身份验证视频的可信度。The advantage of this embodiment is that since the recording time interval and recording duration of the identity verification video are random, the credibility of the obtained identity verification video is improved.
步骤250,在确定不启动二重身份验证的情况下,根据预定规则指示所述用户端的摄像头在后台录制时长为所述总时长的视频,得到所述用户端返回的身份验证视频,作为身份验证信息。Step 250: In the case where it is determined not to start dual identity verification, instruct the camera of the client terminal to record a video with the total duration in the background according to a predetermined rule, and obtain the identity verification video returned by the client terminal as identity verification information.
由于不需要启动二重身份验证,所以可以仅将用户端返回的身份验证视频作为身份验证信息,其中,在本步骤中使用的用于指示所述用户端的摄像头进行视频录制的方式与前述的预定规则的具体实现方式可以相同、也可以不同,在此不再赘述。Since there is no need to start dual identity verification, only the identity verification video returned by the client can be used as the identity verification information. The method used in this step to instruct the camera of the client to record video is the same as the aforementioned predetermined The specific implementation of the rules can be the same or different, and will not be repeated here.
步骤260,接收所述用户端上传的身份证件信息。Step 260: Receive the identity document information uploaded by the user terminal.
用户上传的身份证件信息可以为居民身份证的正面照片或者护照的照片等各种能确定用户人脸图像的信息。The ID information uploaded by the user may be various information that can determine the user's face image, such as the front photo of the resident ID card or the passport photo.
步骤270,基于所述身份验证信息和所述身份证件信息确定所述用户的身份合法。Step 270: Determine that the user's identity is legal based on the identity verification information and the identity document information.
在一个实施例中,步骤270的具体步骤如图5所示,步骤270具体包括以下步骤:In an embodiment, the specific steps of step 270 are shown in FIG. 5, and step 270 specifically includes the following steps:
步骤271,在所述身份验证信息包含二重身份验证信息的情况下,基于所述二重身份验证信息验证所述用户的身份是否合法。Step 271: In a case where the identity verification information includes dual identity verification information, verify whether the user's identity is legal based on the dual identity verification information.
在一个实施例中,二重身份验证信息为眨眼动作,所述基于所述二重身份验证信息验证所述用户的身份是否合法,包括:In one embodiment, the dual identity verification information is a blinking action, and the verifying whether the user's identity is legal based on the dual identity verification information includes:
确定指示所述用户端接收来自用户的二重身份验证信息的时间与眨眼动作的时间是否一致;Determining whether the time for instructing the user terminal to receive the dual identity verification information from the user is consistent with the time for blinking;
如果是,确定基于所述二重身份验证信息验证所述用户的身份合法;If yes, it is determined to verify that the user's identity is legal based on the dual identity verification information;
如果否,确定基于所述二重身份验证信息验证所述用户的身份不合法。If not, it is determined that verification of the identity of the user based on the dual identity verification information is illegal.
步骤272,如果是,基于所述身份验证视频和所述身份证件信息确定所述用户的身份 合法。Step 272: If yes, determine that the user's identity is legal based on the identity verification video and the identity document information.
当用户的二重身份验证信息通过了验证,就有必要针对身份验证视频进行验证。When the user's dual identity verification information is verified, it is necessary to verify the identity verification video.
步骤273,在所述身份验证信息不包含二重身份验证信息的情况下,基于所述身份验证视频和所述身份证件信息确定所述用户的身份合法。Step 273: In the case that the identity verification information does not include dual identity verification information, determine that the user's identity is legal based on the identity verification video and the identity document information.
在一个实施例中,所述基于所述身份验证信息和所述身份证件信息确定所述用户的身份合法,包括:将所述身份验证视频分成帧,得到多个图像帧;判断分成的图像帧中包含的人脸与所述身份证件信息中的人脸一致的图像帧的数目是否大于预定图像帧数目阈值;如果是,则确定所述用户的身份合法。In one embodiment, the determining that the user's identity is legal based on the identity verification information and the identity document information includes: dividing the identity verification video into frames to obtain multiple image frames; and determining the divided image frames Whether the number of image frames in which the human face is consistent with the human face in the identity document information is greater than a predetermined image frame number threshold; if so, it is determined that the identity of the user is legal.
将身份验证视频分成图像帧的方式可以是通过调用Opencv、MATLAB等工具的方式来实现。The method of dividing the authentication video into image frames can be achieved by calling tools such as Opencv and MATLAB.
在一个实施例中,所述基于所述身份验证信息和所述身份证件信息确定所述用户的身份合法,包括:将所述身份验证视频分成帧,得到多个图像帧;在分成的图像帧中判断人脸与所述身份证件信息中的人脸一致的图像帧的数目是否大于预定图像帧数目阈值;如果是,则确定所述用户的身份合法。In an embodiment, the determining that the user’s identity is legal based on the identity verification information and the identity document information includes: dividing the identity verification video into frames to obtain multiple image frames; In determining whether the number of image frames with a human face consistent with the human face in the identity document information is greater than a predetermined image frame number threshold; if so, it is determined that the identity of the user is legal.
在一个实施例中,所述在分成的图像帧中判断人脸与所述身份证件信息中的人脸一致的图像帧的数目是否大于预定图像帧数目阈值包括:In an embodiment, the judging whether the number of image frames in which the human face is consistent with the human face in the identity document information in the divided image frames is greater than a predetermined image frame number threshold includes:
针对分成的图像帧中的每一图像帧,判断该图像帧的人脸是否与所述身份证件信息中的人脸一致;For each image frame in the divided image frames, determining whether the face of the image frame is consistent with the face in the ID information;
获取记录了与所述身份证件信息中的人脸一致的人脸的图像帧的数目;Acquiring the number of image frames in which the human face consistent with the human face in the ID information is recorded;
判断所述数目是否大于预定图像帧数目阈值。It is determined whether the number is greater than a predetermined image frame number threshold.
比较图像帧的人脸是否与所述身份证件信息中的人脸一致的具体方式可以通过使用训练好的神经网络模型的方式进行,比如可以使用卷积神经网络模型来进行人脸的比对;还可以通过调用现有的应用程序编程接口的方式进行。The specific method of comparing whether the face in the image frame is consistent with the face in the ID information can be performed by using a trained neural network model, for example, a convolutional neural network model can be used to compare faces; It can also be done by calling an existing application programming interface.
本实施例的好处在于,通过对所有图像帧进行人脸比对的判断,然后获取记录了与所述身份证件信息中的人脸一致的人脸的图像帧的数目,使得身份验证视频的合法性更能得到保障。The advantage of this embodiment is that, by judging all image frames by comparing faces, and then obtaining the number of image frames that record the faces consistent with the faces in the ID information, the identity verification video is legal Sex can be more guaranteed.
在一个实施例中,在分成的图像帧中判断人脸与所述身份证件信息中的人脸一致的图像帧的数目是否大于预定图像帧数目阈值包括:In an embodiment, judging whether the number of image frames in which the human face is consistent with the human face in the ID information is greater than a predetermined image frame number threshold in the divided image frames includes:
从分成的第一图像帧开始,判断每一图像帧的人脸是否与所述身份证件信息中的人脸一致;Starting from the first divided image frame, determine whether the face of each image frame is consistent with the face in the ID information;
获取已经判断出的人脸与所述身份证件信息中的人脸一致的图像帧的数目;Acquiring the number of image frames in which the determined human face is consistent with the human face in the ID information;
当所述数目大于预定图像帧数目阈值,则结束判断,并确定分成的图像帧中人脸与所述身份证件信息中的人脸一致的图像帧的数目大于预定图像帧数目阈值。When the number is greater than the predetermined image frame number threshold, the judgment is ended, and it is determined that the number of image frames in the divided image frames with the human face consistent with the human face in the ID information is greater than the predetermined image frame number threshold.
由于在某些情况下,不用对所有图像帧进行判断即可确认在分成的图像帧中人脸与所述身份证件信息中的人脸一致的图像帧的数目是否大于预定图像帧数目阈值,所以本实施例在一定程度上提高了验证所述用户的身份合法的效率,降低了计算开销。Because in some cases, it is not necessary to judge all image frames to confirm whether the number of image frames in which the human face is consistent with the human face in the ID information in the divided image frames is greater than the predetermined number of image frames threshold, so This embodiment improves the efficiency of verifying the legality of the user's identity to a certain extent, and reduces the calculation overhead.
在一个实施例中,所述基于所述身份验证视频和所述身份证件信息确定所述用户的身份合法,包括:In an embodiment, the determining that the user's identity is legal based on the identity verification video and the identity document information includes:
将所述身份验证视频分成帧,得到多个图像帧;获取人脸与所述身份证件信息中的人脸一致的图像帧的数目,作为第一数目;获取分成的所有图像帧的数目,作为第二数目;确定所述第一数目与所述第二数目的比值;若所述比值大于预定比值阈值,则确定所述用户的身份合法。Divide the identity verification video into frames to obtain multiple image frames; obtain the number of image frames in which the face is consistent with the face in the ID information as the first number; obtain the number of all divided image frames as The second number; determine the ratio of the first number to the second number; if the ratio is greater than a predetermined ratio threshold, it is determined that the identity of the user is legal.
由于录屏时间不同等因素可能造成将不同的身份验证视频分成的图像帧的数目不同,本实施例的好处在于,将人脸与所述身份证件信息中的人脸一致的图像帧的数目和所有图像帧的数目的相对大小关系作为用于确定用户的身份合法的标准,提高了身份验证时的合 理性和准确性。Due to factors such as different screen recording times, the number of image frames divided into different identity verification videos may be different. The advantage of this embodiment is that the number of image frames that match the human face with the human face in the ID information is sum The relative size relationship of the number of all image frames is used as a standard for determining the legality of the user's identity, which improves the rationality and accuracy of identity verification.
在一个实施例中,所述基于所述身份验证视频和所述身份证件信息确定所述用户的身份合法,包括:In an embodiment, the determining that the user's identity is legal based on the identity verification video and the identity document information includes:
将所述身份验证视频分成帧,得到多个图像帧;Divide the identity verification video into frames to obtain multiple image frames;
在小于预定第五随机数阈值的范围内任取一随机数,作为第五随机数,在小于预定第六随机数阈值的范围内任取一随机数,作为第六随机数;Any random number within the range less than the predetermined fifth random number threshold is used as the fifth random number, and any random number within the range less than the predetermined sixth random number threshold is selected as the sixth random number;
在按照时间排序的多个图像帧中,提取排序为所述第五随机数的图像帧;From the plurality of image frames sorted by time, extract the image frame sorted as the fifth random number;
从排序为所述第五随机数的图像帧开始,每隔数目为第六随机数的图像帧获取一个图像帧;Starting from the image frame sorted as the fifth random number, acquiring an image frame for every image frame having the sixth random number;
在提取出的所有图像帧中的人脸与所述身份证件信息中的人脸一致的情况下,确定所述用户的身份合法。In the case that the faces in all the extracted image frames are consistent with the faces in the ID information, it is determined that the identity of the user is legal.
本实施例的好处在于,通过随机抽样的方式提取图像帧来验证用户身份是否合法,降低了计算量,从而提高了对用户进行身份验证的效率,同时由于提取图像帧的过程完全是随机进行的,能够保证身份验证的安全性。The advantage of this embodiment is that the image frames are extracted by random sampling to verify whether the user's identity is legal, which reduces the amount of calculation, thereby improving the efficiency of user authentication. At the same time, the process of extracting image frames is completely random. , To ensure the security of identity verification.
图4是根据图2对应实施例示出的一实施例的预定规则的流程图。如图4所示,包括以下步骤:Fig. 4 is a flowchart of a predetermined rule according to an embodiment shown in the embodiment corresponding to Fig. 2. As shown in Figure 4, it includes the following steps:
步骤410,获取当前时间和一个随机数。Step 410: Obtain the current time and a random number.
在一个实施例中,随机数是在预定范围内获取的。比如该预定范围可以为[0,100]。In one embodiment, the random number is acquired within a predetermined range. For example, the predetermined range may be [0,100].
步骤420,计算所述当前时间与秒数为所述随机数的时间段之和,作为启动所述用户端的摄像头开始进行录像的时间。Step 420: Calculate the sum of the current time and the time period in which the number of seconds is the random number, as the time for starting the camera of the user end to start recording.
例如,当前时间为20:18:09,而获得的随机数为85,由于85=00:01:25,那么获得的启动所述用户端的摄像头开始进行录像的时间20:19:34。For example, the current time is 20:18:09, and the obtained random number is 85. Since 85=00:01:25, the obtained time when the camera of the user terminal is started to start recording is 20:19:34.
步骤430,在当前时间达到所述启动所述用户端的摄像头开始进行录像的时间时,指示所述用户端的摄像头开始进行时长为所述总时长的录像,以得到身份验证视频。Step 430: When the current time reaches the time when the camera of the client terminal is started to start recording, instruct the camera of the client terminal to start recording with the total duration to obtain an identity verification video.
本实施例的好处在于,由于指示所述用户端的摄像头开始进行录像的时间是根据随机数来确定的,因此指示所述用户端的摄像头开始进行录像的时间是随机的。这样做的好处在于,避免了由于用户提前掌握录像开始时间导致的录屏作弊行为,比如中介代为认证或者由他人进行假冒认证等非法行为,提高了获取的身份验证视频的真实性。The advantage of this embodiment is that since the time for instructing the camera on the user side to start recording is determined according to a random number, the time for instructing the camera on the user side to start recording is random. The advantage of this is that it avoids screen recording cheating caused by the user in advance of the recording start time, such as illegal acts such as authentication by an intermediary or counterfeit authentication by others, and improves the authenticity of the obtained identity verification video.
本申请还提供了一种身份验证装置,以下是本申请的装置实施例。This application also provides an identity verification device, and the following are device embodiments of this application.
图6是根据一示例性实施例示出的一种身份验证装置的框图。如图6所示,该身份验证装置600包括:Fig. 6 is a block diagram showing an identity verification device according to an exemplary embodiment. As shown in FIG. 6, the identity verification device 600 includes:
返回模块610,被配置为当接收到来自用户端的身份验证请求,向所述用户端返回包含用户身份验证手段的协议信息。The return module 610 is configured to, when receiving an identity verification request from the client, return to the client the protocol information including the user's identity verification means.
获取模块620,被配置为响应于接收到来自所述用户端的接受所述协议信息的指令,获取所述用户端的摄像头的像素值。The obtaining module 620 is configured to obtain the pixel value of the camera of the user end in response to receiving an instruction from the user end to accept the protocol information.
第一确定模块630,被配置为根据所述摄像头的像素值确定录像的总时长以及是否启动二重身份验证。The first determining module 630 is configured to determine the total duration of recording and whether to start dual identity verification according to the pixel value of the camera.
指示模块640,被配置为在确定启动二重身份验证的情况下,根据预定规则指示所述用户端的摄像头在后台录制时长为所述总时长的视频,并指示所述用户端接收来自用户的二重身份验证信息,得到所述用户端返回的身份验证视频和所述二重身份验证信息,作为身份验证信息;以及The indicating module 640 is configured to instruct the user terminal’s camera to record a video with the total duration in the background in the background according to a predetermined rule, and instruct the user terminal to receive the secondary identity verification from the user. Re-identification information, obtaining the identity verification video returned by the user terminal and the double identity verification information as identity verification information; and
在确定不启动二重身份验证的情况下,根据预定规则指示所述用户端的摄像头在后台录制时长为所述总时长的视频,得到所述用户端返回的身份验证视频,作为身份验证信息。In the case of determining not to start dual identity verification, instruct the camera of the client terminal to record a video with the total duration in the background according to a predetermined rule, and obtain the identity verification video returned by the client terminal as the identity verification information.
接收模块650,被配置为接收所述用户端上传的身份证件信息。The receiving module 650 is configured to receive the identity document information uploaded by the user terminal.
第二确定模块660,被配置为基于所述身份验证信息和所述身份证件信息确定所述用 户的身份合法。The second determining module 660 is configured to determine that the user's identity is legal based on the identity verification information and the identity document information.
在一个实施例中,所述根据所述摄像头的像素值确定录像的总时长以及是否启动二重身份验证,包括:In one embodiment, the determining the total duration of recording and whether to start dual identity verification according to the pixel value of the camera includes:
在摄像头的像素值达到第一预定像素值阈值的情况下,将预设的第一时长作为录像的总时长并确定不启动二重身份验证;In the case that the pixel value of the camera reaches the first predetermined pixel value threshold, use the preset first duration as the total duration of recording and determine not to start dual identity verification;
在摄像头的像素值小于第一预定像素值阈值且大于或等于第二预定像素值阈值的情况下,将预设的第二时长作为录像的总时长并确定不启动二重身份验证,其中所述第二时长大于第一时长;In the case that the pixel value of the camera is less than the first predetermined pixel value threshold and greater than or equal to the second predetermined pixel value threshold, the preset second duration is used as the total duration of the recording and the dual identity verification is determined not to be initiated, wherein The second duration is greater than the first duration;
在摄像头的像素值小于第二预定像素值阈值的情况下,将预设的第三时长作为录像的总时长并确定启动二重身份验证,其中,所述第三时长大于第二时长。In the case that the pixel value of the camera is less than the second predetermined pixel value threshold, the preset third duration is used as the total duration of the recording and the dual identity verification is determined to be initiated, wherein the third duration is greater than the second duration.
在一个实施例中,所述根据所述摄像头的像素值确定录像的总时长以及是否启动二重身份验证,包括:In one embodiment, the determining the total duration of recording and whether to start dual identity verification according to the pixel value of the camera includes:
基于所述摄像头的像素值和如下公式确定录像的总时长:Determine the total duration of recording based on the pixel value of the camera and the following formula:
Figure PCTCN2019117696-appb-000002
Figure PCTCN2019117696-appb-000002
其中,T out为确定出的录像的总时长,P为摄像头的像素值,P ref为第一预设摄像头像素基准值,T ref1为第一预定时长,T ref2为第二预定时长,其中,T ref2小于或等于T ref1Among them, T out is the determined total recording duration, P is the pixel value of the camera, Pref is the first preset camera pixel reference value, T ref1 is the first predetermined duration, and T ref2 is the second predetermined duration, where, T ref2 is less than or equal to T ref1 ;
在P大于或等于第二预设摄像头像素基准值的情况下,确定不启动二重身份验证,其中,所述第二预设摄像头像素基准值小于第一预设摄像头像素基准值;If P is greater than or equal to the second preset camera pixel reference value, determining not to start dual identity verification, wherein the second preset camera pixel reference value is less than the first preset camera pixel reference value;
在P小于第二预设摄像头像素基准值的情况下,确定启动二重身份验证。In the case where P is less than the second preset camera pixel reference value, it is determined to start dual identity verification.
在一个实施例中,所述预定规则包括:In one embodiment, the predetermined rule includes:
获取当前时间和一个随机数;Get the current time and a random number;
计算所述当前时间与秒数为所述随机数的时间段之和,作为启动所述用户端的摄像头开始进行录像的时间;Calculating the sum of the current time and the time period in which the number of seconds is the random number as the time for starting the camera of the user end to start recording;
在当前时间达到所述启动所述用户端的摄像头开始进行录像的时间时,指示所述用户端的摄像头开始进行时长为所述总时长的录像,以得到身份验证视频。When the current time reaches the time when the camera of the client terminal is activated to start recording, the camera of the client terminal is instructed to start recording with the total duration to obtain an identity verification video.
在一个实施例中,所述预定规则包括:In one embodiment, the predetermined rule includes:
获取当前时间和两个随机数;Get the current time and two random numbers;
在所述两个随机数中确定出较大的随机数,作为第一随机数,并将较小的随机数作为第二随机数;Determining the larger random number among the two random numbers as the first random number, and using the smaller random number as the second random number;
从当前时间开始,每隔秒数为所述第一随机数的时间段,指示所述用户端的摄像头进行秒数为所述第一随机数与第二随机数的差值的视频录制,直至已录制的视频的总长度达到所述总时长。Starting from the current time, every second is the time period of the first random number, instruct the camera of the user end to record the video with the difference between the first random number and the second random number in seconds until it has been The total length of the recorded video reaches the total length.
在一个实施例中,所述基于所述身份验证信息和所述身份证件信息确定所述用户的身份合法,包括:In one embodiment, the determining that the user's identity is legal based on the identity verification information and the identity document information includes:
在所述身份验证信息包含二重身份验证信息的情况下,基于所述二重身份验证信息验证所述用户的身份是否合法;In the case that the identity verification information includes dual identity verification information, verifying whether the identity of the user is legal based on the dual identity verification information;
如果是,基于所述身份验证视频和所述身份证件信息确定所述用户的身份合法;If yes, determine that the user's identity is legal based on the identity verification video and the identity document information;
在所述身份验证信息不包含二重身份验证信息的情况下,基于所述身份验证视频和所述身份证件信息确定所述用户的身份合法。In the case that the identity verification information does not include dual identity verification information, it is determined that the user's identity is legal based on the identity verification video and the identity document information.
在一个实施例中,所述基于所述身份验证信息和所述身份证件信息确定所述用户的身份合法,包括:In one embodiment, the determining that the user's identity is legal based on the identity verification information and the identity document information includes:
将所述身份验证视频分成帧,得到多个图像帧;Divide the identity verification video into frames to obtain multiple image frames;
判断分成的图像帧中包含的人脸与所述身份证件信息中的人脸一致的图像帧的数目 是否大于预定图像帧数目阈值;Judging whether the number of image frames in which the human face contained in the divided image frames is consistent with the human face in the ID information is greater than a predetermined image frame number threshold;
如果是,则确定所述用户的身份合法。If it is, it is determined that the identity of the user is legal.
根据本申请的第三方面,还提供了一种计算设备,执行上述任一所示的身份验证方法的全部或者部分步骤。该计算设备包括:According to the third aspect of the present application, there is also provided a computing device that executes all or part of the steps of any one of the aforementioned identity verification methods. The computing equipment includes:
至少一个处理器;以及At least one processor; and
与所述至少一个处理器通信连接的存储器;其中,A memory communicatively connected with the at least one processor; wherein,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如上述任一个示例性实施例所示出的身份验证方法。The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute as shown in any one of the above exemplary embodiments. Authentication method.
所属技术领域的技术人员能够理解,本申请的各个方面可以实现为系统、方法或程序产品。因此,本申请的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。Those skilled in the art can understand that various aspects of the present application can be implemented as a system, method, or program product. Therefore, each aspect of the present application can be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which can be collectively referred to herein as "Circuit", "Module" or "System".
下面参照图7来描述根据本申请的这种实施方式的计算设备700。图7显示的计算设备700仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。The computing device 700 according to this embodiment of the present application will be described below with reference to FIG. 7. The computing device 700 shown in FIG. 7 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present application.
如图7所示,计算设备700以通用计算设备的形式表现。计算设备700的组件可以包括但不限于:上述至少一个处理单元710、上述至少一个存储单元720、连接不同系统组件(包括存储单元720和处理单元710)的总线730。As shown in FIG. 7, the computing device 700 is represented in the form of a general-purpose computing device. The components of the computing device 700 may include, but are not limited to: the aforementioned at least one processing unit 710, the aforementioned at least one storage unit 720, and a bus 730 connecting different system components (including the storage unit 720 and the processing unit 710).
其中,所述存储单元存储有程序代码,所述程序代码可以被所述处理单元710执行,使得所述处理单元710执行本说明书上述“实施例方法”部分中描述的根据本申请各种示例性实施方式的步骤。Wherein, the storage unit stores program code, and the program code can be executed by the processing unit 710, so that the processing unit 710 executes the various exemplary methods described in the "Embodiment Method" section of this specification. Implementation steps.
存储单元720可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)721和/或高速缓存存储单元722,还可以进一步包括只读存储单元(ROM)723。The storage unit 720 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 721 and/or a cache storage unit 722, and may further include a read-only storage unit (ROM) 723.
存储单元720还可以包括具有一组(至少一个)程序模块725的程序/实用工具724,这样的程序模块725包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。The storage unit 720 may also include a program/utility tool 724 having a set of (at least one) program module 725. Such program module 725 includes but is not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples or some combination may include the implementation of a network environment.
总线730可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。The bus 730 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local area using any bus structure among multiple bus structures. bus.
计算设备700也可以与一个或多个外部设备900(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该计算设备700交互的设备通信,和/或与使得该计算设备700能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口750进行。并且,计算设备700还可以通过网络适配器760与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器760通过总线730与计算设备700的其它模块通信。应当明白,尽管图中未示出,可以结合计算设备700使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。The computing device 700 may also communicate with one or more external devices 900 (such as keyboards, pointing devices, Bluetooth devices, etc.), and may also communicate with one or more devices that enable a user to interact with the computing device 700, and/or communicate with Any device (such as a router, modem, etc.) that enables the computing device 700 to communicate with one or more other computing devices. This communication can be performed through an input/output (I/O) interface 750. In addition, the computing device 700 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 760. As shown in the figure, the network adapter 760 communicates with other modules of the computing device 700 through the bus 730. It should be understood that although not shown in the figure, other hardware and/or software modules can be used in conjunction with the computing device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本申请实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本申请实施方式的方法。Through the description of the foregoing embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which may be a personal computer, server, terminal device, or network device, etc.) execute the method according to the embodiment of the present application.
根据本申请的第四方面,还提供了一种计算机非易失性可读存储介质,其上存储有能 够实现本说明书上述方法的程序产品。在一些可能的实施方式中,本申请的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在终端设备上运行时,所述程序代码用于使所述终端设备执行本说明书上述“示例性方法”部分中描述的根据本申请各种示例性实施方式的步骤。According to the fourth aspect of the present application, there is also provided a computer non-volatile readable storage medium, on which is stored a program product capable of implementing the above method of this specification. In some possible implementation manners, various aspects of the present application can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to enable the The terminal device executes the steps according to various exemplary embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification.
参考图8所示,描述了根据本申请的实施方式的用于实现上述方法的计算机非易失性可读存储介质800,其可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在终端设备,例如个人电脑上运行。然而,本申请的程序产品不限于此,在本文件中,计算机非易失性可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。Referring to FIG. 8, a computer non-volatile readable storage medium 800 for implementing the above method according to an embodiment of the present application is described, which may adopt a portable compact disk read-only memory (CD-ROM) and includes program code , And can run on terminal devices, such as personal computers. However, the program product of this application is not limited to this. In this document, the computer non-volatile readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, device, or device. In conjunction with.
所述程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The program product can use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Type programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。The computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The readable signal medium may also be any readable medium other than a readable storage medium, and the readable medium may send, propagate, or transmit a program for use by or in combination with the instruction execution system, apparatus, or device.
可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。The program code contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
可以以一种或多种程序设计语言的任意组合来编写用于执行本申请操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。The program code used to perform the operations of this application can be written in any combination of one or more programming languages. The programming languages include object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural Programming language-such as "C" language or similar programming language. The program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on. In the case of a remote computing device, the remote computing device can be connected to a user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using Internet service providers) Business to connect via the Internet).
此外,上述附图仅是根据本申请示例性实施例的方法所包括的处理的示意性说明,而不是限制目的。易于理解,上述附图所示的处理并不表明或限制这些处理的时间顺序。另外,也易于理解,这些处理可以是例如在多个模块中同步或异步执行的。In addition, the above-mentioned drawings are only schematic illustrations of the processing included in the method according to the exemplary embodiments of the present application, and are not intended for limitation. It is easy to understand that the processing shown in the above drawings does not indicate or limit the time sequence of these processings. In addition, it is easy to understand that these processes can be executed synchronously or asynchronously in multiple modules, for example.
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围执行各种修改和改变。本申请的范围仅由所附的权利要求来限制。It should be understood that the present application is not limited to the precise structure that has been described above and shown in the drawings, and various modifications and changes can be performed without departing from its scope. The scope of the application is only limited by the appended claims.

Claims (22)

  1. 一种身份验证方法,包括:An identity verification method including:
    当接收到来自用户端的身份验证请求,向所述用户端返回包含用户身份验证手段的协议信息,其中,所述协议信息中的用户身份验证手段包括录像;When receiving the identity verification request from the client, returning to the client the protocol information containing the user identity verification means, wherein the user identity verification means in the protocol information includes video recording;
    响应于接收到来自所述用户端的接受所述协议信息的指令,获取所述用户端的摄像头的像素值;In response to receiving an instruction from the client to accept the protocol information, acquiring the pixel value of the camera of the client;
    根据所述摄像头的像素值确定录像的总时长以及是否启动二重身份验证;According to the pixel value of the camera, determine the total duration of the recording and whether to start dual identity verification;
    在确定启动二重身份验证的情况下,根据预定规则指示所述用户端的摄像头在后台录制时长为所述总时长的视频,并指示所述用户端接收来自用户的二重身份验证信息,得到所述用户端返回的身份验证视频和所述二重身份验证信息,作为身份验证信息;In the case of determining to start the dual identity verification, instruct the user end's camera to record a video with the total duration in the background for the total duration according to a predetermined rule, and instruct the user end to receive the dual identity verification information from the user to obtain all The identity verification video and the dual identity verification information returned by the user terminal are used as identity verification information;
    在确定不启动二重身份验证的情况下,根据预定规则指示所述用户端的摄像头在后台录制时长为所述总时长的视频,得到所述用户端返回的身份验证视频,作为身份验证信息;In the case of determining not to start dual identity verification, instruct the camera of the user end to record a video whose duration is the total duration in the background according to a predetermined rule, and obtain the identity verification video returned by the user end as the identity verification information;
    接收所述用户端上传的身份证件信息;Receiving the ID information uploaded by the client;
    基于所述身份验证信息和所述身份证件信息确定所述用户的身份合法。It is determined that the user's identity is legal based on the identity verification information and the identity document information.
  2. 根据权利要求1所述的方法,其中,所述根据所述摄像头的像素值确定录像的总时长以及是否启动二重身份验证,包括:The method according to claim 1, wherein the determining the total duration of recording and whether to start dual identity verification according to the pixel value of the camera comprises:
    在摄像头的像素值达到第一预定像素值阈值的情况下,将预设的第一时长作为录像的总时长并确定不启动二重身份验证;In the case that the pixel value of the camera reaches the first predetermined pixel value threshold, use the preset first duration as the total duration of recording and determine not to start dual identity verification;
    在摄像头的像素值小于第一预定像素值阈值且大于或等于第二预定像素值阈值的情况下,将预设的第二时长作为录像的总时长并确定不启动二重身份验证,其中所述第二时长大于第一时长;In the case that the pixel value of the camera is less than the first predetermined pixel value threshold and greater than or equal to the second predetermined pixel value threshold, the preset second duration is used as the total duration of the recording and the dual identity verification is determined not to be initiated, wherein The second duration is greater than the first duration;
    在摄像头的像素值小于第二预定像素值阈值的情况下,将预设的第三时长作为录像的总时长并确定启动二重身份验证,其中,所述第三时长大于第二时长。In the case that the pixel value of the camera is less than the second predetermined pixel value threshold, the preset third duration is used as the total duration of the recording and the dual identity verification is determined to be initiated, wherein the third duration is greater than the second duration.
  3. 根据权利要求1所述的方法,其中,所述根据所述摄像头的像素值确定录像的总时长以及是否启动二重身份验证,包括:The method according to claim 1, wherein the determining the total duration of recording and whether to start dual identity verification according to the pixel value of the camera comprises:
    基于所述摄像头的像素值和如下公式确定录像的总时长:Determine the total duration of recording based on the pixel value of the camera and the following formula:
    Figure PCTCN2019117696-appb-100001
    Figure PCTCN2019117696-appb-100001
    其中,T out为确定出的录像的总时长,P为摄像头的像素值,P ref为第一预设摄像头像素基准值,T ref1为第一预定时长,T ref2为第二预定时长,其中,T ref2小于或等于T ref1Among them, T out is the determined total recording duration, P is the pixel value of the camera, Pref is the first preset camera pixel reference value, T ref1 is the first predetermined duration, and T ref2 is the second predetermined duration, where, T ref2 is less than or equal to T ref1 ;
    在P大于或等于第二预设摄像头像素基准值的情况下,确定不启动二重身份验证,其中,所述第二预设摄像头像素基准值小于第一预设摄像头像素基准值;If P is greater than or equal to the second preset camera pixel reference value, determining not to start dual identity verification, wherein the second preset camera pixel reference value is less than the first preset camera pixel reference value;
    在P小于第二预设摄像头像素基准值的情况下,确定启动二重身份验证。In the case where P is less than the second preset camera pixel reference value, it is determined to start dual identity verification.
  4. 根据权利要求1所述的方法,其中,所述预定规则包括:The method according to claim 1, wherein the predetermined rule comprises:
    获取当前时间和一个随机数;Get the current time and a random number;
    计算所述当前时间与秒数为所述随机数的时间段之和,作为启动所述用户端的摄像头开始进行录像的时间;Calculating the sum of the current time and the time period in which the number of seconds is the random number as the time for starting the camera of the user end to start recording;
    在当前时间达到所述启动所述用户端的摄像头开始进行录像的时间时,指示所述用户端的摄像头开始进行时长为所述总时长的录像,以得到身份验证视频。When the current time reaches the time when the camera of the client terminal is activated to start recording, the camera of the client terminal is instructed to start recording with the total duration to obtain an identity verification video.
  5. 根据权利要求1所述的方法,其中,所述预定规则包括:The method according to claim 1, wherein the predetermined rule comprises:
    获取当前时间和两个随机数;Get the current time and two random numbers;
    在所述两个随机数中确定出较大的随机数,作为第一随机数,并将较小的随机数作为第 二随机数;Determine the larger random number among the two random numbers as the first random number, and use the smaller random number as the second random number;
    从当前时间开始,每隔秒数为所述第一随机数的时间段,指示所述用户端的摄像头进行秒数为所述第一随机数与第二随机数的差值的视频录制,直至已录制的视频的总长度达到所述总时长。Starting from the current time, every second is the time period of the first random number, instruct the camera of the user end to record the video with the difference between the first random number and the second random number in seconds until it has been The total length of the recorded video reaches the total length.
  6. 根据权利要求1所述的方法,其中,所述基于所述身份验证信息和所述身份证件信息确定所述用户的身份合法,包括:The method according to claim 1, wherein the determining that the user's identity is legal based on the identity verification information and the identity document information comprises:
    在所述身份验证信息包含二重身份验证信息的情况下,基于所述二重身份验证信息验证所述用户的身份是否合法;In the case that the identity verification information includes dual identity verification information, verifying whether the identity of the user is legal based on the dual identity verification information;
    如果是,基于所述身份验证视频和所述身份证件信息确定所述用户的身份合法;If yes, determine that the user's identity is legal based on the identity verification video and the identity document information;
    在所述身份验证信息不包含二重身份验证信息的情况下,基于所述身份验证视频和所述身份证件信息确定所述用户的身份合法。In the case that the identity verification information does not include double identity verification information, it is determined that the user's identity is legal based on the identity verification video and the identity document information.
  7. 根据权利要求6所述的方法,其中,所述基于所述身份验证信息和所述身份证件信息确定所述用户的身份合法,包括:The method according to claim 6, wherein the determining that the user's identity is legal based on the identity verification information and the identity document information comprises:
    将所述身份验证视频分成帧,得到多个图像帧;Divide the identity verification video into frames to obtain multiple image frames;
    判断分成的图像帧中包含的人脸与所述身份证件信息中的人脸一致的图像帧的数目是否大于预定图像帧数目阈值;Judging whether the number of image frames in which the human face contained in the divided image frames is consistent with the human face in the identity document information is greater than a predetermined image frame number threshold;
    如果是,则确定所述用户的身份合法。If it is, it is determined that the identity of the user is legal.
  8. 一种身份验证装置,包括:An identity verification device includes:
    返回模块,被配置为当接收到来自用户端的身份验证请求,向所述用户端返回包含用户身份验证手段的协议信息;The return module is configured to, when receiving an identity verification request from the client, return to the client the protocol information including the means of user identity verification;
    获取模块,被配置为响应于接收到来自所述用户端的接受所述协议信息的指令,获取所述用户端的摄像头的像素值;The obtaining module is configured to obtain the pixel value of the camera of the user end in response to receiving an instruction to accept the protocol information from the user end;
    第一确定模块,被配置为根据所述摄像头的像素值确定录像的总时长以及是否启动二重身份验证;The first determining module is configured to determine the total duration of recording and whether to start dual identity verification according to the pixel value of the camera;
    指示模块,被配置为在确定启动二重身份验证的情况下,根据预定规则指示所述用户端的摄像头在后台录制时长为所述总时长的视频,并指示所述用户端接收来自用户的二重身份验证信息,得到所述用户端返回的身份验证视频和所述二重身份验证信息,作为身份验证信息;以及The indication module is configured to instruct the user terminal’s camera to record a video whose duration is the total duration in the background according to a predetermined rule, and instruct the client terminal to receive the dual identity verification from the user. Identity verification information, the identity verification video returned by the client and the double identity verification information are obtained as identity verification information; and
    在确定不启动二重身份验证的情况下,根据预定规则指示所述用户端的摄像头在后台录制时长为所述总时长的视频,得到所述用户端返回的身份验证视频,作为身份验证信息;In the case of determining not to start dual identity verification, instruct the camera of the user end to record a video whose duration is the total duration in the background according to a predetermined rule, and obtain the identity verification video returned by the user end as the identity verification information;
    接收模块,被配置为接收所述用户端上传的身份证件信息;The receiving module is configured to receive the identity document information uploaded by the user terminal;
    第二确定模块,被配置为基于所述身份验证信息和所述身份证件信息确定所述用户的身份合法。The second determining module is configured to determine that the user's identity is legal based on the identity verification information and the identity document information.
  9. 根据权利要求8所述的装置,其中,所述根据所述摄像头的像素值确定录像的总时长以及是否启动二重身份验证,包括:The device according to claim 8, wherein said determining the total duration of recording and whether to activate dual identity verification according to the pixel value of the camera comprises:
    在摄像头的像素值达到第一预定像素值阈值的情况下,将预设的第一时长作为录像的总时长并确定不启动二重身份验证;In the case that the pixel value of the camera reaches the first predetermined pixel value threshold, use the preset first duration as the total duration of the video recording and determine not to start dual identity verification;
    在摄像头的像素值小于第一预定像素值阈值且大于或等于第二预定像素值阈值的情况下,将预设的第二时长作为录像的总时长并确定不启动二重身份验证,其中所述第二时长大于第一时长;In the case that the pixel value of the camera is less than the first predetermined pixel value threshold and greater than or equal to the second predetermined pixel value threshold, the preset second duration is used as the total duration of the recording and the dual identity verification is determined not to be initiated, wherein The second duration is greater than the first duration;
    在摄像头的像素值小于第二预定像素值阈值的情况下,将预设的第三时长作为录像的总时长并确定启动二重身份验证,其中,所述第三时长大于第二时长。In the case that the pixel value of the camera is less than the second predetermined pixel value threshold, the preset third duration is used as the total duration of the recording and the dual identity verification is determined to be initiated, wherein the third duration is greater than the second duration.
  10. 根据权利要求8所述的装置,其中,所述根据所述摄像头的像素值确定录像的总时长以及是否启动二重身份验证,包括:8. The device according to claim 8, wherein said determining the total duration of recording and whether to activate dual identity verification according to the pixel value of the camera comprises:
    基于所述摄像头的像素值和如下公式确定录像的总时长:Determine the total duration of recording based on the pixel value of the camera and the following formula:
    Figure PCTCN2019117696-appb-100002
    Figure PCTCN2019117696-appb-100002
    其中,T out为确定出的录像的总时长,P为摄像头的像素值,P ref为第一预设摄像头像素基准值,T ref1为第一预定时长,T ref2为第二预定时长,其中,T ref2小于或等于T ref1Among them, T out is the determined total recording duration, P is the pixel value of the camera, Pref is the first preset camera pixel reference value, T ref1 is the first predetermined duration, and T ref2 is the second predetermined duration, where, T ref2 is less than or equal to T ref1 ;
    在P大于或等于第二预设摄像头像素基准值的情况下,确定不启动二重身份验证,其中,所述第二预设摄像头像素基准值小于第一预设摄像头像素基准值;If P is greater than or equal to the second preset camera pixel reference value, determining not to start dual identity verification, wherein the second preset camera pixel reference value is less than the first preset camera pixel reference value;
    在P小于第二预设摄像头像素基准值的情况下,确定启动二重身份验证。In the case where P is less than the second preset camera pixel reference value, it is determined to start dual identity verification.
  11. 根据权利要求8所述的装置,其中,所述预定规则包括:The apparatus according to claim 8, wherein the predetermined rule comprises:
    获取当前时间和一个随机数;Get the current time and a random number;
    计算所述当前时间与秒数为所述随机数的时间段之和,作为启动所述用户端的摄像头开始进行录像的时间;Calculating the sum of the current time and the time period in which the number of seconds is the random number as the time for starting the camera of the user end to start recording;
    在当前时间达到所述启动所述用户端的摄像头开始进行录像的时间时,指示所述用户端的摄像头开始进行时长为所述总时长的录像,以得到身份验证视频。When the current time reaches the time when the camera of the client terminal is activated to start recording, the camera of the client terminal is instructed to start recording with the total duration to obtain an identity verification video.
  12. 根据权利要求8所述的装置,其中,所述预定规则包括:The apparatus according to claim 8, wherein the predetermined rule comprises:
    获取当前时间和两个随机数;Get the current time and two random numbers;
    在所述两个随机数中确定出较大的随机数,作为第一随机数,并将较小的随机数作为第二随机数;Determining the larger random number among the two random numbers as the first random number, and using the smaller random number as the second random number;
    从当前时间开始,每隔秒数为所述第一随机数的时间段,指示所述用户端的摄像头进行秒数为所述第一随机数与第二随机数的差值的视频录制,直至已录制的视频的总长度达到所述总时长。Starting from the current time, every second is the time period of the first random number, instruct the camera of the user end to record the video with the difference between the first random number and the second random number in seconds until it has been The total length of the recorded video reaches the total length.
  13. 根据权利要求8所述的装置,其中,所述基于所述身份验证信息和所述身份证件信息确定所述用户的身份合法,包括:The device according to claim 8, wherein the determining that the user's identity is legal based on the identity verification information and the identity document information comprises:
    在所述身份验证信息包含二重身份验证信息的情况下,基于所述二重身份验证信息验证所述用户的身份是否合法;In the case that the identity verification information includes dual identity verification information, verifying whether the identity of the user is legal based on the dual identity verification information;
    如果是,基于所述身份验证视频和所述身份证件信息确定所述用户的身份合法;If yes, determine that the user's identity is legal based on the identity verification video and the identity document information;
    在所述身份验证信息不包含二重身份验证信息的情况下,基于所述身份验证视频和所述身份证件信息确定所述用户的身份合法。In the case that the identity verification information does not include double identity verification information, it is determined that the user's identity is legal based on the identity verification video and the identity document information.
  14. 根据权利要求13所述的装置,其中,所述基于所述身份验证信息和所述身份证件信息确定所述用户的身份合法,包括:The apparatus according to claim 13, wherein the determining that the user's identity is legal based on the identity verification information and the identity document information comprises:
    将所述身份验证视频分成帧,得到多个图像帧;Divide the identity verification video into frames to obtain multiple image frames;
    判断分成的图像帧中包含的人脸与所述身份证件信息中的人脸一致的图像帧的数目是否大于预定图像帧数目阈值;Judging whether the number of image frames in which the human face contained in the divided image frames is consistent with the human face in the identity document information is greater than a predetermined image frame number threshold;
    如果是,则确定所述用户的身份合法。If it is, it is determined that the identity of the user is legal.
  15. 一种计算设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行:A computing device includes a memory and a processor, the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the processor executes:
    当接收到来自用户端的身份验证请求,向所述用户端返回包含用户身份验证手段的协议信息,其中,所述协议信息中的用户身份验证手段包括录像;When receiving the identity verification request from the client, returning to the client the protocol information containing the user identity verification means, wherein the user identity verification means in the protocol information includes video recording;
    响应于接收到来自所述用户端的接受所述协议信息的指令,获取所述用户端的摄像头的像素值;In response to receiving an instruction from the client to accept the protocol information, acquiring the pixel value of the camera of the client;
    根据所述摄像头的像素值确定录像的总时长以及是否启动二重身份验证;According to the pixel value of the camera, determine the total duration of the recording and whether to start dual identity verification;
    在确定启动二重身份验证的情况下,根据预定规则指示所述用户端的摄像头在后台录制时长为所述总时长的视频,并指示所述用户端接收来自用户的二重身份验证信息,得到所述用户端返回的身份验证视频和所述二重身份验证信息,作为身份验证信息;In the case of determining to start the dual identity verification, instruct the user end's camera to record a video with the total duration in the background for the total duration according to a predetermined rule, and instruct the user end to receive the dual identity verification information from the user to obtain all The identity verification video and the dual identity verification information returned by the user terminal are used as identity verification information;
    在确定不启动二重身份验证的情况下,根据预定规则指示所述用户端的摄像头在后台录制时长为所述总时长的视频,得到所述用户端返回的身份验证视频,作为身份验证信息;In the case of determining not to start dual identity verification, instruct the camera of the user end to record a video whose duration is the total duration in the background according to a predetermined rule, and obtain the identity verification video returned by the user end as the identity verification information;
    接收所述用户端上传的身份证件信息;Receiving the ID information uploaded by the client;
    基于所述身份验证信息和所述身份证件信息确定所述用户的身份合法。It is determined that the user's identity is legal based on the identity verification information and the identity document information.
  16. 根据权利要求15所述的计算设备,其中,所述根据所述摄像头的像素值确定录像的总时长以及是否启动二重身份验证,包括:The computing device according to claim 15, wherein the determining the total duration of recording and whether to start dual identity verification according to the pixel value of the camera comprises:
    在摄像头的像素值达到第一预定像素值阈值的情况下,将预设的第一时长作为录像的总时长并确定不启动二重身份验证;In the case that the pixel value of the camera reaches the first predetermined pixel value threshold, use the preset first duration as the total duration of the video recording and determine not to start dual identity verification;
    在摄像头的像素值小于第一预定像素值阈值且大于或等于第二预定像素值阈值的情况下,将预设的第二时长作为录像的总时长并确定不启动二重身份验证,其中所述第二时长大于第一时长;In the case that the pixel value of the camera is less than the first predetermined pixel value threshold and greater than or equal to the second predetermined pixel value threshold, the preset second duration is used as the total duration of the recording and the dual identity verification is determined not to be initiated, wherein The second duration is greater than the first duration;
    在摄像头的像素值小于第二预定像素值阈值的情况下,将预设的第三时长作为录像的总时长并确定启动二重身份验证,其中,所述第三时长大于第二时长。In the case that the pixel value of the camera is less than the second predetermined pixel value threshold, the preset third duration is used as the total duration of the recording and the dual identity verification is determined to be initiated, wherein the third duration is greater than the second duration.
  17. 根据权利要求15所述的计算设备,其中,所述根据所述摄像头的像素值确定录像的总时长以及是否启动二重身份验证,包括:The computing device according to claim 15, wherein the determining the total duration of recording and whether to start dual identity verification according to the pixel value of the camera comprises:
    基于所述摄像头的像素值和如下公式确定录像的总时长:Determine the total duration of recording based on the pixel value of the camera and the following formula:
    Figure PCTCN2019117696-appb-100003
    Figure PCTCN2019117696-appb-100003
    其中,T out为确定出的录像的总时长,P为摄像头的像素值,P ref为第一预设摄像头像素基准值,T ref1为第一预定时长,T ref2为第二预定时长,其中,T ref2小于或等于T ref1Among them, T out is the determined total recording duration, P is the pixel value of the camera, Pref is the first preset camera pixel reference value, T ref1 is the first predetermined duration, and T ref2 is the second predetermined duration, where, T ref2 is less than or equal to T ref1 ;
    在P大于或等于第二预设摄像头像素基准值的情况下,确定不启动二重身份验证,其中,所述第二预设摄像头像素基准值小于第一预设摄像头像素基准值;If P is greater than or equal to the second preset camera pixel reference value, determining not to start dual identity verification, wherein the second preset camera pixel reference value is less than the first preset camera pixel reference value;
    在P小于第二预设摄像头像素基准值的情况下,确定启动二重身份验证。In the case where P is less than the second preset camera pixel reference value, it is determined to start dual identity verification.
  18. 根据权利要求15所述的计算设备,其中,所述预定规则包括:The computing device according to claim 15, wherein the predetermined rule comprises:
    获取当前时间和一个随机数;Get the current time and a random number;
    计算所述当前时间与秒数为所述随机数的时间段之和,作为启动所述用户端的摄像头开始进行录像的时间;Calculating the sum of the current time and the time period in which the number of seconds is the random number as the time for starting the camera of the user end to start recording;
    在当前时间达到所述启动所述用户端的摄像头开始进行录像的时间时,指示所述用户端的摄像头开始进行时长为所述总时长的录像,以得到身份验证视频。When the current time reaches the time when the camera of the client terminal is activated to start recording, the camera of the client terminal is instructed to start recording with the total duration to obtain an identity verification video.
  19. 根据权利要求15所述的计算设备,其中,所述预定规则包括:The computing device according to claim 15, wherein the predetermined rule comprises:
    获取当前时间和两个随机数;Get the current time and two random numbers;
    在所述两个随机数中确定出较大的随机数,作为第一随机数,并将较小的随机数作为第二随机数;Determining the larger random number among the two random numbers as the first random number, and using the smaller random number as the second random number;
    从当前时间开始,每隔秒数为所述第一随机数的时间段,指示所述用户端的摄像头进行秒数为所述第一随机数与第二随机数的差值的视频录制,直至已录制的视频的总长度达到所述总时长。Starting from the current time, every second is the time period of the first random number, instruct the camera of the user end to record the video with the difference between the first random number and the second random number in seconds until it has been The total length of the recorded video reaches the total length.
  20. 根据权利要求15所述的计算设备,其中,所述基于所述身份验证信息和所述身份证件信息确定所述用户的身份合法,包括:The computing device according to claim 15, wherein the determining that the identity of the user is legal based on the identity verification information and the identity document information comprises:
    在所述身份验证信息包含二重身份验证信息的情况下,基于所述二重身份验证信息验证所述用户的身份是否合法;In the case that the identity verification information includes dual identity verification information, verifying whether the identity of the user is legal based on the dual identity verification information;
    如果是,基于所述身份验证视频和所述身份证件信息确定所述用户的身份合法;If yes, determine that the user's identity is legal based on the identity verification video and the identity document information;
    在所述身份验证信息不包含二重身份验证信息的情况下,基于所述身份验证视频和所述身份证件信息确定所述用户的身份合法。In the case that the identity verification information does not include double identity verification information, it is determined that the user's identity is legal based on the identity verification video and the identity document information.
  21. 根据权利要求20所述的计算设备,其中,所述基于所述身份验证信息和所述身份证件信息确定所述用户的身份合法,包括:The computing device of claim 20, wherein the determining that the user's identity is legal based on the identity verification information and the identity document information comprises:
    将所述身份验证视频分成帧,得到多个图像帧;Divide the identity verification video into frames to obtain multiple image frames;
    判断分成的图像帧中包含的人脸与所述身份证件信息中的人脸一致的图像帧的数目是否大于预定图像帧数目阈值;Judging whether the number of image frames in which the human face contained in the divided image frames is consistent with the human face in the identity document information is greater than a predetermined image frame number threshold;
    如果是,则确定所述用户的身份合法。If it is, it is determined that the identity of the user is legal.
  22. 一种存储有计算机可读指令的计算机非易失性可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行权利要求1至7任一项所述的方法。A computer non-volatile readable storage medium storing computer readable instructions, which when executed by one or more processors, cause one or more processors to execute any one of claims 1 to 7 The method described in the item.
PCT/CN2019/117696 2019-05-23 2019-11-12 Identity authentication method and apparatus, computing device, and storage medium WO2020233009A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910434967.3A CN110247898B (en) 2019-05-23 2019-05-23 Identity verification method, identity verification device, identity verification medium and electronic equipment
CN201910434967.3 2019-05-23

Publications (1)

Publication Number Publication Date
WO2020233009A1 true WO2020233009A1 (en) 2020-11-26

Family

ID=67884934

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117696 WO2020233009A1 (en) 2019-05-23 2019-11-12 Identity authentication method and apparatus, computing device, and storage medium

Country Status (2)

Country Link
CN (1) CN110247898B (en)
WO (1) WO2020233009A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113343850A (en) * 2021-06-07 2021-09-03 广州市奥威亚电子科技有限公司 Method, device, equipment and storage medium for checking video character information
CN114390323A (en) * 2022-01-04 2022-04-22 亿咖通(湖北)技术有限公司 Vehicle-mounted image transmission method and electronic equipment
CN114745521A (en) * 2022-04-06 2022-07-12 英才(广州)在线教育科技有限公司 Video recording device for novel remote online education

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110247898B (en) * 2019-05-23 2021-11-19 平安普惠企业管理有限公司 Identity verification method, identity verification device, identity verification medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105989263A (en) * 2015-01-30 2016-10-05 阿里巴巴集团控股有限公司 Method for authenticating identities, method for opening accounts, devices and systems
CN108875461A (en) * 2017-05-16 2018-11-23 深圳市祈飞科技有限公司 A kind of human face in-vivo detection method and device
US20180365512A1 (en) * 2017-06-20 2018-12-20 Nvidia Corporation Equivariant landmark transformation for landmark localization
CN110247898A (en) * 2019-05-23 2019-09-17 平安普惠企业管理有限公司 Auth method, device, medium and electronic equipment

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105320950A (en) * 2015-11-23 2016-02-10 天津大学 A video human face living body detection method
CN106911630A (en) * 2015-12-22 2017-06-30 上海仪电数字技术股份有限公司 Terminal and the authentication method and system of identity identifying method, terminal and authentication center
CN105787428A (en) * 2016-01-08 2016-07-20 上海交通大学 Method for lip feature-based identity authentication based on sparse coding
CN105681316B (en) * 2016-02-02 2019-12-17 腾讯科技(深圳)有限公司 identity verification method and device
CN105871900A (en) * 2016-05-24 2016-08-17 邵军利 Identity authentication method and system
KR20180009275A (en) * 2016-07-18 2018-01-26 삼성전자주식회사 User authentication method and electronic device supporting the same
CN107748876A (en) * 2017-11-06 2018-03-02 杭州有盾网络科技有限公司 Face vivo identification method, device and mobile terminal based on mobile terminal
CN108021892B (en) * 2017-12-06 2021-11-19 上海师范大学 Human face living body detection method based on extremely short video
CN107895158A (en) * 2017-12-07 2018-04-10 朱明君 A kind of mobile terminal that target can be identified
CN108763897A (en) * 2018-05-22 2018-11-06 平安科技(深圳)有限公司 Method of calibration, terminal device and the medium of identity legitimacy
CN109783338B (en) * 2019-01-02 2022-11-15 深圳壹账通智能科技有限公司 Recording processing method and device based on service information and computer equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105989263A (en) * 2015-01-30 2016-10-05 阿里巴巴集团控股有限公司 Method for authenticating identities, method for opening accounts, devices and systems
CN108875461A (en) * 2017-05-16 2018-11-23 深圳市祈飞科技有限公司 A kind of human face in-vivo detection method and device
US20180365512A1 (en) * 2017-06-20 2018-12-20 Nvidia Corporation Equivariant landmark transformation for landmark localization
CN110247898A (en) * 2019-05-23 2019-09-17 平安普惠企业管理有限公司 Auth method, device, medium and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHAKRABORTY, SAPTARSHI ET AL.: "AN OVERVIEW OF FACE LIVENESS DETECTION", INTERNATIONAL JOURNAL ON INFORMATION THEORY (IJIT), vol. 3, no. 2, 30 April 2014 (2014-04-30), XP055421188, DOI: 20200219151704A *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113343850A (en) * 2021-06-07 2021-09-03 广州市奥威亚电子科技有限公司 Method, device, equipment and storage medium for checking video character information
CN113343850B (en) * 2021-06-07 2022-08-16 广州市奥威亚电子科技有限公司 Method, device, equipment and storage medium for checking video character information
CN114390323A (en) * 2022-01-04 2022-04-22 亿咖通(湖北)技术有限公司 Vehicle-mounted image transmission method and electronic equipment
CN114390323B (en) * 2022-01-04 2023-12-01 亿咖通(湖北)技术有限公司 Vehicle-mounted image transmission method and electronic equipment
CN114745521A (en) * 2022-04-06 2022-07-12 英才(广州)在线教育科技有限公司 Video recording device for novel remote online education
CN114745521B (en) * 2022-04-06 2023-02-03 英才(广州)在线教育科技有限公司 Video recording device for novel remote online education

Also Published As

Publication number Publication date
CN110247898B (en) 2021-11-19
CN110247898A (en) 2019-09-17

Similar Documents

Publication Publication Date Title
WO2020233009A1 (en) Identity authentication method and apparatus, computing device, and storage medium
KR101731404B1 (en) Voice and/or facial recognition based service provision
CN111343162B (en) System secure login method, device, medium and electronic equipment
WO2015135381A1 (en) Device, system, and method for creating virtual credit card field of the technology
JP6351737B2 (en) Upload form attachment
CN110322317B (en) Transaction data processing method and device, electronic equipment and medium
US9253194B2 (en) Verifying user information
CN111160845A (en) Service processing method and device
US11068892B2 (en) System and method for secure personal information retrieval
EP2853073A1 (en) User-based identification system for social networks
RU2673401C2 (en) Method and device for obtaining certification document
WO2018045977A1 (en) Shared resource display method, device and storage medium
WO2018205468A1 (en) Biometric transaction processing method, electronic device and storage medium
WO2021196935A1 (en) Data checking method and apparatus, electronic device, and storage medium
CN110929244A (en) Digital identity identification method, device, equipment and storage medium
TWI584146B (en) Login system and method based on face recognition
CN107240023A (en) client identity confirmation method, device and system
US10270771B1 (en) Mid-session live user authentication
US10671718B2 (en) System and method for authentication
US11924636B2 (en) System and method for authenticating using a multi-provider platform
CN104967592B (en) Auth method, device and its system
WO2021073576A1 (en) Intelligent vehicle verification method and system, computer device, and storage medium
US20200120091A1 (en) Online verification method and system for verifying the identity of a subject
CN116383391B (en) Text classification method and device
US11924199B1 (en) Systems and methods for user authentication using an imaged machine-readable identity document

Legal Events

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

Ref document number: 19929720

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19929720

Country of ref document: EP

Kind code of ref document: A1