Detection method and apparatus
By performing randomly generated challenge tasks on smart terminals, using physical non-clone function (PUF) technology to identify the matching degree of image data, the problem of malicious users bypassing facial recognition authentication or live detection is solved, improving security and user experience, and reducing operation and maintenance costs.
Patent Information
- Application Number
- PCT/CN2024/083403
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-28
- Filing Date
- 2024-03-22
- Publication Date
- 2025-07-03
AI Technical Summary
The prior art is difficult to effectively identify malicious users through virtual cameras to bypass facial recognition authentication or live detection, resulting in the security and information security of smart terminals being threatened, and security detection strategies need to be updated frequently, which has high operating and maintenance costs.
By performing randomly generated challenge tasks on the operating device, affecting the acquisition of the camera, using physical non-clone function (PUF) technology, multi-dimensional camera feature information is generated, the matching degree of image data is identified, and the injected video attack methods of malicious users are identified.
It improves the security of facial recognition authentication or live detection, reduces the difficulty of malicious users to crack, improves user experience, reduces the need for interactive live detection, and enhances the timeliness and security of image data.
Smart Images

Figure CN2024083403_03072025_PF_FP_ABST
Abstract
Description
A detection method and device
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on August 28, 2023, with application number 202311091708.8 and application name “A Detection Method and Device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The embodiments of the present invention relate to the field of intelligent terminal technology, and in particular to a detection method and device. Background Art
[0004] When using a smart terminal, it is often necessary to call a camera for face recognition authentication or liveness detection to ensure information security during the use of the smart terminal.
[0005] Malicious users use virtual cameras to load pre-acquired facial video files to bypass facial recognition authentication or liveness detection, and then carry out business registration, fraud and other activities, posing serious risks and threats to the use safety and information security of smart terminals.
[0006] Existing detection methods assess the security of smart terminals by checking whether key files in the smart terminal system have been tampered with or by scanning key paths in the smart terminal system for hijacking framework tools. However, the types of tools used by malicious users are constantly evolving, requiring frequent updates to smart terminal security detection strategies, resulting in high operational and maintenance costs.
[0007] Summary of the Invention
[0008] The embodiments of the present application provide a detection method and device for effectively identifying malicious users' injected video attack methods during face recognition authentication or liveness detection.
[0009] In a first aspect, embodiments of the present application provide a detection method for receiving image data collected by an operating device during a challenge task, wherein the challenge task is triggered when the operating device calls a camera to perform a recognition task; the challenge task is used to physically affect the camera's acquisition work;
[0010] Identifying the image data to obtain imaging feature information of the image data;
[0011] Determine whether the camera feature information matches the image feature information corresponding to the challenge task; if not, determine that the recognition task detection has failed.
[0012] By having the operating device perform randomly generated challenge tasks to influence the camera's image data collection, it is possible to effectively identify malicious users' video injection attacks. Since the challenge tasks are randomly generated, it is more difficult for malicious users to crack them, and the security of the face recognition authentication or liveness detection process is improved. In addition, from a user experience perspective, compared to existing interactive liveness detection methods such as opening the mouth, blinking, and turning the head, this application does not require user action cooperation. The operating device can independently complete the face recognition authentication or liveness detection process, improving the user experience.
[0013] Optionally, the challenge task is a manipulation instruction for at least one component in the operating device; the manipulation instruction is randomly generated and has different combination modes; the combination mode includes a combination of different components and / or a combination of different operations.
[0014] Since the control instructions of the challenge task are a combination of randomly generated different instructions, there is a wide range of random variations, which improves the security of the challenge task, increases the difficulty for malicious users to crack it, and greatly improves the security of face recognition authentication or liveness detection. In addition, if a malicious user intercepts the challenge task, it will take a certain amount of time for the malicious user to generate the corresponding image data according to the challenge task. In this application, the recognition of the image data collected after the challenge task is executed is timely. Therefore, this application also provides a test of the timeliness of the image data.
[0015] Optionally, the challenge task is used to drive the camera to adjust optical parameters during the shooting process; and / or the challenge task is used to drive the operating device to vibrate.
[0016] By driving the camera to adjust optical parameters during the recording process; and / or challenging the task to drive the operating device to vibrate, the image data collected by the operating device can be affected from a microscopic physical perspective.
[0017] Optionally, the identifying the image data to obtain imaging feature information of the image data includes:
[0018] Identifying the image data to obtain optical feature information of different frames in the image data, and / or obtaining motion feature information of different frames in the image data through a motion sensor in the operating device;
[0019] The determining whether the camera feature information matches the image feature information corresponding to the challenge task includes:
[0020] Acquiring optical characteristic information corresponding to the challenge task through the instruction corresponding to the challenge task, and / or acquiring motion characteristic information corresponding to the challenge task through the instruction corresponding to the challenge task;
[0021] Determine whether the optical feature information of the different frames matches the optical feature information corresponding to the challenge task, and / or determine whether the motion feature information of the different frames matches the motion feature information corresponding to the challenge task.
[0022] Optionally, the identifying the image data includes:
[0023] The image data is recognized by a recognition model, and the recognition model is obtained by training sample images and sample labels under different challenging tasks using different operating devices.
[0024] Optionally, the detection method is located on the operating device;
[0025] Before receiving the image data collected during the operation of the operating device performing the challenge task, the method further includes:
[0026] Receiving an identification task and a challenge task initiated by a server; the challenge task is randomly determined by the server;
[0027] After determining that the recognition task detection fails, the method further includes:
[0028] Send the detection result of recognition failure to the server.
[0029] Optionally, the detection method is located in the identification server;
[0030] Randomly generate a challenge task based on the recognition task of the business server; and send the challenge task and the recognition task to the operating device;
[0031] After determining that the recognition task detection fails, the method further includes:
[0032] Sending a detection result of identification failure to the service server.
[0033] In a second aspect, an embodiment of the present application provides a detection device, comprising:
[0034] A collection unit, configured to receive image data collected by an operating device during a challenge task, wherein the challenge task is triggered when the operating device calls a camera to perform a recognition task; the challenge task is used to physically affect the collection work of the camera;
[0035] an identification unit, configured to identify the image data and obtain imaging feature information of the image data;
[0036] A processing unit is used to determine a matching degree between the camera feature information and the influencing feature information corresponding to the challenge task, and determine a detection result of the recognition task based on the matching degree.
[0037] By having the operating device perform randomly generated challenge tasks to influence the camera's image data collection, the randomly generated challenge tasks increase the difficulty for malicious users to crack the system, thereby improving the security of the face recognition authentication or liveness detection process. In addition, from a user experience perspective, compared to existing interactive liveness detection methods such as opening the mouth, blinking, and turning the head, this application does not require user action cooperation. The operating device can independently complete the face recognition authentication or liveness detection process, thus improving the user experience.
[0038] Optionally, the acquisition unit is specifically configured to:
[0039] The challenge task is a manipulation instruction for at least one component in the operating device; the manipulation instruction is randomly generated and has different combination modes; the combination mode includes a combination of different components and / or a combination of different operations.
[0040] Optionally, the acquisition unit is specifically configured to:
[0041] The challenge task is used to drive the camera to adjust optical parameters during the shooting process; and / or the challenge task is used to drive the operating device to vibrate.
[0042] Optionally, the identification unit is specifically configured to:
[0043] Identifying the image data to obtain optical feature information of different frames in the image data, and / or obtaining motion feature information of different frames in the image data through a motion sensor in the operating device;
[0044] The determining whether the camera feature information matches the image feature information corresponding to the challenge task includes:
[0045] Acquiring optical characteristic information corresponding to the challenge task through the instruction corresponding to the challenge task, and / or acquiring motion characteristic information corresponding to the challenge task through the instruction corresponding to the challenge task;
[0046] Determine whether the optical feature information of the different frames matches the optical feature information corresponding to the challenge task, and / or determine whether the motion feature information of the different frames matches the motion feature information corresponding to the challenge task.
[0047] Optionally, the identification unit is specifically configured to:
[0048] The image data is recognized by a recognition model, and the recognition model is obtained by training sample images and sample labels under different challenging tasks using different operating devices.
[0049] Optionally, the processing unit is specifically configured to:
[0050] Receiving an identification task and a challenge task initiated by a server; the challenge task is randomly determined by the server;
[0051] Send the detection result of recognition failure to the server.
[0052] Optionally, the processing unit is specifically configured to:
[0053] Randomly generate a challenge task based on the recognition task of the business server; and send the challenge task and the recognition task to the operating device;
[0054] Sending a detection result of identification failure to the service server.
[0055] In a third aspect, an embodiment of the present application provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes any of the detection methods described in the first aspect.
[0056] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program executable by a computer device. When the program runs on the computer device, the computer device executes any detection method described in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0058] FIG1 is a schematic diagram of a flow chart of a detection method provided in an embodiment of the present application;
[0059] FIG2 is a schematic diagram of a combination pattern diagram of a challenge task provided in an embodiment of the present application;
[0060] FIG3 is a schematic diagram of a combination pattern diagram of another challenge task provided in an embodiment of the present application;
[0061] FIG4 is a schematic diagram of interaction between an operating device and a server according to an embodiment of the present application;
[0062] FIG5 is a schematic diagram of another embodiment of the present application providing an operating device interacting with a server;
[0063] FIG6 is a schematic structural diagram of a detection device provided in an embodiment of the present application;
[0064] FIG7 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solutions and beneficial effects of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0066] For ease of understanding, the terms involved in the embodiments of the present invention are explained below.
[0067] Cloud phones, also known as cloud phones, are mobile phones that leverage cloud computing technology for network terminal services, accessing cloud services through cloud servers. Essentially, they are smartphones deeply integrated with network services. These phones utilize their own operating systems and the network terminals provided by the manufacturer to perform numerous online functions.
[0068] Context object: It tracks the properties of the MTS server component when it runs in an activity, including the activation state of the tracked component, security information, transaction status (if any), etc. This eliminates the need for the component to track its own status.
[0069] A Physical Unclonable Function (PUF) is a hardware security technology commonly used to improve the hardware security of IC chips. It utilizes random variations that are difficult to replicate or simulate at the physical microscopic level. It exploits inherent device variations to produce a unique, unclonable device response to a given input.
[0070] Under normal circumstances, taking an Android phone as an example, when an Android phone app (application) needs to perform face recognition or liveness detection, it calls the Android Framework's Camera.open() instruction, enters the underlying android_hardware_camera.cpp, and calls new JNICameraContext to construct a camera context object before using the camera function.
[0071] Malicious users can customize and develop system packages, namely ROM (Read-Only Memory) packages, for specific mobile phones or cloud phones. They use these ROM packages to change the implementation process of new JNICameraContext. Malicious users can write programs to load and start the libvirtualcamera.so module, which integrates the ffmpeg library. Malicious users can use the ffmpeg library to load pre-recorded video files, decode them, and convert them into the data format required by normal cameras. This replaces the data transmitted by the real camera, thereby bypassing facial recognition authentication or liveness detection.
[0072] Existing detection methods rely on checking whether key files on smart devices have been tampered with or scanning critical paths for hijacking frameworks to assess device security. However, the types of tools used by malicious users are constantly evolving, requiring frequent updates to security detection strategies for smart devices, resulting in high operational and maintenance costs.
[0073] This application randomly generates challenge tasks, and uses the randomness of challenge tasks that are difficult to replicate or simulate to allow the operating device to perform the challenge tasks, thereby affecting the operation of the operating device's image data collection from a micro or macro level. Even if a malicious user can obtain the challenge task, the action of the operating device performing the challenge in this application is separated from the action of the operating device collecting image data and identifying it. In addition, it takes a certain amount of processing time for the malicious user to process the pre-recorded original image data in real time according to the challenge task, which greatly increases the cost and difficulty of the malicious user's attack.
[0074] FIG1 is a flow chart of a detection method provided in an embodiment of the present application, and the flow chart of the detection method includes the following steps:
[0075] Step S101 : receiving image data collected by an operating device during a challenge task. The challenge task is triggered when the operating device calls a camera to perform a recognition task. The challenge task is used to physically influence the camera's acquisition work.
[0076] Specifically, the operating device includes but is not limited to a mobile phone, a drone or a surveillance camera. The recognition task is initiated when the operating device needs to perform face recognition authentication or liveness detection in actual application scenarios. The operating device triggers the camera based on the recognition task. When the operating device performs the challenge task, it will collect image data in real time. When the operating device completes the challenge task, it will stop collecting image data. The image feature information corresponding to each challenge task is different, and the image feature information is multi-dimensional information. The basic principle of the challenge task is the Physical Unclonable Function (PUF), which affects the camera's collection work at the physical microscopic or macroscopic level. The physical microscopic aspect refers to the fact that when the camera is performing the collection work, the image data collected by the camera produces changes that are not observable to the naked eye; for example, if the operating device is a mobile phone, the camera of the mobile phone produces tiny high-frequency jitter at the pixel level that is difficult for the naked eye to detect during the collection work. The physical macroscopic aspect refers to the fact that when the camera is performing collection work, the image data collected by the camera produces changes that can be observed by the naked eye. For example, if the operating device is a surveillance camera in a supermarket, then when the surveillance camera performs the challenge task, the physical macroscopic changes produced may include the camera rotating, etc.
[0077] Step S102: Identify the image data to obtain the camera feature information of the image data.
[0078] Specifically, since the challenge task is performed by the operating device, the changes caused by the operating device to the camera that collects the image data may be linear or nonlinear. A trained model is needed to recognize the image data and obtain the camera's multi-dimensional feature information.
[0079] Step S103 : determining the matching degree between the camera feature information and the image feature information corresponding to the challenge task, and determining the detection result of the recognition task based on the matching degree.
[0080] Specifically, since the camera feature information of the image data is identified based on the image feature information corresponding to the challenge task by the operating device, the dimension of the image feature information is consistent with the dimension of the camera feature information. For example, the image feature information corresponding to the challenge task includes information on the frequency dimension and the amplitude dimension, and the identified camera feature information also includes the frequency dimension and the amplitude dimension. Based on the comparison of the feature information of each dimension, the matching degree between the camera feature information and the image feature information can be determined, and the matching degree threshold is set according to the specific recognition detection scenario or the needs of the user. If the obtained matching degree is less than the threshold, the matching result is determined to be a mismatch, and the recognition task detection fails; if the obtained matching degree is greater than or equal to the threshold, the matching result is determined to be a match, and the recognition task detection is successful.
[0081] In the prior art, face recognition authentication often requires users to perform fixed actions, such as opening their mouths, turning their heads, and blinking. Malicious users write control programs to generate videos of users performing corresponding authentication actions during face recognition, and inject the generated videos into the operating device to bypass detection. However, in the present application, since the challenge tasks are randomly generated, if the malicious user continues to use the attack method of injecting videos to bypass detection, the injected video will not correspond to the image data after the challenge task is executed. Therefore, the present application allows the operating device to execute randomly generated challenge tasks to affect the camera's work of collecting image data. In the process of face recognition authentication or liveness detection, the malicious user's injection video attack method can be effectively identified, that is, the malicious user's use of virtual cameras to bypass face recognition detection or liveness detection can be identified. In addition, since the challenge tasks are randomly generated, the difficulty of malicious users to crack is increased, and the security of the detection process of face recognition authentication or liveness detection is improved. From the perspective of user experience, compared with existing interactive liveness detection methods, such as opening the mouth, blinking, and turning the head, this application does not require the user's cooperation. The operating device can independently complete the face recognition authentication or liveness detection process, which improves the user experience.
[0082] The above detection method can also be applied to scenarios where multiple operating devices execute the same randomly generated challenge task. Since there will be slight differences in the responses generated by multiple devices after executing the challenge task, this difference can be used to authenticate the operating devices and protect the copyright of the camera images.
[0083] In this application, the challenge task is a control instruction for at least one component in the operating device; the control instruction is randomly generated and has different combination modes; the combination mode includes a combination of different components and / or a combination of different operations.
[0084] Specifically, there is at least one component in the operating device that can affect the image data at the physical microscopic or macroscopic level, such as a camera, a motor, etc. The challenge task is to provide control instructions for the operating components. Since a component can affect the image data in multiple dimensions, for example, if the component is a camera, the image data can be affected from dimensions such as the focal length, relative aperture and aperture number, field of view angle and image plane size, resolution, distortion, depth of field and working distance of the camera. The combination pattern of each control instruction can randomly extract any dimension from the multi-dimensional information of each component and combine them to generate a control instruction. At the same time, the number of operation instructions in the challenge task, the frequency of operation instructions, and the duration of operation instructions can also be randomly combined.
[0085] Since the control instructions of the challenge task are a combination of randomly generated different instructions, there is a wide range of random variations, which improves the security of the challenge task, increases the difficulty for malicious users to crack it, and greatly improves the security of face recognition authentication or liveness detection. In addition, if a malicious user intercepts the challenge task, it will take a certain amount of time for the malicious user to generate the corresponding image data according to the challenge task. In this application, the recognition of the image data collected after the challenge task is executed is timely. Therefore, this application also provides a test of the timeliness of the image data.
[0086] In some embodiments, the challenge task is used to drive the camera to adjust optical parameters during the camera shooting process; and / or the challenge task is used to drive the operating device to vibrate.
[0087] Specifically, the challenge task can cause vibrations in the camera or the operating device alone, or simultaneously. If the challenge task acts on the camera, it is used to adjust the camera's optical parameters, including but not limited to focal length, relative aperture and f-number, field of view and image plane size, resolution, distortion, depth of field, and working distance. For example, the challenge task can continuously or discontinuously adjust the camera's zoom factor. It can also adjust the camera's focus point, such as the tip of the nose, eyes, or ears. The challenge task can also cause vibrations in the operating device through other components, including but not limited to linear motors, vibration motors, and wheel motors. These components are used to generate slight pixel-level jitter or vibration. The linear motor has an effective bandwidth of 50Hz to 500Hz, consumes as little as 0.12W, and has a maximum vibration of up to 1.1 Grms. This can generate subtle, high-frequency jitter at the pixel level that is imperceptible to the naked eye during image acquisition. As shown in the combination pattern diagram of the challenge task in Figure 2, a rectangle is used to represent the linear motor that drives the operating device to vibrate, wherein the width of the rectangle is the vibration time of the linear motor, and the height of the rectangle is the vibration amplitude of the linear motor; a trapezoid is used to represent the instruction to drive the camera to adjust the optical parameters during the shooting process, the bottom of the trapezoid represents the time to drive the camera to adjust the optical parameters during the shooting process, and the height of the trapezoid is the zoom multiple. The linear motor in Figure 2 only vibrates before the camera zooms. As shown in Figure 3, multiple combination pattern diagrams of another challenge task are provided for this application. The linear motor in Figure 3 vibrates before and during the zoom of the camera.
[0088] By driving the camera to adjust optical parameters during the recording process; and / or challenging the task to drive the operating device to vibrate, the image data collected by the operating device can be affected from a microscopic physical perspective.
[0089] In the above-mentioned step S102, the image data is identified to obtain the camera feature information of the image data, including: identifying the image data to obtain the optical feature information of different frames in the image data, and / or, obtaining the motion feature information of different frames in the image data by operating the motion sensor in the device; determining whether the camera feature information matches the image feature information corresponding to the challenge task, including: obtaining the optical feature information corresponding to the challenge task through the instructions corresponding to the challenge task, and / or, obtaining the motion feature information corresponding to the challenge task through the instructions corresponding to the challenge task; determining whether the optical feature information of different frames matches the optical feature information corresponding to the challenge task, and / or, determining whether the motion feature information of different frames matches the motion feature information corresponding to the challenge task.
[0090] Specifically, the image data is composed of multiple consecutive frames of images, and each frame includes but is not limited to a frame sequence, optical feature information, and motion feature information. The optical feature information can be identified by a recognition model, and the motion feature information can be identified by a motion sensor in an operating device. The optical feature information and motion feature information contained between any two consecutive frame images may be the same or different. The instructions in the challenge task include the corresponding optical feature information and motion feature information. The challenge task may include both optical feature information and motion feature information, or may include only one of the optical feature information and motion feature information.
[0091] By identifying the image data obtained after executing the challenge task, the optical feature information of each frame of the image can be obtained; while the camera is collecting image data, the motion feature information of each frame of the image is collected by the motion sensor in the operating device. Since the information dimension of the optical feature information of different frames and / or the motion feature information of different frames contained in the image data is the same as the information dimension of the optical feature information and / or the motion feature information contained in the instructions in the challenge task, by comparing the optical feature information of different frames under the same information dimension and the optical feature information contained in the instructions in the challenge task, and / or the motion feature information of different frames under the same information dimension and the motion feature information contained in the instructions in the challenge task, it can be determined whether the optical feature information of different frames matches the optical feature information corresponding to the challenge task, and / or whether the motion feature information of different frames matches the motion feature information corresponding to the challenge task. Then, the matching results are comprehensively judged, and whether the task detection is successful is identified based on the matching results.
[0092] For example, the instructions for Challenge Task 1 include both optical feature information and motion feature information. The optical feature information is: continuously changing from 1x focal length to 2x focal length and then to 1x focal length with a 2-second cycle within 10 seconds; the motion feature information is that the linear motor vibrates continuously at a frequency of 130Hz for 10 seconds. After the operating device completes Challenge Task 1, it obtains image data, identifies the image data, and obtains optical feature information of different frames in the image data. While collecting the image data, the motion sensor in the operating device is used to collect the motion feature information of different frames in the image data. The optical feature information in the instructions for Challenge Task 1 and the optical feature information of different frames in the image data, as well as the motion feature information in the instructions for Challenge Task 1 and the motion feature information of different frames, are matched respectively. The matching results are comprehensively judged, and the success of the task detection is determined based on the matching results.
[0093] In some embodiments, after obtaining the motion feature information of different frames in the image data by operating the motion sensor in the device, the motion feature information of the different frames needs to be processed and converted into camera coordinate system units, so as to facilitate the matching of the motion feature information of different frames with the motion feature information in the challenge task.
[0094] Recognize image data, including: recognizing image data through a recognition model, where the recognition model is trained by sample images and sample labels under different challenging tasks using different operating devices.
[0095] Specifically, the recognition method can identify the feature information contained in the image data by training a recognition model. Different image data corresponding to different operating devices performing different challenge tasks are collected by multiple cameras to obtain multiple training sample sets of image data, wherein a sample set can be multiple image data collected by a camera of an operating device to perform multiple challenge tasks. The form and content of a sample set are not limited in this application. Taking a sample set as an example, the image data in the training sample set is recognized by the recognition model to be trained to obtain the corresponding optical feature information vectors of different frames. The optical feature information vector may include feature information such as the movement or zoom of the camera driven by the operating device; during the period of the camera collecting image data, the motion feature information of different frames in the image data is collected by the motion sensor in the operating device; the motion feature information may include but is not limited to the frequency or amplitude of the vibration of the operating device. The optical feature information of different frames and the motion feature information of different frames are processed and transformed to form sample labels. The recognition model to be trained is trained by the optical feature information vector and the sample label to obtain a trained recognition model.
[0096] The camera captures the multi-dimensional imaging data’s imaging feature information, and through samples of multiple operating devices under different challenging tasks, since the training sample information includes optical feature information and motion feature information, the features of the two dimensions can be associated, thereby improving the stability of detection.
[0097] The following are two implementations of the detection methods provided in this application:
[0098] In one possible implementation, the detection method is located on the operating device; before receiving the image data collected during the operation of the operating device to perform the challenge task, it also includes: receiving the recognition task and challenge task initiated by the server; the challenge task is randomly determined by the server; after determining that the recognition task detection has failed, it also includes: sending the detection result of the recognition failure to the server.
[0099] Specifically, if the detection method is located on the operating device, the detection method can be integrated on the operating device through a software development kit (SDK). First, the operating device receives the recognition task and challenge task initiated by the server. When the operating device receives the recognition task, it turns on the camera to collect image data and executes the challenge task at the same time. Among them, the challenge task is a challenge number randomly generated by the server when initiating the recognition task. The challenge number is mapped to a random task number in the challenge task list. The challenge task information is obtained from the challenge task list according to the random task number. The challenge task list is loaded into the server in advance.
[0100] The recognition module on the operating device recognizes the collected image data, obtains the camera feature information, and determines whether the camera feature information matches the image feature information of the challenge task. If there is no match, it is determined that the recognition task detection has failed, and the detection result of the recognition failure is sent to the server.
[0101] As shown in FIG4 , it is a schematic diagram of the interaction between an operating device and a server provided in this application, wherein the challenge task includes control instructions for component cameras and electronically controlled motors.
[0102] Step 401: The server initiates an identification task and a challenge task and sends them to the operating device;
[0103] Specifically, the server initiates an identification task based on the user's operation of the device. Based on the identification task, the server randomly generates a challenge number, which is mapped to a random task number in the challenge task list. The server obtains challenge task information from the challenge task list according to the random task number to form a challenge task.
[0104] Step 402: operating the device to perform the challenge task while collecting image data;
[0105] Specifically, based on the challenge task, the operating device controls the electronic motor to perform high-frequency and small-amplitude vibration, and controls the camera to perform optical zoom, mechanical movement, or adjust the aperture size;
[0106] Step 403: The motion sensor collects motion feature information in the image data;
[0107] Specifically, the motion sensor may be on the operating device or located outside the operating device;
[0108] Step 404: operating a recognition module on the device to recognize optical feature information in the image data;
[0109] Step 405: Operate the device to perform matching and determine the recognition task detection result;
[0110] Specifically, the operating device determines to match the camera feature information of the image data with the image feature information of the challenge task, wherein the camera feature information is motion feature information and optical feature information in the image data.
[0111] In step 406 , the operating device sends the recognition task detection result to the server.
[0112] In another possible implementation, the detection method is located in the recognition server; based on the recognition task of the business server, a challenge task is randomly generated; the challenge task and the recognition task are sent to the operating device; after determining that the recognition task detection fails, it also includes: sending the detection result of the recognition failure to the business server.
[0113] Specifically, the server includes an identification server and a business server. If the detection method is located in the identification server, the detection method can be integrated into the identification server through a software development kit (SDK). First, the identification server receives the identification task initiated by the business server, randomly generates a challenge task, and sends the challenge task and the identification task to the operating device. When the operating device receives the identification task, it turns on the camera to collect image data and executes the challenge task at the same time. Among them, the challenge task is that the recognition server randomly generates a challenge number when receiving the identification task sent by the business server. The challenge number is mapped to a random task number in the challenge task list. The challenge task information is obtained from the challenge task list according to the random task number. The challenge task list is loaded into the recognition server in advance.
[0114] The operating device sends the collected image data to the recognition server. The recognition module on the recognition server recognizes the collected image data, obtains the camera feature information, and determines whether the camera feature information matches the image feature information of the challenge task. If there is no match, it is determined that the recognition task detection has failed, and the detection result of the recognition failure is sent to the business server.
[0115] Figure 5 shows a schematic diagram of the interaction between the recognition server, the service server, and the operating device provided by this application. Both the recognition server and the service server are located on the server side. The challenge tasks include control instructions for component cameras and electronically controlled motors.
[0116] Step 501: The business server initiates a recognition task and sends the recognition task to the recognition server;
[0117] Step 502: The recognition server randomly generates a challenge task based on the recognition task;
[0118] Specifically, the recognition server randomly generates a challenge number based on the recognition task, the challenge number is mapped to a random task number in the challenge task list, and the challenge task information is obtained from the challenge task list according to the random task number to form a challenge task.
[0119] Step 503: operating the device to perform the challenge task while collecting image data;
[0120] Specifically, based on the challenge task, the operating device controls the electronic motor to perform high-frequency and small-amplitude vibration, and controls the camera to perform optical zoom, mechanical movement, or adjust the aperture size;
[0121] Step 504: The motion sensor collects motion feature information of the image data;
[0122] Step 505: The operating device sends the image data and motion feature information to the recognition server;
[0123] Step 506: The recognition module on the recognition server recognizes the optical feature information in the image data;
[0124] Step 507: The recognition server performs matching and determines the detection result of the recognition task;
[0125] Specifically, the recognition server determines the matching of the camera feature information of the image data and the image feature information of the challenge task, wherein the camera feature information is the motion feature information and optical feature information in the image data.
[0126] Step 508: The recognition server sends the recognition task detection result to the business server.
[0127] Based on the same technical concept, an embodiment of the present application provides a structural diagram of a detection device 600, as shown in FIG6 , which includes:
[0128] The acquisition unit 601 is configured to receive image data acquired by an operating device during a challenge task, wherein the challenge task is triggered when the operating device calls a camera to perform a recognition task; the challenge task is configured to physically affect the acquisition work of the camera;
[0129] The recognition unit 602 is used to recognize the image data and obtain the imaging feature information of the image data;
[0130] The processing unit 603 is configured to determine a matching degree between the camera feature information and the influencing feature information corresponding to the challenge task, and determine a detection result of the recognition task based on the matching degree.
[0131] By having the operating device perform randomly generated challenge tasks to physically affect the camera's image data collection, the randomly generated challenge tasks increase the difficulty for malicious users to crack the system, thereby improving the security of the face recognition authentication or liveness detection process. In addition, from a user experience perspective, compared to existing interactive liveness detection methods such as opening the mouth, blinking, and turning the head, this application does not require user action cooperation. The operating device can independently complete the face recognition authentication or liveness detection process, thereby improving the user experience.
[0132] Optionally, the collection unit 601 is specifically configured to:
[0133] The challenge task is a manipulation instruction for at least one component in the operating device; the manipulation instruction is randomly generated and has different combination modes; the combination mode includes a combination of different components and / or a combination of different operations.
[0134] Since the control instructions of the challenge task are a combination of randomly generated different instructions, there is a wide range of random variations, which improves the security of the challenge task, increases the difficulty for malicious users to crack it, and greatly improves the security of face recognition authentication or liveness detection. In addition, if a malicious user intercepts the challenge task, it will take a certain amount of time for the malicious user to generate the corresponding image data according to the challenge task. In this application, the recognition of the image data collected after the challenge task is executed is timely. Therefore, this application also provides a test of the timeliness of the image data.
[0135] Optionally, the collection unit 601 is specifically configured to:
[0136] The challenge task is used to drive the camera to adjust optical parameters during the shooting process; and / or the challenge task is used to drive the operating device to vibrate.
[0137] By driving the camera to adjust optical parameters during the recording process; and / or challenging the task to drive the operating device to vibrate, the image data collected by the operating device can be affected from a microscopic physical perspective.
[0138] Optionally, the identification unit 602 is specifically configured to:
[0139] Identifying the image data to obtain optical feature information of different frames in the image data, and / or obtaining motion feature information of different frames in the image data through a motion sensor in the operating device;
[0140] The determining whether the camera feature information matches the image feature information corresponding to the challenge task includes:
[0141] Acquiring optical characteristic information corresponding to the challenge task through the instruction corresponding to the challenge task, and / or acquiring motion characteristic information corresponding to the challenge task through the instruction corresponding to the challenge task;
[0142] Determine whether the optical feature information of the different frames matches the optical feature information corresponding to the challenge task, and / or determine whether the motion feature information of the different frames matches the motion feature information corresponding to the challenge task.
[0143] Optionally, the identification unit 602 is specifically configured to:
[0144] The image data is recognized by a recognition model, and the recognition model is obtained by training sample images and sample labels under different challenging tasks using different operating devices.
[0145] Optionally, the processing unit 603 is specifically configured to:
[0146] Receiving an identification task and a challenge task initiated by a server; the challenge task is randomly determined by the server;
[0147] Send the detection result of recognition failure to the server.
[0148] Optionally, the processing unit 603 is specifically configured to:
[0149] Randomly generate a challenge task based on the recognition task of the business server; and send the challenge task and the recognition task to the operating device;
[0150] Sending a detection result of identification failure to the service server.
[0151] By having the operating device perform randomly generated challenge tasks to influence the camera's image data collection, the randomly generated challenge tasks increase the difficulty for malicious users to crack the system, thereby improving the security of the face recognition authentication or liveness detection process. In addition, from a user experience perspective, compared to existing interactive liveness detection methods such as opening the mouth, blinking, and turning the head, this application does not require user action cooperation. The operating device can independently complete the face recognition authentication or liveness detection process, thus improving the user experience.
[0152] Based on the same technical concept, an embodiment of the present application provides a computer device, as shown in FIG7 , including at least one processor 701 and a memory 702 connected to the at least one processor. The specific connection medium between the processor 701 and the memory 702 is not limited in the embodiment of the present application. FIG7 illustrates an example of a bus connection between the processor 701 and the memory 702. Buses can be divided into address buses, data buses, control buses, and the like.
[0153] In an embodiment of the present application, the memory 702 stores instructions that can be executed by at least one processor 701. The at least one processor 701 can perform the above-mentioned steps based on the detection method by executing the instructions stored in the memory 702.
[0154] The processor 701 is the control center of the computer device. It can connect various parts of the computer device using various interfaces and lines. By running or executing instructions stored in the memory 702 and calling data stored in the memory 702, it can identify and detect the malicious user's injection video attack methods. Optionally, the processor 701 may include one or more processing units. The processor 701 may integrate an application processor and a modem processor. The application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 701. In some embodiments, the processor 701 and the memory 702 may be implemented on the same chip. In some embodiments, they may also be implemented separately on independent chips.
[0155] The processor 701 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.
[0156] The memory 702 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 702 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 702 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 702 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0157] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program that can be executed by a computer device. When the program runs on the computer device, the computer device executes the steps of the above-mentioned detection method.
[0158] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0159] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or box in the flow chart and / or block diagram, as well as the combination of the flow chart and / or box in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more flow charts and / or one or more boxes in the block diagram.
[0160] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0161] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0162] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A detection method, wherein, Including: Receiving the image data collected during the execution of a challenge task by an operating device, where the challenge task is triggered based on the operating device invoking a camera for an identification task; the challenge task is used to physically affect the acquisition work of the camera; Identifying the image data to obtain the camera feature information of the image data; Determining whether the camera feature information matches the image feature information corresponding to the challenge task, and if not, determining that the identification task detection fails.
2. The method according to claim 1, wherein Including: The challenge task is a control instruction for at least one component in the operating device; The control instruction is randomly generated and has different combination modes; the combination modes include combinations of different components and / or combinations of different operations.
3. The method according to claim 1, wherein Including: The challenge task is used to drive the camera to adjust optical parameters during imaging; And / or the challenge task is used to drive the operating device to vibrate.
4. The method according to claim 3, wherein, The identifying the image data to obtain the camera feature information of the image data includes: Identifying the image data to obtain the optical feature information of different frames in the image data, and / or obtaining the motion feature information of different frames in the image data through a motion sensor in the operating device; The determining whether the camera feature information matches the image feature information corresponding to the challenge task includes: Obtaining the optical feature information corresponding to the challenge task through the instruction corresponding to the challenge task, and / or obtaining the motion feature information corresponding to the challenge task through the instruction corresponding to the challenge task; Determining whether the optical feature information of the different frames matches the optical feature information corresponding to the challenge task, and / or determining whether the motion feature information of the different frames matches the motion feature information corresponding to the challenge task.
5. The method according to claim 1, wherein, The identifying the image data includes: Identifying the image data through an identification model, where the identification model is trained with sample images and sample labels of different operating devices under different challenge tasks.
6. The method according to any one of claims 1 to 5, wherein The detection method is located on the operating device; Before receiving the image data collected during the execution of the challenge task by the operating device, it further includes: Receiving an identification task and a challenge task initiated by a server; the challenge task is randomly determined by the server; After determining that the identification task detection fails, it further includes: Sending a detection result of identification failure to the server.
7. The method according to any one of claims 1 to 5, wherein, The detection method is located on an identification server; Randomly generating a challenge task based on the identification task of a business server; Sending the challenge task and the identification task to the operating device; After determining that the identification task detection fails, it further includes: Sending a detection result of identification failure to the business server.
8. A detection device, wherein, Including: An acquisition unit for receiving the image data collected during the execution of a challenge task by an operating device, where the challenge task is triggered based on the operating device invoking a camera for an identification task; the challenge task is used to physically affect the acquisition work of the camera; An identification unit for identifying the image data to obtain the camera feature information of the image data; A processing unit for determining the matching degree between the camera feature information and the influence feature information corresponding to the challenge task, and determining the detection result of the identification task based on the matching degree.
9. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, When the processor executes the program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, wherein, It stores a computer program executable by a computer device. When the program runs on the computer device, the computer device is caused to execute the steps of the method according to any one of claims 1 to 7.