Live detection method, system, device, electronic device and storage medium

By flexibly selecting the liveness detection mode and the number of indicators, and combining anti-intrusion hack detection and signature information generation of video frames, the problem of insufficient flexibility and security after the liveness detection technology is integrated on the user end is solved, achieving higher security and flexibility.

CN115116145BActive Publication Date: 2026-01-09BEIJING SENSETIME TECH DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210375439.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-11
Publication Date
2026-01-09
Estimated Expiration
2042-04-11

AI Technical Summary

Technical Problem

Existing liveness detection technologies have low flexibility when integrated at the user end, making it difficult to adapt to different security levels and have insufficient security.

Method used

By flexibly selecting target detection modes and the number of detection indicators through target detection parameters, diverse liveness detection indicators are generated. Combined with anti-intrusion hack detection and signature information generation of video frames, the flexibility and security of liveness detection are improved.

Benefits of technology

This enhances the flexibility and security of liveness detection, increases the difficulty of pre-recording videos, mitigates the harm caused by resource waste and repeated attacks, and improves the overall security of liveness detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115116145B_ABST
    Figure CN115116145B_ABST
Patent Text Reader

Abstract

The present disclosure provides a living body detection method, system, device, electronic equipment and storage medium, the method comprising: in response to obtaining a target detection parameter corresponding to a to-be-detected user, determining a living body detection index corresponding to the to-be-detected user based on the target detection parameter; wherein the living body detection index comprises a detection index sequence matched with a target number in a target detection mode; the target detection parameter comprises a first parameter affecting the selected target detection mode, and / or a second parameter affecting the selected number of detection indexes; obtaining a to-be-detected video of the to-be-detected user; determining a detection result of the to-be-detected video under the living body detection index based on the living body detection index.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computer vision, and in particular, to a living body detection method, system, device, electronic equipment and storage medium. BACKGROUND

[0002] Living body detection is a method for determining the real physiological characteristics of an object in some identity verification scenarios. In face recognition applications, living body detection can verify whether a user is a real living body by using a combination of actions such as blinking, opening the mouth, shaking the head, nodding, and the like, and using face key point positioning and face tracking technologies. With the maturity of living body detection technology, living body detection technology is widely used in the fields of finance and security to ensure the accuracy and security of user identity authentication.

[0003] Generally, a software development kit (SDK) including living body detection technology can be integrated into a user terminal, and the user is detected by the living body detection technology integrated on the user terminal. The living body detection technology integrated on the user terminal is determined, and the flexibility of living body detection is low. SUMMARY

[0004] Therefore, the present disclosure provides at least a living body detection method, system, device, electronic equipment and storage medium to improve the flexibility and security of living body detection.

[0005] In a first aspect, the present disclosure provides a living body detection method, comprising:

[0006] In response to obtaining a target detection parameter corresponding to a to-be-detected user, determining a living body detection index corresponding to the to-be-detected user based on the target detection parameter; wherein the living body detection index comprises a detection index sequence matched with a target number in a target detection mode; the target detection parameter comprises a first parameter affecting the selected target detection mode, and / or a second parameter affecting the selected number of detection indexes;

[0007] Obtaining a to-be-detected video of a to-be-detected user;

[0008] Determining a detection result of the to-be-detected video under the living body detection index based on the living body detection index.

[0009] In the method, the target detection parameter includes a first parameter affecting a selected target detection mode and / or a second parameter affecting a selected number of detection indexes, so that different target detection parameters can correspond to different target detection modes and / or numbers of detection indexes; by obtaining the target detection parameter, the live body detection index corresponding to the to-be-tested user can be flexibly determined, and then, based on the live body detection index, the detection result of the to-be-tested video under the live body detection index can be flexibly determined after the to-be-tested video corresponding to the to-be-tested user is obtained. Meanwhile, since the content and number of the live body detection index are flexible, the video meeting the requirements of the live body detection index is more diverse and flexible, the difficulty of the to-be-tested user passing the live body detection by using the video recorded in advance is improved, and the security of the live body detection is increased.

[0010] In a possible implementation, in a case where the target detection parameter includes the first parameter and does not include the second parameter, the determining, based on the target detection parameter, of the live body detection index corresponding to the to-be-tested user includes:

[0011] determining, based on the first parameter included in the target detection parameter and a first mapping relationship between a preset mode parameter and a detection mode, a target detection mode corresponding to the to-be-tested user;

[0012] selecting, from a detection index set, a preset target number of detection indexes corresponding to the target detection mode, to generate the live body detection index corresponding to the to-be-tested user.

[0013] Here, the target detection mode can be determined by using the first parameter and the first mapping relationship, and the live body detection index corresponding to the to-be-tested user can be flexibly generated by selecting, from the detection index set, the preset target number of detection indexes corresponding to the target detection mode.

[0014] In a possible implementation, in a case where the target detection parameter does not include the first parameter and includes the second parameter, the determining, based on the target detection parameter, of the live body detection index corresponding to the to-be-tested user includes:

[0015] determining, based on the second parameter included in the target detection parameter and a second mapping relationship between a preset difficulty parameter and a number of detection indexes, a target number corresponding to the to-be-tested user;

[0016] selecting, from a detection index set, the target number of detection indexes corresponding to a preset target detection mode, to generate the live body detection index corresponding to the to-be-tested user.

[0017] Here, the target number can be determined by using the second parameter and the second mapping relationship, and the live body detection index corresponding to the to-be-tested user can be flexibly generated by selecting, from the detection index set, the target number of detection indexes corresponding to the preset target detection mode.

[0018] In a possible implementation, when the target detection parameter includes a first parameter and a second parameter, the determining, based on the target detection parameter, of the liveness detection indicator corresponding to the to-be-detected user includes:

[0019] determining, based on the first parameter included in the target detection parameter and a first mapping relationship between preset mode parameters and detection modes, a target detection mode corresponding to the to-be-detected user; and

[0020] determining, based on the second parameter included in the target detection parameter and a second mapping relationship between preset difficulty parameters and numbers of detection indicators, a target number corresponding to the to-be-detected user.

[0021] selecting, from a set of detection indicators, detection indicators of the target number corresponding to the target detection mode, to generate the liveness detection indicator corresponding to the to-be-detected user.

[0022] Here, the target detection mode can be determined by using the first parameter and the first mapping relationship, and the target number can be determined by using the second parameter and the second mapping relationship; and the liveness detection indicator corresponding to the to-be-detected user can be flexibly generated by selecting, from the set of detection indicators, detection indicators of the target number corresponding to the target detection mode.

[0023] In a possible implementation, the determining, based on the liveness detection indicator, of the detection result of the to-be-detected video under the liveness detection indicator includes:

[0024] performing indicator identification on the to-be-detected video based on the liveness detection indicator, to obtain an indicator identification result corresponding to the to-be-detected user;

[0025] extracting at least one detection video frame from the to-be-detected video, when the indicator identification result indicates that the identification is passed.

[0026] performing anti-invasion hack detection on the at least one detection video frame, to determine a detection result corresponding to the to-be-detected user.

[0027] In the foregoing method, at least one detection video frame can be extracted from the to-be-detected video when the indicator identification result indicates that the identification is passed; the anti-invasion hack detection is performed on the at least one detection video frame, to determine the detection result corresponding to the to-be-detected user, thereby improving the security of liveness detection by performing multiple detection processes. Meanwhile, the anti-hack detection is performed after the indicator identification result indicates that the identification is passed, thereby relieving the waste of resources caused by performing the anti-hack detection after the identification is not passed.

[0028] In a possible implementation, after the determination of the detection result of the to-be-detected video under the living body detection index, the method further includes:

[0029] determining a target video frame from the to-be-detected video;

[0030] generating signature information corresponding to the target video frame based on the target video frame.

[0031] Here, after the determination of the detection result of the to-be-detected video under the living body detection index, signature information corresponding to the target video frame can be generated based on the determined target video frame, so that the user side can determine the credibility of the obtained detection result according to the target video frame and the signature information, and the security of the living body detection is improved.

[0032] In a possible implementation, the generating of the signature information corresponding to the target video frame based on the target video frame includes:

[0033] performing encryption processing on the target video frame to generate an encrypted digest corresponding to the target video frame;

