Liveness detection methods and systems

By acquiring images and attack risk indicators of target users, and using graph convolutional networks to train a model for liveness detection, the problem of balancing security and user experience in existing methods is solved, and fast and secure liveness detection is achieved.

CN116343348BActive Publication Date: 2026-03-10ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-06
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing liveness detection methods struggle to balance security and user experience. Silent methods lack sufficient security, while interactive methods are time-consuming and negatively impact user experience.

Method used

By acquiring target images and attack risk indicators of target users, combining user similarity and device similarity, and training a model using graph convolutional networks, the attack risk level is determined, and liveness detection is performed, achieving rapid security detection without requiring additional user actions.

Benefits of technology

It improves the security of liveness detection without affecting user experience. By combining attack risk indicators for liveness detection, it enhances both the security and efficiency of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116343348B_ABST
    Figure CN116343348B_ABST
Patent Text Reader

Abstract

The liveness detection method and system provided in this specification acquire the target image and attack risk indicators of the target user, perform liveness detection based on the target image and attack risk indicators, obtain the liveness detection result, and output the liveness detection result.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present specification relates to the field of image recognition, and in particular, to a living body detection method and system. BACKGROUND

[0002] In recent years, as people's requirements for the security of face recognition systems increase, living body detection has become an indispensable part of face recognition systems. Through living body detection, non-living body type attack samples can be effectively intercepted. Existing living body detection methods can adopt a silent living body detection method or an interactive action-based living body detection method.

[0003] The silent living body detection method has poor security and cannot be applied to some scenarios with high security requirements. The interactive action-based living body detection method requires the user to cooperate to complete some actions, for example, the user completes various actions based on prompts, which results in a long time consumption of living body detection and thus affects the user experience. Therefore, there is an urgent need for a living body detection method that can balance user experience and security at the same time. SUMMARY

[0004] The present specification provides a living body detection method and system that can balance user experience and security at the same time.

[0005] In a first aspect, the present specification provides a living body detection method, comprising: obtaining a target image of a target user and an attack risk indicator, the attack risk indicator representing a risk level of an attack behavior when the target user performs biometric recognition on a target device, and the target image being collected by the target device; performing living body detection based on the target image and the attack risk indicator to obtain a living body detection result; and outputting the living body detection result.

[0006] In some embodiments, the obtaining of the attack risk indicator comprises: determining a user similarity corresponding to the target user, the user similarity being obtained based on M first user similarities and / or N second user similarities, the M first user similarities representing similarities between the target user and M target risk users, the N second user similarities representing similarities between the target user and N target risk devices, the M and the N being integers greater than or equal to 0; determining a device similarity corresponding to the target device, the device similarity being obtained based on P first device similarities and / or K second device similarities, the P first device similarities representing similarities between the target device and P target risk users, the K second device similarities representing similarities between the target device and K target risk devices, the P and the K being integers greater than or equal to 0; and determining the attack risk indicator based on the user similarity and the device similarity.

[0007] In some embodiments, the M first user similarities are obtained by the following steps: obtaining the first target user features corresponding to the target user; obtaining the M target risk user features corresponding to the M target risk users, wherein the M target risk users are users associated with the target user and have engaged in attack behavior; and determining the M first user similarities based on the similarity between the first target user features and the M target risk user features.

[0008] In some embodiments, the first target user feature and the M target risk user features are obtained based on a first graph model, which includes multiple users and the relationships between the multiple users, including the target user.

[0009] In some embodiments, the first graph model is obtained by the following steps: obtaining a first initial graph model, wherein the first initial graph model uses the initial user features corresponding to each user among the plurality of users as nodes, and connects the nodes corresponding to users with related relationships, wherein at least some users among the plurality of users are labeled as risk users; and training the first initial graph model by updating its features to obtain the first graph model.

[0010] In some embodiments, training the first initial graph model to update its features and obtain the first graph model includes: updating the features of the plurality of initial user features using a preset first graph convolutional network to obtain a plurality of training user features; performing risk classification based on the plurality of training user features to obtain risk classification training results; and determining a first comprehensive loss based on the risk classification training results and the plurality of training user features, and converging the preset first graph convolutional network based on the first comprehensive loss to obtain the first graph model.

[0011] In some embodiments, determining the first comprehensive loss based on the risk classification training results and the plurality of training user features includes: determining a user feature similarity loss based on the differences between the plurality of training user features; determining a risk classification loss based on the differences between the risk classification training results and the labeled risk classifications of at least some of the plurality of users; and obtaining the first comprehensive loss based on the weighted sum of the user feature similarity loss and the risk classification loss.

[0012] In some embodiments, the user feature similarity loss constraint states that the similarity between training user features corresponding to users with a relationship is greater than a preset similarity, while the similarity between training user features corresponding to users without a relationship is less than a preset similarity.

[0013] In some embodiments, the N second user similarities are obtained by the following steps: obtaining the second target user features corresponding to the target user; obtaining the N target risk device features corresponding to the N target risk devices, wherein the N target risk devices are devices associated with the target user and exhibiting attack behavior; and determining the N second user similarities based on the similarity between the second target user features and the N target risk device features.

[0014] In some embodiments, the second target user characteristics and the N target risk device characteristics are obtained based on a second graph model, which includes multiple users and multiple devices, and the association relationships between the multiple users and the multiple devices. The multiple users include the target user, and the multiple devices include the target device.

[0015] In some embodiments, the P first device similarities are obtained by the following steps: obtaining the first target device features corresponding to the target device; obtaining the P target risk user features corresponding to the P target risk users, wherein the P target risk users are users associated with the target device and who have engaged in attack behavior; and determining the P first device similarities based on the similarity between the first device features and the P target risk user features.

[0016] In some embodiments, the first target device feature and the P target risk user features are obtained based on a second graph model, which includes multiple users and multiple devices, and the association relationships between the multiple users and the multiple devices. The multiple users include the target user, and the multiple devices include the target device.

[0017] In some embodiments, the second graph model is obtained by the following steps: obtaining a second initial graph model, wherein the second initial graph model uses the initial user features corresponding to each user among the plurality of users and the initial device features corresponding to each device among the plurality of devices as nodes, and connects the nodes corresponding to users and devices that have a relationship, wherein at least some users among the plurality of users are marked as risky users, and at least some devices among the plurality of devices are marked as risky devices; and training the second initial graph model by updating its features to obtain the second graph model.

[0018] In some embodiments, training the second initial graph model by updating its features to obtain the second graph model includes: using a preset second graph convolutional network to update the features of the plurality of initial user features and the plurality of initial device features to obtain a plurality of training user features and a plurality of training device features; performing risk classification based on the plurality of training user features and the plurality of training device features to obtain a risk classification training result; and determining a second comprehensive loss based on the risk classification training result, the plurality of training user features, and the plurality of training device features, and converging the preset second graph convolutional network based on the second comprehensive loss to obtain the second graph model.

[0019] In some embodiments, determining the second comprehensive loss based on the risk classification training results, the multiple training user features, and the multiple training device features includes: determining a feature similarity loss between user devices based on the difference between the training user features corresponding to the user and the training device features corresponding to the device in a user-device pair with an association relationship; determining a risk classification loss based on the difference between the risk classification training results and the labeled risk classification results of at least some of the multiple users, and / or the difference between the risk classification training results and the labeled risk classification results of at least some of the multiple devices; and obtaining the second comprehensive loss based on the weighted sum of the feature similarity loss information between user devices and the risk classification loss information.

[0020] In some embodiments, the similarity of the K second devices is obtained by the following steps: obtaining the second target device features corresponding to the target device; obtaining the K target risk device features corresponding to the K target risk devices, wherein the K target risk devices are devices associated with the target device and exhibiting attack behavior; and determining the similarity of the K second devices based on the similarity between the second target device features and the K target risk device features.

[0021] In some embodiments, the second target device feature and the K target risk device features are obtained based on a third graph model, which includes multiple devices and the relationships between the multiple devices, including the target device.

[0022] In some embodiments, the third graph model is obtained by the following steps: obtaining a third initial graph model, wherein the third initial graph model uses the initial device features corresponding to each of the plurality of devices as nodes, and connects the nodes corresponding to devices that have a relationship, wherein at least some of the plurality of devices are marked as risk devices; and training the third initial graph model by updating its features to obtain the third graph model.

[0023] In some embodiments, the training of the third initial graph model to obtain the third graph model by updating its features includes: using a preset third graph convolutional network to update the features of the plurality of initial devices to obtain a plurality of training device features; performing risk classification based on the plurality of training device features to obtain risk classification training results; and determining a third comprehensive loss based on the risk classification training results and the plurality of training device features, and converging the preset third graph convolutional network based on the third comprehensive loss to obtain the third graph model.

[0024] In some embodiments, determining the third comprehensive loss based on the risk classification training results and the features of the plurality of training devices includes: determining a device feature similarity loss based on the differences between the features of the plurality of training devices; determining a risk classification loss based on the differences between the risk classification training results and the labeled risk classification results of at least some of the plurality of devices; and obtaining the third comprehensive loss based on the weighted sum of the device feature similarity loss and the risk classification loss.

[0025] In some embodiments, the step of performing liveness detection based on the target image and the attack risk indicator to obtain a liveness detection result includes: extracting features from the target image and the attack risk indicator to obtain target image features and attack risk features; fusing features based on the target image features and the attack risk features to obtain fused features; and performing liveness detection based on the fused features to obtain the liveness detection result.

[0026] Secondly, this specification also provides a liveness detection system, comprising: at least one storage medium storing at least one instruction set for performing liveness detection; and at least one processor communicatively connected to the at least one storage medium, wherein, when the liveness detection system is running, the at least one processor reads the at least one instruction set and executes the liveness detection method described in the first aspect of this specification according to the instructions of the at least one instruction set.

[0027] As can be seen from the above technical solutions, the liveness detection method and system provided in this specification acquire the target image and attack risk indicators of the target user, and perform liveness detection based on the target image and attack risk indicators to obtain and output the liveness detection results. The liveness detection method and system provided in this specification can perform liveness detection based on the target image and attack risk indicators of the target user. No additional actions from the user are required during the detection process, therefore liveness detection is time-efficient and can be performed seamlessly, improving the user experience. Simultaneously, by incorporating attack risk indicators into the liveness detection process, the risk level of attack behavior by the target user and target device is considered to assist in liveness detection, thereby improving the security of liveness detection. Therefore, the liveness detection method and system provided in this specification can improve both the security of liveness detection and the user experience.

