Video injection attack detection method and device

By obtaining and comparing the preview video stream and the to-be-detected video stream of the terminal device in the identity recognition system, the problem of insufficient detection capabilities of injected video attacks is solved, and high-accuracy attack identification and protection are achieved.

CN113850211BActive Publication Date: 2024-08-23ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111151257.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-29
Publication Date
2024-08-23
Estimated Expiration
2041-09-29

AI Technical Summary

Technical Problem

Existing identity recognition systems cannot effectively detect injected video attacks, resulting in compromised security.

Method used

By obtaining at least two video streams in the terminal device, including the displayed preview video stream and the sent video stream to be detected, the target face or image is selected respectively, and similarity comparison is performed to determine whether the video stream to be detected is based on the similarity. Video stream for the injection attack.

Benefits of technology

It achieves accurate detection of injected video attacks and ensures the security of the identity recognition system without user perception and high anti-injection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113850211B
    Figure CN113850211B
Patent Text Reader

Abstract

The embodiments of this specification disclose a method and device for detecting injection video attacks. The method includes: when performing face recognition, obtaining at least two video streams of a terminal device, the at least two video streams include a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, the preview video stream is generated based on continuous frame face images taken by the terminal device of the object to be detected; selecting target face images from the at least two video streams respectively; performing similarity comparison on the selected target face images to obtain the similarity between the target face images in each video stream; based on the similarity between the target face images in each video stream, determining whether the video stream to be detected is an injection attack video stream.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of computer technology, and more particularly to a method and device for detecting injection video attacks. Background Art

[0002] In the identity recognition system, the terminal device collects user images (such as face images) for identification. However, in this process, illegal users often use the images injected into the video to attack the identity recognition system through video injection attacks. However, the current identity recognition system is powerless against this new type of attack. Therefore, in order to ensure the security of the identity recognition system, a solution that can detect video injection attacks is urgently needed. Summary of the invention

[0003] The purpose of the embodiments of this specification is to provide a method and device for detecting injected video attacks, so as to accurately detect injected video attacks and solve the problem that the existing identity recognition system has no detection capability for injected video attacks.

[0004] In order to achieve the above purpose, the embodiments of this specification adopt the following technical solutions:

[0005] In a first aspect, a method for detecting an injection video attack is provided, comprising:

[0006] When performing face recognition, obtaining at least two video streams of a terminal device, the at least two video streams comprising a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, the preview video stream being generated based on continuous frame face images taken by the terminal device of the object to be detected;

[0007] Selecting target face images from the at least two video streams respectively;

[0008] Perform similarity comparison on the selected target face images to obtain the similarity between the target face images in each video stream;

[0009] Based on the similarity between the target face images in each video stream, it is determined whether the video stream to be detected is an injection attack video stream.

[0010] In a second aspect, a method for detecting an injection video attack is provided, comprising:

[0011] When performing biometric feature recognition, obtaining at least two video streams of a terminal device, the at least two video streams comprising a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, the preview video stream being generated based on continuous frame images taken by the terminal device of the object to be detected;

[0012] Selecting target images from the at least two video streams respectively;

[0013] Perform similarity comparison on the selected target images to obtain the similarity between the target images in each video stream;

[0014] Based on the similarity between the target images in each video stream, it is determined whether the video stream to be detected is an injection attack video stream.

[0015] In a third aspect, a video injection attack detection device is provided, comprising:

[0016] A first video stream acquisition unit, when performing face recognition, acquires at least two video streams of a terminal device, wherein the at least two video streams include a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, wherein the preview video stream is generated based on continuous frame face images taken by the terminal device of the object to be detected;

[0017] A first image selection unit selects target face images from the at least two video streams respectively;

[0018] A first similarity comparison unit performs similarity comparison on the selected target face images to obtain similarities between the target face images in each video stream;

[0019] The first injection attack detection unit determines whether the video stream to be detected is an injection attack video stream based on the similarity between the target face images in each video stream.

[0020] In a fourth aspect, a video injection attack detection device is provided, comprising:

[0021] A second video stream acquisition unit, when performing biometric feature recognition, acquires at least two video streams of a terminal device, wherein the at least two video streams include a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, wherein the preview video stream is generated based on continuous frame images taken by the terminal device of the object to be detected;

[0022] A second image selection unit selects target images from the at least two video streams respectively;

[0023] A second similarity comparison unit performs similarity comparison on the selected target images to obtain similarities between the target images in each video stream;

[0024] The second injection attack detection unit determines whether the video stream to be detected is an injection attack video stream based on the similarity between the target images in the video streams.

[0025] In a fifth aspect, an electronic device is provided, including:

[0026] Processor; and

[0027] a memory arranged to store computer executable instructions which, when executed, cause the processor to:

[0028] When performing face recognition, obtaining at least two video streams of a terminal device, the at least two video streams comprising a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, the preview video stream being generated based on continuous frame face images taken by the terminal device of the object to be detected;

