Identity detection method, device, medium and equipment for reducing attack risk

By recording videos in glare-filled environments and analyzing the color information distribution patterns, the vulnerability of existing facial recognition systems to attacks has been addressed, achieving higher security and reliability.

CN116403293BActive Publication Date: 2026-04-28PING AN BANK CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PING AN BANK CO LTD
Filing Date
2023-03-28
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing facial recognition technology struggles to effectively distinguish between live and non-live individuals when faced with attacks, especially those using pre-recorded videos, resulting in insufficient security and reliability.

Method used

By recording video in a glare environment, extracting the color information of the video frame images and determining whether it matches the preset backlight activation order, it is possible to determine whether the face to be detected is a live person.

Benefits of technology

This effectively avoids attacks that use photos or pre-recorded videos to bypass facial recognition systems, improving the security and reliability of facial recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116403293B_ABST
    Figure CN116403293B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an identity detection method and device for reducing attack risk, a medium and equipment, the method comprising: obtaining a video with glare containing a face to be detected; selecting a plurality of key video frame images from the video with glare, and arranging the key video frame images in the order of recording time to obtain a sequence of video frame images; obtaining a target face region of each key video frame image in the sequence of video frame images; extracting color information of each target face region, and determining key color information corresponding to each sequence group; determining whether the key color information corresponding to each sequence group in the sequence of video frame images corresponds to a preset background light opening sequence, to obtain a judgment result of whether the face to be detected in the video with glare passes the identity detection. The embodiments of the present application can prevent hackers from recording a fake video with glare in advance to invade a face recognition system to replace a real video with glare, thereby cheating the face recognition system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic communication technology, and more particularly to a data update technology field, especially to an identity detection method, apparatus, medium, and device for reducing the risk of attacks. Background Technology

[0002] With the continuous development of technology, facial recognition is being applied in increasingly widespread scenarios. However, examples of cybercriminals using fake faces to complete online facial recognition and causing losses to customers are commonplace. Therefore, the authenticity, security, and credibility of facial recognition in various business scenarios have become crucial issues. While many liveness detection products exist in the market, they all have significant shortcomings. Most rely on device-side prompts for users to perform actions such as opening their mouth, shaking their head, and blinking for verification. When attackers use pre-recorded videos containing these actions, they can easily bypass the liveness detection, posing a certain risk. Summary of the Invention

[0003] This application provides an identity detection method, apparatus, medium, and device to reduce the risk of attacks. The method involves recording a video of the face to be identified under glare conditions, and then determining whether the color information arrangement of the video frame images in the video frame image sequence constructed based on the glare video corresponds to a preset recording background light activation order. This determines whether the face in the glare video passes the identity detection. On the one hand, this prevents individuals intending to attack the facial recognition system from using photos to bypass detection; on the other hand, it prevents hackers from pre-recording a fake video with glare to infiltrate the facial recognition system and replace the genuine glare video, thus deceiving the system.

[0004] This application provides an identity detection method for reducing attack risks, the method comprising:

[0005] Acquire a glare video containing the face to be detected, wherein the glare video is video data recorded by the face to be detected in a glare environment;

[0006] Several key video frame images are selected from the glare video and arranged in chronological order of recording time to obtain a video frame image sequence, wherein the video frame image sequence is divided into several sequence groups, and each sequence group contains the same number of video frames.

[0007] The target face region of each key video frame in the video frame image sequence is obtained respectively;

[0008] The color information of each target face region is extracted, and the key color information corresponding to each sequence group is determined.

[0009] Determine whether the key color information corresponding to each sequence group in the video frame image sequence corresponds to the preset backlight activation order, and obtain the judgment result of whether the face to be detected in the glare video passes the identity detection.

[0010] In the identity detection method for reducing attack risk described in the embodiments of this application, the step of obtaining the target face region of each key video frame image in the video frame image sequence includes:

[0011] Determine the preset face detection bounding box for each key video frame in the video frame image sequence;

[0012] Based on the position of the face detection box on the key video frame image, the key video frame image is cropped along the boundary of the face detection box to obtain the region to be identified in each key video frame image.

[0013] Each of the regions to be identified is input into the trained face region extraction model to perform face region extraction operations, and the coordinates of facial key points in each region to be identified are extracted.

[0014] The target face region of each key video frame image is obtained based on the coordinates of the facial key points.

[0015] In the identity detection method for reducing attack risk described in the embodiments of this application, the step of determining the face detection box for each key video frame image in the video frame image sequence includes:

[0016] Each key video frame image is input into the trained face localization network model, and the output is the face heat map, face scale map and face center offset map of each key video frame image.

[0017] The facial coordinate offset is obtained at the corresponding position of the facial region on the facial center offset map, and added to the coordinates of the facial heat map to obtain the position of the facial center point.