[0028] Other functions of the liveness detection methods and systems provided in this specification will be partially listed in the following description. The figures and examples described below will be readily apparent to those skilled in the art. The inventive aspects of the liveness detection methods and systems provided in this specification can be fully understood through practice or use of the methods, apparatus, and combinations described in the detailed examples below. Attached Figure Description

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

[0030] Figure 1 A schematic diagram illustrating an application scenario of a liveness detection system provided according to an embodiment of this specification is shown.

[0031] Figure 2 A hardware structure diagram of a computing device provided according to an embodiment of this specification is shown;

[0032] Figure 3 A flowchart of a liveness detection method according to an embodiment of this specification is shown;

[0033] Figure 4 A flowchart illustrating a method for obtaining attack risk indicators according to embodiments of this specification is shown; and

[0034] Figure 5 A schematic diagram of the structure of a liveness detection model provided according to an embodiment of this specification is shown. Detailed Implementation

[0035] The following description provides specific application scenarios and requirements for this specification, intended to enable those skilled in the art to make and use the contents of this specification. Various partial modifications to the disclosed embodiments will be apparent to those skilled in the art, and the general principles defined herein can be applied to other embodiments and applications without departing from the spirit and scope of this specification. Therefore, this specification is not limited to the embodiments shown, but rather to the widest scope consistent with the claims.

[0036] The terminology used herein is for the purpose of describing particular exemplary embodiments only and is not restrictive. For example, unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “the” used herein may also include the plural forms. When used in this specification, the terms “comprising,” “including,” and / or “containing” mean that the associated integers, steps, operations, elements, and / or components are present, but do not exclude the presence of one or more other features, integers, steps, operations, elements, components, and / or groups, or that other features, integers, steps, operations, elements, components, and / or groups may be added to the system / method.

[0037] Considering the following description, these and other features of this specification, as well as the operation and function of the related components of the structure, and the economy of assembly and manufacture of the parts, can be significantly improved. All of these form part of this specification with reference to the accompanying drawings. However, it should be clearly understood that the drawings are for illustrative and descriptive purposes only and are not intended to limit the scope of this specification. It should also be understood that the drawings are not drawn to scale.

[0038] The flowcharts used in this specification illustrate operations implemented according to some embodiments of this specification. It should be clearly understood that the operations in the flowcharts may not be implemented in a sequential order. Instead, the operations may be implemented in reverse order or simultaneously. Furthermore, one or more additional operations may be added to the flowcharts. One or more operations may be removed from the flowcharts.

[0039] For ease of description, the terms that will appear in the following descriptions will be explained as follows:

[0040] Graph model: In this scheme, it refers to a graph network that uses the connections between users, users and devices, and devices to transmit risk factors. The graph network can transmit risks from known risk nodes to similar undiscovered risk nodes.

[0041] Liveness detection (liveness protection against attacks): refers to the technology of using artificial intelligence models to detect and intercept liveness attacks, such as those on mobile phone screens, printed paper, etc.

[0042] Tiered liveness detection: This refers to running different liveness detection algorithms or applying different liveness detection standards based on different risk levels. In this solution, it means applying different liveness detection standards based on different risk levels.

[0043] In recent years, facial recognition technology has developed rapidly and has been applied to scenarios such as facial recognition payment and attendance tracking. While bringing convenience to people, facial recognition also faces security risks. For example, attackers can use methods such as mobile phone screens, printed paper, and silicone masks to launch liveness detection attacks on facial recognition systems. To combat liveness attacks, various types of liveness detection methods have been proposed and integrated into facial recognition systems.

[0044] Currently, common liveness detection methods can be categorized into silent liveness detection methods and interactive action-based liveness detection methods, based on whether user interaction is required. Silent liveness detection methods perform liveness detection by acquiring facial images of users in a natural state. These methods are easy to train and deploy. However, due to limited input information, their security capabilities are relatively weak. Therefore, these methods are difficult to apply to scenarios with high security requirements, such as the financial sector. Interactive action-based liveness detection methods require users to perform various actions based on prompts, such as "blink," "shake their head," and "open their mouth." These methods utilize user images under various action conditions for liveness detection, offering better security capabilities. However, because they require additional user interaction to complete one or more actions, liveness detection is time-consuming, thus impacting the user experience.

[0045] To address the aforementioned technical problems, the inventors of this specification propose the following technical concept: when performing liveness detection on a target user, an attack risk index of the target user is obtained, and liveness detection is performed in conjunction with the target user's attack risk index and the target image, thereby achieving the effect of simultaneously considering user experience and security requirements.

[0046] The liveness detection method will now be described in detail with reference to specific embodiments. Before describing the specific embodiments in this specification, the application scenarios of this specification will be introduced as follows:

[0047] The liveness detection method provided in this specification can be applied to any liveness detection scenario in biometric processes, such as facial payment, access control, attendance, and identity verification. It can be used to perform liveness detection on the target image of the target user. It can also be applied to any other liveness detection scenario, which will not be elaborated upon here. The biometric features may include, but are not limited to, one or more of the following: facial image, iris, sclera, fingerprint, palm print, and skeletal projection. For ease of description, this specification will use the application of the liveness detection method in a facial recognition scenario as an example for liveness detection of a face.

[0048] Those skilled in the art should understand that the liveness detection methods and systems described in this specification are also within the scope of protection of this specification when applied to other application scenarios.

[0049] Figure 1 This diagram illustrates an application scenario of a liveness detection system 001 provided according to an embodiment of this specification. The liveness detection system 001 (hereinafter referred to as System 001) can be applied to liveness detection in any scenario, such as liveness detection in face payment scenarios, liveness detection in identity verification scenarios, liveness detection in other face recognition scenarios, etc. Figure 1 As shown, system 001 may include target user 100, client 200, server 300 and network 400.

[0050] Target user 100 can be a user who needs to undergo biometric identification, or a user who is currently undergoing biometric identification. Target user 100 can be the object detected by system 001. Target user 100 can initiate a biometric identification process, thereby triggering liveness detection of target user 100.

[0051] Client 200 may be a device for performing liveness detection on a target image in response to a liveness detection operation by target user 100. In some embodiments, the liveness detection method may be executed on client 200. In this case, client 200 may store data or instructions for performing the liveness detection method described herein, and may execute or be used to execute the data or instructions. In some embodiments, client 200 may include a hardware device with data processing capabilities and the necessary programs required to drive the hardware device. In some embodiments, client 200 may include a mobile device, tablet computer, laptop computer, built-in device of a motor vehicle, or similar content, or any combination thereof. In some embodiments, the mobile device may include a smart home device, smart mobile device, virtual reality device, augmented reality device, or similar device, or any combination thereof. In some embodiments, the smart home device may include a smart TV, desktop computer, etc., or any combination thereof. In some embodiments, the smart mobile device may include a smartphone, personal digital assistant, gaming device, navigation device, etc., or any combination thereof. In some embodiments, the virtual reality device or augmented reality device may include a virtual reality headset, virtual reality glasses, virtual reality patch, augmented reality headset, augmented reality glasses, augmented reality patch, or similar content, or any combination thereof. For example, the virtual reality device or the augmented reality device may include Google Glass, a head-mounted display, VR, etc. In some embodiments, the built-in device in the motor vehicle may include an in-vehicle computer, an in-vehicle television, etc. In some embodiments, the client 200 may include an image acquisition device and an audio acquisition device for collecting user data of the account. In some embodiments, the image acquisition device may be a two-dimensional image acquisition device (such as an RGB camera), or a two-dimensional image acquisition device (such as an RGB camera) and a depth image acquisition device (such as a 3D structured light camera, a laser detector, etc.). In some embodiments, the client 200 may be a device with positioning technology for locating the position of the client 200.

[0052] In some embodiments, the client 200 may have one or more applications (APPs) installed. The APPs provide the target user 100 with the ability and interface to interact with the outside world via the network 400. The APPs include, but are not limited to: web browser APPs, search APPs, chat APPs, shopping APPs, video APPs, financial management APPs, instant messaging tools, email clients, social media platform software, etc. In some embodiments, the client 200 may have a target APP installed. The target APP can collect target images of the target user's biometric features for the client 200. In some embodiments, the target object 100 can also trigger a liveness detection request through the target APP. The target APP can respond to the liveness detection request and execute the liveness detection method described in this specification. The liveness detection method will be described in detail later.

[0053] like Figure 1 As shown, client 200 can communicate with server 300. In some embodiments, server 300 can communicate with multiple clients 200. In some embodiments, client 200 can interact with server 300 through network 400 to receive or send messages, etc. Server 300 can be a server providing various services, such as a backend server supporting liveness detection of target images of target users collected on multiple clients 200. In some embodiments, the liveness detection method can be executed on server 300. In this case, server 300 can store data or instructions for executing the liveness detection method described in this specification, and can execute or be used to execute the data or instructions. In some embodiments, server 300 may include hardware devices with data information processing capabilities and the necessary programs required to drive the hardware devices. Server 300 can communicate with multiple clients 200 and receive data sent by clients 200.

[0054] Network 400 serves as a medium to provide a communication connection between client 200 and server 300. Network 400 facilitates the exchange of information or data. For example... Figure 1 As shown, client 200 and server 300 can connect to network 400 and transmit information or data to each other through network 400. In some embodiments, network 400 can be any type of wired or wireless network, or a combination thereof. For example, network 400 may include cable networks, wired networks, fiber optic networks, telecommunications networks, intranets, the Internet, local area networks (LANs), wide area networks (WANs), wireless local area networks (WLANs), metropolitan area networks (MANs), public switched telephone networks (PSTNs), and Bluetooth networks. TM ZigBeeTM A network, a near-field communication (NFC) network, or a similar network. In some embodiments, network 400 may include one or more network access points. For example, network 400 may include wired or wireless network access points, such as base stations or internet exchange points, through which one or more components of client 200 and server 300 can connect to network 400 to exchange data or information.