[0034] generating the signature information corresponding to the target video frame based on the encrypted digest and set attribute information, wherein the attribute information includes at least one of the following: a signature algorithm version number, a random string, a key, and a time stamp.

[0035] Here, the signature information corresponding to the target video frame can be generated based on the encrypted digest and the attribute information. Since the information used is relatively rich, the generated signature information is difficult to decipher, the security of the signature information is relatively high, and the security of the living body detection is increased.

[0036] In a possible implementation, after the target detection parameter corresponding to the to-be-detected user is obtained, the method further includes:

[0037] determining a first target time period based on a first time point at which the target detection parameter corresponding to the to-be-detected user is obtained and a second target time length;

[0038] if each detection result corresponding to the to-be-detected user in the first target time period indicates that the living body detection is not passed, and / or the to-be-detected user does not obtain a detection result, ending the living body detection for the to-be-detected user.

[0039] Here, by setting the second target time length, the harm caused by the attack and unlimited attack of the user on the living body detection process can be alleviated, and the security of the living body detection is improved.

[0040] In a possible implementation, after the living body detection index corresponding to the to-be-detected user is determined, the method further includes:

[0041] determine an effective time period of the living body detection index based on a generation time of the living body detection index and the first target time length;

[0042] If no detection result of the to-be-detected video under the living body detection index is obtained within the effective time period, and / or the detection result obtained within the effective time period indicates that the living body detection fails, the living body detection index corresponding to the to-be-detected user is re-determined until the number of times of determining the living body detection index equals a set number threshold.

[0043] Here, by setting the first target time length and the number threshold, the harm caused by the user attacking and repeatedly attacking the living body detection process can be alleviated, and the security of the living body detection is improved.

[0044] The effects of the following systems, devices, electronic devices, and the like are described in the above method description, which will not be repeated here.

[0045] In a second aspect, the present disclosure provides a living body detection system, comprising: a living body detection front end and a living body detection back end; the living body detection front end is connected with the living body detection back end and an external user front end respectively;

[0046] In response to a living body detection request of any user from the user front end, the living body detection front end is jumped to from the user front end to display a living body detection interface;

[0047] The living body detection back end is configured to, in response to the living body detection front end displaying the living body detection interface, execute the living body detection method according to the first aspect or any of the embodiments based on target detection parameters indicated by the living body detection request, to obtain a detection result corresponding to the any user.

[0048] In a possible implementation, the living body detection back end is connected with an external user back end, and the living body detection back end is further configured to, in response to a result acquisition request sent by the user back end, send the obtained detection result corresponding to the any user to the user back end.

[0049] In a possible implementation, the living body detection back end is further configured to send the obtained detection result corresponding to the any user to the living body detection front end for display.

[0050] The living body detection front end is further configured to send the detection result to the user front end.

[0051] In a possible implementation, the living body detection backend is connected to an external user backend, and the living body detection backend is further configured to send the target video frame corresponding to any user and signature information corresponding to the target video frame to the user backend after determining the target video frame corresponding to the user and the signature information corresponding to the target video frame.

[0052] In a third aspect, the present disclosure provides a living body detection system, comprising: a user front end and a user backend; wherein the user front end is connected to a living body detection front end; and the user backend is connected to a living body detection backend;

[0053] The user front end is configured to jump to the living body detection front end when receiving a living body detection request for any user, so that the living body detection backend connected to the living body detection front end can execute the living body detection method according to the first aspect or any implementation to obtain a detection result corresponding to any user.

[0054] The user front end is configured to jump to the living body detection front end when receiving a living body detection request for any user, so that the living body detection backend connected to the living body detection front end can execute the living body detection method according to the first aspect or any implementation to obtain a detection result corresponding to any user.

[0055] The user backend is configured to receive the detection result corresponding to any user sent by the living body detection backend in response to the result acquisition request.

[0056] In a possible implementation, the user backend is further configured to receive a target video frame corresponding to any user and signature information corresponding to the target video frame sent by the living body detection backend, and call a configured signature verification algorithm or a signature verification module in the living body detection backend to verify the target video frame and the signature information to obtain a verification result.

[0057] In a fourth aspect, the present disclosure provides a living body detection device, comprising:

[0058] A first determination module is configured to determine a living body detection index corresponding to a to-be-detected user based on a target detection parameter corresponding to the to-be-detected user in response to obtaining the target detection parameter; wherein the living body detection index comprises a detection index sequence matched with a target number in a target detection mode; and the target detection parameter comprises a first parameter affecting a selected target detection mode and / or a second parameter affecting a selected number of detection indexes.

[0059] An acquisition module is configured to acquire a to-be-detected video of a to-be-detected user.

[0060] A second determination module is configured to determine a detection result of the to-be-detected video under the living body detection index based on the living body detection index.

[0061] In a possible implementation, in a case where the target detection parameter comprises the first parameter and does not comprise the second parameter, the first determining module, when determining the live detection index corresponding to the to-be-detected user based on the target detection parameter, is configured to:

[0062] determine the target detection mode corresponding to the to-be-detected user based on the first parameter comprised in the target detection parameter and a first mapping relationship between a preset mode parameter and a detection mode;

[0063] select, from a detection index set, a preset target number of detection indexes corresponding to the target detection mode, and generate the live detection index corresponding to the to-be-detected user.

[0064] In a possible implementation, in a case where the target detection parameter does not comprise the first parameter and comprises the second parameter, the first determining module, when determining the live detection index corresponding to the to-be-detected user based on the target detection parameter, is configured to:

[0065] determine the target number based on the second parameter comprised in the target detection parameter and a second mapping relationship between a preset difficulty parameter and a number of detection indexes;

[0066] select, from a detection index set, the target number of detection indexes corresponding to a preset target detection mode, and generate the live detection index corresponding to the to-be-detected user.

[0067] In a possible implementation, in a case where the target detection parameter comprises the first parameter and the second parameter, the first determining module, when determining the live detection index corresponding to the to-be-detected user based on the target detection parameter, is configured to:

[0068] determine the target detection mode corresponding to the to-be-detected user based on the first parameter comprised in the target detection parameter and a first mapping relationship between a preset mode parameter and a detection mode; and

[0069] determine the target number based on the second parameter comprised in the target detection parameter and a second mapping relationship between a preset difficulty parameter and a number of detection indexes;

[0070] select, from a detection index set, the target number of detection indexes corresponding to the target detection mode, and generate the live detection index corresponding to the to-be-detected user.

[0071] In a possible implementation, the second determining module, when determining the detection result of the to-be-detected video under the live detection index based on the live detection index, is configured to:

[0072] identify an index of the to-be-detected video based on the living body detection index to obtain an index identification result corresponding to the to-be-detected user;

[0073] extract at least one detection video frame from the to-be-detected video in a case where the index identification result indicates that identification is passed;

[0074] perform anti-invasion hack detection on the at least one detection video frame to determine a detection result corresponding to the to-be-detected user.

[0075] In a possible implementation, after the detection result of the to-be-detected video under the living body detection index is determined, the apparatus further includes a generation module configured to:

[0076] determine a target video frame from the to-be-detected video;

[0077] generate signature information corresponding to the target video frame based on the target video frame.

[0078] In a possible implementation, when the signature information corresponding to the target video frame is generated based on the target video frame, the generation module is configured to:

[0079] perform encryption processing on the target video frame to generate an encrypted digest corresponding to the target video frame;

[0080] generate the signature information corresponding to the target video frame based on the encrypted digest and set attribute information, wherein the attribute information includes at least one of the following: a signature algorithm version number, a random string, a key, and a time stamp.

[0081] In a possible implementation, after the target detection parameter corresponding to the to-be-detected user is obtained, the apparatus further includes a first judgment module configured to:

[0082] determine a first target time period based on a first time point at which the target detection parameter corresponding to the to-be-detected user is obtained and a second target time length;

[0083] end the living body detection for the to-be-detected user in a case where each detection result corresponding to the to-be-detected user within the first target time period indicates that living body detection is not passed and / or the to-be-detected user does not obtain a detection result.

[0084] In a possible implementation, after the living body detection index corresponding to the to-be-detected user is determined, the apparatus further includes a second judgment module configured to:

[0085] determine an effective time period of the living body detection index based on a generation time point of the living body detection index and a first target time length;