[0018] The width and height of the face are calculated by exponential conversion on the face scale map to obtain the face detection box, and then duplicate face detection boxes are removed by nonmaximum suppression.

[0019] The identity detection method for reducing attack risks described in the embodiments of this application further includes:

[0020] The face detection frame is expanded outwards in all directions according to a predetermined ratio.

[0021] In the identity detection method for reducing attack risk described in this application embodiment, obtaining the target face region of each key video frame image based on the facial key point coordinates includes:

[0022] Based on the coordinates of the facial key points, generate each facial contour map, which includes the facial region and the non-facial region respectively.

[0023] Each of the aforementioned face contour images is filled with 255 pixel values ​​based on the coordinates of the key facial points to generate a corresponding face region mask;

[0024] Each face region mask is multiplied by its corresponding key video frame image to obtain each target face region with non-face regions removed.

[0025] In the identity detection method for reducing attack risk described in the embodiments of this application, the step of extracting the color information of each target face region and determining the key color information corresponding to each sequence group includes:

[0026] The mean values ​​of the three RGB color channels of each target face region are extracted to construct the mean value sequence for each sequence group.

[0027] Perform a DCT transform on the mean sequence to convert the signal in the time domain to the frequency domain.

[0028] Calculate the signal-to-noise ratio (SNR) of the mean sequence of each of the three color channels (RGB) in the same sequence group to obtain the R SNR, G SNR and B SNR;

[0029] The color channel corresponding to the largest of the R signal-to-noise ratio, G signal-to-noise ratio, and B signal-to-noise ratio is taken as the key color information of the same sequence group.

[0030] In the identity detection method for reducing attack risk described in this application embodiment, after obtaining the judgment result of whether the face to be detected in the glare video passes the identity detection, the method further includes:

[0031] If the determination result is that the face to be detected in the glare video fails the identity detection, then the abnormal face detected in the glare video is screenshotted, and a prompt message containing the abnormal face is generated.

[0032] Accordingly, another aspect of this application embodiment also provides an identity detection device for reducing attack risks, the identity detection device for reducing attack risks comprising:

[0033] The first acquisition module is used to acquire a glare video containing the face to be detected, wherein the glare video is video data of the face to be detected recorded in a glare environment;

[0034] The image selection module is used to select several key video frame images from the glare video and arrange them in chronological order of recording time to obtain a video frame image sequence, wherein the video frame image sequence is divided into several sequence groups, and each sequence group contains the same number of video frames.

[0035] The second acquisition module is used to acquire the target face region of each key video frame image in the video frame image sequence;

[0036] The information extraction module is used to extract the color information of each target face region and determine the key color information corresponding to each sequence group.

[0037] The result judgment module is used to determine whether the key color information corresponding to each sequence group in the video frame image sequence corresponds to the preset backlight turn-on order, and to obtain the judgment result of whether the face to be detected in the glare video passes the identity detection.

[0038] Accordingly, another aspect of this application embodiment also provides a storage medium storing a plurality of instructions adapted for loading by a processor to execute the identity detection method for reducing attack risk as described above.

[0039] Accordingly, another aspect of this application embodiment also provides a terminal device, including a processor and a memory, wherein the memory stores multiple instructions, and the processor loads the instructions to execute the identity detection method for reducing attack risks as described above.

[0040] This application provides an identity detection method, apparatus, medium, and device to reduce the risk of attacks. The method involves acquiring a glare video containing a face to be detected, wherein the glare video is video data recorded by the face to be detected in a glare environment; selecting several key video frame images from the glare video and arranging them in chronological order of recording time to obtain a video frame image sequence, wherein the video frame image sequence is divided into several sequence groups, each sequence group containing the same number of video frames; acquiring the target face region of each key video frame image in the video frame image sequence; extracting the color information of each target face region and determining the key color information corresponding to each sequence group; and determining whether the key color information corresponding to each sequence group in the video frame image sequence corresponds to a preset backlight activation order to obtain a judgment result on whether the face to be detected in the glare video passes the identity detection. The identity detection method for reducing attack risks provided in this application's embodiments records a video of the face to be identified under glare conditions. It then determines whether the color information arrangement of the video frame images in the video frame image sequence constructed based on the glare video corresponds to the preset recording background light activation order, thereby determining whether the face in the glare video passes identity detection. This method prevents individuals intending to attack the face recognition system from using photos to bypass detection. Furthermore, it prevents hackers from pre-recording a fake video with glare to infiltrate the face recognition system and replace the genuine glare video, thus deceiving the system. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 This is a flowchart illustrating the identity detection method for reducing attack risks provided in this application embodiment.

[0043] Figure 2 This is a schematic diagram of the synthesis of the target face region in the identity detection method for reducing the risk of attack provided in the embodiments of this application.

[0044] Figure 3 This is a schematic diagram of the identity detection device for reducing the risk of attack provided in an embodiment of this application.