[0055] It should be understood that Figure 1 The number of clients 200, servers 300, and networks 400 shown is merely illustrative. Depending on implementation needs, there can be any number of clients 200, servers 300, and networks 400.

[0056] It should be noted that the liveness detection method can be executed entirely on the client 200, entirely on the server 300, or partially on both the client 200 and the server 300. This paper will use the execution of the liveness detection method on the server 300 as an example for illustration.

[0057] Figure 2 A hardware structure diagram of a computing device 600 provided according to an embodiment of this specification is shown. The computing device 600 can execute the liveness detection method described in this specification. The liveness detection method is described in other parts of this specification. When the liveness detection method is executed on a client 200, the computing device 600 can be the client 200. When the liveness detection method is executed on a server 300, the computing device 600 can be the server 300. When the liveness detection method can be executed partly on the client 200 and partly on the server 300, the computing device 600 can be both the client 200 and the server 300.

[0058] like Figure 2 As shown, the computing device 600 may include at least one storage medium 630 and at least one processor 620. In some embodiments, the computing device 600 may also include a communication port 650 and an internal communication bus 610. Additionally, the computing device 600 may include I / O components 660.

[0059] The internal communication bus 610 can connect different system components, including storage medium 630, processor 620 and communication port 650.

[0060] I / O component 660 supports input / output between computing device 600 and other components.

[0061] Communication port 650 is used for data communication between computing device 600 and external sources. For example, communication port 650 can be used for data communication between computing device 600 and network 400. Communication port 650 can be a wired communication port or a wireless communication port.

[0062] Storage medium 630 may include a data storage device. The data storage device may be a non-transitory storage medium or a temporary storage medium. For example, the data storage device may include one or more of a disk 632, a read-only storage medium (ROM) 634, or a random access storage medium (RAM) 636. Storage medium 630 also includes at least one instruction set stored in the data storage device. The instructions are computer program code, which may include programs, routines, objects, components, data structures, procedures, modules, etc., that execute the liveness detection method provided in this specification.

[0063] At least one processor 620 can be communicatively connected to at least one storage medium 630 and a communication port 650 via an internal communication bus 610. At least one processor 620 is used to execute the at least one instruction set described above. When the computing device 600 is running, at least one processor 620 reads the at least one instruction set and, according to the instructions of the at least one instruction set, executes the liveness detection method provided in this specification. Processor 620 can execute all the steps included in the liveness detection method. Processor 620 can be in the form of one or more processors. In some embodiments, processor 620 may include one or more hardware processors, such as a microcontroller, microprocessor, reduced instruction set computer (RISC), application-specific integrated circuit (ASIC), application-specific instruction set processor (ASIP), central processing unit (CPU), graphics processing unit (GPU), physical processing unit (PPU), microcontroller unit, digital signal processor (DSP), field-programmable gate array (FPGA), advanced RISC machine (ARM), programmable logic device (PLD), any circuit or processor capable of performing one or more functions, or any combination thereof. For illustrative purposes only, only one processor 620 is described in this specification for the computing device 600. However, it should be noted that the computing device 600 may also include multiple processors. Therefore, the operation and / or method steps disclosed in this specification may be executed by one processor as described herein, or they may be executed jointly by multiple processors. For example, if processor 620 of the computing device 600 in this specification executes steps A and B, it should be understood that steps A and B may also be executed jointly or separately by two different processors 620 (e.g., a first processor executes step A, a second processor executes step B, or the first and second processors jointly execute steps A and B).

[0064] Figure 3 A flowchart of a liveness detection method P100 according to an embodiment of this specification is shown. As previously described, computing device 600 can execute the liveness detection method P100 of this specification. Specifically, processor 620 can read an instruction set stored in its local storage medium and then execute the liveness detection method P100 of this specification according to the instructions in the instruction set. Figure 3 As shown, method P100 may include:

[0065] S120: Obtain the target image and attack risk indicators of the target user.

[0066] For information about the target users, please refer to the preceding content.

[0067] The target image can be acquired through the target device. The target device can be the aforementioned client. The target device can be a device that performs liveness verification or facial verification. The target user can complete the login on the target device by performing liveness verification or facial verification. The target device can include a terminal, client, or platform, etc.

[0068] The target device integrates an image acquisition module. When a liveness verification or face verification request from the target user is triggered, the target device controls the image acquisition module to acquire a target image of the target user.

[0069] The attack risk index characterizes the risk level of an attack when a target user performs biometric identification on a target device. The risk level can characterize the probability that the target user and / or target device pose a risk. In some embodiments, the risk level characterizes the probability that the target user is a risky user. In some embodiments, the risk level characterizes the probability that the target device is a risky device. In some embodiments, the risk level characterizes the probability that both the target user and the target device pose a risk. In some embodiments, the risk level can be represented numerically. For example, the risk level can be represented by a value between 0 and 10, a probability value, or a value between 0 and 100. In some embodiments, the risk level is positively correlated with the probability that the target user and / or target device poses a risk. That is, the higher the risk level, the higher the probability that the target user and / or target device poses a risk; the lower the risk level, the lower the probability that the target user and / or target device poses a risk. It should be noted that the foregoing is merely illustrative, and those skilled in the art should understand that setting the risk level to be negatively correlated with the probability that the target user and / or target device poses a risk is also within the scope of this specification.

[0070] Figure 4 A flowchart illustrating a method for obtaining attack risk indicators according to embodiments of this specification is shown.Figure 4 This corresponds to the step of obtaining attack risk indicators in step S120. For example... Figure 4 As shown, obtaining the attack risk indicator in step S120 may include the following steps:

[0071] S122: Determine the user similarity corresponding to the target user.

[0072] The user similarity score corresponding to the target user is obtained based on M first-user similarities and / or N second-user similarities. Here, the M first-user similarities represent the similarity between the target user and M target risk users. The N second-user similarities represent the similarity between the target user and N target risk devices. M and N are both integers greater than or equal to 0.

[0073] In some embodiments, the user similarity corresponding to the target user can be obtained based on M first user similarities. Each of the M first user similarities represents the similarity between the target user and each of the M target risk users.

[0074] In some embodiments, the M target risk users can be all risk users associated with the target user, or a subset of all risk users associated with the target user. The subset of risk users can be randomly selected from all risk users associated with the target user, or it can be determined by calculating the similarity between all risk users associated with the target user and the target risk user, ranking them based on similarity, and selecting the top-ranked risk users as the subset of risk users.

[0075] In some embodiments, the M target risk users may also be all or some of the risk users among multiple users. The method for obtaining some risk users can be found in the description of the foregoing embodiments, and will not be repeated here.

[0076] The M first user similarities can be obtained as follows: obtain the first target user features corresponding to the target user, obtain the M target risk user features corresponding to the M target risk users, and determine the M first user similarities based on the similarity between the first target user features and the M target risk user features.

[0077] After obtaining the first target user feature and M target risk user features, the computing device 600 can obtain a first user similarity between the first target user feature and each of the M target risk user features based on the similarity between the first target user feature and each of the M target risk user features. After performing the above similarity calculation on all M target risk user features, the computing device 600 can obtain M first user similarities. Then, the computing device 600 obtains the user similarity corresponding to the target user by performing a weighted summation of the M first user similarities. In some embodiments, the weighted summation can be an average. In some embodiments, the weighted summation can be based on an attention mechanism to obtain the weights.

[0078] The first target user characteristics and the M target risk user characteristics can be obtained based on the first graph model. The first graph model can include multiple users and the relationships between them, including the target user.

[0079] The first graph model can be obtained through the following steps: obtaining a first initial graph model and training it with feature updates to obtain the first graph model. The first initial graph model uses the initial user features corresponding to each user among multiple users as nodes, and connects the nodes corresponding to users with related relationships. Furthermore, at least some users among the multiple users are labeled as risk users.

[0080] Obtaining the first initial graph model can include the following steps:

[0081] 1. Obtain multiple user attribute sets corresponding to multiple users within a preset range.

[0082] The multiple users within the preset range can be users who have logged in on the target APP (Application), users who have logged in on the target APP within a preset geographical area, or users who have logged in on the target APP within the same network area. This embodiment does not impose specific restrictions on this.

[0083] Here, there is a one-to-one correspondence between users and user attribute sets. That is, each user among multiple users corresponds to one user attribute set from multiple user attribute sets. Each user attribute set may include a first attribute. The first attribute identifies other users associated with that user. Additionally, each user attribute set may also include a second attribute. The second attribute may include which devices the user recently logged in on, the number of logins, and the number of times attack behavior occurred, to indicate whether the user has engaged in attack behavior.

[0084] 2. Determine multiple initial user characteristics corresponding to multiple users.

[0085] Each initial user feature can be determined by random initialization or by characterizing the user's attributes.

[0086] 3. Using each user among multiple users as a node in the first initial graph model, and based on the user attribute set corresponding to each user among multiple users, connect the nodes corresponding to users with related relationships to obtain the first initial graph model.

[0087] The initial graph model can be understood as a user-user graph model, representing the relationships between multiple users within a preset range. When any two users are related, their corresponding nodes are connected by a line to indicate that they are related. When two users are not related, this is represented in the initial graph model as no connection between their corresponding nodes. These relationships can be interpersonal relationships such as classmates, friends, colleagues, or family members, or historical operational relationships such as logging in on the same device, from the same IP address, or from the same network.

[0088] 4. Based on the user attribute set corresponding to each user among multiple users, label at least some of the users with risk classification tags.

[0089] In some embodiments, the at least some users refer to all users among the plurality of users. In some embodiments, the at least some users refer to a subset of the plurality of users. At least some nodes in the first initial graph model will correspond to risk classification labels, indicating whether the user corresponding to that node is a risky user. This labeling can be done manually or using other non-manual labeling methods; this embodiment does not impose any restrictions. Risk classification labels can include two categories: risky users and non-risky users. During labeling, if the current user has a history of attack behavior, the current user is labeled as a risky user. If the current user has no history of attack behavior, the current user is labeled as a non-risky user.

[0090] After obtaining the first initial graph model, the computing device 600 needs to train the first initial graph model by updating its features to obtain the final graph model. The specific process of training the first initial graph model by updating its features will be described below:

[0091] The feature update training of the first initial graph model includes: using a preset first graph convolutional network to update the features of multiple initial user features to obtain multiple training user features; performing risk classification based on the multiple training user features to obtain risk classification training results; determining the first comprehensive loss based on the risk classification training results and the multiple training user features; and converging the preset first graph convolutional network based on the first comprehensive loss to obtain the first graph model.

[0092] The preset first graph convolutional network has the same network structure as the first initial graph model, and also includes multiple nodes and the connections between them. The input to the preset first graph convolutional network is the first initial graph model, i.e., multiple initial user features corresponding to multiple users. The output is multiple training user features updated from the initial user features. The preset first graph convolutional network has a propagation function that can transfer attack risks from the nodes corresponding to risky users to nodes with high similarity but not detected as having attack behavior, thereby updating the multiple initial user features to obtain multiple training user features.

[0093] All nodes of the pre-defined first convolutional network can also be connected to a liveness classifier, which is configured to perform risk classification based on multiple trained user features. The input to this liveness classifier is the multiple trained user features, and the output is the risk classification training result corresponding to each of the multiple trained user features. This risk classification training result characterizes whether the risk classification of the user corresponding to each trained user feature is liveness or attack.

[0094] After obtaining the risk classification training results corresponding to the training user features, a first comprehensive loss can be determined based on the risk classification training results and multiple training user features. Then, a preset first graph convolutional network is converged based on the first comprehensive loss to obtain the first graph model. When the preset first graph convolutional network converges, the updated first initial graph model is the first graph model.

[0095] The pre-defined first graph convolutional network has a propagation function that can transmit attack risk from risky user nodes to user nodes with high similarity but not yet detected as having engaged in attack behavior. This allows for feature updates of multiple initial user features, resulting in multiple training user features. The risk classification label in the first initial graph model can characterize whether a single user or device has engaged in attack behavior. During feature update training of the first initial graph model, user nodes in the model can update their own features based on the features of their neighboring user nodes propagated from their neighboring user nodes. This increases the similarity between related user nodes and decreases the similarity between unrelated user nodes. Based on the obtained first graph model, the probability of users in the first initial graph model who are not labeled as having engaged in attack behavior being identified can be observed, thus identifying potential risky users.

[0096] The first comprehensive loss includes user feature similarity loss and first risk classification loss. The user feature similarity loss constrains the differences between multiple training user features. For example, it constrains the similarity between training user features corresponding to users with a relationship to be greater than a preset similarity, and it constrains the similarity between training user features corresponding to users without a relationship to be less than a preset similarity. The first risk classification loss constrains the differences between the risk classification training results and the labeled risk classification results for at least some of the multiple users.

[0097] The first comprehensive loss can be obtained as follows: user feature similarity loss is determined based on the differences between multiple training user features; the first risk classification loss is determined based on the differences between the risk classification training results of at least some users and the labeled risk classifications; and the first comprehensive loss is determined based on the weighted sum of user feature similarity and the first risk classification loss. Here, the labeled risk classification refers to the result of labeling the liveness classification of some or all users among the multiple users in the first initial graph model. Liveness classification includes liveness category and attack category. The first comprehensive loss can be expressed as the following formula (1):

[0098] Loss_total1=Loss_sim1+Loss_cls1; (1)

[0099] In equation (1), Loss_total1 is the first comprehensive loss; Loss_sim1 is the user feature similarity loss; and Loss_cls1 is the first risk classification loss.

[0100] The process of determining the user feature similarity loss Loss_sim1 includes the following steps: determining the similarity between the training user features corresponding to every two users with a relationship among multiple users, obtaining at least one sub-first feature similarity loss; determining the similarity between the training user features corresponding to every two users without a relationship among multiple users, obtaining at least one sub-second feature similarity loss; determining the first feature similarity loss based on the difference between the weighted sum of the at least one sub-first feature similarity loss and a preset value; determining the second feature similarity loss based on the weighted sum of the at least one sub-second feature similarity loss; and determining the user feature similarity loss Loss_sim1 based on the weighted sum between the first feature similarity loss and the second feature similarity loss.

[0101] Here, the first sub-feature similarity loss constrains the similarity between the training user features of every two related users to be as high as possible, while the second sub-feature similarity loss constrains the similarity between the training user features of every two unrelated users to be as low as possible. It can be seen that their constraints are opposite. Therefore, a preset value is added to the determination of the first sub-feature similarity loss to ensure that the constraints of the two are consistent, thus facilitating the subsequent updating of user features using user feature similarity loss.

[0102] The process of determining the first risk classification loss Loss_cls1 includes the following steps: determining the difference between the risk classification training result of each user and its corresponding labeled risk classification in at least some users to obtain at least some sub-first risk classification losses, and obtaining the first risk classification loss based on the weighted sum of the at least some sub-first risk classification losses corresponding to at least some users.

[0103] Here, there is a one-to-one correspondence between at least some of the first risk category losses and at least some of the users. That is to say, each user in the at least some of the users corresponds to one of the first risk category losses in the at least some of the first risk category losses.

[0104] Based on the first graph model, the characteristics of the first target user and the characteristics of M target risk users are obtained, and the user similarity is determined based on the two. The first graph model can be used to propagate the characteristics and risks, fully explore risky users, and thus achieve liveness detection that takes into account both user experience and security.

[0105] In some embodiments, the user similarity corresponding to the target user is obtained based on N second user similarities.

[0106] Each of the N second-user similarities represents the similarity between the target user and each of the N target risk devices. The N target risk devices are devices associated with the target user and exhibiting attack behavior.

[0107] In some embodiments, the N target risk devices may be all risk devices associated with the target user, or a subset of all risk devices associated with the target device. The subset of risk devices may be randomly selected from all risk devices associated with the domain target user, or it may be determined by calculating the similarity between all risk devices associated with the target user and the target risk device, ranking them based on the similarity, and selecting the top-ranked risk devices as the subset of risk devices.

[0108] In some embodiments, the N target risk devices may also be all or some of the risk devices among multiple devices.

[0109] The N second user similarities can be obtained as follows: obtain the second target user features corresponding to the target user, obtain the N target risk device features corresponding to the N target risk devices, and determine the N second user similarities based on the similarity between the second target user features and the N target risk device features.

[0110] After obtaining the second target user feature and N target risk device features, the second user similarity between the first target user feature and each of the N target risk device features can be obtained based on the similarity between the second target user feature and each of the N target risk device features. After performing the above similarity calculation on the N target risk device similarities, N second user similarities can be obtained. Then, by performing a weighted summation on the N second user similarities, the user similarity corresponding to the target user can be obtained. In some embodiments, the weighted summation can be an average. In some embodiments, the weighted summation can be based on an attention mechanism to obtain the weights.

[0111] The second target user characteristics and the N target risk device characteristics can be obtained based on the second graph model. The second graph model can include multiple users and multiple devices, as well as the relationships between multiple users and multiple devices. The multiple users include target users, and the multiple devices include target devices.

[0112] The second graph model can be obtained through the following steps: acquiring a second initial graph model, and training the second initial graph model by updating its features. The second initial graph model uses the initial user features corresponding to each user among multiple users and the initial device features corresponding to each device among multiple devices as nodes, and connects the nodes corresponding to users and devices that have relationships. At least some users among the multiple users are labeled as risky users, and at least some devices among the multiple devices are labeled as risky devices.

[0113] Obtaining the second initial graph model can include the following steps:

[0114] 1. Obtain multiple user attribute sets corresponding to multiple users and multiple device attribute sets corresponding to multiple devices within a preset range.

[0115] For details on how to obtain multiple user attribute sets corresponding to multiple users within a preset range, please refer to the introduction of relevant content when obtaining the first initial graph model mentioned above, which will not be repeated here.

[0116] The multiple devices within the preset range can be devices that have logged into the target APP, or devices that have logged into the target APP within the preset geographical area. This embodiment does not impose specific restrictions on this.

[0117] Here, there is a one-to-one correspondence between devices and device attribute sets. That is, each of the multiple devices corresponds to one device attribute set within the multiple device attribute sets. Each device attribute set may include a third attribute. The third attribute represents the identifier of the user or device associated with that device. Additionally, each device attribute set may also include a fourth attribute. The fourth attribute may include the number of times the device has recently been the subject of attacks, indicating whether the device has engaged in any attacks, and may also include a network address, such as an IP address.

[0118] 2. Determine multiple initial user characteristics for multiple users and multiple initial device characteristics for multiple devices.

[0119] For details on the process of determining the initial user characteristics, please refer to the previous section on obtaining the first initial graph model; it will not be repeated here.

[0120] Each initial device feature can be determined by random initialization or by characterizing the device attributes.

[0121] 3. Using each user among multiple users and each device among multiple devices as nodes of the second initial graph model, and based on the user attribute set corresponding to each user among multiple users, connect the nodes corresponding to the users and devices that have relationships among multiple users and multiple devices to obtain the second initial graph model.

[0122] The second initial graph model can be understood as a user-device graph model, representing the relationships between multiple users and multiple devices within a preset range. When any user and any device have a relationship, a line is connected between the node corresponding to that user and the node corresponding to that device to indicate that a relationship exists between them. Conversely, when no relationship exists between a user and a device, this is represented in the second initial graph model as no connection between the node corresponding to that user and the node corresponding to that device. The relationship between a user and a device can be represented by the user's login activity on that device.

[0123] 4. Based on the user attribute set corresponding to each user among multiple users, label at least some of the users with risk classification tags, and based on the device attribute set corresponding to each device among multiple devices, label at least some of the devices with risk classification tags.

[0124] For details on the process of labeling at least some users among multiple users with risk classification tags, please refer to the aforementioned introduction to the relevant content in the first initial graph model, which will not be repeated here. This section focuses on the implementation process of labeling at least some devices among multiple devices with risk classification tags based on the device attribute set corresponding to each device.

