Terminal-based risk detection method, device, equipment and storage medium
By using multiple live detection models on the terminal to detect images, the risk degree of the terminal is calculated, the problem of high misidentification rate in the prior art is solved, the accuracy of risk detection is improved, and the normal handling of business is ensured.
Patent Information
- Application Number
- CN202210666221.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-14
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2042-06-14
AI Technical Summary
The prior art has a high false recognition rate in facial recognition risk detection, resulting in user equipment being accidentally locked and affecting business processing.
The image to be detected is obtained through the preset terminal, and the device information is obtained from the database. Multiple living body detection models (front-end face living body detection model, silent living body detection model, and glare living body detection model) are used to detect the images in vivo, generate probability values, calculate the risk of the feature vector, and determine whether the terminal is a high-risk device.
It improves the accuracy of terminal-based risk detection, reduces the occurrence of user equipment incorrectly locked, and ensures normal business handling.
Smart Images

Figure CN114973379B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular to a terminal-based risk detection method, device, equipment and storage medium. Background Art
[0002] Facial recognition technology has a large number of application scenarios in the financial industry as a risk control method for user identity verification. There are also more than 100 business scenarios in banks that use facial recognition. Driven by interests, the black industry will use its own dedicated equipment to attack facial recognition by means of face reshooting, face activation video replacing camera video stream, etc. In order to ensure the risk control capability of our business, we need to promptly identify high-risk devices used by the black industry and take restrictive measures against them.
[0003] The existing solution is to lock the devices corresponding to the traffic detected as non-live by the liveness detection model during the face recognition process. Currently, the error interception rate of motion liveness, glare liveness, and silent liveness is quite high on the market. If such devices are locked directly, many users' devices will be locked due to liveness misidentification, which will cause users to be unable to continue to handle their business. Summary of the invention
[0004] The present invention provides a terminal-based risk detection method, device, equipment and storage medium, which are used to improve the accuracy of terminal-based risk detection.
[0005] The first aspect of the present invention provides a terminal-based risk detection method, which includes: obtaining an image to be detected through a preset terminal, and obtaining device information of the terminal from a preset database; performing liveness detection on the image respectively through multiple preset liveness detection models, and obtaining probability values corresponding to each liveness detection model, wherein the probability value is used to indicate that the device is a high-risk device; generating a feature vector according to the probability value corresponding to each liveness detection model, and calling a preset risk calculation function to calculate the risk corresponding to the feature vector to obtain a target risk; generating a detection result of the terminal according to the target risk, and the detection result is used to indicate whether the terminal is a high-risk device.
[0006] Optionally, in a first implementation method of the first aspect of the present invention, obtaining the image to be detected through a preset terminal and obtaining the device information of the terminal from a preset database includes: receiving a liveness detection request sent by a terminal, and querying the device information of the terminal from a preset database; obtaining the image to be detected through a camera in the terminal, wherein the image is used for liveness detection.
[0007] Optionally, in a second implementation method of the first aspect of the present invention, liveness detection is performed on the image respectively through multiple preset liveness detection models to obtain probability values corresponding to each liveness detection model, wherein the probability value is used to indicate the probability value of the device being a high-risk device, including: inputting the image into multiple preset liveness detection models respectively, wherein the multiple liveness detection models include: a front-end face liveness detection model, a silent liveness detection model, and a glare liveness detection model; performing liveness detection on the image respectively through the multiple liveness detection models to obtain probability values corresponding to each liveness detection model.
[0008] Optionally, in a third implementation method of the first aspect of the present invention, the image is subjected to liveness detection by respectively using the multiple liveness detection models to obtain a probability value corresponding to each liveness detection model, including: inputting the image into the front-end face liveness detection model for liveness detection to obtain face liveness data, and performing an attack behavior analysis on the face liveness data to obtain a probability value corresponding to the front-end face liveness detection model; inputting the image into the silent liveness detection model for liveness detection to obtain silent liveness data, and performing an attack behavior analysis on the silent liveness data to obtain a probability value corresponding to the silent liveness detection model; inputting the image into the glare liveness detection model for liveness detection to obtain glare liveness data, and performing an attack behavior analysis on the glare liveness data to obtain a probability value corresponding to the glare liveness detection model.
[0009] Optionally, in a fourth implementation method of the first aspect of the present invention, a feature vector is generated according to the probability value corresponding to each liveness detection model, and a preset risk calculation function is called to calculate the risk corresponding to the feature vector to obtain a target risk, including: extracting an input vector and an output vector from a preset sample database; performing parameter calculation on the probability value corresponding to each liveness detection model, the input vector and the output vector to obtain target parameters, and generating a feature vector according to the target parameters; calling a preset risk calculation function to calculate the risk corresponding to the feature vector to obtain a target risk.
[0010] Optionally, in a fifth implementation manner of the first aspect of the present invention, the detection result of the terminal is generated according to the target risk, and the detection result is used to indicate whether the terminal is a high-risk device, including: comparing the target risk and a preset target value to obtain a comparison result; if the comparison result is that the target risk is greater than or equal to the preset target value, then the detection result of the terminal is generated that the terminal is a high-risk device; if the comparison result is that the target risk is less than the preset target value, then the detection result of the terminal is generated that the terminal is not a high-risk device.
[0011] Optionally, in a sixth implementation method of the first aspect of the present invention, after generating a detection result of the terminal according to the target risk, wherein the detection result is used to indicate whether the terminal is a high-risk device, it also includes: determining a device risk level of the terminal according to the detection result; and determining a liveness detection strategy based on the device risk level of the terminal.
[0012] The second aspect of the present invention provides a terminal-based risk detection device, which includes: an acquisition module, used to acquire an image to be detected through a preset terminal, and obtain device information of the terminal from a preset database; a detection module, used to perform liveness detection on the image respectively through multiple preset liveness detection models, and obtain a probability value corresponding to each liveness detection model, wherein the probability value is used to indicate that the device is a high-risk device; a calculation module, used to generate a feature vector according to the probability value corresponding to each liveness detection model, and call a preset risk calculation function to calculate the risk corresponding to the feature vector to obtain a target risk; a generation module, used to generate a detection result of the terminal according to the target risk, and the detection result is used to indicate whether the terminal is a high-risk device.
[0013] Optionally, in a first implementation method of the second aspect of the present invention, the acquisition module is specifically used to: receive a liveness detection request sent by a terminal, and query device information of the terminal from a preset database; obtain an image to be detected through a camera in the terminal, wherein the image is used for liveness detection.
[0014] Optionally, in a second implementation method of the second aspect of the present invention, the detection module also includes: an input unit, used to input the image into multiple preset liveness detection models respectively, wherein the multiple liveness detection models include: a front-end face liveness detection model, a silent liveness detection model, and a glare liveness detection model; a processing unit, used to perform liveness detection on the image through the multiple liveness detection models respectively to obtain a probability value corresponding to each liveness detection model.
[0015] Optionally, in a third implementation method of the second aspect of the present invention, the processing unit is specifically used to: input the image into the front-end face liveness detection model for liveness detection to obtain face liveness data, and perform attack behavior analysis on the face liveness data to obtain a probability value corresponding to the front-end face liveness detection model; input the image into the silent liveness detection model for liveness detection to obtain silent liveness data, and perform attack behavior analysis on the silent liveness data to obtain a probability value corresponding to the silent liveness detection model; input the image into the glare liveness detection model for liveness detection to obtain glare liveness data, and perform attack behavior analysis on the glare liveness data to obtain a probability value corresponding to the glare liveness detection model.
[0016] Optionally, in a fourth implementation method of the second aspect of the present invention, the calculation module is specifically used to: extract input vectors and output vectors from a preset sample database; perform parameter calculations on the probability values corresponding to each liveness detection model, the input vectors and the output vectors to obtain target parameters, and generate feature vectors based on the target parameters; call a preset risk calculation function to calculate the risk corresponding to the feature vector to obtain a target risk.
[0017] Optionally, in the fifth implementation method of the second aspect of the present invention, the generation module is specifically used to: compare the target risk and a preset target value to obtain a comparison result; if the comparison result is that the target risk is greater than or equal to the preset target value, then the detection result of the terminal is generated that the terminal is a high-risk device; if the comparison result is that the target risk is less than the preset target value, then the detection result of the terminal is generated that the terminal is not a high-risk device.
[0018] Optionally, in a sixth implementation of the second aspect of the present invention, the terminal-based risk detection device further includes: a configuration module for determining a device risk level of the terminal according to the detection result; and determining a liveness detection strategy based on the device risk level of the terminal.
[0019] The third aspect of the present invention provides a terminal-based risk detection device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the terminal-based risk detection device executes the above-mentioned terminal-based risk detection method.
[0020] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned terminal-based risk detection method.
[0021] In the technical solution provided by the present invention, an image to be detected is obtained through a preset terminal, and the device information of the terminal is obtained from a preset database; liveness detection is performed on the image respectively through multiple preset liveness detection models to obtain a probability value corresponding to each liveness detection model, wherein the probability value is used to indicate that the device is a high-risk device; a feature vector is generated according to the probability value corresponding to each liveness detection model, and a preset risk calculation function is called to calculate the risk corresponding to the feature vector to obtain a target risk; a detection result of the terminal is generated according to the target risk, and the detection result is used to indicate whether the terminal is a high-risk device. The present invention uses multiple liveness detection models to identify the device, thereby improving the accuracy of terminal-based risk detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A schematic diagram of an embodiment of a terminal-based risk detection method in an embodiment of the present invention;
[0023] Figure 2 A schematic diagram of another embodiment of a terminal-based risk detection method in an embodiment of the present invention;
[0024] Figure 3 A schematic diagram of an embodiment of a terminal-based risk detection device in an embodiment of the present invention;
[0025] Figure 4 It is a schematic diagram of another embodiment of the terminal-based risk detection device in an embodiment of the present invention;
[0026] Figure 5 Schematic diagram of an embodiment of a terminal-based risk detection device in an embodiment of the present invention. DETAILED DESCRIPTION
[0027] Embodiments of the present invention provide a terminal-based risk detection method, apparatus, device, and storage medium for improving the accuracy of terminal-based risk detection.
[0028] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , a first embodiment of the terminal-based risk detection method in an embodiment of the present invention includes:
[0030] 101. Acquire an image to be detected through a preset terminal, and acquire device information of the terminal from a preset database;
[0031] It should be noted that the liveness detection application is installed on the terminal, and the device information of the terminal can be collected during the startup of the liveness detection application. The liveness detection software development kit (SDK) is initialized on the terminal, and the device information of the terminal can be collected during the initialization of the liveness detection software development kit.
[0032] It is understandable that the execution subject of the present invention can be a terminal-based risk detection device, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking the server as the execution subject as an example. The embodiment of the present invention can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. Artificial intelligence software technology mainly includes computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0033] 102. Perform liveness detection on the image respectively by using multiple preset liveness detection models to obtain a probability value corresponding to each liveness detection model, wherein the probability value is used to indicate a probability value of the device being a high-risk device;
[0034] Specifically, the server performs liveness detection through at least one of multiple inspection strategies, wherein the multiple inspection strategies specifically include whether the device has ROOT, whether it is a virtual device, whether there is an abnormality in account login, glare liveness data during face recognition, motion liveness data, silent liveness data, historical face recognition records of the device, and at least one of multiple dimensions of data is used for judgment. During the face recognition process, the high-risk device risk level of the device is scored. When the risk level of the high-risk device is higher than a certain threshold, the corresponding device will be locked for a period of time to avoid insufficient accuracy of single-dimensional judgment.
[0035] 103. Generate a feature vector according to the probability value corresponding to each liveness detection model, and call a preset risk calculation function to calculate the risk corresponding to the feature vector to obtain a target risk;
[0036] Specifically, the server calculates the feature vector through the probability values corresponding to the multiple liveness detection models, wherein the multiple liveness detection models include at least one of the front-end face liveness detection model, the silent liveness detection model, and the glare liveness detection model. The server calculates the risk through the preset risk calculation function to obtain the target risk, wherein the preset risk calculation function can be a sigmoid function, and the sigmoid function is used to calculate the target risk corresponding to the feature vector. Specifically, the sigmoid function outputs the event probability, that is, when the output meets a certain probability condition, it is classified into a positive class. In the present invention, the sigmoid function is mainly used to calculate the risk probability of each liveness detection model to obtain the risk corresponding to each liveness detection model. Finally, the preset normalization function is used to normalize the risk corresponding to each liveness detection model to obtain the target risk.
[0037] 104. Generate a detection result of the terminal according to the target risk level, and the detection result is used to indicate whether the terminal is a high-risk device.
[0038] Specifically, the server compares the target risk with a preset target value, and generates a detection result, which includes a detection result of the terminal that the terminal is a high-risk device and a detection result that the terminal is not a high-risk device.
[0039] Furthermore, the server stores the detection results in a blockchain database, which is not specifically limited here.
[0040] In an embodiment of the present invention, an image to be detected is obtained through a preset terminal, and device information of the terminal is obtained from a preset database; liveness detection is performed on the image respectively through multiple preset liveness detection models to obtain probability values corresponding to each liveness detection model, wherein the probability value is used to indicate that the device is a high-risk device; a feature vector is generated according to the probability value corresponding to each liveness detection model, and a preset risk calculation function is called to calculate the risk corresponding to the feature vector to obtain a target risk; a detection result of the terminal is generated according to the target risk, and the detection result is used to indicate whether the terminal is a high-risk device. The present invention uses multiple liveness detection models to identify the device, thereby improving the accuracy of terminal-based risk detection.
[0041] See also Figure 2 , a second embodiment of the terminal-based risk detection method in an embodiment of the present invention includes:
[0042] 201. Acquire an image to be detected through a preset terminal, and acquire device information of the terminal from a preset database;
[0043] Specifically, the server receives a liveness detection request sent by the terminal, and queries the device information of the terminal from a preset database; the server obtains an image to be detected through a camera in the terminal, wherein the image is used for liveness detection.
[0044] It should be noted that the terminal may be a mobile phone, tablet computer, customized terminal or other terminal device, or may be various terminals simulated by software. Information about the device may include, for example, a device identifier for uniquely identifying the terminal, characteristic parameters for detecting that the terminal is a real device, etc.
[0045] 202. Perform liveness detection on the image respectively by using multiple preset liveness detection models to obtain a probability value corresponding to each liveness detection model, wherein the probability value is used to indicate a probability value of the device being a high-risk device;
[0046] Specifically, the server inputs the image into multiple preset liveness detection models respectively, where the multiple liveness detection models include: front-end face liveness detection model, silent liveness detection model, and glare liveness detection model; the server performs liveness detection on the image through multiple liveness detection models respectively, and obtains the probability value corresponding to each liveness detection model.
[0047] Among them, the server inputs the image into the front-end face liveness detection model for liveness detection to obtain face liveness data, and the server performs attack behavior analysis on the face liveness data to obtain the probability value corresponding to the front-end face liveness detection model; the server inputs the image into the silent liveness detection model for liveness detection to obtain silent liveness data, and performs attack behavior analysis on the silent liveness data to obtain the probability value corresponding to the silent liveness detection model; the server inputs the image into the glare liveness detection model for liveness detection to obtain glare liveness data, and performs attack behavior analysis on the glare liveness data to obtain the probability value corresponding to the glare liveness detection model.
[0048] It should be noted that when collecting face photos, face liveness detection will perform motion or glare liveness detection, and will report non-live data to the backend server. For devices that report non-liveness, it is believed that there may be device attacks on the face, or the server will perform another silent liveness detection on the face pictures collected and uploaded by the front end; or if a device has too many records of silent liveness failure; or the server will perform another glare liveness detection on the glare liveness video collected and uploaded by the front end; or if a device has too many records of glare liveness failure; or if a device has changed many login accounts, then it may be a device related to black industry to attack the face. The server detects whether the device is ROOT and reports the information to the server for record. ROOT devices are usually likely to be devices related to black industry to attack the face. The server detects whether the device is a simulator and reports the information to the server for record. After analyzing the black industry, the black industry may use the simulator to log in to the application, and then hijack the simulator's camera when doing face recognition to complete the replacement of face pictures. This simulator may also be a device involved in the black market and capable of face attack. If a device has been locked and unlocked too many times before, it may be a device involved in the black market and capable of face attack.
[0049] 203. Generate a feature vector according to the probability value corresponding to each liveness detection model, and call a preset risk calculation function to calculate the risk corresponding to the feature vector to obtain a target risk;
[0050] Specifically, the server extracts input vectors and output vectors from a preset sample database; the server performs parameter calculations on the probability value, input vector, and output vector corresponding to each liveness detection model to obtain target parameters, and generates feature vectors based on the target parameters; the server calls a preset risk calculation function to calculate the risk corresponding to the feature vector to obtain the target risk. The server selects samples from the preset data, X is the input vector, Y is the output vector, and the parameter W is determined by the least squares method, Y=wx, where the vector w is the weight of the feature diagnosis of each dimension listed above, and the vector x is the feature vector of the feature combination of each dimension listed above.
[0051] 204. Generate a detection result of the terminal according to the target risk level, and the detection result is used to indicate whether the terminal is a high-risk device;
[0052] Specifically, the server compares the target risk with the preset target value to obtain a comparison result; if the comparison result of the server is that the target risk is greater than or equal to the preset target value, the detection result of the terminal is generated that the terminal is a high-risk device; if the comparison result of the server is that the target risk is less than the preset target value, the detection result of the terminal is generated that the terminal is not a high-risk device.
[0053] For example, the server sets the preset target value to 0.5. If the comparison result is that the target risk is greater than or equal to the preset target value, that is, the target risk is greater than or equal to 0.5, then the detection result of the terminal is that the terminal is a high-risk device; if the comparison result is that the target risk is less than the preset target value, that is, the target risk is less than 0.5, then the detection result of the terminal is that the terminal is not a high-risk device.
[0054] 205. Determine the equipment risk level of the terminal according to the test results;
[0055] Specifically, if the device fingerprint of the terminal belongs to the device fingerprint high-risk blacklist library, the server determines that the device risk level of the terminal is high risk; and / or if the device fingerprint of the terminal belongs to the device fingerprint risk blacklist library, the server determines that the device risk level of the terminal is risky.
[0056] 206. Determine a liveness detection strategy based on the device risk level of the terminal.
[0057] Specifically, when the device risk level of the terminal is risky, the server determines that the liveness detection strategy is to randomly increase the number of actions required to be performed by the object to be detected and / or increase the difficulty of the actions required to be performed by the object to be detected; and / or when the device risk level of the terminal is neither high risk nor risky, the server determines that the liveness detection strategy is to randomly reduce the number of actions required to be performed by the object to be detected and / or reduce the difficulty of the actions required to be performed by the object to be detected.
[0058] Furthermore, the server stores the detection results in a blockchain database, which is not specifically limited here.
[0059] In an embodiment of the present invention, an image to be detected is obtained through a preset terminal, and device information of the terminal is obtained from a preset database; liveness detection is performed on the image respectively through multiple preset liveness detection models to obtain probability values corresponding to each liveness detection model, wherein the probability value is used to indicate that the device is a high-risk device; a feature vector is generated according to the probability value corresponding to each liveness detection model, and a preset risk calculation function is called to calculate the risk corresponding to the feature vector to obtain a target risk; a detection result of the terminal is generated according to the target risk, and the detection result is used to indicate whether the terminal is a high-risk device. The present invention uses multiple liveness detection models to identify the device, thereby improving the accuracy of terminal-based risk detection.
[0060] The above describes the terminal-based risk detection method in the embodiment of the present invention. The following describes the terminal-based risk detection device in the embodiment of the present invention. Figure 3 The first embodiment of the terminal-based risk detection device in the embodiment of the present invention includes:
[0061] The acquisition module 301 is used to acquire the image to be detected through a preset terminal and obtain the device information of the terminal from a preset database;
[0062] A detection module 302 is used to perform liveness detection on the image using a plurality of preset liveness detection models to obtain a probability value corresponding to each liveness detection model, wherein the probability value is used to indicate a probability value that the device is a high-risk device;
[0063] The calculation module 303 is used to generate a feature vector according to the probability value corresponding to each living body detection model, and call a preset risk calculation function to calculate the risk corresponding to the feature vector to obtain a target risk;
[0064] The generating module 304 is used to generate a detection result of the terminal according to the target risk, wherein the detection result is used to indicate whether the terminal is a high-risk device.
[0065] Furthermore, the server stores the detection results in a blockchain database, which is not specifically limited here.
[0066] In an embodiment of the present invention, an image to be detected is obtained through a preset terminal, and device information of the terminal is obtained from a preset database; liveness detection is performed on the image respectively through multiple preset liveness detection models to obtain probability values corresponding to each liveness detection model, wherein the probability value is used to indicate that the device is a high-risk device; a feature vector is generated according to the probability value corresponding to each liveness detection model, and a preset risk calculation function is called to calculate the risk corresponding to the feature vector to obtain a target risk; a detection result of the terminal is generated according to the target risk, and the detection result is used to indicate whether the terminal is a high-risk device. The present invention uses multiple liveness detection models to identify the device, thereby improving the accuracy of terminal-based risk detection.
[0067] See also Figure 4 The second embodiment of the terminal-based risk detection device in the embodiment of the present invention includes:
[0068] The acquisition module 301 is used to acquire the image to be detected through a preset terminal and obtain the device information of the terminal from a preset database;
[0069] A detection module 302 is used to perform liveness detection on the image using a plurality of preset liveness detection models to obtain a probability value corresponding to each liveness detection model, wherein the probability value is used to indicate a probability value that the device is a high-risk device;
[0070] The calculation module 303 is used to generate a feature vector according to the probability value corresponding to each living body detection model, and call a preset risk calculation function to calculate the risk corresponding to the feature vector to obtain a target risk;
[0071] The generating module 304 is used to generate a detection result of the terminal according to the target risk, wherein the detection result is used to indicate whether the terminal is a high-risk device.
[0072] Optionally, the acquisition module 301 is specifically used for:
[0073] The receiving terminal sends a liveness detection request, and queries the device information of the terminal from a preset database; and obtains an image to be detected through a camera in the terminal, wherein the image is used for liveness detection.
[0074] Optionally, the detection module 302 further includes:
[0075] The input unit 3021 is used to input the image into a plurality of preset liveness detection models respectively, wherein the plurality of liveness detection models include: a front-end face liveness detection model, a silent liveness detection model, and a glare liveness detection model;
[0076] The processing unit 3022 is used to perform liveness detection on the image using the multiple liveness detection models respectively to obtain a probability value corresponding to each liveness detection model.
[0077] Optionally, the processing unit 3022 is specifically configured to:
[0078] The image is input into the front-end face liveness detection model for liveness detection to obtain face liveness data, and the face liveness data is analyzed for attack behavior to obtain the probability value corresponding to the front-end face liveness detection model; the image is input into the silent liveness detection model for liveness detection to obtain silent liveness data, and the silent liveness data is analyzed for attack behavior to obtain the probability value corresponding to the silent liveness detection model; the image is input into the glare liveness detection model for liveness detection to obtain glare liveness data, and the glare liveness data is analyzed for attack behavior to obtain the probability value corresponding to the glare liveness detection model.
[0079] Optionally, the calculation module 303 is specifically used for:
[0080] Extract input vectors and output vectors from a preset sample database; perform parameter calculation on the probability value corresponding to each liveness detection model, the input vector and the output vector to obtain target parameters, and generate feature vectors based on the target parameters; call a preset risk calculation function to calculate the risk corresponding to the feature vector to obtain the target risk.
[0081] Optionally, the generating module 304 is specifically used for:
[0082] The target risk is compared with a preset target value to obtain a comparison result; if the comparison result is that the target risk is greater than or equal to the preset target value, the detection result of the terminal is generated as the terminal is a high-risk device; if the comparison result is that the target risk is less than the preset target value, the detection result of the terminal is generated as the terminal is not a high-risk device.
[0083] Optionally, the terminal-based risk detection device further includes:
[0084] The configuration module 305 is used to determine the device risk level of the terminal according to the detection result; and determine the liveness detection strategy based on the device risk level of the terminal.
[0085] Furthermore, the server stores the detection results in a blockchain database, which is not specifically limited here.
[0086] In an embodiment of the present invention, an image to be detected is obtained through a preset terminal, and device information of the terminal is obtained from a preset database; liveness detection is performed on the image respectively through multiple preset liveness detection models to obtain probability values corresponding to each liveness detection model, wherein the probability value is used to indicate that the device is a high-risk device; a feature vector is generated according to the probability value corresponding to each liveness detection model, and a preset risk calculation function is called to calculate the risk corresponding to the feature vector to obtain a target risk; a detection result of the terminal is generated according to the target risk, and the detection result is used to indicate whether the terminal is a high-risk device. The present invention uses multiple liveness detection models to identify the device, thereby improving the accuracy of terminal-based risk detection.
[0087] above Figure 3 and Figure 4 The terminal-based risk detection device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The terminal-based risk detection device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0088] Figure 5 is a schematic diagram of the structure of a terminal-based risk detection device provided by an embodiment of the present invention. The terminal-based risk detection device 500 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 510 (for example, one or more processors) and a memory 520, and one or more storage media 530 (for example, one or more mass storage devices) storing application programs 533 or data 532. Among them, the memory 520 and the storage medium 530 may be temporary storage or permanent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the terminal-based risk detection device 500. Furthermore, the processor 510 may be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the terminal-based risk detection device 500.
[0089] The terminal-based risk detection device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input and output interfaces 560, and / or one or more operating systems 531, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 5The illustrated terminal-based risk detection device structure does not constitute a limitation on the terminal-based risk detection device, and may include more or fewer components than illustrated, or combine certain components, or arrange the components differently.
[0090] The present invention also provides a terminal-based risk detection device, which includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the terminal-based risk detection method in the above-mentioned embodiments.
[0091] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the terminal-based risk detection method.
[0092] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0093] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0094] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0095] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0096] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A terminal-based risk detection method, characterized in that: The terminal-based risk detection method includes: Acquire an image to be detected through a preset terminal, and acquire device information of the terminal from a preset database; Performing liveness detection on the image respectively through a plurality of preset liveness detection models, and obtaining a probability value corresponding to each liveness detection model, wherein the probability value is used to indicate a probability value of the device being a high-risk device, and the plurality of liveness detection models include a front-end face liveness detection model, a silent liveness detection model, and a glare liveness detection model; Generate a feature vector according to the probability value corresponding to each liveness detection model, and call a preset risk calculation function to calculate the risk corresponding to the feature vector to obtain a target risk, wherein the risk calculation function is a sigmoid function, and the sigmoid function is used to perform risk probability calculation on each liveness detection model to obtain the risk corresponding to each liveness detection model, and use a preset normalization function to normalize the risk corresponding to each liveness detection model to obtain the target risk; A detection result of the terminal is generated according to the target risk, and the detection result is used to indicate whether the terminal is a high-risk device.
2. The terminal-based risk detection method according to claim 1, characterized in that: The step of acquiring the image to be detected through a preset terminal and acquiring the device information of the terminal from a preset database includes: The receiving terminal sends a liveness detection request, and queries the device information of the terminal from a preset database; An image to be detected is acquired through a camera in the terminal, wherein the image is used for living body detection.
3. The terminal-based risk detection method according to claim 1, characterized in that: The liveness detection is performed on the image by using a plurality of preset liveness detection models respectively to obtain a probability value corresponding to each liveness detection model, wherein the probability value is used to indicate that the device is a high-risk device, including: Inputting the images into a plurality of preset living body detection models respectively; Perform liveness detection on the image using the multiple liveness detection models respectively to obtain a probability value corresponding to each liveness detection model.
4. The terminal-based risk detection method according to claim 3, characterized in that: The performing liveness detection on the image by using the multiple liveness detection models respectively to obtain a probability value corresponding to each liveness detection model includes: Inputting the image into the front-end face liveness detection model for liveness detection to obtain face liveness data, and performing attack behavior analysis on the face liveness data to obtain a probability value corresponding to the front-end face liveness detection model; Inputting the image into the silent liveness detection model for liveness detection to obtain silent liveness data, and performing attack behavior analysis on the silent liveness data to obtain a probability value corresponding to the silent liveness detection model; The image is input into the glare liveness detection model for liveness detection to obtain glare liveness data, and the glare liveness data is subjected to attack behavior analysis to obtain a probability value corresponding to the glare liveness detection model.
5. The terminal-based risk detection method according to claim 1, characterized in that: Generating a detection result of the terminal according to the target risk, wherein the detection result is used to indicate whether the terminal is a high-risk device, includes: Comparing the target risk with a preset target value to obtain a comparison result; If the comparison result is that the target risk is greater than or equal to the preset target value, generating a detection result of the terminal as that the terminal is a high-risk device; If the comparison result is that the target risk is less than the preset target value, the detection result of the terminal is generated as follows: the terminal is not a high-risk device.
6. The terminal-based risk detection method according to any one of claims 1 to 5, characterized in that: After generating a detection result of the terminal according to the target risk, wherein the detection result is used to indicate whether the terminal is a high-risk device, the method further includes: Determine the device risk level of the terminal according to the detection result; A liveness detection strategy is determined based on the device risk level of the terminal.
7. A terminal-based risk detection device, characterized in that: The terminal-based risk detection device includes: An acquisition module, used to acquire the image to be detected through a preset terminal, and acquire the device information of the terminal from a preset database; a detection module, configured to perform liveness detection on the image respectively through a plurality of preset liveness detection models, and obtain a probability value corresponding to each liveness detection model, wherein the probability value is used to indicate a probability value that the device is a high-risk device, and the plurality of liveness detection models include a front-end face liveness detection model, a silent liveness detection model, and a glare liveness detection model; A calculation module, used to generate a feature vector according to the probability value corresponding to each liveness detection model, and call a preset risk calculation function to calculate the risk corresponding to the feature vector to obtain a target risk, wherein the risk calculation function is a sigmoid function, and the sigmoid function is used to perform risk probability calculation on each liveness detection model to obtain the risk corresponding to each liveness detection model, and use a preset normalization function to normalize the risk corresponding to each liveness detection model to obtain the target risk; A generating module is used to generate a detection result of the terminal according to the target risk, wherein the detection result is used to indicate whether the terminal is a high-risk device.
8. A terminal-based risk detection device, characterized in that: The terminal-based risk detection device includes: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instruction in the memory to enable the terminal-based risk detection device to execute the terminal-based risk detection method according to any one of claims 1 to 6.
9. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the terminal-based risk detection method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Unlocking control method and related products
CN107832598A
Living body detection method, device, system and storage medium
CN108875688A