[0045] Figure 4 This is another structural schematic diagram of the identity detection device for reducing the risk of attack provided in the embodiments of this application.

[0046] Figure 5 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation

[0047] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the protection scope of this application.

[0048] It should be noted that the following is a brief introduction to the background of this solution:

[0049] This solution primarily addresses the technical problem of low accuracy in current identity verification methods based on facial recognition technology. These methods struggle to verify whether a face truly belongs to the person and is alive, resulting in weak anti-attack capabilities. Understandably, as technology advances and facial recognition applications become increasingly widespread, instances of cybercriminals using fake faces to conduct online facial recognition and causing customer losses are commonplace. Therefore, ensuring customer authenticity, security, and trustworthiness is crucial in various business scenarios. While numerous liveness detection products exist, they all have significant shortcomings. Most rely on device-side prompts for users to perform actions like opening their mouth, shaking their head, or blinking for verification. When attackers use pre-recorded videos containing these actions, they can easily bypass liveness verification, posing a significant risk.

[0050] To address the aforementioned technical problems, this application provides an identity detection method that reduces the risk of attacks. Using this method, a video of the face to be identified, captured in a glare-filled environment, is recorded. The color information arrangement of the video frame images in the video frame sequence constructed based on the glare video corresponds to a preset recording background light activation order. This allows the system to determine whether the face in the glare video passes the identity detection. On one hand, this prevents individuals intending to attack the facial recognition system from using photos to bypass detection. On the other hand, it also prevents hackers from pre-recording a fake glare video to infiltrate the facial recognition system and replace the genuine glare video, thus deceiving the system.

[0051] Please see Figure 1 , Figure 1This is a flowchart illustrating an identity detection method for reducing attack risks provided in an embodiment of this application. The identity detection method for reducing attack risks is applied to a terminal device. Optionally, the terminal device can be a terminal or a server. Optionally, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, smart voice interaction device, smart home appliance, or in-vehicle terminal, but is not limited to these.

[0052] In one embodiment, the method may include the following steps:

[0053] Step 101: Obtain a glare video containing the face to be detected, wherein the glare video is video data recorded by the face to be detected in a glare environment.

[0054] The glare video is video data recorded on the face to be detected under glare conditions. Random colors are incorporated during the glare process; randomly selecting four colors from five options (e.g., red, yellow, green, blue, purple) and arranging them results in 5*4*3*2 = 120 possible combinations, thus increasing the difficulty for an attacker to guess the true color combination. This prevents attackers from pre-recording a fake glare video to infiltrate the facial recognition system and replace the genuine glare video, thereby deceiving the facial recognition system.

[0055] Step 102: Select several key video frame images from the glare video and arrange them in chronological order of recording time to obtain a video frame image sequence, wherein the video frame image sequence is divided into several sequence groups, and each sequence group contains the same number of video frames.

[0056] Among them, key video frame images refer to images that contain the face to be detected and whose clarity meets the requirements for detection by the face recognition system.

[0057] In some embodiments, the mediapipe method can be used to select 20 key video frame images from the acquired glare video and arrange them in chronological order of recording time to obtain a video frame image sequence. It should be explained that mediapipe is a tool that can automatically detect whether an image contains a target object. Using mediapipe, after pre-configuring the parameters of the face to be detected, it can automatically identify key video frame images containing the face to be detected from numerous video frame images.

[0058] To further improve the accuracy of facial recognition, key video frame images can be selected through the following steps:

[0059] Starting from a preset position in the glare video, image frames are acquired. It is determined whether the acquired image frame contains the face to be detected and whether the size of the face to be detected meets the preset size. If the acquired image frame contains the face to be detected and the size of the face to be detected meets the preset size condition, then the acquired image frame is determined to be a key video frame image.

[0060] Step 103: Obtain the target face region of each key video frame image in the video frame image sequence.

[0061] Since glare information is mainly distributed in the face region, non-face regions such as the background image will only interfere with image processing and affect processing efficiency. Therefore, it is necessary to first obtain the target face region of each key video frame image in the video frame image sequence.

[0062] In this embodiment, the target face region can be obtained through the following steps:

[0063] Determine the preset face detection bounding box for each key video frame in the video frame image sequence;

[0064] Based on the position of the face detection box on the key video frame image, the key video frame image is cropped along the boundary of the face detection box to obtain the region to be identified in each key video frame image.

[0065] Each of the regions to be identified is input into the trained face region extraction model to perform face region extraction operations, and the coordinates of facial key points in each region to be identified are extracted.

[0066] The target face region of each key video frame image is obtained based on the coordinates of the facial key points.

[0067] It should be further explained that the method for determining the face detection bounding box in the step of obtaining the target face region can be achieved through the following steps:

[0068] Each key video frame image is input into the trained face localization network model, and the output is the face heat map, face scale map and face center offset map of each key video frame image.