[0125] In some embodiments, the at least some devices are all of the plurality of devices. In some embodiments, the at least some devices are some of the plurality of devices. At least some nodes in the second initial graph model will correspond to risk classification labels, indicating whether the user corresponding to the node is a risky user, or whether the device corresponding to the node is a risky device. The labeling can be done manually or using other non-manual labeling methods; this embodiment does not limit this. Risk classification labels can include two categories: risky users and non-risky users. During labeling, if the current user has a history of attack behavior, the current user is labeled as a risky user. If the current user has no history of attack behavior, the current user is labeled as a non-risky user. Similarly, if one of the multiple devices has a history of attack behavior, the node corresponding to that device is labeled as a risky device. If one of the multiple devices has no history of attack behavior, the node corresponding to that device is labeled as a non-risky device.

[0126] After obtaining the second initial graph model, it is necessary to train the second initial graph model by updating its features to obtain the second graph model. The specific process of training the second initial graph model by updating its features will be described below:

[0127] The feature update training of the second initial graph model includes: using a pre-set second graph convolutional network to update multiple initial user features and multiple initial device features to obtain multiple training user features and multiple training device features; performing risk classification based on the multiple training user features and multiple training device features to obtain risk classification training results; determining a second comprehensive loss based on the risk classification training results, multiple training user features, and multiple training device features; and converging the pre-set second graph convolutional network based on the second comprehensive loss to obtain the second graph model.

[0128] The pre-defined second graph convolutional network has the same network structure as the second initial graph model, and also includes multiple nodes. The input to the pre-defined second graph convolutional network is the second initial graph model, which consists of multiple initial user features corresponding to multiple users and multiple initial device features corresponding to multiple devices. The output consists of multiple trained user features updated from the initial user features and multiple trained device features updated from the initial device features.

[0129] All nodes of the pre-defined second convolutional network can also be connected to a liveness classifier, which is configured to perform risk classification based on multiple trained user features and multiple trained device features. The input to this liveness classifier is the multiple trained user features and multiple trained device features, and the output is the risk classification training result corresponding to each of the trained user features and the risk classification training result corresponding to each of the trained device features. The risk classification training result corresponding to the trained user features indicates whether the risk classification of the user corresponding to that trained user feature is live or attack. The risk classification training result corresponding to the trained device features indicates whether the risk classification of the device corresponding to that trained device feature is live or attack.

[0130] After obtaining the risk classification training results corresponding to the training user features and the training device features, a second comprehensive loss can be determined based on these results. The second comprehensive loss includes a user-device feature similarity loss and a second risk classification loss. The user-device feature similarity loss constrains the differences between multiple training user features and multiple training device features. For example, it constrains the similarity between the training user features and the training device features of related user devices to be greater than a preset similarity, and it constrains the similarity between the training user features and the training device features of unrelated user devices to be less than a preset similarity. The second risk classification loss constrains the differences between the risk classification training results of at least some users and the labeled risk classification results, and it also constrains the differences between the risk classification training results of at least some devices and the labeled risk classification results.

[0131] The pre-defined second graph convolutional network has a propagation function that can transmit attack risks from nodes corresponding to risky users or devices to nodes corresponding to users or devices with high similarity but not yet detected as having engaged in attack behavior. This allows for feature updates of multiple initial user features and multiple initial device features, resulting in multiple training user features and multiple training device features. The second initial graph model represents whether a single user or device has engaged in attack behavior. During feature update training of the second initial graph model, user nodes or device nodes in the second initial graph model can update their own features based on the features of neighboring nodes (including neighboring user nodes and / or neighboring device nodes) propagated from their neighboring nodes. This results in increasing similarity between related nodes (including at least one of user nodes and user nodes, user nodes and device nodes, and device nodes and device nodes), and decreasing similarity between unrelated nodes. Based on the obtained second graph model, the probability of whether users and / or devices in the second initial graph model that are not marked as having engaged in attack behavior can be observed, thereby identifying potential risky users and / or risky devices.

[0132] The second comprehensive loss can be obtained as follows: Based on the difference between the training user features corresponding to the users and the training device features corresponding to the devices in the user-device pair with the relationship, the feature similarity loss between user devices is determined; based on the difference between the risk classification training results and the labeled risk classification results of at least some users among multiple users, and / or the difference between the risk classification training results and the labeled risk classification results of at least some devices among multiple devices, the second risk classification loss is determined; and based on the weighted sum of the feature similarity loss information between user devices and the risk classification loss information, the second comprehensive loss is obtained. Here, the labeled risk classification refers to the result of labeling the liveness classification of some or all users among multiple users in the second initial graph model. And the result of labeling the liveness classification of some or all devices among multiple devices in the second initial graph model. Liveness classification includes liveness category and attack category. The second comprehensive loss can be expressed as the following formula (2):

[0133] Loss_total2=Loss_sim2+Loss_cls2; (2)

[0134] In equation (2), Loss_total2 is the second comprehensive loss; Loss_sim2 is the feature similarity loss between user devices; and Loss_cls2 is the second risk classification loss.

[0135] The process of determining the feature similarity loss Loss_sim2 between user devices includes the following steps: determining the similarity between the training user features corresponding to the user and the training device features corresponding to the device in a pair of user devices with a relationship among multiple users and multiple devices, obtaining at least one sub-third feature similarity loss; and determining the similarity between the training user features corresponding to the user and the training device features corresponding to the device in a pair of user devices with no relationship among multiple users and multiple devices, obtaining at least one sub-fourth feature similarity loss.

[0136] The third feature similarity loss is determined based on the difference between the weighted sum of at least one sub-third feature similarity loss and a preset value; the fourth feature similarity loss is determined based on the weighted sum of at least one sub-fourth feature similarity loss; and the user equipment feature similarity loss Loss_sim2 is determined based on the weighted sum between the third feature similarity loss and the fourth feature similarity loss.

[0137] Here, the first sub-feature similarity loss constrains the similarity between the training user features of every two related users to be as high as possible, while the second sub-feature similarity loss constrains the similarity between the training user features of every two unrelated users to be as low as possible. It can be seen that the two constraints have opposite objectives. Therefore, a preset value is added to the determination process of the second sub-feature similarity loss to ensure that the two constraints are consistent, thus facilitating the subsequent updating of user features using user feature similarity loss.

[0138] The third sub-feature similarity loss constrains the similarity between the training user features corresponding to a user and the training device features corresponding to a device in a pair of user-device relationships among multiple users and multiple devices to be as high as possible. The fourth sub-feature similarity loss constrains the similarity between the training user features corresponding to a user and the training device features corresponding to a device in a pair of user-device relationships among multiple users and multiple devices to be as low as possible. It can be seen that the two constraints have opposite objectives. Therefore, a preset value is added to the determination process of the fourth sub-feature similarity loss to ensure that the constraint objectives of the two are consistent, thereby facilitating the subsequent updating of user and device features using the feature similarity loss between user devices.

[0139] The process of determining the second risk classification loss Loss_cls2 includes the following steps: determining the difference between the risk classification training result of each user in at least a subset of users and its corresponding labeled risk classification to obtain the risk classification loss of at least a subset of sub-users; and determining the risk classification loss of at least a subset of devices based on the difference between the risk classification training result of each device in at least a subset of devices and its corresponding labeled device classification; and obtaining the second risk classification loss based on the weighted sum of the risk classification losses of at least a subset of sub-users and the risk classification losses of at least a subset of devices.

[0140] Here, there is a one-to-one correspondence between at least a subset of sub-user risk classification losses and at least a subset of users; that is, each user in the at least subset of users corresponds to one sub-user risk classification loss in the at least subset of sub-user risk classification losses. Similarly, there is a one-to-one correspondence between at least a subset of sub-device risk classification losses and at least a subset of devices; that is, each device in the at least subset of devices corresponds to one sub-device risk classification loss in the at least subset of sub-device risk classification losses.

[0141] In some embodiments, the user similarity corresponding to the target user is obtained based on M first user similarities and N second user similarities.

[0142] For information on the similarity scores of the M first users and the similarity scores of the N second users, please refer to the foregoing description. The computing device 600 can determine the user similarity score based on the weighted sum of the similarity scores of the M first users and the weighted sum of the similarity scores of the N second users.

[0143] In summary, user similarity can be expressed as the following formula (3):

[0144] S1 = (a + b * s1) * c; (3)

[0145] In equation (3), S1 represents user similarity; s1 is the result of a weighted sum of M first user similarities, or a weighted sum of N second user similarities, or the sum of the weighted sum of M first user similarities and the weighted sum of N second user similarities. Since the value range of s1 is between -1 and 1, the purpose of a and b is to adjust the value range of a+b*s1 to between 0 and 1. Multiplying by c is intended to adjust s1 to the value range of 0 to 10. In some embodiments, a and b can both be 0.5, and c can be 10.

[0146] Based on the second graph model, the features of the second target user and N target risk devices are obtained, and user similarity is determined based on these two features. This allows for the propagation of features and risks using the second graph model, fully identifying risky users or devices, thus achieving liveness detection that balances user experience and security. Furthermore, both the first and second graph models can provide diverse feature representations of users, further identifying risky users and enabling liveness detection based on different risk levels.

[0147] like Figure 4 As shown, step S120 may further include step S124. It should be understood that... Figure 4 For ease of understanding, step S124 is described as occurring after step S122. In practice, the order in which steps S124 and S122 are executed is not restricted. Step S122 can be executed first, followed by step S124, or step S124 can be executed first, followed by step S122, or steps S122 and S124 can be executed simultaneously.

[0148] S124: Determine the device similarity corresponding to the target device.

[0149] The device similarity corresponding to the target device is obtained based on P first device similarities and / or K second device similarities. The P first device similarities represent the similarity between the target device and P target risk users. The K second device similarities represent the similarity between the target device and K target risk devices. P and K are both integers greater than or equal to 0. Specifically, the device similarity corresponding to the target device is obtained based on P first device similarities and / or K second device similarities.

[0150] In some embodiments, the device similarity corresponding to the target device can be obtained based on P first device similarities.

[0151] Each of the P first device similarities represents the similarity between the target device and each of the P target risk users.

[0152] In some embodiments, the P target risk users can be all risk users associated with the target device, or a subset of all risk users associated with the target device. The subset of risk users can be randomly selected from all risk users associated with the target device, or they can be determined by calculating the similarity between all risk users associated with the target device and the target risk users, ranking them based on similarity, and selecting the top-ranked risk users as the subset of risk users.