[0029] Selecting target face images from the at least two video streams respectively;

[0030] Perform similarity comparison on the selected target face images to obtain the similarity between the target face images in each video stream;

[0031] Based on the similarity between the target face images in each video stream, it is determined whether the video stream to be detected is an injection attack video stream.

[0032] In a sixth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by an electronic device including a plurality of application programs, the electronic device performs the following operations:

[0033] When performing face recognition, obtaining at least two video streams of a terminal device, the at least two video streams comprising a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, the preview video stream being generated based on continuous frame face images taken by the terminal device of the object to be detected;

[0034] Selecting target face images from the at least two video streams respectively;

[0035] Perform similarity comparison on the selected target face images to obtain the similarity between the target face images in each video stream;

[0036] Based on the similarity between the target face images in each video stream, it is determined whether the video stream to be detected is an injection attack video stream.

[0037] In a seventh aspect, an electronic device is provided, including:

[0038] Processor; and

[0039] a memory arranged to store computer executable instructions which, when executed, cause the processor to:

[0040] When performing biometric feature recognition, obtaining at least two video streams of a terminal device, the at least two video streams comprising a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, the preview video stream being generated based on continuous frame images taken by the terminal device of the object to be detected;

[0041] Selecting target images from the at least two video streams respectively;

[0042] Perform similarity comparison on the selected target images to obtain the similarity between the target images in each video stream;

[0043] Based on the similarity between the target images in each video stream, it is determined whether the video stream to be detected is an injection attack video stream.

[0044] In an eighth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by an electronic device including a plurality of application programs, the electronic device performs the following operations:

[0045] When performing biometric feature recognition, obtaining at least two video streams of a terminal device, the at least two video streams comprising a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, the preview video stream being generated based on continuous frame images taken by the terminal device of the object to be detected;

[0046] Selecting target images from the at least two video streams respectively;

[0047] Perform similarity comparison on the selected target images to obtain the similarity between the target images in each video stream;

[0048] Based on the similarity between the target images in each video stream, it is determined whether the video stream to be detected is an injection attack video stream.

[0049] In the scheme of the embodiments of the present specification, since the preview video stream displayed by the terminal device and the video stream to be detected sent by the terminal device are similar during the normal identity recognition process, the images in these two video streams are similar. Moreover, when performing identity recognition, the injection video attack usually occurs on the link between the image acquisition device of the terminal device and the client performing identity recognition. Therefore, by separately acquiring at least two video streams, such as the preview video stream displayed by the terminal device and the video stream to be detected sent by the terminal device, based on the similarity between the images in each acquired video stream, it is possible to distinguish well whether the video stream to be detected sent by the terminal device is an injection attack video stream or a real shot video stream, thereby solving the problem that the existing identity recognition system has no detection capability for injection video attacks, and has the characteristics of being unaware to the user and having a high anti-injection accuracy rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:

[0051] Figure 1 A schematic diagram of an implementation environment applicable to a method for detecting an injection video attack provided by an embodiment of this specification;

[0052] Figure 2 A flowchart of a method for detecting an injection video attack provided by an embodiment of this specification;

[0053] Figure 3 A flowchart of a method for detecting an injection video attack is provided as another embodiment of the present specification;

[0054] Figure 4 A flowchart of a method for detecting an injection video attack is provided as another embodiment of the present specification;

[0055] Figure 5 A schematic diagram of the structure of a video injection attack detection device provided by an embodiment of this specification;

[0056] Figure 6 A schematic diagram of the structure of a video injection attack detection device provided by another embodiment of the present specification;

[0057] Figure 7 A schematic diagram of the structure of an electronic device provided for one embodiment of the present specification. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solutions and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.

[0059] As mentioned above, during the identification process, illegal users often attack by injecting videos, such as generating videos containing various actions through software, and then injecting the videos to attack the face recognition system. However, the current identification system is powerless against this type of new attack method. In order to solve the problem that the existing identification system has no detection capability for injected video attacks, the embodiments of this specification provide a method and device for detecting injected video attacks, which are described below.

[0060] It should be understood that the video injection attack detection method provided in the embodiments of this specification may be executed by an electronic device or software installed in an electronic device, and may be specifically executed by a terminal device.

[0061] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.

[0062] First combine Figure 1 The implementation environment applicable to a method for detecting an injection video attack provided by an embodiment of this specification is described. Figure 1 As shown, an implementation environment applicable to a method for detecting an injected video attack according to an embodiment of the present specification may include a terminal device 1, wherein a client (which may be an APP or a web client) that requires identity recognition (such as face recognition, biometric recognition, etc.) may be installed in the terminal device 1. The terminal device 1 may include, for example, but is not limited to: any one of smart terminal devices such as a smartphone, a personal computer (PC), a laptop computer, a tablet computer, an e-reader, an Internet TV, a wearable device, etc.