[0086] If the detection result of the to-be-detected video under the living body detection index is not obtained within the effective time period, and / or the detection result obtained within the effective time period indicates that the living body detection fails, the living body detection index corresponding to the to-be-detected user is re-determined until the number of times of determining the living body detection index equals the set number threshold.

[0087] In a fifth aspect, the present disclosure provides an electronic device, comprising a processor, a memory, and a bus, the memory stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, and the machine readable instructions are executed by the processor to perform the steps of the living body detection method according to the first aspect or any one of the embodiments.

[0088] In a sixth aspect, the present disclosure provides a computer readable storage medium, the computer readable storage medium stores a computer program, when the computer program is executed by a processor, the steps of the living body detection method according to the first aspect or any one of the embodiments are performed.

[0089] In order to make the above objectives, characteristics and advantages of the present disclosure more apparent, clear and easy to understand, the following will describe the preferred embodiments in detail, and the accompanying drawings will be described as follows. BRIEF DESCRIPTION OF DRAWINGS

[0090] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following will briefly introduce the drawings needed to be used in the embodiments, the drawings herein are incorporated into the description and form a part of the description, the drawings show the embodiments consistent with the present disclosure, and are used to illustrate the technical solutions of the present disclosure together with the description. It should be understood that the following drawings only show some embodiments of the present disclosure, and therefore should not be regarded as a limitation on the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor.

[0091] Figure 1 A flowchart of a living body detection method provided by an embodiment of the present disclosure is shown;

[0092] Figure 2 A flowchart of another living body detection method provided by an embodiment of the present disclosure is shown;

[0093] Figure 3 A schematic diagram of a signature verification process in a living body detection method provided by an embodiment of the present disclosure is shown;

[0094] Figure 4 A working schematic diagram of a living body detection system provided by an embodiment of the present disclosure is shown;

[0095] Figure 5A schematic diagram of timeliness in a living body detection method provided by an embodiment of the present disclosure is shown.

[0096] Figure 6 A schematic diagram of an architecture of a living body detection system provided by an embodiment of the present disclosure is shown.

[0097] Figure 7 A schematic diagram of an architecture of a living body detection system provided by an embodiment of the present disclosure is shown.

[0098] Figure 8 A schematic diagram of an architecture of a living body detection device provided by an embodiment of the present disclosure is shown.

[0099] Figure 9 A schematic diagram of a structure of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0100] To make the objectives, technical solutions, and superiorities of the embodiments of the present disclosure clearer, the following will be combined with the accompanying drawings for the embodiments of the present disclosure to make a clear and complete description of the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. The components of the embodiments of the present disclosure described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed present disclosure, but only represents selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present disclosure.

[0101] Generally, a software development kit (SDK) including a living body detection technology can be integrated into a user terminal, and a user is detected by the living body detection technology integrated on the user terminal, where the living body detection technology integrated on the user terminal is determined, and the flexibility of living body detection is low. In order to improve the flexibility of living body detection, the embodiments of the present disclosure provide a living body detection method, system, device, electronic equipment and storage medium.

[0102] It should be noted that: similar reference numerals and letters represent similar items in the following drawings, therefore, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0103] To facilitate the understanding of the embodiments of the present disclosure, first, a live body detection method disclosed by the embodiments of the present disclosure is introduced in detail. The execution subject of the live body detection method provided by the embodiments of the present disclosure can be a live body detection backend, for example, the live body detection backend can be a service end that provides live body detection technology. In some possible implementation manners, the live body detection method can be realized by a processor calling computer readable instructions stored in a memory.

[0104] Referring to Figure 1 The flowchart of the live body detection method provided by the embodiments of the present disclosure is shown, and the method comprises S101-S103, wherein:

[0105] S101, in response to obtaining a target detection parameter corresponding to a to-be-tested user, determining a live body detection index corresponding to the to-be-tested user based on the target detection parameter; wherein the live body detection index comprises a detection index sequence matched with a target number in a target detection mode; the target detection parameter comprises a first parameter affecting a selected target detection mode, and / or a second parameter affecting a selected number of detection indexes;

[0106] S102, obtaining a to-be-detected video of the to-be-tested user;

[0107] S103, determining a detection result of the to-be-detected video under the live body detection index based on the live body detection index.

[0108] In the above method, the target detection parameter comprises the first parameter affecting the selected target detection mode and / or the second parameter affecting the selected number of detection indexes, so that different target detection parameters can correspond to different target detection modes and / or numbers of detection indexes; by determining the live body detection index corresponding to the to-be-tested user based on the obtained target detection parameter, the detection result of the to-be-detected video under the live body detection index can be flexibly determined after obtaining the to-be-detected video corresponding to the to-be-tested user. At the same time, since the content and number of the live body detection index are flexible, the video meeting the requirements of the live body detection index is more diverse and flexible, which improves the difficulty of the to-be-tested user using the pre-recorded video to pass the live body detection, and increases the security of the live body detection.

[0109] The following specifically describes S101-S103.

[0110] For S101:

[0111] When the user to be detected needs to perform the liveness detection, a liveness detection request can be triggered on the user side, and the liveness detection request carries target detection parameters. The target detection parameters can be set by the user side according to the security level of the business. The target detection parameters can include a first parameter that affects the selection of a target detection mode, and / or a second parameter that affects the selection of a number of detection indicators.

[0112] For example, when the security level is high, the target detection mode can select a first detection mode including motion liveness detection and color liveness detection; when the security level is low, the target detection mode can select a second detection mode of color liveness detection. In addition, the higher the security level, the more the number of determined detection indicators; the lower the security level, the fewer the number of determined detection indicators.

[0113] In implementation, the target detection parameters can be used to determine the liveness detection indicators corresponding to the user to be detected in the following three ways.

[0114] In the first way, when the target detection parameters include the first parameter and do not include the second parameter, the target detection mode corresponding to the user to be detected can be determined based on the first parameter included in the target detection parameters and a first mapping relationship between a preset mode parameter and a detection mode. Then, a preset target number of detection indicators corresponding to the target detection mode are selected from a detection indicator set to generate the liveness detection indicators corresponding to the user to be detected.

[0115] In implementation, the first mapping relationship between the mode parameter and the detection mode can be determined in advance. For example, when the mode parameter is 0, the detection mode can be a first detection mode including color liveness detection; when the mode parameter is 1, the detection mode can be a second detection mode including motion liveness detection; and when the mode parameter is 2, the detection mode can be a third detection mode including color liveness detection and motion liveness detection. The security level of the third detection mode is higher than that of the second detection mode, and the security level of the second detection mode is higher than that of the first detection mode.

[0116] When the target detection parameters include the first parameter and do not include the second parameter, the target detection mode corresponding to the user to be detected can be determined according to the first parameter and the first mapping relationship, and a target number of detection indicators can be preset. Then, a preset target number of detection indicators corresponding to the target detection mode are selected from a detection indicator set to generate the liveness detection indicators corresponding to the user to be detected. The detection indicator set can include various detection indicators required by different detection modes. For example, the detection indicator set can include various detection actions required by motion liveness detection, such as shaking head, opening mouth, blinking eyes, and nodding, and can also include various detection colors required by color detection.

[0117] For example, if the target detection mode is the second detection mode including action liveness detection, and the preset target quantity is 4, four detection actions can be randomly selected from the detection index set, and the four detection actions after arrangement are used as the liveness detection index corresponding to the user to be detected. That is, the detection index sequence including the four detection actions is determined as the liveness detection index corresponding to the user to be detected.

[0118] For example, if the target detection mode is the first detection mode including color liveness detection, and the preset target quantity is 4, four detection colors can be randomly selected from the detection index set, and the four detection colors after arrangement are used as the liveness detection index corresponding to the user to be detected. That is, the detection index sequence including the four detection colors is determined as the liveness detection index corresponding to the user to be detected.

[0119] Here, the target detection mode can be determined by using the first parameter and the first mapping relationship, and then the detection index of the preset target quantity corresponding to the target detection mode can be selected from the detection index set to flexibly generate the liveness detection index corresponding to the user to be detected.

[0120] In the second mode, when the target detection parameter does not include the first parameter and includes the second parameter, the target quantity corresponding to the user to be detected can be determined based on the second parameter included in the target detection parameter and the second mapping relationship between the preset difficulty parameter and the detection index quantity. Then, the detection index of the target quantity corresponding to the preset target detection mode can be selected from the detection index set to generate the liveness detection index corresponding to the user to be detected.