[0153] In some embodiments, the P target risk users can also be all or some of the risk users among multiple users. The method for obtaining some risk users can be found in the description of the foregoing embodiments, and will not be repeated here.

[0154] The P similarities of the first devices can be obtained in the following way: obtain the first target device features corresponding to the target device, obtain the P target risk user features corresponding to the P target risk users, where the P target risk users are users associated with the target device and have attack behavior, and determine the P first device similarities based on the similarity between the first device features and the P target risk user features.

[0155] After obtaining the first target device feature and P target risk user features, the computing device 600 can obtain a first device similarity between the first target device feature and each of the P target risk user features based on the similarity between the first target device feature and each of the P target risk user features. After performing the above similarity calculation on all P target risk user features, the computing device 600 can obtain P first device similarities. Then, the computing device 600 obtains the device similarity corresponding to the target device by performing a weighted summation of the P first device similarities. In some embodiments, the weighted summation can be an average. In some embodiments, the weighted summation can be based on an attention mechanism to obtain the weights.

[0156] The first target device similarity and the characteristics of P target risk users can be obtained based on the second graph model. The second graph model can include multiple users and multiple devices, as well as the relationships between the multiple users and multiple devices. The multiple users include target users, and the multiple devices include target devices.

[0157] The method for obtaining the second graph model can be found in the preceding content and will not be repeated here.

[0158] Based on the second graph model, the characteristics of the first target device and the characteristics of P target risk users are obtained, and the device similarity is determined based on the two. The second graph model can be used to propagate the characteristics and risks, fully explore risky users or devices, and thus achieve liveness detection that takes into account both user experience and security.

[0159] In some embodiments, the device similarity corresponding to the target device is obtained based on K second device similarities.

[0160] Each of the K second device similarities represents the similarity between the target device and each of the K target risk devices.

[0161] In some embodiments, the K target risk devices may be all risk devices associated with the target device, or a subset of all risk devices associated with the target device. The subset of risk devices may be some risk devices randomly selected from all risk devices associated with the target device, or it may be determined by calculating the similarity between all risk devices associated with the target device and the target risk device, ranking them based on the similarity, and selecting the top-ranked risk devices as the subset of risk devices.

[0162] In some embodiments, the K target risk devices may be all or some of the risk devices among multiple devices. The method for obtaining some risk devices can be found in the description of the foregoing embodiments, and will not be repeated here.

[0163] The similarity of the K second devices is obtained by the following steps: obtaining the features of the second target device corresponding to the target device and the features of the K target risk devices corresponding to the K target risk devices, and determining the similarity of the K second devices based on the similarity between the features of the second target device and the features of the K target risk devices.

[0164] Here, the K target risk devices are devices associated with the target device and exhibiting attack behavior. The second target device features and the K target risk device features are obtained based on a third graph model. The third graph model includes multiple devices and the relationships between them, with the target device being one of the multiple devices. After obtaining the second target device features and the K target risk device features, the second device similarity between the second target device features and each of the K target risk device features can be obtained. After performing the above similarity calculation on the K target risk device similarities, the K second device similarities can be obtained. Then, by weighted summing the K second device similarities, the device similarity corresponding to the target device can be obtained.

[0165] The third graph model is obtained through the following steps: obtaining a third initial graph model and training it by updating its features to obtain the third graph model. The third initial graph model uses the initial device features corresponding to each device in the multiple devices as nodes, and connects the nodes corresponding to devices with correlation relationships. At least some of the multiple devices are labeled as risk devices.

[0166] Obtaining a third initial graph model can include the following steps:

[0167] 1. Obtain multiple device attribute sets corresponding to multiple devices within a preset range.

[0168] For details on how to obtain multiple device attribute sets corresponding to multiple devices within a preset range, please refer to the introduction of relevant content when obtaining the second initial graph model mentioned above, which will not be repeated here.

[0169] 2. Determine the initial device characteristics corresponding to multiple devices.

[0170] For details on the process of determining multiple initial device features, please refer to the previous section on obtaining the second initial graph model. It will not be repeated here.

[0171] 3. Using each of the multiple devices as a node in the third initial graph model, and based on the device attribute set corresponding to each of the multiple devices, connect the nodes corresponding to each pair of related devices to obtain the third initial graph model.

[0172] The third initial graph model can be understood as a device-to-device graph model, representing the relationships between multiple devices within a preset range. When any two devices are related, a line is connected between their corresponding nodes to indicate that the two devices are related. When no relationship exists between two devices, this is represented in the third initial graph model as no connection between their corresponding nodes. The relationship between the two devices can be that they are within the same network range, such as the same network segment or a preset IP address range.

[0173] 4. Based on the device attribute set corresponding to each of the multiple devices, label at least some of the devices with risk classification tags.

[0174] For the process of labeling at least some of the devices with risk classification tags, please refer to the relevant content in the second initial graph model mentioned above, which will not be repeated here.

[0175] After obtaining the third initial graph model, it is necessary to train the third initial graph model by updating its features to obtain the third graph model. The specific process of training the third initial graph model by updating its features will be described below:

[0176] The feature update training of the third initial graph model includes: using a pre-set third graph convolutional network to update the features of multiple initial devices to obtain multiple training device features; performing risk classification based on the multiple training device features to obtain risk classification training results; and determining the third comprehensive loss based on the risk classification training results and multiple training device features, and converging the pre-set third graph convolutional network based on the third comprehensive loss to obtain the third graph model.

[0177] The preset third graph convolutional network has the same network structure as the third initial graph model. It also includes multiple nodes and connections between them. The input to the preset third graph convolutional network is the third initial graph model, which consists of multiple initial device features corresponding to multiple devices. The output is multiple training device features updated from these initial device features. The preset third graph convolutional network has a propagation function that can transfer attack risks from nodes corresponding to risky devices to nodes with high similarity but not yet detected as having attack behavior. This allows for feature updates of multiple initial device features to obtain multiple training device features.

[0178] All nodes of the pre-defined third graph convolutional network can also be connected to a liveness classifier. This liveness classifier is configured to perform risk classification based on multiple training device features. The input of the liveness classifier is the multiple training device features, and the output is the risk classification training result corresponding to each training device feature. This risk classification training result characterizes whether the risk classification of the device corresponding to each training device feature is liveness or attack.

[0179] After obtaining the risk classification training results corresponding to the training device features, a third comprehensive loss can be determined based on these results and multiple training device features. Then, a pre-defined third graph convolutional network is converged based on this third comprehensive loss to obtain the third graph model. When the pre-defined third graph convolutional network converges, the updated third initial graph model becomes the third graph model. The third comprehensive loss includes device feature similarity loss and third risk classification loss. The device feature similarity loss constrains the differences between multiple training device features. For example, it constrains the similarity between training device features corresponding to related devices to be greater than a pre-defined similarity, and it constrains the similarity between training device features corresponding to unrelated devices to be less than a pre-defined similarity. The third risk classification loss constrains the differences between the risk classification training results and the labeled risk classification results for at least some of the multiple devices.

[0180] The third comprehensive loss can be obtained as follows: based on the differences between the features of multiple training devices, determine the device feature similarity loss; based on the differences between the risk classification training results and the labeled risk classification results of at least some devices among the multiple devices, determine the third risk classification loss; and based on the weighted sum of the device feature similarity loss and the third risk classification loss, obtain the third comprehensive loss. Here, the labeled risk classification refers to the result of labeling the liveness classification of some or all devices among the multiple devices in the third initial graph model. Liveness classification includes liveness category and attack category. The third comprehensive loss can be expressed as the following formula (4):

[0181] Loss_total3=Loss_sim3+Loss_cls3; (4)

[0182] In equation (4), Loss_total3 is the third comprehensive loss; Loss_sim3 is the equipment feature similarity loss; and Loss_cls3 is the third risk classification loss.

[0183] The process of determining the device feature similarity loss Loss_sim3 includes the following steps: determining the similarity between the training device features corresponding to every two devices that have a relationship among multiple devices, obtaining at least one sub-fifth feature similarity loss; and determining the similarity between the training device features corresponding to every two devices that do not have a relationship among multiple devices, obtaining at least one sub-sixth feature similarity loss.

[0184] After obtaining at least one sub-fifth feature similarity loss and at least one sub-sixth feature similarity loss, the fifth feature similarity loss can be determined based on the weighted sum of the at least one sub-fifth feature similarity loss, and the sixth feature similarity loss can be determined based on the difference between the weighted sum of the at least one sub-sixth feature similarity loss and a preset value. Finally, the device feature similarity loss Loss_sim3 can be determined based on the weighted sum between the fifth feature similarity loss and the sixth feature similarity loss.

[0185] Here, the fifth sub-feature similarity loss constrains the similarity between the training device features of every two related devices to be as high as possible, while the sixth sub-feature similarity loss constrains the similarity between the training device features of every two unrelated devices to be as low as possible. It can be seen that their constraint objectives are opposite. Therefore, a preset value is added to the determination process of the sixth sub-feature similarity loss to ensure that the constraint objectives of the two are consistent, thereby facilitating the subsequent updating of device features using device feature similarity loss.

[0186] The process of determining the third risk classification loss Loss_cls3 includes the following steps: determining the difference between the risk classification training result of each device in at least some devices and its corresponding labeled risk classification to obtain at least some sub-third risk classification losses, and obtaining the third risk classification loss based on the weighted sum of the at least some sub-third risk classification losses corresponding to at least some devices.

[0187] Here, there is a one-to-one correspondence between at least some of the sub-third risk category losses and at least some of the devices. That is to say, each device in the at least some sub-third risk category losses corresponds to one of the sub-third risk category losses in the at least some sub-third risk category losses.

[0188] The third scenario: The device similarity corresponding to the target device is obtained based on P first device similarities and K second device similarities.

[0189] For the similarity scores of P first devices and K second devices, please refer to the above two descriptions. After obtaining the similarity scores of P first devices and K second devices, the weighted sum of the P first device similarities and the weighted sum of the K second device similarities can be combined and then summed again to obtain the device similarity score. The device similarity score can be expressed as the following formula (5):

[0190] S2 = (0.5 + s2) * 10; (5)