[0063] In the embodiment of the present specification, the terminal device 1 has an image acquisition device 11 (such as a camera) and a display device (12). The image acquisition device 11 can shoot the object to be detected to obtain a video stream containing continuous frame images (such as continuous frame facial images). Afterwards, on the one hand, the image acquisition device 11 can send the video stream to the display device 12, and the display device 12 generates and displays a video stream for user preview based on the continuous frame images; on the other hand, the image acquisition device 11 can send the video stream to a client that needs to perform identity recognition, and the client performs identity recognition on the object to be detected based on the video stream from the image acquisition device 11. It should be noted that, for the sake of distinction, in the embodiment of the present specification, the video stream displayed by the display device 12 for user preview is referred to as a "preview video stream", and the video stream shot and sent by the image acquisition device 11 is referred to as a "video stream to be detected".

[0064] An injected video attack is an attack in which an attacker intercepts normal data in a link (in the embodiment of this specification, it is the video stream to be detected actually shot by the terminal device, or more specifically, the video stream to be detected actually shot by the image acquisition device of the terminal device) and replaces it with another copy of the data (in the embodiment of this specification, it is the injected video stream), thereby tampering with the data stream.

[0065] Since in the normal identification process, the video streams transmitted by the image acquisition device 11 to the display device 12 and the client for identification are the same, or the preview video stream displayed by the terminal device 1 is similar to the video stream to be detected sent by the terminal device 1, the images in these two video streams are similar. Moreover, when performing identity identification, the injection video attack usually occurs on the link between the image acquisition device 11 and the client for identification. Therefore, by respectively acquiring at least two video streams, such as the preview video stream displayed by the terminal device 1 and the video stream to be detected sent by the terminal device 1, based on the similarity between the images in each acquired video stream, it is possible to distinguish well whether the video stream to be detected sent by the terminal device 1 is an injection attack video stream or a real shot video stream, thereby solving the problem that the existing identity recognition system has no detection capability for injection video attacks, and has the characteristics of being imperceptible to the user and having a high anti-injection accuracy.

[0066] based on Figure 1 The implementation environment shown is Figure 2 As shown, an embodiment of this specification provides a method for detecting injection video attacks. Figure 2 , is a flow chart of a method for detecting an injection video attack provided by an embodiment of the present specification, the method may include:

[0067] S202, when performing face recognition, obtaining at least two video streams of the terminal device.

[0068] In an embodiment of the present specification, at least two video streams include a preview video stream displayed by a terminal device and a video stream to be detected sent by the terminal device, wherein the preview video stream is generated based on continuous frame facial images taken by the terminal device of the object to be detected.

[0069] In order to more conveniently obtain at least two video streams of the terminal device, a face acquisition software development kit (SDK) can be pre-installed in the terminal device. The SDK can provide the ability to obtain video streams from different video stream links of the terminal device, select appropriate target face images from the video streams, and communicate with the server. Figure 3As shown, in the above S202, the terminal device can call the above-mentioned built-in face acquisition SDK to obtain the preview video stream displayed by the display device from the display device of the terminal device, and call the face acquisition SDK to receive the video stream to be detected captured and output by the image acquisition device of the terminal device.

[0070] Of course, in practical applications, the at least two video streams mentioned above may also include video streams transmitted on the links between the image acquisition device of the terminal device and other components of the terminal device, and this specification embodiment does not specifically limit this. Accordingly, the terminal device may also call the built-in face acquisition SDK to obtain the corresponding video streams from these links.

[0071] S204: Select target face images from at least two video streams respectively.

[0072] In the embodiments of this specification, for each video stream, a target facial image can be selected from the video stream respectively, wherein the target facial image selected from the video stream can be a partial frame facial image or all frame facial images contained in the video stream.

[0073] In an optional implementation, for a target video stream in at least two video streams, a target face image is selected from the target video stream according to the playback order of the face images contained in the target video stream, wherein the target video stream refers to any one of the at least two video streams.

[0074] In another optional implementation, in order to improve the accuracy of detecting the injected video attack, the above S204 may include the following steps:

[0075] Step A1: for a target video stream in at least two video streams, extract key image features of each frame of face image contained in the target video stream.

[0076] In the embodiments of this specification, the key image features of the face image may include the features of the key points of the face in the face image, wherein the key points of the face may include, but are not limited to, at least one point of the eyes, nose, eyebrows, mouth, forehead, and facial contour. Specifically, the key image features of each frame of face image can be extracted from each frame of face image by various feature extraction algorithms known to those skilled in the art, and this embodiment of this specification does not specifically limit this.

[0077] Step A2, determining the image quality of each frame of face image contained in the target video stream based on the key image features of each frame of face image.