[0069] The facial coordinate offset is obtained at the corresponding position of the facial region on the facial center offset map, and added to the coordinates of the facial heat map to obtain the position of the facial center point.

[0070] The width and height of the face are calculated by exponential conversion on the face scale map to obtain the face detection box, and then duplicate face detection boxes are removed by nonmaximum suppression.

[0071] It should be noted that points in the face heatmap that are greater than a preset threshold of 0.35 can also be considered as live faces, which makes it easier to determine whether the face to be detected is a live face.

[0072] In some embodiments, the method further includes the following steps:

[0073] The face detection frame is expanded outwards in all directions according to a predetermined ratio.

[0074] Since the target face region is mainly used for subsequent face recognition, in practical applications, the face detection box needs to be expanded to include some background information. This prevents the extracted target face region from being just the face region, which would be detrimental to subsequent face recognition.

[0075] It should be further explained that the training process of the face region extraction model specifically includes the following steps:

[0076] 1) Face landmark network design: Based on transfer learning technology, the backbone network adopts MobileNetV2. The last three layers of MobileNetV2 (i.e., convolutional layer, average pooling layer and fully connected layer) are removed, and custom convolutional layer, multi-scale convolutional layer and fully connected layer are connected (output is 896 neurons).

[0077] 2) Preprocess the face training images, including data augmentation and data normalization. Data augmentation includes operations such as random edge padding and random color jitter.

[0078] 3) Input the face training image into the face landmark network, and calculate the loss by comparing the network's 896-dimensional output with the true values ​​(i.e., the x and y coordinates of 486 face landmarks).

[0079] 4) Train the optimizer Adam with hyperparameters β1 and β2 of 0.9 and 0.999, respectively.

[0080] 5) The learning rate is 5e -4 .

[0081] 6) After repeating the iteration 80 times, reduce the learning rate and continue to repeat the iteration 80 times. When the final loss value is less than or equal to the preset threshold, adjust the internal parameters of the face landmark localization model (internal parameters are the model weights, gradients, etc.) until the final loss value is greater than the preset threshold, and then output the standard face landmark localization model.

[0082] 7) Input the face image into the trained model above, and output the coordinates of 468 facial key points.

[0083] It needs to be further explained that, such as Figure 2 As shown, obtaining the target face region of each key video frame image based on the coordinates of the facial key points can be achieved through the following steps:

[0084] Based on the coordinates of the facial key points, generate each facial contour map, which includes the facial region and the non-facial region respectively.

[0085] Each of the aforementioned face contour images is filled with 255 pixel values ​​based on the coordinates of the key facial points to generate a corresponding face region mask;

[0086] Each face region mask is multiplied by its corresponding key video frame image to obtain each target face region with non-face regions removed.

[0087] Step 104: Extract the color information of each target face region and determine the key color information corresponding to each sequence group.

[0088] The color information refers to the average values ​​of the three RGB color channels of the target face region. Each target face region includes three average values, corresponding to the three RGB color information respectively. Using the color information, the signal-to-noise ratio (SNR) of each of the three RGB color channels can be obtained, and then the color with the largest color proportion in the target face region can be determined by the SNR.

[0089] Since glare videos are usually composed of a series of video frames with contextual relationships, the average information of multiple video frames can be fused to calculate the signal-to-noise ratio, thereby improving the accuracy of the signal-to-noise ratio.

[0090] Specifically, the determination of key color information can be achieved through the following steps:

[0091] The mean values ​​of the three RGB color channels of each target face region are extracted to construct the mean value sequence for each sequence group.

[0092] Perform a DCT transform on the mean sequence to convert the signal in the time domain to the frequency domain.

[0093] Calculate the signal-to-noise ratio (SNR) of the mean sequence of each of the three color channels (RGB) in the same sequence group to obtain the R SNR, G SNR and B SNR;

[0094] The color channel corresponding to the largest of the R signal-to-noise ratio, G signal-to-noise ratio, and B signal-to-noise ratio is taken as the key color information of the same sequence group.

[0095] Step 105: Determine whether the key color information corresponding to each sequence group in the video frame image sequence corresponds to the preset backlight activation order, and obtain the judgment result of whether the face to be detected in the glare video passes the identity detection.

[0096] In this embodiment, the key color information (red, green, blue) corresponding to each sequence group is compared with the backlight activation order sent by the front-end device. If the color result matches the sent color sequence, the face is considered alive; otherwise, the face is considered not alive.

[0097] If the determination result is that the face to be detected in the glare video fails the identity detection, then the abnormal face detected in the glare video is screenshotted, and a prompt message containing the abnormal face is generated.

[0098] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.

[0099] In practice, this application is not limited by the execution order of the described steps. Without causing conflicts, some steps may be performed in other orders or simultaneously.