[0121] In implementation, the second mapping relationship between the difficulty parameter and the detection index quantity can be determined in advance. For example, the second mapping relationship can include that when the difficulty parameter is 0, the detection index quantity can be 2; when the difficulty parameter is 1, the detection index quantity can be 3; when the difficulty parameter is 2, the detection index quantity can be 4, and so on. The more the detection index quantity, the higher the liveness detection security.

[0122] When the target detection parameter does not include the first parameter and includes the second parameter, the target quantity corresponding to the user to be detected can be determined according to the second parameter and the second mapping relationship, that is, the number of detection indexes used for liveness detection of the user to be detected is determined, and the target detection mode is preset. Then, the detection index of the target quantity corresponding to the preset target detection mode can be selected from the detection index set to generate the liveness detection index corresponding to the user to be detected.

[0123] For example, if the preset target detection mode is the second detection mode including action liveness detection, and the determined target quantity is 3, three detection actions can be randomly selected from the detection index set, and the three detection actions after arrangement are used as the liveness detection index corresponding to the user to be detected.

[0124] Here, the target number can be determined by using the second parameter and the second mapping relationship, and then the detection indexes corresponding to the target number of the target detection mode are selected from the set of detection indexes to flexibly generate the liveness detection indexes corresponding to the user to be detected.

[0125] In a third mode, when the target detection parameter includes a first parameter and a second parameter, the target detection mode corresponding to the user to be detected can be determined based on the first parameter included in the target detection parameter and a first mapping relationship between preset mode parameters and detection modes, and the target number corresponding to the user to be detected can be determined based on the second parameter included in the target detection parameter and a second mapping relationship between preset difficulty parameters and the number of detection indexes. Then, the detection indexes corresponding to the target number of the target detection mode are selected from the set of detection indexes to generate the liveness detection indexes corresponding to the user to be detected.

[0126] In implementation, the first mapping relationship between the mode parameters and the detection modes can be determined in advance, and the second mapping relationship between the difficulty parameters and the number of detection indexes can be determined in advance. The target detection mode corresponding to the user to be detected can be determined by the first parameter and the first mapping relationship, and the target number corresponding to the user to be detected can be determined by the second parameter and the second mapping relationship. Then, the detection indexes corresponding to the target number of the target detection mode are selected from the set of detection indexes to generate the liveness detection indexes corresponding to the user to be detected.

[0127] For example, the target detection mode is determined to be the third detection mode including the action liveness detection and the color liveness detection according to the first parameter, and the target number is determined to be 4 according to the second parameter. Then, 4 detection actions and 4 detection colors can be selected from the set of detection indexes, and the liveness detection indexes corresponding to the user to be detected are generated according to the arranged 4 detection actions and the arranged 4 detection colors.

[0128] Here, the target detection mode can be determined by using the first parameter and the first mapping relationship, and the target number can be determined by using the second parameter and the second mapping relationship. Then, the detection indexes corresponding to the target number of the target detection mode are selected from the set of detection indexes to flexibly generate the liveness detection indexes corresponding to the user to be detected.

[0129] For S102 and S103:

[0130] After the liveness detection indexes are determined, the liveness detection front end connected to the liveness detection back end can be controlled to display the liveness detection indexes, so that the liveness detection video of the user to be detected can be collected through the liveness detection front end, and then the liveness detection back end can obtain the liveness detection video of the user to be detected from the liveness detection front end.

[0131] In one case, when the target detection mode is the first detection mode including the liveness detection with color flash, the liveness detection front end can be controlled to sequentially display each detection color in the liveness detection indicator, and then the liveness detection front end can collect the to-be-detected video of the to-be-detected user under the reflection of each displayed detection color.

[0132] For example, after obtaining the to-be-detected video, each to-be-detected video frame in the to-be-detected video can be input into the color flash detection algorithm to determine the target color corresponding to each to-be-detected video frame. For example, the color flash detection algorithm can output the probability of each to-be-detected video frame under each preset color, and the color with the highest probability can be selected as the target color corresponding to the to-be-detected video frame; or two colors with higher probabilities can be selected as the target colors corresponding to the to-be-detected video. Then, it can be determined whether the target color sequence (i.e., the target color sequence of each to-be-detected video frame) corresponding to the to-be-detected video matches the color sequence included in the liveness detection indicator; if it matches, it is determined that the target identification result corresponding to the to-be-detected user is identified to pass, and it is determined that the detection result of the to-be-detected video under the liveness detection indicator is liveness detection pass; if it does not match, it is determined that the target identification result corresponding to the to-be-detected user is identified to fail, and it is determined that the detection result of the to-be-detected video under the liveness detection indicator is liveness detection fail.

[0133] In another case, when the target detection mode is the second detection mode including the liveness detection with action, the liveness detection front end can be controlled to sequentially display each detection action in the liveness detection indicator, and the prompt information corresponding to each detection action can be displayed, which can be text information, picture information, voice information, etc. For example, the prompt information of the detection action can be “wink” and “open mouth”. Then, the liveness detection front end can collect the to-be-detected video of the to-be-detected user performing the corresponding action.

[0134] When the detection action included in the liveness detection indicator is multiple, the prompt information of each detection action can be sequentially displayed, and the current to-be-detected video of the to-be-detected user performing the corresponding action based on the prompt information can be obtained. When it is detected that the action information included in the current to-be-detected video does not match the detection action currently displayed by the liveness detection front end, it is determined that the target identification result corresponding to the to-be-detected user is identified to fail, and it is determined that the target detection result corresponding to the to-be-detected user is liveness detection fail, and the current liveness detection process of the to-be-detected user ends.

[0135] When it is detected that the action information included in the current to-be-detected video matches the detection action currently displayed by the living body detection front end, the living body detection front end is controlled to display prompt information of a next detection action in the living body detection index, and the process returns to the step of obtaining the current to-be-detected video in which the to-be-tested user performs the corresponding action based on the prompt information, until each detection action in the living body detection index is displayed. When it is detected that the action information included in each current to-be-detected video matches the detection action currently displayed by the living body detection front end, that is, the detected action sequence is consistent with the action sequence in the living body detection index, it is determined that the index recognition result corresponding to the to-be-tested user is recognized to pass, and it is determined that the detection result corresponding to the to-be-tested user is living body detection to pass. The action detection algorithm can be used to detect whether the action information included in the current to-be-detected video matches the detection action currently displayed by the living body detection front end.

[0136] In another case, when the target detection mode is the third detection mode including the action living body detection and the glitter living body detection, the living body detection front end can be controlled to display each detection action in the living body detection index in turn, and display each detection color in the living body detection index synchronously, so that the living body detection front end can collect the to-be-detected video in which the to-be-tested user performs the corresponding action under the reflection of each detection color displayed.

[0137] In implementation, the action living body detection and the glitter living body detection can be performed on the to-be-detected video in parallel; or the action living body detection can be performed on the to-be-detected video first, and then the glitter living body detection is performed; or the glitter living body detection can be performed on the to-be-detected video first, and then the action living body detection is performed.

[0138] Preferably, the action detection algorithm can be used to perform the action living body detection on the to-be-detected video first, and then the glitter detection algorithm is used to perform the glitter living body detection on the to-be-detected video after the action detection passes. If the glitter detection passes, it is determined that the index recognition result corresponding to the to-be-tested user is recognized to pass, and it is determined that the detection result corresponding to the to-be-tested user is living body detection to pass. If the action detection does not pass or the glitter detection does not pass, it is determined that the index recognition result corresponding to the to-be-tested user is recognized to fail, and it is determined that the detection result corresponding to the to-be-tested user is living body detection to fail. The process of the action living body detection and the glitter living body detection can be referred to the above description, which will not be repeated here.

[0139] Since the safety degree of the action living body detection is higher, the action living body detection can be performed on the to-be-detected video first, and the glitter living body detection can not be performed when the action living body detection does not pass, so as to avoid waste of computing resources.

[0140] In an optional implementation, the determination of the detection result of the to-be-detected video under the living body detection index based on the living body detection index can include:

[0141] Step A1, based on the living body detection index, the index identification of the to-be-detected video is performed to obtain the index identification result corresponding to the to-be-detected user;

[0142] Step A2, in the case where the index identification result indicates that the identification is passed, at least one frame of detection video frame is extracted from the to-be-detected video;