[0078] Specifically, for each frame of facial images, the quality parameters such as light, occlusion, angle, completeness, blurriness, etc. of the face in the frame of facial image can be determined based on the key image features of the frame of facial image, and the image quality of the frame of facial image can be further determined based on the quality parameters of the face in the frame of facial image.

[0079] It should be noted that determining the quality parameters of the face in the face image based on the key image features of the face image and determining the image quality of the face image based on the quality parameters of the face can be achieved in various ways known to those skilled in the art, such as artificial intelligence algorithms, etc., and the embodiments of this specification do not specifically limit this.

[0080] Step A3, selecting at least one frame of face image whose image quality meets a preset quality condition from the continuous frames of face images included in the target video stream, and determining it as the target face image in the target video stream.

[0081] The preset quality condition can be set according to actual needs, and the embodiments of this specification do not specifically limit this. For example, the preset quality condition can be set as a quality score threshold, and if the image quality score of a frame of face image reaches the quality score threshold, the frame of face image is determined as the target face image in the frame of face image.

[0082] S206, performing a similarity comparison on the selected target face images to obtain the similarity between the target face images in each video stream.

[0083] Specifically, the key image features can be extracted from the target face images selected from each video stream, and then the similarity between the target face images in each video stream can be determined by comparing the similarity between the key image features of the target face images in each video stream.

[0084] Of course, it should be understood that the determination of the similarity between the target facial images in each video stream may also be achieved by other methods known to those skilled in the art, and the embodiments of this specification do not specifically limit this.

[0085] S208: Determine whether the video stream to be detected is an injection attack video stream based on the similarity between the target face images in each video stream.

[0086] Since the video streams captured and sent to each link by the image acquisition device of the terminal device in the normal identification process are similar, and thus the images in each video stream are similar. If the similarity between the target face images in each video stream is less than the preset similarity threshold, the video stream to be detected sent by the terminal device is determined to be an injection attack video stream; if the similarity between the target face images in each video stream is greater than or equal to the preset similarity threshold, the video stream to be detected is determined to be a real shot video stream.

[0087] The method for detecting injected video attacks provided in the embodiments of this specification is similar to the preview video stream displayed by the terminal device and the video stream to be detected sent by the terminal device during normal identity recognition. In addition, when performing identity recognition, the injected video attack usually occurs on the link between the image acquisition device of the terminal device and the client performing identity recognition. Therefore, by separately acquiring at least two video streams, such as the preview video stream displayed by the terminal device and the video stream to be detected sent by the terminal device, based on the similarity between the images in each acquired video stream, it is possible to distinguish well whether the video stream to be detected sent by the terminal device is an injected attack video stream or a real shot video stream, thereby solving the problem that the existing identity recognition system has no detection capability for injected video attacks, and has the characteristics of being unaware to the user and having a high anti-injection accuracy rate.

[0088] Optionally, after the above S208, the injection video attack detection method provided by the embodiment of this specification may also include: in the case of determining that the video stream to be detected is an injection attack video stream, performing at least one of the following operations: discarding the video stream to be detected, instructing the terminal device to reshoot and send the video stream to be detected, and outputting injection video attack alarm information. The injection video attack alarm information is used to remind the user that the video stream to be detected sent by the terminal device is subjected to an injection video attack. In addition, the form of the injection video attack alarm information may include, for example, but is not limited to, a combination of one or more of the following forms: text, voice, light, vibration, etc.

[0089] It can be understood that, in the case where the video stream to be detected is determined to be an injection attack video stream, by performing at least one of the above operations, the injection video attack can be accurately prevented.

[0090] Optionally, after the above S208, the video injection attack detection method provided by the embodiment of this specification may further include: when it is determined that the video stream to be detected is a real video stream, based on the video stream to be detected and preset sample face data, identifying the identity of the object to be detected.

[0091] Specifically, optionally, the terminal device can communicate and exchange data with the server located at the back end through the above-mentioned built-in face acquisition SDK to obtain sample face data from the server, and identify the identity information of the object to be detected by comparing the key image features of the face images of some frames or all frames in the video stream to be detected with the sample face data.

[0092] Optionally, the terminal device can also access a pre-configured database storing sample face data through the above-mentioned built-in face acquisition SDK to obtain the sample face data from the database, and identify the identity information of the object to be detected by comparing the key image features of the face images of some or all frames in the video stream to be detected with the sample face data.

[0093] Of course, in some other optional solutions, the terminal device can also communicate and exchange data with the server at the back end through the above-mentioned built-in face acquisition SDK, and send the video stream to be detected to the server. The server will compare the key image features of the face images of some or all frames in the video stream to be detected with the sample face data locally stored on the server to identify the identity information of the object to be detected, and return the identity recognition result to the terminal device.