[0100] As can be seen from the above, the identity detection method for reducing attack risk provided in this application embodiment acquires a glare video containing the face to be detected, wherein the glare video is video data recorded by the face to be detected in a glare environment; selects several key video frame images from the glare video and arranges them in chronological order of recording time to obtain a video frame image sequence, wherein the video frame image sequence is divided into several sequence groups, each sequence group containing the same number of video frames; acquires the target face region of each key video frame image in the video frame image sequence; extracts the color information of each target face region and determines the key color information corresponding to each sequence group; and determines whether the key color information corresponding to each sequence group in the video frame image sequence corresponds to the preset backlight on-time order to obtain the judgment result of whether the face to be detected in the glare video passes the identity detection. The identity detection method for reducing attack risks provided in this application's embodiments records a video of the face to be identified under glare conditions. It then determines whether the color information arrangement of the video frame images in the video frame image sequence constructed based on the glare video corresponds to the preset recording background light activation order, thereby determining whether the face in the glare video passes identity detection. This method prevents individuals intending to attack the face recognition system from using photos to bypass detection. Furthermore, it prevents hackers from pre-recording a fake video with glare to infiltrate the face recognition system and replace the genuine glare video, thus deceiving the system.

[0101] This application also provides an identity detection device to reduce the risk of attacks, which can be integrated into a terminal device.

[0102] Please see Figure 2 , Figure 2 This is a schematic diagram of the structure of the identity detection device for reducing attack risk provided in an embodiment of this application. The identity detection device 30 for reducing attack risk may include:

[0103] The first acquisition module 31 is used to acquire a glare video containing the face to be detected, wherein the glare video is video data of the face to be detected recorded in a glare environment;

[0104] The image selection module 32 is used to select several key video frame images from the glare video and arrange them in chronological order of recording time to obtain a video frame image sequence, wherein the video frame image sequence is divided into several sequence groups, and each sequence group contains the same number of video frames.

[0105] The second acquisition module 33 is used to acquire the target face region of each key video frame image in the video frame image sequence;

[0106] The information extraction module 34 is used to extract the color information of each target face region and determine the key color information corresponding to each sequence group.

[0107] The result judgment module 35 is used to judge whether the key color information corresponding to each sequence group in the video frame image sequence corresponds to the preset backlight turn-on order, and to obtain the judgment result of whether the face to be detected in the glare video passes the identity detection.

[0108] In some embodiments, the second acquisition module 33 is configured to: determine preset face detection boxes for each key video frame image in the video frame image sequence; crop the key video frame images along the boundaries of the face detection boxes according to their positions on the key video frame images to obtain a region map to be identified for each key video frame image; input each region map to be identified into a trained face region extraction model to perform face region extraction operations, extracting the coordinates of facial key points in various region maps to be identified; and obtain the target face region of each key video frame image based on the coordinates of the facial key points.

[0109] In some embodiments, the second acquisition module 33 is used to input each key video frame image into the trained face localization network model, and output the face heatmap, face scale map, and face center offset map of each key video frame image; obtain the face coordinate offset at the corresponding position of the face region on the face center offset map, add it to the coordinate of the face heatmap to obtain the face center point position; calculate the width and height of the face on the face scale map through exponential conversion to obtain the face detection box, and then remove duplicate face detection boxes through non-maximum suppression.

[0110] In some embodiments, the device further includes an expansion module for expanding the face detection frame outwards in all directions according to a predetermined ratio.

[0111] In some embodiments, the second acquisition module 33 is used to generate face contour maps containing face regions and non-face regions based on the face key point coordinates; to fill each face contour map with a face key point coordinate of 255 pixels to generate a corresponding face region mask; and to multiply each face region mask with its corresponding key video frame image to obtain each target face region with non-face regions removed.

[0112] In some embodiments, the information extraction module 34 is used to extract the mean values ​​of the three RGB color channels of each target face region to construct a mean sequence corresponding to each sequence group; perform DCT transformation on the mean sequence to convert the signal time domain control of the mean sequence to the frequency domain space; calculate the signal-to-noise ratio (SNR) of each of the three RGB color channels in the same sequence group to obtain the R SNR, G SNR, and B SNR; and take the color channel corresponding to the largest of the R SNR, G SNR, and B SNR as the key color information of the same sequence group.

[0113] In some embodiments, the device further includes a screenshot module, configured to take a screenshot of the abnormal face in the glare video if the determination result is that the face to be detected in the glare video fails the identity detection, and generate a prompt message containing the abnormal face.

[0114] In practice, the above modules can be implemented as independent entities or combined in any way to be implemented as the same or several entities.