[0143] Step A3, the anti-invasion hack detection is performed on the at least one frame of detection video frame to determine the detection result corresponding to the to-be-detected user.

[0144] In step A1, when the target detection mode is the first detection mode, the index identification of the to-be-detected video can be performed by using the glitter detection algorithm to obtain the index identification result corresponding to the to-be-detected user. When the target detection mode is the second detection mode, the index identification of the to-be-detected video can be performed by using the action detection algorithm to obtain the index identification result corresponding to the to-be-detected user. When the target detection mode is the third detection mode, the index identification of the to-be-detected video can be performed by using the action detection algorithm and the glitter living body detection algorithm respectively to obtain the index identification result corresponding to the to-be-detected user. The index identification result includes identification pass and identification fail. In the third detection mode, when the action living body detection and the glitter living body detection are both passed, it is determined that the index identification result is identification pass.

[0145] In A2, when the index identification result indicates that the identification is failed, the to-be-detected user is contacted for the current living body detection process.

[0146] When the index identification result indicates that the identification is passed, the anti-hack detection can be performed on the to-be-detected video of the to-be-detected user. Generally, the glitter detection algorithm and the action detection algorithm can also output the quality score of each to-be-detected video frame when detecting each to-be-detected video frame in the to-be-detected video. Further, the to-be-detected video frame with a higher quality score can be selected as the at least one frame of detection video frame.

[0147] In implementation, the number of detection video frames can be matched with the target number of detection indexes. For example, if 4 detection actions are included in the living body detection index, for each detection action, the to-be-detected video frame with the highest quality score can be selected from the to-be-detected video frame matched with the detection action as a frame of detection video frame, that is, the detection video frame matched with each detection action is obtained.

[0148] In A3, the anti-hack algorithm can be used to detect each detection video frame to determine the detection result of the to-be-detected user. If the anti-hack detection indicates that the to-be-detected user is a living body user, it is determined that the detection result of the to-be-detected user is a living body detection pass; if the anti-hack detection indicates that the to-be-detected user is not a living body user, it is determined that the detection result of the to-be-detected user is a living body detection failure.

[0149] In the above method, at least one detection video frame can be extracted from the to-be-detected video when the index recognition result indicates that the recognition is passed; the anti-intrusion hack detection is performed on the at least one detection video frame to determine the detection result of the to-be-detected user, and the safety of the living body detection is improved by performing multiple detection processes. At the same time, the anti-hack detection is performed after the index recognition result indicates that the recognition is passed, which alleviates the resource waste caused by performing anti-hack detection after the recognition fails.

[0150] Referring to FIG. 1, Figure 2 As shown in FIG. 1, when the to-be-detected user initiates a living body detection request, the living body detection backend can start living body verification to determine the target detection parameter of the to-be-detected user. When the target detection parameter includes a first parameter and a second parameter, the target detection mode of the to-be-detected user can be determined according to the first parameter, and the target number of detection indexes in the target detection mode can be determined according to the second parameter.

[0151] For example, the action living body detection can be performed on the to-be-detected video of the to-be-detected user based on the determined action sequence (i.e., living body detection index) composed of the target number of actions, the anti-hack detection is performed on the to-be-detected video after the action living body detection is passed, the detection result is obtained, and the living body detection process is ended. Or, the color living body detection can be performed on the to-be-detected video of the to-be-detected user based on the determined color sequence (i.e., living body detection index) composed of the target number of colors, the anti-hack detection is performed on the to-be-detected video after the color living body detection is passed, the detection result is obtained, and the living body detection process is ended. Or, the action living body detection and the color living body detection can be performed on the to-be-detected video of the to-be-detected user based on the determined color sequence composed of the target number of colors and the determined action sequence composed of the target number of actions (i.e., living body detection index), the anti-hack detection is performed on the to-be-detected video after the action living body detection and the color living body detection are passed, the detection result is obtained, and the living body detection process is ended.

[0152] In an optional implementation, after the detection result of the to-be-detected video under the living body detection index is determined, the method further includes:

[0153] Step B1, determining a target video frame from the to-be-detected video;

[0154] Step B2, based on the target video frame, generating signature information corresponding to the target video frame.

[0155] The target video frame can be determined from the video to be detected. Among them, a frame can be randomly selected from the video to be detected as the target video frame; or the highest quality score of the video to be detected can be selected as the target video frame. Then, according to the target video frame, the signature information corresponding to the target video frame is generated.

[0156] In implementation, the live body detection backend can send the detection result corresponding to the user to be detected, the target video frame and the signature information corresponding to the target video frame to the user backend, so that the user backend can use the received signature information and the target video frame to determine the credibility of the received detection result of the user to be detected. For example, when the user backend detects that the received target video frame matches the signature information, it is determined that the received detection result of the user to be detected is credible; if the user backend detects that the received target video frame does not match the signature information, the received detection result of the user to be detected may be tampered with, so it is determined that the received detection result of the user to be detected is not credible.

[0157] Here, after determining the detection result of the video to be detected under the live body detection index, the signature information corresponding to the target video frame is generated based on the determined target video frame, so that the user side can determine the credibility of the obtained detection result according to the target video frame and the signature information, and improve the security of live body detection.

[0158] For example, referring to Figure 3 the signature verification process is shown in the figure, the Figure 3 The access side and the live body detection service side are included in the figure, wherein the access side can be any user side that needs to perform live body detection business, and the live body detection service side can be the provider side of the live body detection algorithm. Among them, the access side business can initiate a live body detection request, the live body detection service side can perform live body detection in response to the initiated live body detection request, and can determine the target video frame and the signature information corresponding to the target video frame after the live body detection passes. And send the target video frame and the signature information to the access side business. Then, the access side business can verify the target video frame and the signature information according to the configured signature verification algorithm, that is, the algorithm self-signature verification process, to obtain the signature verification result. Or, the access side business can also call the signature verification service provided by the live body detection service side to verify the target video frame and the signature information, that is, the algorithm self-signature verification process, to obtain the signature verification result.

[0159] In step B2, based on the target video frame, the signature information corresponding to the target video frame is generated, which can include: performing encryption processing on the target video frame to generate an encrypted digest corresponding to the target video frame; based on the encrypted digest and the set attribute information, the signature information corresponding to the target video frame is generated; wherein the attribute information includes at least one of the following: signature algorithm version number, random string, key, and timestamp.

[0160] For example, the target video frame can be encrypted using an encryption algorithm to generate an encrypted digest corresponding to the target video frame. For example, the encrypted digest can be a hexadecimal string. The encrypted digest and the signature algorithm version number, random string, and other information in the attribute information can be signed using secret to obtain intermediate signature information. For example, the digital signature algorithm can include but is not limited to: HMAC-SHA256, ECDSA, SHA256withRSA, SHA256withDSA, and SHA512withDSA.

[0161] The intermediate signature information can be spliced with the timestamp in the attribute information, and the spliced string can be encoded using a set encoding method to obtain the signature information corresponding to the target video frame. For example, the encoding method includes but is not limited to: Base64 encoding, Hex encoding, Unicode encoding, UTF-8 encoding, and MD5 encoding.

[0162] Here, the signature information corresponding to the target video frame can be generated based on the encrypted digest and the attribute information. Since the information used is rich, the generated signature information is difficult to decipher, the security level of the signature information is high, and the security of the live detection is increased.

[0163] In an optional implementation, after obtaining the target detection parameter corresponding to the to-be-tested user, the method further includes: determining a first target time period based on a first time when the target detection parameter corresponding to the to-be-tested user is obtained and a second target time length; if each detection result corresponding to the to-be-tested user in the first target time period indicates that the live detection is not passed, and / or the to-be-tested user does not obtain a detection result, the live detection for the to-be-tested user is ended.

[0164] In implementation, the second target time length can be set as needed, wherein the second target time length can be the effective time length of the live detection process performed for each live detection request, that is, after obtaining the target detection parameter, the detection result of the live detection passed needs to be obtained within the second target time length; if the detection result of the live detection passed is not obtained within the second target time length, the live detection process is ended.

[0165] determining a first time point at which the target detection parameter corresponding to the to-be-tested user is acquired, determining a first target time period according to the first time point and a second target time length, and ending the living body detection for the to-be-tested user if each detection result corresponding to the to-be-tested user in the first target time period indicates that the living body detection fails, or if the to-be-tested user does not obtain a detection result in the first target time period, that is, if the living body detection process corresponding to the to-be-tested user ends.