[0094] Optionally, in order to further prevent illegal users from forging facial images of legitimate users (for example, using photos of legitimate users, face swapping, masks, occlusions, and screen reshoots, etc.) to deceive facial recognition devices, the above-mentioned identification of the object to be detected based on the video stream to be detected and preset sample facial data includes: performing liveness detection on the video stream to be detected based on a preset liveness detection algorithm to determine whether the video stream to be detected is a liveness video stream; if so, identifying the object to be detected based on continuous frame facial images and sample facial data contained in the video stream to be detected.

[0095] It should be noted that the above-mentioned liveness detection algorithm can be various liveness detection algorithms known to those skilled in the art, such as infrared liveness algorithm, RGB liveness algorithm, etc., and the embodiments of this specification do not specifically limit this.

[0096] It can be understood that when it is determined that the video stream to be detected is a real video stream, the identity of the object to be detected can be identified by using the video stream to be detected and the sample face data. This can prevent the attack video stream injected by illegal users from deceiving the identity recognition system and endangering the property, person, safety, etc. of legitimate users, thereby ensuring the accuracy and reliability of the identity recognition results.

[0097] Please refer to Figure 4 , is a flow chart of a method for detecting an injection video attack provided by another embodiment of the present specification, the method may include:

[0098] S402, when performing biometric identification, obtaining at least two video streams of the terminal device.

[0099] In the embodiment of the present specification, at least two video streams include a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, wherein the preview video stream is generated based on continuous frame images taken by the terminal device of the object to be detected.

[0100] It should be noted that the biometric features in the embodiments of this specification may include, for example, but not limited to, face, iris, fingerprint, palm print, gait, etc. In the process of biometric identification, the continuous frame images captured by the terminal device may include other images besides face images, such as hand images, eye images, finger images, full body images, etc., which can be selected according to the actual biometric identification needs, and the embodiments of this specification do not specifically limit this.

[0101] S404: Select target images from at least two video streams respectively.

[0102] S406: Perform similarity comparison on the selected target images to obtain similarities between the target images in each video stream.

[0103] S408: Determine whether the video stream to be detected is an injection attack video stream based on the similarity between the target images in each video stream.

[0104] It should be noted that the specific implementation process of the above S402 to S408 is the same as Figure 2 The specific implementation process of the corresponding steps in the embodiment shown is similar, and the specific implementation process can be referred to the above Figure 2 The description of the illustrated embodiment will not be repeated here.

[0105] The method for detecting injected video attacks provided in the embodiments of this specification is similar to the preview video stream displayed by the terminal device and the video stream to be detected sent by the terminal device during normal identity recognition. In addition, when performing identity recognition, the injected video attack usually occurs on the link between the image acquisition device of the terminal device and the client performing identity recognition. Therefore, by separately acquiring at least two video streams, such as the preview video stream displayed by the terminal device and the video stream to be detected sent by the terminal device, based on the similarity between the images in each acquired video stream, it is possible to distinguish well whether the video stream to be detected sent by the terminal device is an injected attack video stream or a real shot video stream, thereby solving the problem that the existing identity recognition system has no detection capability for injected video attacks, and has the characteristics of being unaware to the user and having a high anti-injection accuracy rate.

[0106] In addition, Figure 2Corresponding to the injected video attack detection method shown, the embodiment of this specification also provides an injected video attack detection device. Figure 5 is a structural diagram of a video injection attack detection device 500 provided in an embodiment of this specification, including:

[0107] The first video stream acquisition unit 510 acquires at least two video streams of a terminal device when performing face recognition, wherein the at least two video streams include a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, wherein the preview video stream is generated based on continuous frame face images taken by the terminal device of the object to be detected;

[0108] A first image selection unit 520 selects target face images from the at least two video streams respectively;

[0109] A first similarity comparison unit 530 performs similarity comparison on the selected target face images to obtain similarities between the target face images in each video stream;

[0110] The first injection attack detection unit 540 determines whether the video stream to be detected is an injection attack video stream based on the similarity between the target face images in each video stream.

[0111] The injection video attack detection device provided in the embodiment of this specification is similar to the preview video stream displayed by the terminal device and the video stream to be detected sent by the terminal device during the normal identity recognition process, so the images in these two video streams are similar. In addition, when performing identity recognition, the injection video attack usually occurs on the link between the image acquisition device of the terminal device and the client performing identity recognition. Therefore, by respectively acquiring at least two video streams, such as the preview video stream displayed by the terminal device and the video stream to be detected sent by the terminal device, based on the similarity between the images in each acquired video stream, it is possible to distinguish well whether the video stream to be detected sent by the terminal device is an injection attack video stream or a real shot video stream, thereby solving the problem that the existing identity recognition system has no detection capability for injection video attacks, and has the characteristics of being unaware to the user and having a high anti-injection accuracy rate.

[0112] Optionally, the first image selection unit 520 extracts key image features of each frame of facial images contained in the target video stream of the at least two video streams, determines the image quality of each frame of facial images contained in the target video stream based on the key image features of each frame of facial images, and selects at least one frame of facial image whose image quality meets a preset quality condition from the continuous frames of facial images contained in the target video stream, and determines it as the target facial image in the target video stream.