[0115] As can be seen from the above, the identity detection device 30 for reducing attack risks provided in this application embodiment includes a first acquisition module 31 for acquiring a glare video containing the face to be detected, wherein the glare video is video data recorded by the face to be detected in a glare environment; an image selection module 32 for selecting several key video frame images from the glare video and arranging them in chronological order of recording time to obtain a video frame image sequence, wherein the video frame image sequence is divided into several sequence groups, each sequence group containing the same number of video frames; a second acquisition module 33 for acquiring the target face region of each key video frame image in the video frame image sequence; an information extraction module 34 for extracting the color information of each target face region and determining the key color information corresponding to each sequence group; and a result judgment module 35 for judging whether the key color information corresponding to each sequence group in the video frame image sequence corresponds to the preset backlight turn-on order, thereby obtaining a judgment result on whether the face to be detected in the glare video passes the identity detection.

[0116] Please see Figure 4 , Figure 4 This is another schematic diagram of the identity detection device for reducing attack risks provided in this application embodiment. The identity detection device 30 for reducing attack risks includes a memory 120, one or more processors 180, and one or more application programs, wherein the one or more application programs are stored in the memory 120 and configured to be executed by the processors 180; the processors 180 may include a first acquisition module 31, an image selection module 32, a second acquisition module 33, an information extraction module 34, and a result judgment module 35. For example, the structure and connection relationship of the above components can be as follows:

[0117] Memory 120 can be used to store applications and data. The applications stored in memory 120 contain executable code. Applications can be composed of various functional modules. Processor 180 executes various functional applications and performs identity verification to mitigate attack risks by running the applications stored in memory 120. Furthermore, memory 120 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory 120 may also include a memory controller to provide processor 180 with access to memory 120.

[0118] The processor 180 is the control center of the device, connecting various parts of the terminal through various interfaces and lines. It performs various functions and processes data by running or executing applications stored in the memory 120 and calling data stored in the memory 120, thereby providing overall monitoring of the device. Optionally, the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications.

[0119] Specifically, in this embodiment, the processor 180 loads the executable code corresponding to the processes of one or more applications into the memory 120 according to the following instructions, and the processor 180 runs the applications stored in the memory 120 to achieve various functions:

[0120] The first acquisition instruction is used to acquire a glare video containing the face to be detected, wherein the glare video is video data of the face to be detected recorded in a glare environment;

[0121] The image selection instruction is used to select several key video frame images from the glare video and arrange them in chronological order of recording time to obtain a video frame image sequence, wherein the video frame image sequence is divided into several sequence groups, and each sequence group contains the same number of video frames.

[0122] The second acquisition instruction is used to acquire the target face region of each key video frame image in the video frame image sequence;

[0123] Information extraction instructions are used to extract the color information of each of the target face regions and determine the key color information corresponding to each sequence group;

[0124] The result judgment instruction is used to determine whether the key color information corresponding to each sequence group in the video frame image sequence corresponds to the preset backlight activation order, and to obtain the judgment result of whether the face to be detected in the glare video passes the identity detection.

[0125] This application also provides a terminal device. The terminal device may be a server, smartphone, computer, tablet computer, or other similar device.

[0126] Please see Figure 5 , Figure 5 A schematic diagram of a terminal device provided in an embodiment of this application is shown. This terminal device can be used to implement the identity detection method for reducing attack risks provided in the above embodiments. The terminal device 1200 can be a smartphone or a tablet computer.

[0127] like Figure 5As shown, the terminal device 1200 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more (only one is shown in the figure) computer-readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a transmission module 170, a processor 180 including one or more (only one is shown in the figure) processing cores, and a power supply 190, etc. Those skilled in the art will understand that... Figure 5 The structure of the terminal device 1200 shown does not constitute a limitation on the terminal device 1200, and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:

[0128] RF circuit 110 is used to receive and transmit electromagnetic waves, realizing the mutual conversion between electromagnetic waves and electrical signals, thereby enabling communication with communication networks or other devices. RF circuit 110 may include various existing circuit elements used to perform these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, Subscriber Identity Module (SIM) cards, memory, etc. RF circuit 110 can communicate with various networks such as the Internet, corporate intranets, and wireless networks, or communicate with other devices via wireless networks.

[0129] The memory 120 can be used to store software programs and modules, such as the program instructions / modules corresponding to the identity detection method for reducing attack risks in the above embodiments. The processor 180 executes various functional applications and identity detection to reduce attack risks by running the software programs and modules stored in the memory 120. It can automatically select a vibration reminder mode to update data according to the current scenario of the terminal device, ensuring that it is not disturbed in scenarios such as meetings, while also ensuring that users can sense incoming calls, thus improving the intelligence of the terminal device. The memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 120 may further include memory remotely located relative to the processor 180, and these remote memories can be connected to the terminal device 1200 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0130] Input unit 130 can be used to receive input numerical or character information, and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. Specifically, input unit 130 may include touch-sensitive surface 131 and other input devices 132. Touch-sensitive surface 131, also known as a touch display screen or touchpad, can collect user touch operations on or near it (such as user operations using fingers, styluses, or any suitable object or accessory on or near touch-sensitive surface 131), and drive corresponding connection devices according to a pre-set program. Optionally, touch-sensitive surface 131 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to processor 180, and can receive and execute commands from processor 180. In addition, the touch-sensitive surface 131 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. Besides the touch-sensitive surface 131, the input unit 130 may also include other input devices 132. Specifically, other input devices 132 may include, but are not limited to, one or more of the following: a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick.