[0166] Here, by setting the second target time length, the harm caused by the user attacking the living body detection process and unlimited attack can be alleviated, and the security of the living body detection is improved.

[0167] In an optional implementation, after the living body detection index corresponding to the to-be-tested user is determined, the method further includes: determining an effective time period of the living body detection index based on a generation time point of the living body detection index and a first target time length, and re-determining the living body detection index corresponding to the to-be-tested user until the number of times of determining the living body detection index is equal to a set number threshold, if a detection result of the to-be-tested video under the living body detection index is not obtained in the effective time period and / or the detection result obtained in the effective time period indicates that the living body detection fails.

[0168] The first target time length can be set as needed, where the first target time length can be the effective time length of the generated living body detection index. In implementation, the generation time point of the living body detection index can be determined, and the effective time period of the living body detection index can be determined based on the generation time point of the living body detection index and the first target time length. If a detection result of the to-be-tested video under the living body detection index is not obtained in the effective time period, or if the detection result of the to-be-tested video under the living body detection index obtained in the effective time period indicates that the living body detection fails, the living body detection index corresponding to the to-be-tested user is re-determined. For example, the living body detection index corresponding to the to-be-tested user can be re-determined in response to a re-detection request triggered by the to-be-tested user, or a preset time length can be set, and the living body detection index corresponding to the to-be-tested user is re-determined after the preset time length. The number of times of determining the living body detection index is equal to a set number threshold. If the detection result of the to-be-tested user under the number threshold of living body detection indexes indicates that the living body detection fails, the living body detection for the to-be-tested user ends.

[0169] Here, by setting the first target time length and the number threshold, the harm caused by the user attacking the living body detection process and repeated attack can be alleviated, and the security of the living body detection is improved.

[0170] For example, the user to be tested can generate at most a threshold number of liveness detection indicators within a second target time length, obtaining a threshold number of detection results. For example, if the second target time length is 3 minutes, the first target time length is 30 seconds, and the threshold number is 5, then at most 5 liveness detection indicators are generated within 3 minutes; and a detection result is obtained for each liveness detection indicator within 30 seconds. If the user to be tested fails the liveness detection within 3 minutes, for example, each detection result (at most 5 detection results) obtained within 3 minutes indicates that the liveness detection fails, then the liveness detection of the user to be tested ends.

[0171] To alleviate the problem of poor flexibility of liveness detection when a user is detected by a liveness detection technology integrated on a user terminal, liveness detection can be performed based on Hyper Text Markup Language (HTML) 5, that is, a liveness detection algorithm on the service side can be called in a front-end page or a program to detect the liveness of a user, so that the liveness detection method based on HTML 5 can be flexibly applied to various pages and programs. However, due to the low security of the front-end technology, the detection result and detection content of the liveness detection method based on HTML 5 are easy to be tampered with, and the security of the liveness detection is low. Based on this, a liveness detection system is proposed, which can include a liveness detection front-end, a liveness detection back-end, a user front-end, and a user back-end. The liveness detection method can be applied to the liveness detection back-end in the liveness detection system.

[0172] The liveness detection front-end is connected to the liveness detection back-end and the user front-end, and the user back-end is connected to the liveness detection back-end and the user front-end. That is, the above-mentioned connection mode of the liveness detection front-end and the user front-end and the liveness detection back-end and the user back-end can effectively divide the trusted domain and improve the security of the liveness detection system, and can better alleviate the risk of interception and tampering on the liveness detection link.

[0173] In combination with Figure 4 As shown in the figure, the workflow of the liveness detection system can include:

[0174] Step 1: In response to a liveness detection request initiated by a user to be tested, the user front-end generates a request parameter and sends the request parameter to the user back-end.

[0175] The request parameter includes a target detection parameter and a working parameter. The working parameter can be various parameters required for the normal operation of the liveness detection system. For example, the working parameter can include but is not limited to Reditect-url.

[0176] Step 2: The user back-end calls the liveness detection back-end with the request parameter.

[0177] Step 3: The live body detection backend generates calling information based on the request parameters, and sends the calling information to the user backend.

[0178] For example, the calling information can be a uniform resource locator (URL) including a token, which is used to indicate the jump between front-end pages.

[0179] Step 4: The user backend sends the calling information to the user front-end.

[0180] Step 5: The user front-end jumps to the live body detection front-end according to the calling information.

[0181] Step 6: The live body detection front-end sends the token in the calling information to the live body detection backend.

[0182] Step 7: The live body detection backend determines the target detection parameter according to the token, and determines the live body detection index corresponding to the user to be detected based on the target detection parameter; and sends the live body detection index to the live body detection front-end.

[0183] Step 8: The live body detection front-end displays the live body detection index and collects the video to be detected of the user to be detected.

[0184] Step 9: The live body detection backend obtains the video to be detected of the user to be detected from the live body detection front-end; and determines the detection result of the video to be detected under the live body detection index based on the live body detection index.

[0185] Step 10: When the detection result indicates that the live body detection passes, the live body detection backend can determine the target video frame from the video to be detected; and generate signature information corresponding to the target video frame based on the target video frame.

[0186] Step 11: The user front-end sends a result obtaining request to the user backend after determining that the live body detection backend obtains the detection result.

[0187] Step 12: The user backend sends the received result obtaining request to the live body detection backend.

[0188] Step 13: The live body detection backend sends the obtained detection result to the user backend in response to the result obtaining request, and sends the target video frame and the signature information to the user backend when the detection result indicates that the live body detection passes.

[0189] Step 14: The user backend receives the detection result. When the user backend receives the target video frame and the signature information, the user backend can perform signature verification based on the signature information and the target video frame to obtain a signature verification result.

[0190] For example, the user backend can call a configured signature verification algorithm or call a signature verification module in the liveness detection backend to verify the target video frame and the signature information, and obtain a verification result. For example, the verification result can include: a verification pass indicating that the target video frame is consistent with the signature information, and a verification fail indicating that the target video frame is inconsistent with the signature information. Wherein, the verification pass indicates that the liveness detection pass detection result received by the user backend is reliable; the verification fail indicates that the liveness detection pass detection result received by the user backend is unreliable.

[0191] In implementation, the liveness detection backend can also send the detection result to the liveness detection front end, and the liveness detection front end sends the detection result to the user front end for display.

[0192] Referring to Figure 5 As shown in the figure, the timeliness of steps 1-9 can be a second target time length, for example, liveness detection timeliness 3min; the timeliness of the liveness detection index can be a first target time length, for example, random factor timeliness 30s; the maximum number of generated liveness detection indexes in the entire second target time length is a threshold, for example, the number of retries is less than or equal to 5 times; and the effective time length of the token in the above process can be a third target time length, for example, the token invalidity of the entire detection process is 5min. Wherein, the third target time length can be set as needed.

[0193] In implementation, the codes involved in the user front end and the liveness detection front end in the above liveness detection total system are all codes after security reinforcement. Wherein, the user front end and the liveness detection front end can be constructed based on HTML5. By security reinforcement on the HTML5 front end code, multiple protection measures such as code obfuscation, call conversion, attribute and string encryption are implemented to increase the cost and difficulty of attacking the logic of the HTML5 front end code, and the security of the user front end and the liveness detection front end is ensured.

[0194] For example, the HTML5 (H5 for short) front end code can be reinforced in one or more of the following ways: 1. Anti-reverse reinforcement: meaningless obfuscation and encryption of attributes and variables in the H5 front end code to reduce code readability and prevent code from being reverse analyzed. 2. Anti-tampering reinforcement: signature verification protection can avoid code class files from being repackaged and prevent application piracy. 3. Anti-debugging reinforcement: real-time detection of program debugging state to prevent code injection and code logic exposure, effectively reducing the risk of data hijacking and tampering. 4. Anti-theft reinforcement: encryption of key data such as core resource files and configuration files to prevent theft.

[0195] Those skilled in the art can understand that, in the above method of the specific embodiment, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process, and the specific execution order of each step should be determined according to its function and possible internal logic.