[0113] Optionally, the first similarity comparison unit 530 determines that the video stream to be detected is an injection attack video stream when the similarity between the target face images in each video stream is less than a preset similarity threshold, and determines that the video stream to be detected is a real shot video stream when the similarity between the target face images in at least two video streams is greater than or equal to the preset similarity threshold.

[0114] Optionally, the device further comprises:

[0115] The first operation execution unit performs at least one of the following operations when the video stream to be detected is an injection attack video stream: discarding the video stream to be detected, instructing the terminal device to reshoot and send the video stream to be detected, and outputting injection video attack alarm information.

[0116] Optionally, the device further comprises:

[0117] The first identity recognition unit performs identity recognition on the object to be detected based on the video stream to be detected and preset sample face data when the video stream to be detected is a real video stream.

[0118] Optionally, the first identity recognition unit performs liveness detection on the video stream to be detected based on a preset liveness detection algorithm to determine whether the video stream to be detected is a liveness video stream; if so, performs identity recognition on the object to be detected based on continuous frame face images and the sample face data contained in the video stream to be detected.

[0119] Optionally, the first video stream acquisition unit 510 calls the face acquisition software development kit SDK built into the terminal device to acquire the preview video stream displayed by the display device from the display device of the terminal device, and calls the face acquisition SDK built into the terminal device to receive the video stream to be detected captured and output by the image acquisition device of the terminal device.

[0120] Obviously, the video injection attack detection device of the embodiment of this specification can be used as the above Figure 2 The execution body of the injection video attack detection method shown in FIG. Figure 2 The functions realized are as follows. Since the principles are the same, they will not be described here.

[0121] In addition, Figure 4 Corresponding to the injected video attack detection method shown, the embodiment of this specification also provides an injected video attack detection device. Figure 6 6 is a schematic diagram of a structure of an injection video attack detection device 600 provided in an embodiment of the present specification, including:

[0122] The second video stream acquisition unit 610 acquires at least two video streams of a terminal device when performing biometric feature recognition, wherein the at least two video streams include a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, wherein the preview video stream is generated based on continuous frame images taken by the terminal device of the object to be detected;

[0123] A second image selection unit 620 selects target images from the at least two video streams respectively;

[0124] The second similarity comparison unit 630 performs similarity comparison on the selected target images to obtain the similarity between the target images in each video stream;

[0125] The second injection attack detection unit 640 determines whether the video stream to be detected is an injection attack video stream based on the similarity between the target images in each video stream.

[0126] The injection video attack detection device provided in the embodiment of this specification is similar to the preview video stream displayed by the terminal device and the video stream to be detected sent by the terminal device during the normal identity recognition process, so the images in these two video streams are similar. In addition, when performing identity recognition, the injection video attack usually occurs on the link between the image acquisition device of the terminal device and the client performing identity recognition. Therefore, by respectively acquiring at least two video streams, such as the preview video stream displayed by the terminal device and the video stream to be detected sent by the terminal device, based on the similarity between the images in each acquired video stream, it is possible to distinguish well whether the video stream to be detected sent by the terminal device is an injection attack video stream or a real shot video stream, thereby solving the problem that the existing identity recognition system has no detection capability for injection video attacks, and has the characteristics of being unaware to the user and having a high anti-injection accuracy rate.

[0127] Optionally, the second image selection unit 620 extracts key image features of each frame image contained in the target video stream of the at least two video streams, determines the image quality of each frame image contained in the target video stream based on the key image features of each frame image, and selects at least one frame image whose image quality meets a preset quality condition from the continuous frame images contained in the target video stream, and determines it as the target image in the target video stream.

[0128] Optionally, the second similarity comparison unit 630 determines that the video stream to be detected is an injection attack video stream when the similarity between the target images in each video stream is less than a preset similarity threshold, and determines that the video stream to be detected is a real shot video stream when the similarity between the target images in at least two video streams is greater than or equal to the preset similarity threshold.

[0129] Optionally, the device further comprises:

[0130] The second operation execution unit performs at least one of the following operations when the video stream to be detected is an injection attack video stream: discarding the video stream to be detected, instructing the terminal device to reshoot and send the video stream to be detected, and outputting injection video attack alarm information.

[0131] Optionally, the device further comprises:

[0132] The second identity recognition unit performs identity recognition on the object to be detected based on the video stream to be detected and preset sample biometric data when the video stream to be detected is a real video stream.

[0133] Optionally, the second identity recognition unit performs liveness detection on the video stream to be detected based on a preset liveness detection algorithm to determine whether the video stream to be detected is a liveness video stream; if so, performs identity recognition on the object to be detected based on continuous frame images contained in the video stream to be detected and the sample biometric data.