[0191] In equation (5), S2 represents the device similarity; s2 is the result of a weighted sum of P first device similarities, or a weighted sum of K second device similarities, or the sum of the weighted sum of P first device similarities and the weighted sum of K second device similarities. Since the value range of s2 is between -1 and 1, the purpose of 0.5 is to adjust the value range of s2 to between 0 and 1. Multiplying by 10 will adjust s2 to the value range of 0 to 10.

[0192] By acquiring the features of the second target device and K target risk devices using a third graph model, and determining device similarity based on these features, the system can propagate features and risks using the third graph model, fully identifying risky devices and achieving liveness detection that balances user experience and security. Furthermore, the second and third graph models can also provide multi-dimensional feature representations of devices, further enabling the identification of risky devices and achieving liveness detection based on different risk levels.

[0193] like Figure 4 As shown, after step S122 or step S124, step S120 may also include step S126.

[0194] S126: Determine attack risk indicators based on user similarity and device similarity.

[0195] After obtaining user similarity and device similarity, an attack risk index can be obtained based on the weighted sum of user similarity and device similarity.

[0196] Because the relationships between users, devices, and between users and devices can change at any time, after at least one of the first, second, and third graph models is constructed, at least one of these models can be updated at preset time intervals. During the update, the nodes of at least one of the first, second, and third graph models and the relationships between them can be updated, and feature update training can be performed based on the updated graph model to obtain the updated graph model. Alternatively, when the number of changed nodes is less than a preset number, the updated features of the nodes associated with the changed nodes in the feature-updated graph model can be used to determine the number of changed nodes. When the number of changed nodes is greater than the preset number, feature update training is used to update the features of the graph model. Changed nodes can be newly added nodes or nodes whose attributes have changed.

[0197] When the number of changing nodes is equal to the preset number, it can be determined by weighted summation of the updated features of the nodes associated with the changing nodes in at least one graph model after feature update training. Alternatively, feature update training can be used to update the features of at least one graph model. This embodiment does not limit this.

[0198] In some embodiments, attack risk indicators can also be determined based on user similarity or device similarity. For example, user similarity or device similarity can be used as an attack risk indicator.

[0199] like Figure 3 As shown, after step S120, method P100 may further include step S140.

[0200] S140: Perform liveness detection based on the target image and attack risk indicators to obtain liveness detection results.

[0201] Step S140 may include the following steps: extracting features from the target image and attack risk indicators to obtain target image features and attack risk features, fusing features based on the target image features and attack risk features to obtain fused features, and performing liveness detection based on the fused features to obtain liveness detection results.

[0202] Feature fusion based on target image features and attack risk features can be implemented as follows: An attention-based fusion mechanism is used to fuse different parts of the target image features. Then, the fused target image features and attack risk features are further fused to obtain the fused features. Specifically, different parts of the target image features correspond to different levels of attention, meaning they have different weights. By performing weighted fusion on the target image features, some interfering feature dimensions can be removed, leaving only the more important ones. This makes the weighted fused target image features more compact, thereby improving the accuracy of liveness detection.

[0203] Feature fusion, based on the fused target image features and attack risk features, can be achieved by adding or concatenating the target image features and attack risk features to obtain the fused features. Then, liveness detection is performed based on these fused features. This enables liveness detection using images, which is faster, and different risk levels can provide different liveness detection results, improving the security of liveness detection and thus achieving a balance between user experience and security.

[0204] Liveness detection can be achieved using a liveness detection model. Figure 5 A schematic diagram of the structure of a liveness detection model provided according to an embodiment of this specification is shown. Figure 5 As shown, the liveness detection model includes a first feature extraction network, a second feature extraction network, and a liveness detection network. Both the first and second feature extraction networks can be networks such as ResNet (residual network), VGGNet (a deep convolutional network), or InceptionV3 (asymmetric convolutional network) used for feature extraction. The first feature extraction network is configured to extract image features corresponding to the input image. The second feature extraction network is configured to extract attack risk features corresponding to the attack risk index. The liveness detection network can be a Transform network, configured to fuse image features and attack risk features, and perform liveness detection based on the fused features to output the liveness detection result.

[0205] based on Figure 5 The network structure of the liveness detection model shown can be implemented in step S140 as follows: The target image is input into the first feature extraction network to obtain target image features. The attack risk index is input into the second feature extraction network to obtain attack risk features. The target image features and attack risk features are input into the liveness detection network to obtain the liveness detection result.

[0206] Before being applied to liveness detection, the liveness detection model needs to be trained. The entity executing the training method for the liveness detection model can be the same as or different from the entity executing the liveness detection method; this embodiment does not impose any restrictions. The training process of the liveness detection model will be described below:

[0207] The liveness detection model can be trained using the following steps: First, a pre-defined first feature extraction network is used to extract features from the target image, obtaining training features for the target image. Then, a pre-defined second feature extraction network is used to extract features from the attack risk indicators, obtaining attack risk training features. Next, a pre-defined liveness detection network is used to fuse the target image training features and the attack risk training features, and the liveness detection training result is output based on the fused training features. Then, the liveness classification loss is determined based on the difference between the liveness detection training result and the labeled liveness classification, and the parameters of the pre-defined liveness detection network, the pre-defined first feature extraction network, and the pre-defined second feature extraction network are updated based on the liveness classification loss. This training is repeated until the training is complete, resulting in the liveness detection model.

[0208] For details on how feature fusion is implemented during training, please refer to the implementation of feature fusion in liveness detection; it will not be described in detail here.

[0209] The conditions for ending training can be that the liveness classification loss is less than a preset value, the number of training iterations reaches a preset number, or the accuracy of the trained liveness detection model reaches a preset accuracy.

[0210] Once training is complete, a trained liveness detection model is obtained. This model can be deployed to terminal devices or cloud servers for liveness detection applications. During liveness detection, the output of the training results based on the fused training features can include: obtaining the liveness attack probability P' based on the fused training features, and determining the liveness detection result based on the liveness attack probability P'. For example, if the liveness attack probability P' is greater than a set threshold T', the target user is identified as an attack category; if the liveness attack probability P' is less than the set threshold T', the target user is identified as a live user.

[0211] It should be noted that when the probability of a live attack, P', is equal to the set threshold, the target user can be identified as either a live user or an attack user. This manual does not impose any restrictions on this.

[0212] In some embodiments, liveness detection is performed based on the fused features to obtain a liveness detection result, including: selecting one of a first operation or a second operation based on an attack risk index: the first operation includes: determining that the attack risk index is greater than a preset attack risk index threshold, identifying the target image as an attack category; determining that the attack risk index is less than the preset attack risk index threshold, and determining the liveness detection result determined based on the target image as the final liveness detection result.

[0213] In some embodiments, liveness detection is performed based on the fused features to obtain a liveness detection result, including: selecting one of a first operation or a second operation based on an attack risk indicator: the first operation includes: determining that the attack risk indicator is greater than a preset attack risk indicator threshold, and performing liveness detection using a first liveness detection scheme; determining that the attack risk indicator is less than the preset attack risk indicator threshold, and performing liveness detection using a second liveness detection scheme. The first liveness detection scheme can be a silent liveness detection scheme. The second liveness detection scheme can be an interactive liveness detection scheme.

[0214] like Figure 3 As shown, step S140 may be included after step S160.

[0215] S160: Output liveness detection results.

[0216] There are several ways to output the liveness detection results. For example, the processor 620 can directly return the liveness detection results to the client 200 or terminal device of the target user 100, or it can return the liveness detection results to the verification device that needs to perform facial recognition or verification so that the verification device can perform facial recognition based on the liveness detection results, or it can also visualize the liveness detection results.

[0217] There are several ways to visualize the liveness detection result. For example, the processor 620 can display the liveness detection result through a display, or it can issue a prompt message about the liveness detection result through sound and light, etc.

[0218] In summary, the liveness detection method P100 and system 001 provided in this specification acquire the target image and attack risk indicators of the target user, and perform liveness detection based on the target image and attack risk indicators to obtain and output the liveness detection result. Because this scheme uses images for liveness detection, the detection time is relatively short. Furthermore, by incorporating attack risk indicators into the liveness detection process, even for the same target image, different attack risk indicators will result in different liveness detection results. Therefore, the increased risk level enhances the security of liveness detection, thus achieving a balance between user experience and security.

[0219] This specification, in another aspect, provides a non-transitory storage medium storing at least one set of executable instructions for performing liveness detection. When the executable instructions are executed by a processor, they instruct the processor to implement the steps of the liveness detection method P100 described herein. In some possible embodiments, various aspects of this specification can also be implemented as a program product comprising program code. When the program product is run on a computing device 600, the program code causes the computing device 600 to perform the steps of the liveness detection method P100 described herein. The program product for implementing the above method may employ a portable compact disk read-only memory (CD-ROM) containing program code and may run on the computing device 600. However, the program product of this specification is not limited thereto. In this specification, a readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system. The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. The computer-readable storage medium may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium may also be any readable medium other than a readable storage medium that can send, propagate, or transmit programs for use by or in connection with an instruction execution system, apparatus, or device. Program code contained on a readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof. Program code for performing the operations described herein can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on computing device 600, partially on computing device 600, as a standalone software package, partially on computing device 600 and partially on a remote computing device, or entirely on a remote computing device.

[0220] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0221] In summary, after reading this detailed disclosure, those skilled in the art will understand that the foregoing detailed disclosure is presented by way of example only and is not restrictive. Although not explicitly stated herein, those skilled in the art will understand that this specification requires various reasonable changes, improvements, and modifications to the embodiments. These changes, improvements, and modifications are intended to be made by this specification and are within the spirit and scope of the exemplary embodiments described herein.

[0222] Furthermore, certain terms in this specification have been used to describe embodiments of this specification. For example, "an embodiment," "an embodiment," and / or "some embodiments" mean that a particular feature, structure, or characteristic described in connection with that embodiment may be included in at least one embodiment of this specification. Therefore, it is to be emphasized and understood that two or more references to "an embodiment" or "an embodiment" or "alternative embodiment" in various parts of this specification do not necessarily refer to the same embodiment. Moreover, specific features, structures, or characteristics may be suitably combined in one or more embodiments of this specification.