[0196] Based on the same idea, the embodiment of the present disclosure also provides a living body detection system, as shown in Figure 6 The architecture schematic diagram of the living body detection system provided by the embodiment of the present disclosure includes a living body detection front end 601 and a living body detection back end 602; the living body detection front end 601 is connected with the living body detection back end 602 and an external user front end respectively, and specifically:

[0197] In response to a living body detection request of any user from the user front end, the user front end jumps to the living body detection front end 601 to display a living body detection interface;

[0198] The living body detection back end 602 is configured to, in response to the living body detection front end displaying the living body detection interface, execute the living body detection method according to the target detection parameter indicated by the living body detection request to obtain a detection result corresponding to the any user.

[0199] In a possible implementation, the living body detection back end 602 is connected with an external user back end, and the living body detection back end 602 is further configured to, in response to a result acquisition request sent by the user back end, send the obtained detection result corresponding to the any user to the user back end.

[0200] In a possible implementation, the living body detection back end 602 is further configured to send the obtained detection result corresponding to the any user to the living body detection front end for display.

[0201] The living body detection front end 601 is further configured to send the detection result to the user front end.

[0202] In a possible implementation, the living body detection back end 602 is connected with an external user back end, and the living body detection back end 602 is further configured to, after determining the target video frame corresponding to any user and the signature information corresponding to the target video frame, send the target video frame and the signature information corresponding to the target video frame to the user back end.

[0203] Based on the same idea, the embodiment of the present disclosure also provides a living body detection system, as shown in Figure 7As shown in FIG. 7, an architecture schematic diagram of a live body detection system provided by the embodiment of the present disclosure is shown, including a user front end 701 and a user back end 702; wherein the user front end 701 is connected with a live body detection front end; the user back end 702 is connected with a live body detection back end; specifically:

[0204] The user front end 701 is configured to, when receiving a live body detection request for any user, jump to the live body detection front end, so that the live body detection back end connected with the live body detection front end can execute the live body detection method as described in the first aspect or any implementation manner, to obtain a detection result corresponding to any user; and

[0205] The user front end 701 is configured to, when receiving a live body detection request for any user, jump to the live body detection front end, so that the live body detection back end connected with the live body detection front end can execute the live body detection method as described in the first aspect or any implementation manner, to obtain a detection result corresponding to any user; and

[0206] The user back end 702 is configured to receive a detection result corresponding to any user sent by the live body detection back end in response to the result acquisition request.

[0207] In a possible implementation manner, the user back end 702 is further configured to receive a target video frame corresponding to any user and signature information corresponding to the target video frame sent by the live body detection back end; and call a configured signature verification algorithm or call a signature verification module in the live body detection back end to verify the target video frame and the signature information, to obtain a verification result.

[0208] Based on the same concept, the embodiment of the present disclosure further provides a live body detection device, as shown in FIG. 8, the live body detection device comprises: Figure 8 As shown in FIG. 8, an architecture schematic diagram of a live body detection device provided by the embodiment of the present disclosure is shown, comprising:

[0209] A first determination module 801 is configured to, in response to obtaining a target detection parameter corresponding to a to-be-detected user, determine a live body detection index corresponding to the to-be-detected user based on the target detection parameter; wherein the live body detection index comprises a detection index sequence matched with a target number in a target detection mode; the target detection parameter comprises a first parameter affecting a selected target detection mode, and / or a second parameter affecting a selected number of detection indexes;

[0210] An acquisition module 802 is configured to acquire a to-be-detected video of a to-be-detected user.

[0211] A second determination module 803 is configured to determine a detection result of the to-be-detected video under the live body detection index based on the live body detection index.

[0212] In a possible implementation, when the target detection parameter comprises the first parameter and does not comprise the second parameter, the first determining module 801, when determining the live detection index corresponding to the to-be-detected user based on the target detection parameter, is configured to:

[0213] determine the target detection mode corresponding to the to-be-detected user based on the first parameter comprised in the target detection parameter and a first mapping relationship between a preset mode parameter and a detection mode;

[0214] select, from a detection index set, a preset target number of detection indexes corresponding to the target detection mode, and generate the live detection index corresponding to the to-be-detected user.

[0215] In a possible implementation, when the target detection parameter does not comprise the first parameter and comprises the second parameter, the first determining module 801, when determining the live detection index corresponding to the to-be-detected user based on the target detection parameter, is configured to:

[0216] determine the target number based on the second parameter comprised in the target detection parameter and a second mapping relationship between a preset difficulty parameter and a number of detection indexes;

[0217] select, from a detection index set, the target number of detection indexes corresponding to a preset target detection mode, and generate the live detection index corresponding to the to-be-detected user.

[0218] In a possible implementation, when the target detection parameter comprises the first parameter and the second parameter, the first determining module 801, when determining the live detection index corresponding to the to-be-detected user based on the target detection parameter, is configured to:

[0219] determine the target detection mode corresponding to the to-be-detected user based on the first parameter comprised in the target detection parameter and a first mapping relationship between a preset mode parameter and a detection mode; and

[0220] determine the target number based on the second parameter comprised in the target detection parameter and a second mapping relationship between a preset difficulty parameter and a number of detection indexes;

[0221] select, from a detection index set, the target number of detection indexes corresponding to the target detection mode, and generate the live detection index corresponding to the to-be-detected user.

[0222] In a possible implementation, the second determining module 802, when determining the detection result of the to-be-detected video under the live detection index based on the live detection index, is configured to:

[0223] based on the living body detection index, performing index recognition on the to-be-detected video to obtain an index recognition result corresponding to the to-be-detected user;

[0224] in a case where the index recognition result indicates that the recognition is passed, extracting at least one detection video frame from the to-be-detected video;

[0225] performing anti-invasion hack detection on the at least one detection video frame to determine a detection result corresponding to the to-be-detected user.

[0226] In a possible implementation, after the detection result of the to-be-detected video under the living body detection index is determined, the apparatus further includes a generation module 804 configured to:

[0227] determine a target video frame from the to-be-detected video;

[0228] based on the target video frame, generate signature information corresponding to the target video frame.

[0229] In a possible implementation, when the generation module 804 generates the signature information corresponding to the target video frame based on the target video frame, the generation module 804 is configured to:

[0230] perform encryption processing on the target video frame to generate an encrypted digest corresponding to the target video frame;

[0231] based on the encrypted digest and set attribute information, generate the signature information corresponding to the target video frame, where the attribute information includes at least one of the following: a signature algorithm version number, a random string, a key (key), and a time stamp.

[0232] In a possible implementation, after the target detection parameter corresponding to the to-be-detected user is obtained, the apparatus further includes a first judgment module 805 configured to:

[0233] based on a first time point at which the target detection parameter corresponding to the to-be-detected user is obtained and a second target time length, determine a first target time period;

[0234] if each detection result corresponding to the to-be-detected user within the first target time period indicates that the living body detection is not passed, and / or the to-be-detected user does not obtain a detection result, end the living body detection for the to-be-detected user.

[0235] In a possible implementation, after the living body detection index corresponding to the to-be-detected user is determined, the apparatus further includes a second judgment module 806 configured to:

[0236] based on a generation time point of the living body detection index and a first target time length, determine an effective time period of the living body detection index;

[0237] If the detection result of the video to be tested under the liveness detection index is not obtained within the effective time period, and / or the detection result obtained within the effective time period indicates that the liveness detection fails, then the liveness detection index corresponding to the user to be tested is re-determined until the number of times the liveness detection index is determined is equal to the set number threshold.

[0238] In some embodiments, the functions or templates of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0239] Based on the same technical concept, this disclosure also provides an electronic device. (See also...) Figure 9 The diagram shows the structure of an electronic device provided in this embodiment, including a processor 901, a memory 902, and a bus 903. The memory 902 stores execution instructions and includes a main memory 9021 and an external memory 9022. The main memory 9021, also called internal memory, temporarily stores computational data in the processor 901 and data exchanged with external memory 9022 such as a hard disk. The processor 901 exchanges data with the external memory 9022 through the main memory 9021. When the electronic device 900 is running, the processor 901 and the memory 902 communicate through the bus 903, causing the processor 901 to execute the following instructions:

[0240] In response to obtaining the target detection parameters corresponding to the user to be tested, a liveness detection index corresponding to the user to be tested is determined based on the target detection parameters; wherein, the liveness detection index includes a sequence of detection indicators that match the number of targets under the target detection mode; the target detection parameters include a first parameter that affects the selected target detection mode, and / or a second parameter that affects the number of selected detection indicators;