[0134] Optionally, the second video stream acquisition unit 610 calls the biometric acquisition software development kit SDK built into the terminal device to obtain the preview video stream displayed on the display device of the terminal device, and calls the biometric acquisition SDK built into the terminal device to receive the video stream to be detected captured and output by the image acquisition device of the terminal device.

[0135] Obviously, the video injection attack detection device of the embodiment of this specification can be used as the above Figure 4 The execution body of the injection video attack detection method shown in FIG. Figure 4 The functions realized are as follows. Since the principles are the same, they will not be described here.

[0136] Figure 7 This is a schematic diagram of the structure of an electronic device according to an embodiment of this specification. Figure 7 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.

[0137] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0138] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.

[0139] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming an injection video attack detection device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:

[0140] When performing face recognition, obtaining at least two video streams of a terminal device, the at least two video streams comprising a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, the preview video stream being generated based on continuous frame face images taken by the terminal device of the object to be detected;

[0141] Selecting target face images from the at least two video streams respectively;

[0142] Perform similarity comparison on the selected target face images to obtain the similarity between the target face images in each video stream;

[0143] Based on the similarity between the target face images in each video stream, it is determined whether the video stream to be detected is an injection attack video stream.

[0144] Alternatively, the processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming an abnormal group identification device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:

[0145] When performing biometric feature recognition, obtaining at least two video streams of a terminal device, the at least two video streams comprising a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, the preview video stream being generated based on continuous frame images taken by the terminal device of the object to be detected;

[0146] Selecting target images from the at least two video streams respectively;

[0147] Perform similarity comparison on the selected target images to obtain the similarity between the target images in each video stream;

[0148] Based on the similarity between the target images in each video stream, it is determined whether the video stream to be detected is an injection attack video stream.

[0149] The above is as in this manual Figure 2 or Figure 4 The method performed by the injection video attack detection device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of this specification can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of this specification can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0150] It should be understood that the electronic device of the embodiment of this specification can implement the injection video attack detection device in Figure 2 or Figure 4 Functions of the embodiments shown. Since the principles are the same, the embodiments of this specification will not be described in detail here.

[0151] Of course, in addition to software implementation, the electronic device of this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0152] The embodiment of the present specification also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by a portable electronic device including a plurality of application programs, enable the portable electronic device to execute Figure 2 The method of the embodiment shown is specifically used to perform the following operations:

[0153] When performing face recognition, obtaining at least two video streams of a terminal device, the at least two video streams comprising a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, the preview video stream being generated based on continuous frame face images taken by the terminal device of the object to be detected;

[0154] Selecting target face images from the at least two video streams respectively;

[0155] Perform similarity comparison on the selected target face images to obtain the similarity between the target face images in each video stream;

[0156] Based on the similarity between the target face images in each video stream, it is determined whether the video stream to be detected is an injection attack video stream.

[0157] Alternatively, when the above instructions are executed by a portable electronic device including a plurality of application programs, the portable electronic device can execute Figure 4 The method of the embodiment shown is specifically used to perform the following operations:

[0158] When performing biometric feature recognition, obtaining at least two video streams of a terminal device, the at least two video streams comprising a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, the preview video stream being generated based on continuous frame images taken by the terminal device of the object to be detected;

[0159] Selecting target images from the at least two video streams respectively;

[0160] Perform similarity comparison on the selected target images to obtain the similarity between the target images in each video stream;

[0161] Based on the similarity between the target images in each video stream, it is determined whether the video stream to be detected is an injection attack video stream.

[0162] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0163] In short, the above description is only a preferred embodiment of this specification and is not intended to limit the protection scope of this specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in the protection scope of this specification.

[0164] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer.

[0165] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0166] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0167] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

Claims

1. A method for detecting an injection video attack, comprising: When performing face recognition, obtaining at least two video streams of a terminal device, the at least two video streams comprising a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, the preview video stream being generated based on continuous frame face images taken by the terminal device of the object to be detected; Selecting target face images from the at least two video streams respectively; Perform similarity comparison on the selected target face images to obtain the similarity between the target face images in each video stream; Based on the similarity between the target face images in each video stream, it is determined whether the video stream to be detected is an injection attack video stream.

2. The method according to claim 1, wherein selecting the target face image from the at least two video streams comprises: For a target video stream in the at least two video streams, extract key image features of each frame of face image contained in the target video stream; Determining the image quality of each frame of face image contained in the target video stream based on the key image features of each frame of face image; At least one frame of face image whose image quality meets a preset quality condition is selected from the continuous frames of face images included in the target video stream and determined as the target face image in the target video stream.

3. The method according to claim 1, wherein determining whether the video stream to be detected is an injection attack video stream based on the similarity between the target face images in each video stream comprises: When the similarity between the target face images in each video stream is less than a preset similarity threshold, determining that the video stream to be detected is an injection attack video stream; When the similarity between the target face images in at least two video streams is greater than or equal to the preset similarity threshold, it is determined that the video stream to be detected is a real shot video stream.