[0131] Display unit 140 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of terminal device 1200. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Display unit 140 may include display panel 141, optionally configured as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, touch-sensitive surface 131 may cover display panel 141. When touch-sensitive surface 131 detects a touch operation on or near it, it transmits the information to processor 180 to determine the type of touch event. Subsequently, processor 180 provides corresponding visual output on display panel 141 according to the type of touch event. Although in Figure 5 In this embodiment, the touch-sensitive surface 131 and the display panel 141 are implemented as two separate components to realize input and output functions. However, in some embodiments, the touch-sensitive surface 131 and the display panel 141 can be integrated to realize input and output functions.

[0132] The terminal device 1200 may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 141 according to the ambient light level, and the proximity sensor can turn off the display panel 141 and / or backlight when the terminal device 1200 is moved to the ear. As a type of motion sensor, a gravity acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, tapping), etc. Other sensors that the terminal device 1200 may also be configured with, such as a gyroscope, barometer, hygrometer, thermometer, and infrared sensor, will not be described in detail here.

[0133] Audio circuitry 160, speaker 161, and microphone 162 provide an audio interface between the user and terminal device 1200. Audio circuitry 160 converts received audio data into electrical signals, which are then transmitted to speaker 161, where they are converted into sound signals for output. Conversely, microphone 162 converts collected sound signals into electrical signals, which are received by audio circuitry 160, converted back into audio data, and then processed by processor 180 before being transmitted via RF circuitry 110 to, for example, another terminal, or output to memory 120 for further processing. Audio circuitry 160 may also include an earphone jack to facilitate communication between peripheral headphones and terminal device 1200.

[0134] Terminal device 1200, through transmission module 170 (e.g., Wi-Fi module), can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 5 The transmission module 170 is shown, but it is understood that it is not a necessary component of the terminal device 1200 and can be omitted as needed without changing the nature of the invention.

[0135] The processor 180 is the control center of the terminal device 1200. It connects to various parts of the mobile phone via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 120, and by calling data stored in the memory 120, it performs various functions of the terminal device 1200 and processes data, thereby providing overall monitoring of the mobile phone. Optionally, the processor 180 may include one or more processing cores; in some embodiments, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 180.

[0136] The terminal device 1200 also includes a power supply 190 that supplies power to the various components. In some embodiments, the power supply can be logically connected to the processor 180 through a power management system, thereby enabling functions such as discharge management and power consumption management through the power management system. The power supply 190 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0137] Although not shown, the terminal device 1200 may also include a camera (such as a front-facing camera and a rear-facing camera), a Bluetooth module, etc., which will not be described in detail here. Specifically, in this embodiment, the display unit 140 of the terminal device 1200 is a touch screen display, and the terminal device 1200 also includes a memory 120 and one or more programs, one or more of which are stored in the memory 120 and configured to be executed by one or more processors 180. One or more programs contain instructions for performing the following operations:

[0138] The first acquisition instruction is used to acquire a glare video containing the face to be detected, wherein the glare video is video data of the face to be detected recorded in a glare environment;

[0139] The image selection instruction is used to select several key video frame images from the glare video and arrange them in chronological order of recording time to obtain a video frame image sequence, wherein the video frame image sequence is divided into several sequence groups, and each sequence group contains the same number of video frames.

[0140] The second acquisition instruction is used to acquire the target face region of each key video frame image in the video frame image sequence;

[0141] Information extraction instructions are used to extract the color information of each of the target face regions and determine the key color information corresponding to each sequence group;

[0142] The result judgment instruction is used to determine whether the key color information corresponding to each sequence group in the video frame image sequence corresponds to the preset backlight activation order, and to obtain the judgment result of whether the face to be detected in the glare video passes the identity detection.

[0143] This application also provides a storage medium storing a computer program. When the computer program is run on a computer, the computer executes the identity detection method for reducing attack risks described in any of the above embodiments.

[0144] It should be noted that, regarding the identity detection method for reducing attack risk described in this application, those skilled in the art will understand that implementing all or part of the process of the identity detection method for reducing attack risk described in the embodiments of this application can be accomplished by a computer program controlling related hardware. The computer program can be stored in a computer-readable storage medium, such as in the memory of a terminal device, and executed by at least one processor within the terminal device. During execution, it can include the process of the embodiments of the identity detection method for reducing attack risk. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), etc.