[0241] Obtain the video to be tested from the user to be tested;

[0242] Based on the liveness detection index, the detection result of the video to be detected under the liveness detection index is determined.

[0243] The specific processing flow of the processor 901 can be referred to the description in the above method embodiment, and will not be repeated here.

[0244] Furthermore, this disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the liveness detection method described in the above-described method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.

[0245] The embodiments of the present disclosure further provide a computer program product carrying program codes, the program codes comprising instructions for executing the steps of the living body detection method described in the above method embodiments, which can be specifically referred to the above method embodiments and will not be repeated here.

[0246] The computer program product can be specifically implemented by hardware, software or a combination thereof. In an optional embodiment, the computer program product is specifically embodied as a computer storage medium. In another optional embodiment, the computer program product is specifically embodied as a software product, such as a software development kit (SDK) and the like.

[0247] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system and device can refer to the corresponding process in the above method embodiments, which will not be repeated here. In several embodiments provided by the present disclosure, it should be understood that the disclosed system, device and method can be implemented by other means. The above-described device embodiments are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some communication interface, device or unit, which can be electrical, mechanical or other forms.

[0248] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e. they can be located in one place or distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment.

[0249] In addition, each functional unit in each embodiment of the present disclosure can be integrated into one processing unit, or each unit can exist physically, or two or more units can be integrated into one unit.

[0250] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a nonvolatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present disclosure, essentially or in part, or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and various other media that can store program codes.

[0251] The above merely describes the specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present disclosure, which shall be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims

1. A method of detecting living matter, characterized by, Comprise: In response to obtaining the target detection parameter corresponding to the to-be-tested user, determining the live body detection index corresponding to the to-be-tested user based on the target detection parameter; wherein the live body detection index comprises a detection index sequence matched with a target number in a target detection mode; the target detection parameter comprises a first parameter affecting the selected target detection mode, and / or a second parameter affecting the selected detection index number; Obtain the to-be-detected video of the to-be-tested user; Based on the live body detection index, determine the detection result of the to-be-detected video under the live body detection index; In the case where the target detection parameter includes the first parameter and the second parameter, the determination of the live body detection index corresponding to the to-be-tested user based on the target detection parameter comprises: Based on the first parameter included in the target detection parameter and the first mapping relationship between the preset mode parameter and the detection mode, determine the target detection mode corresponding to the to-be-tested user; and Based on the second parameter included in the target detection parameter and the second mapping relationship between the preset difficulty parameter and the detection index number, determine the target number corresponding to the to-be-tested user; Select the detection index of the target number corresponding to the target detection mode from the detection index set to generate the live body detection index corresponding to the to-be-tested user.

2. The method of claim 1, wherein, In the case where the target detection parameter includes the first parameter and does not include the second parameter, the determination of the live body detection index corresponding to the to-be-tested user based on the target detection parameter comprises: Based on the first parameter included in the target detection parameter and the first mapping relationship between the preset mode parameter and the detection mode, determine the target detection mode corresponding to the to-be-tested user; Select the detection index of the preset target number corresponding to the target detection mode from the detection index set to generate the live body detection index corresponding to the to-be-tested user.

3. The method of claim 1, wherein, In the case where the target detection parameter does not include the first parameter and includes the second parameter, the determination of the live body detection index corresponding to the to-be-tested user based on the target detection parameter comprises: Based on the second parameter included in the target detection parameter and the second mapping relationship between the preset difficulty parameter and the detection index number, determine the target number corresponding to the to-be-tested user; Select the detection index of the target number corresponding to the preset target detection mode from the detection index set to generate the live body detection index corresponding to the to-be-tested user.

4. The method according to any one of claims 1 to 3, characterized in that, The determination of the detection result of the to-be-detected video under the live body detection index based on the live body detection index comprises: Based on the live body detection index, perform index recognition on the to-be-detected video to obtain an index recognition result corresponding to the to-be-tested user; In the case where the index recognition result indicates that the recognition is passed, extract at least one detection video frame from the to-be-detected video; Perform anti-invasion hack detection on the at least one detection video frame to determine the detection result corresponding to the to-be-tested user.

5. The method according to any one of claims 1 to 3, characterized in that, After determining the live body detection index corresponding to the to-be-tested user, the method further comprises: determine an effective time period of the living body detection index based on a generation time of the living body detection index and a first target time length; if no detection result of the to-be-detected video under the living body detection index is obtained within the effective time period and / or the detection result obtained within the effective time period indicates that the living body detection fails, the living body detection index corresponding to the to-be-detected user is re-determined until the number of times of determining the living body detection index equals a set number threshold.

6. A vital detection system characterized by, The method comprises the following steps: a living body detection front end and a living body detection back end; the living body detection front end is connected with the living body detection back end and an external user front end respectively; in response to a living body detection request of any user from the user front end, jumping from the user front end to the living body detection front end to display a living body detection interface; the living body detection back end is configured to, in response to the living body detection front end displaying the living body detection interface, execute the living body detection method according to any one of claims 1 to 5 based on target detection parameters indicated by the living body detection request to obtain a detection result corresponding to the any user.

7. The system of claim 6, wherein, the living body detection back end is connected with an external user back end, and the living body detection back end is further configured to, in response to a result acquisition request sent by the user back end, send the obtained detection result corresponding to the any user to the user back end.

8. The system of claim 6, wherein, the living body detection back end is further configured to send the obtained detection result corresponding to the any user to the living body detection front end for display; the living body detection front end is further configured to send the detection result to the user front end.

9. The system of claim 6, wherein, the living body detection back end is connected with an external user back end, and the living body detection back end is further configured to, after determining a target video frame corresponding to any user and signature information corresponding to the target video frame, send the target video frame and the signature information corresponding to the target video frame to the user back end.

10. A vital detection system characterized by, The method comprises the following steps: a user front end and a user back end; the user front end is connected with a living body detection front end; and the user back end is connected with a living body detection back end; the user front end is configured to, when receiving a living body detection request of any user, jump to the living body detection front end, so that the living body detection back end connected with the living body detection front end can execute the living body detection method according to any one of claims 1 to 5 to obtain a detection result corresponding to the any user; and generating a result acquisition request and sending the result acquisition request to the living body detection back end through the user back end; the user back end is configured to receive the detection result corresponding to the any user sent by the living body detection back end in response to the result acquisition request.

11. The system of claim 10, wherein, the user back end is further configured to receive a target video frame corresponding to any user and signature information corresponding to the target video frame sent by the living body detection back end, and call a configured signature verification algorithm or a signature verification module in the living body detection back end to verify the target video frame and the signature information to obtain a verification result.

12. A living body detecting apparatus characterized by comprising: The method comprises the following steps: The first determining module is configured to, in response to obtaining a target detection parameter corresponding to a to-be-tested user, determine a living body detection index corresponding to the to-be-tested user based on the target detection parameter; wherein the living body detection index comprises a detection index sequence matched with a target number in a target detection mode; the target detection parameter comprises a first parameter affecting a selected target detection mode and / or a second parameter affecting a selected detection index number; The acquisition module is configured to acquire a to-be-tested video of a to-be-tested user; The second determining module is configured to determine a detection result of the to-be-tested video under the living body detection index based on the living body detection index; In a case where the target detection parameter comprises the first parameter and the second parameter, the first determining module, when determining the living body detection index corresponding to the to-be-tested user based on the target detection parameter, is configured to: determine a target detection mode corresponding to the to-be-tested user based on the first parameter included in the target detection parameter and a first mapping relationship between preset mode parameters and detection modes; and determine a target number corresponding to the to-be-tested user based on the second parameter included in the target detection parameter and a second mapping relationship between preset difficulty parameters and detection index numbers. select, from a detection index set, detection indexes of the target number corresponding to the target detection mode, to generate the living body detection index corresponding to the to-be-tested user.

13. An electronic device, comprising: comprise: a processor, a memory and a bus, the memory stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, the machine readable instructions are executed by the processor to execute the steps of the living body detection method in any one of claims 1 to 5.

14. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to execute the steps of the living body detection method in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Living body detection method and device, computer equipment and storage medium

    CN109815853A

  • Living body detection method and device, computer equipment and storage medium

    CN113971841A