4. The method of claim 3, further comprising: When the video stream to be detected is an injection attack video stream, at least one of the following operations is performed: discarding the video stream to be detected, instructing the terminal device to reshoot and send the video stream to be detected, and outputting injection video attack alarm information.

5. The method of claim 3, further comprising: When the video stream to be detected is a real video stream, the identity of the object to be detected is identified based on the video stream to be detected and preset sample face data.

6. The method according to claim 5, wherein the identification of the object to be detected based on the video stream to be detected and preset sample face data comprises: Performing liveness detection on the video stream to be detected based on a preset liveness detection algorithm to determine whether the video stream to be detected is a liveness video stream; If yes, the identity of the object to be detected is identified based on the continuous frame facial images contained in the video stream to be detected and the sample facial data.

7. The method according to any one of claims 1 to 6, wherein obtaining at least two video streams of a terminal device comprises: Calling a face acquisition software development kit SDK built into the terminal device to obtain the preview video stream displayed by the display device from the display device of the terminal device; The face acquisition SDK built into the terminal device is called to receive the video stream to be detected shot and output by the image acquisition device of the terminal device.

8. A method for detecting an injection video attack, comprising: When performing biometric feature recognition, obtaining at least two video streams of a terminal device, the at least two video streams comprising a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, the preview video stream being generated based on continuous frame images taken by the terminal device of the object to be detected; Selecting target images from the at least two video streams respectively; Perform similarity comparison on the selected target images to obtain the similarity between the target images in each video stream; Based on the similarity between the target images in each video stream, it is determined whether the video stream to be detected is an injection attack video stream.

9. A video injection attack detection device, comprising: A first video stream acquisition unit, when performing face recognition, acquires at least two video streams of a terminal device, wherein the at least two video streams include a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, wherein the preview video stream is generated based on continuous frame face images taken by the terminal device of the object to be detected; A first image selection unit selects target face images from the at least two video streams respectively; A first similarity comparison unit performs similarity comparison on the selected target face images to obtain similarities between the target face images in each video stream; The first injection attack detection unit determines whether the video stream to be detected is an injection attack video stream based on the similarity between the target face images in each video stream.

10. A video injection attack detection device, comprising: A second video stream acquisition unit, when performing biometric feature recognition, acquires at least two video streams of a terminal device, wherein the at least two video streams include a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, wherein the preview video stream is generated based on continuous frame images taken by the terminal device of the object to be detected; A second image selection unit selects target images from the at least two video streams respectively; A second similarity comparison unit performs similarity comparison on the selected target images to obtain similarities between the target images in each video stream; The second injection attack detection unit determines whether the video stream to be detected is an injection attack video stream based on the similarity between the target images in the video streams.

11. An electronic device, comprising: processor; as well as a memory arranged to store computer executable instructions which, when executed, cause the processor to: When performing face recognition, obtaining at least two video streams of a terminal device, the at least two video streams comprising a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, the preview video stream being generated based on continuous frame face images taken by the terminal device of the object to be detected; Selecting target face images from the at least two video streams respectively; Perform similarity comparison on the selected target face images to obtain the similarity between the target face images in each video stream; Based on the similarity between the target face images in each video stream, it is determined whether the video stream to be detected is an injection attack video stream.

12. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of application programs, causes the electronic device to perform the following operations: When performing face recognition, obtaining at least two video streams of a terminal device, the at least two video streams comprising a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, the preview video stream being generated based on continuous frame face images taken by the terminal device of the object to be detected; Selecting target face images from the at least two video streams respectively; Perform similarity comparison on the selected target face images to obtain the similarity between the target face images in each video stream; Based on the similarity between the target face images in each video stream, it is determined whether the video stream to be detected is an injection attack video stream.

13. An electronic device comprising: processor; as well as a memory arranged to store computer executable instructions which, when executed, cause the processor to: When performing biometric feature recognition, obtaining at least two video streams of a terminal device, the at least two video streams comprising a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, the preview video stream being generated based on continuous frame images taken by the terminal device of the object to be detected; Selecting target images from the at least two video streams respectively; Perform similarity comparison on the selected target images to obtain the similarity between the target images in each video stream; Based on the similarity between the target images in each video stream, it is determined whether the video stream to be detected is an injection attack video stream.

14. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of application programs, causes the electronic device to perform the following operations: When performing biometric feature recognition, obtaining at least two video streams of a terminal device, the at least two video streams comprising a preview video stream displayed by the terminal device and a video stream to be detected sent by the terminal device, the preview video stream being generated based on continuous frame images taken by the terminal device of the object to be detected; Selecting target images from the at least two video streams respectively; Perform similarity comparison on the selected target images to obtain the similarity between the target images in each video stream; Based on the similarity between the target images in each video stream, it is determined whether the video stream to be detected is an injection attack video stream.