[0145] For the identity detection device for reducing attack risks described in this application embodiment, its functional modules can be integrated into a single processing chip, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0146] The foregoing has provided a detailed description of the identity detection method, apparatus, medium, and device for reducing attack risks provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the methods and core ideas of this application; furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. An identity detection method to reduce the risk of attack, characterized in that, include: Acquire a glare video containing the face to be detected, wherein the glare video is video data recorded by the face to be detected in a glare environment; Several key video frame images are selected from the glare video and arranged in chronological order of recording time to obtain a video frame image sequence, wherein the video frame image sequence is divided into several sequence groups, and each sequence group contains the same number of video frames. The target face region of each key video frame in the video frame image sequence is obtained respectively; The mean values ​​of the RGB three color channels of each target face region are extracted to construct a mean sequence for each sequence group. A DCT transform is performed on the mean sequence to convert the signal from the time domain to the frequency domain. The signal-to-noise ratio (SNR) of each of the RGB three color channels in the same sequence group is calculated to obtain the R SNR, G SNR, and B SNR. The color channel corresponding to the largest of the R SNR, G SNR, and B SNR is taken as the key color information for the same sequence group. Determine whether the key color information corresponding to each sequence group in the video frame image sequence corresponds to the preset backlight activation order, and obtain the judgment result of whether the face to be detected in the glare video passes the identity detection.

2. The identity detection method as described in claim 1, characterized in that, The step of obtaining the target face region of each key video frame image in the video frame image sequence includes: Determine the preset face detection bounding box for each key video frame in the video frame image sequence; Based on the position of the face detection box on the key video frame image, the key video frame image is cropped along the boundary of the face detection box to obtain the region to be identified in each key video frame image; Each of the regions to be identified is input into the trained face region extraction model to perform face region extraction operations, and the coordinates of facial key points in each region to be identified are extracted. The target face region of each key video frame image is obtained based on the coordinates of the facial key points.

3. The identity detection method as described in claim 2, characterized in that, The step of determining the face detection bounding box for each key video frame in the video frame image sequence includes: Each key video frame image is input into the trained face localization network model, and the output is the face heat map, face scale map and face center offset map of each key video frame image. The facial coordinate offset is obtained at the corresponding position of the facial region on the facial center offset map, and added to the coordinates of the facial heat map to obtain the position of the facial center point. The width and height of the face are calculated by exponential conversion on the face scale map to obtain the face detection box, and then duplicate face detection boxes are removed by nonmaximum suppression.

4. The identity detection method as described in claim 3, characterized in that, The method further includes: The face detection frame is expanded outwards in all directions according to a predetermined ratio.

5. The identity detection method as described in claim 2, characterized in that, The step of obtaining the target face region of each key video frame image based on the coordinates of the facial key points includes: Based on the coordinates of the facial key points, generate each facial contour map, which includes the facial region and the non-facial region respectively. Each of the aforementioned face contour images is filled with 255 pixel values ​​based on the coordinates of the key facial points to generate a corresponding face region mask; Each face region mask is multiplied by its corresponding key video frame image to obtain each target face region with non-face regions removed.

6. The identity detection method as described in claim 1, characterized in that, After obtaining the determination result of whether the face to be detected in the glare video passes the identity detection, the method further includes: If the determination result is that the face to be detected in the glare video fails the identity detection, then the abnormal face detected in the glare video is screenshotted, and a prompt message containing the abnormal face is generated.

7. An identity detection device for reducing the risk of attack, characterized in that, The identity detection device for reducing the risk of attacks includes: The first acquisition module is used to acquire a glare video containing the face to be detected, wherein the glare video is video data of the face to be detected recorded in a glare environment; The image selection module is used to select several key video frame images from the glare video and arrange them in chronological order of recording time to obtain a video frame image sequence, wherein the video frame image sequence is divided into several sequence groups, and each sequence group contains the same number of video frames. The second acquisition module is used to acquire the target face region of each key video frame image in the video frame image sequence; The information extraction module is used to extract the mean values ​​of the three RGB color channels of each target face region to construct a mean sequence for each sequence group; perform DCT transformation on the mean sequence to convert the signal time domain of the mean sequence to the frequency domain; calculate the signal-to-noise ratio (SNR) of each of the three RGB color channels in the same sequence group to obtain the R SNR, G SNR, and B SNR; and take the color channel corresponding to the largest of the R SNR, G SNR, and B SNR as the key color information of the same sequence group. The result judgment module is used to determine whether the key color information corresponding to each sequence group in the video frame image sequence corresponds to the preset backlight turn-on order, and to obtain the judgment result of whether the face to be detected in the glare video passes the identity detection.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to execute the identity detection method for reducing attack risk as described in any one of claims 1 to 6.

9. A terminal device, characterized in that, The device includes a processor and a memory, the memory storing multiple instructions, and the processor loading the instructions to execute the identity detection method for reducing the risk of attack as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Lightweight living body detection method

    CN112163539A

  • Face living body detection method and system

    CN115546874A

  • Identity detection method and device based on face image, medium and equipment

    CN115761867A