[0223] It should be understood that in the foregoing description of the embodiments in this specification, various features are combined in a single embodiment, drawing, or description for the purpose of simplifying the description and aiding in the understanding of a feature. However, this does not mean that the combination of these features is necessary, and those skilled in the art may readily identify some of the devices as separate embodiments when reading this specification. That is, the embodiments in this specification can also be understood as an integration of multiple secondary embodiments. It is also valid when each secondary embodiment contains fewer than all the features of a single foregoing disclosed embodiment.

[0224] Each patent, patent application, publication of the patent application, and other materials such as articles, books, specifications, publications, documents, articles, etc., cited herein may be incorporated by reference. All contents used for all purposes, except for any history of prosecution documents relating to it, that may be inconsistent with or conflict with this document, or any such history of prosecution documents that may have a limiting effect on the widest extent of the claims, are now or hereafter associated with this document. For example, in the event of any inconsistency or conflict between the description, definition, and / or use of terms associated with any of the included materials and the terms, description, definition, and / or used in connection with this document, the terms used herein shall prevail.

[0225] Finally, it should be understood that the embodiments disclosed herein are illustrative of the principles of the embodiments described in this specification. Other modified embodiments are also within the scope of this specification. Therefore, the embodiments disclosed in this specification are merely examples and not limitations. Those skilled in the art can implement the applications described in this specification using alternative configurations based on the embodiments in this specification. Therefore, the embodiments in this specification are not limited to the embodiments precisely described in the applications.

Claims

1. A live detection method, comprising: obtaining a target image of a target user and an attack risk indicator, the target image being collected by a target device; performing feature extraction on the target image and the attack risk indicator to obtain a target image feature and an attack risk feature; performing feature fusion on the target image feature and the attack risk feature to obtain a fused feature; performing live detection based on the fused feature to obtain a live detection result; and outputting the live detection result; wherein the attack risk indicator represents a risk level of an attack behavior when the target user performs biometric recognition on the target device, and the attack risk indicator is obtained based on a user similarity corresponding to the target user and a device similarity corresponding to the target device; the user similarity is obtained based on a similarity between a feature of the target user and features of at least part of associated risk users and / or risk devices; the device similarity is obtained based on a similarity between a feature of the target device and features of at least part of associated risk users and / or risk devices.

2. The method of claim 1, wherein, Obtaining the attack risk indicator comprises: determining the user similarity, which is obtained based on M first user similarities and / or N second user similarities, the M first user similarities representing similarities between the target user and M target risk users, and the N second user similarities representing similarities between the target user and N target risk devices, the M and the N being integers greater than or equal to 0; determining the device similarity, which is obtained based on P first device similarities and / or K second device similarities, the P first device similarities representing similarities between the target device and P target risk users, and the K second device similarities representing similarities between the target device and K target risk devices, the P and the K being integers greater than or equal to 0; and determining the attack risk indicator based on the user similarity and the device similarity.

3. The method of claim 2, wherein, The M first user similarities are obtained by: obtaining a first target user feature corresponding to the target user; obtaining M target risk user features corresponding to M target risk users, the M target risk users being users associated with the target user and having attack behaviors; and determining the M first user similarities based on similarities between the first target user feature and the M target risk user features. The first target user feature and the M target risk user features are obtained based on a first graph model, the first graph model comprising a plurality of users and association relationships between the plurality of users, the plurality of users including the target user.

4. The method of claim 3, wherein, The first graph model is obtained by:

5. The method of claim 4, wherein, obtaining a first initial graph model, the first initial graph model taking an initial user feature corresponding to each user in the plurality of users as a node, and connecting nodes corresponding to users having association relationships, at least part of the plurality of users being labeled as risk users; and ​ ​ The first initial graph model is trained for feature updating to obtain the first graph model.

6. The method of claim 5, wherein, The training of the first initial graph model for feature updating to obtain the first graph model comprises: a preset first graph convolutional network is used to perform feature updating on a plurality of initial user features to obtain a plurality of training user features; risk classification is performed based on the plurality of training user features to obtain a risk classification training result; and based on the risk classification training result and the plurality of training user features, a first comprehensive loss is determined, and the preset first graph convolutional network is converged based on the first comprehensive loss to obtain the first graph model.

7. The method of claim 6, wherein, The determination of the first comprehensive loss based on the risk classification training result and the plurality of training user features comprises: a user feature similarity loss is determined based on the difference between the plurality of training user features; a risk classification loss is determined based on the difference between the risk classification training result of at least part of the plurality of users and the labeled risk classification; and the first comprehensive loss is obtained based on the weighted sum of the user feature similarity loss and the risk classification loss.

8. The method of claim 7, wherein, The user feature similarity loss restricts that the similarity between the training user features corresponding to the users having an association relationship is greater than a preset similarity, and the similarity between the training user features corresponding to the users not having an association relationship is less than the preset similarity.

9. The method of claim 2, wherein, The N second user similarities are obtained by the following steps: a second target user feature corresponding to the target user is obtained; N target risk device features corresponding to N target risk devices are obtained, the N target risk devices being devices associated with the target user and having attack behaviors; and based on the similarity between the second target user feature and the N target risk device features, the N second user similarities are determined.

10. The method of claim 9, wherein, The second target user feature and the N target risk device features are obtained based on a second graph model, the second graph model comprising a plurality of users and a plurality of devices, and an association relationship between the plurality of users and the plurality of devices, the plurality of users comprising the target user, and the plurality of devices comprising the target device.

11. The method of claim 2, wherein, The P first device similarities are obtained by the following steps: a first target device feature corresponding to the target device is obtained; P target risk user features corresponding to P target risk users are obtained, the P target risk users being users associated with the target device and having attack behaviors; and based on the similarity between the first target device feature and the P target risk user features, the P first device similarities are determined.

12. The method of claim 11, the first target device feature and the P target risk user features are obtained based on a second graph model, the second graph model comprising a plurality of users and a plurality of devices, and an association relationship between the plurality of users and the plurality of devices, the plurality of users comprising the target user, and the plurality of devices comprising the target device.

13. The method of claim 10 or 12, wherein, The second graph model is obtained by the following method steps: obtain a second initial graph model, the second initial graph model taking initial user features corresponding to each of a plurality of users and initial device features corresponding to each of a plurality of devices as nodes, and connecting nodes corresponding to users and nodes corresponding to devices that have an association relationship, at least some of the plurality of users being labeled as risk users, and at least some of the plurality of devices being labeled as risk devices; and perform feature update training on the second initial graph model to obtain the second graph model.

14. The method of claim 13, wherein, The feature update training on the second initial graph model to obtain the second graph model includes: performing feature update on a plurality of initial user features and the plurality of initial device features using a preset second graph convolutional network to obtain a plurality of training user features and a plurality of training device features; performing risk classification based on the plurality of training user features and the plurality of training device features to obtain a risk classification training result; and based on the risk classification training result, the plurality of training user features, and the plurality of training device features, determining a second comprehensive loss, and based on the second comprehensive loss, converging the preset second graph convolutional network to obtain the second graph model.

15. The method of claim 14, wherein, The determination of the second comprehensive loss based on the risk classification training result, the plurality of training user features, and the plurality of training device features includes: determining a user-device feature similarity loss based on a difference between a training user feature corresponding to a user and a training device feature corresponding to a device in a user-device pair having an association relationship; determining a risk classification loss based on a difference between a risk classification training result of at least some of the plurality of users and a labeled risk classification result, and / or a difference between a risk classification training result of at least some of the plurality of devices and a labeled risk classification result; and obtaining the second comprehensive loss based on a weighted sum of the user-device feature similarity loss and the risk classification loss.

16. The method of claim 2, wherein, The K second device similarities are obtained by the following steps: obtaining a second target device feature corresponding to the target device; obtaining K target risk device features corresponding to K target risk devices, the K target risk devices being devices associated with the target device and having attack behaviors; and determining the K second device similarities based on similarities between the second target device feature and the K target risk device features. The second target device feature and the K target risk device features are obtained based on a third graph model, the third graph model including a plurality of devices and association relationships between the plurality of devices, the plurality of devices including the target device.

17. The method of claim 16, wherein, The third graph model is obtained by the following steps:

18. The method of claim 17, wherein, obtaining a third initial graph model, the third initial graph model taking initial device features corresponding to each of a plurality of devices as nodes, and connecting nodes corresponding to devices that have an association relationship, at least some of the plurality of devices being labeled as risk devices; and performing feature update training on the third initial graph model to obtain the third graph model. The feature update training on the third initial graph model to obtain the third graph model includes: performing feature update on a plurality of initial device features using a preset third graph convolutional network to obtain a plurality of training device features; performing risk classification based on the plurality of training device features to obtain a risk classification training result; and based on the risk classification training result and the plurality of training device features, determining a third comprehensive loss, and based on the third comprehensive loss, converging the preset third graph convolutional network to obtain the third graph model.

19. The method of claim 18, wherein, The training of the third initial graph model is performed to obtain the third graph model, including: performing feature updating on a plurality of initial device features by using a preset third graph convolutional network to obtain a plurality of training device features; performing risk classification based on the plurality of training device features to obtain a risk classification training result; and determining a third comprehensive loss based on the risk classification training result and the plurality of training device features, and performing convergence on the preset third graph convolutional network based on the third comprehensive loss to obtain the third graph model.

20. The method of claim 19, wherein, The determination of the third comprehensive loss based on the risk classification training result and the plurality of training device features includes: determining a device feature similarity loss based on a difference between the plurality of training device features; determining a risk classification loss based on a difference between a risk classification training result of at least part of the plurality of devices and a labeled risk classification result; and obtaining the third comprehensive loss based on a weighted sum of the device feature similarity loss and the risk classification loss.

21. A living body detection system, comprising: at least one storage medium storing at least one instruction set for performing living body detection; and at least one processor in communication connection with the at least one storage medium, wherein when the living body detection system is running, the at least one processor reads the at least one instruction set and performs the living body detection method according to the indication of the at least one instruction set as claimed in any one of claims 1-20.

Citation Information

Patent Citations

  • Face detection method and device, electronic equipment and medium

    CN110991249A

  • Spatial graph convolutional network training method, electronic equipment and storage medium

    CN111079780A

  • Risk judgment model training method and device for face recognition

    CN115188043A