Liveness detection method and system

By acquiring the liveness detection model of the remote server and the interaction characteristics of associated devices from the local device, the problem of decreased liveness detection performance in weak network environments is solved, and high-accuracy liveness detection is achieved across scenarios.

CN116110135BActive Publication Date: 2026-02-24ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310090038.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-17
Publication Date
2026-02-24
Estimated Expiration
2043-01-17

AI Technical Summary

Technical Problem

Existing liveness detection methods suffer from performance degradation in weak or no network environments, and the limited computing power and storage space of edge devices result in low detection accuracy, making them difficult to apply effectively in new scenarios.

Method used

By acquiring the liveness detection model and conditional input features from the remote server on the local device, and combining them with the interaction features of the associated devices, liveness detection performance is improved.

Benefits of technology

It achieves cross-scenario liveness detection adaptation and improves the accuracy of liveness detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116110135B_ABST
    Figure CN116110135B_ABST
Patent Text Reader

Abstract

The living body detection method and system provided in the specification obtain a living body detection model corresponding to a local device stored in a remote server, the local device including a newly deployed device or an existing device in a preset device set, and obtain condition input features, the condition input features including interaction features of a set of associated devices associated with the local device, then obtain a target user image of a target user, input the target user image and the condition input features into the living body detection model, obtain output information, the output information including an attack probability of the target user, and determine a living body detection result of the target user based on the attack probability of the target user, and output the living body detection result; the scheme can improve the accuracy of living body detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of liveness detection, and more particularly to a liveness detection method and system. Background Technology

[0002] In recent years, with the rapid development of internet technology, liveness detection has become an indispensable part of facial recognition systems. Liveness detection can effectively block non-live attack samples. Existing liveness detection methods can often perform liveness detection using cloud-based models or edge-based models.

[0003] In the process of researching and practicing existing technologies, the inventors of this application discovered that when performing liveness detection through a cloud-based liveness detection model, there are high requirements for network conditions. Once the device is in a weak network or no network environment, the liveness detection performance in the cloud will be affected. When using an edge-based liveness detection model, the liveness detection performance is also limited by the computing power and storage space of the edge. In addition, due to the limited complexity of the model, the liveness detection performance drops significantly when applied to new scenarios, resulting in a low accuracy rate of liveness detection. Summary of the Invention

[0004] This manual provides a more accurate method and system for liveness detection.

[0005] In a first aspect, this specification provides a liveness detection method, comprising: obtaining a liveness detection model and conditional input features corresponding to a local device stored on a remote server, wherein the local device includes a newly deployed device or an existing device in a preset device set, and the conditional input features include interaction features of a set of associated devices that are associated with the local device; obtaining a target user image of a target user, and inputting the target user image and the conditional input features into the liveness detection model to obtain output information, wherein the output information includes the attack probability of the target user; and determining the liveness detection result of the target user based on the attack probability of the target user, and outputting the liveness detection result.

[0006] In some embodiments, the associated device set includes one of a similar device set similar to the target device set or an interactive device set corresponding to the local device. The target device set includes the device set to which the local device belongs in the preset device set. The interactive device set includes a preset number of devices connected to the local device.

[0007] In some embodiments, the newly deployed device includes at least one of a new device or a device deployed in a new scenario, the new device includes a device that does not exist in a preset set of devices, and the new scenario includes a scenario that does not exist in a preset set of scenarios.

[0008] In some embodiments, before obtaining the target user image of the target user, the method further includes: when the local device is the newly deployed device, determining the neighboring devices of the local device based on the device location of the local device; obtaining the current liveness detection model corresponding to the neighboring devices, and using the current liveness detection model as the liveness detection model corresponding to the local device; selecting a preset number of devices connected to the local device from the preset device set based on preset connection conditions to obtain an associated device set, and obtaining the candidate conditional output features of each device in the associated device set; and determining the feature mean of the candidate conditional output features of each device to obtain the interaction features of the associated device set, and using the interaction features as the conditional input features corresponding to the local device.

[0009] In some embodiments, the preset connection conditions include at least one of the following: the distance between devices is less than a preset distance threshold or the number of users interacting with each other on the devices exceeds a preset number threshold.

[0010] In some embodiments, the output information further includes current conditional output features; and after inputting the target user image and the conditional input features into the liveness detection model to obtain the output information, the method further includes: obtaining historical conditional output features of the local device, determining the feature mean of the historical conditional output features and the current conditional output features to obtain candidate conditional output features of the local device, and sending the candidate conditional output features of the local device to a remote server so that the remote server determines the target conditional input features corresponding to the target device based on the candidate conditional output features of the local device, wherein the target device includes a device connected to the local device.

[0011] In some embodiments, after determining the mean value of the historical condition output features and the current condition output features to obtain the candidate condition output features of the local device, the method further includes: receiving an adaptation request sent by the target device; and sending the candidate condition output features of the local device to the target device based on the adaptation request, so that the target device can determine the target condition input features corresponding to the target device based on the candidate condition output features.

[0012] In some embodiments, determining the liveness detection result of the target user based on the attack probability of the target user includes: selecting one of a first scheme and a second scheme based on the attack probability of the target user, wherein: the first scheme includes: determining that the attack probability of the target user is greater than a preset attack probability threshold, and taking the attacking user as the liveness detection result of the target user; and the second scheme includes: determining that the attack probability of the target user is less than the preset attack probability threshold, and taking the normal user as the liveness detection result of the target user.

[0013] Secondly, this specification provides a detection method against attacks, applied to a remote server communicating with a local device, comprising: obtaining a first user image sample, and training a preset liveness detection model based on the first user image sample to obtain a general liveness detection model; clustering devices in a preset device set to obtain multiple candidate device sets, and updating the general liveness detection model to obtain a liveness detection model set, wherein the liveness detection model set includes a liveness detection model corresponding to each of the multiple candidate device sets; and determining a liveness detection model and conditional input features corresponding to the local device based on the liveness detection model set, and sending the liveness detection model and the conditional input features to the local device so that the local device performs liveness detection on the target user based on the liveness detection model and the conditional input features.

[0014] In some embodiments, training a preset liveness detection model based on the first user image sample to obtain a general liveness detection model includes: inputting the first user image sample into the preset liveness detection model to obtain a first predicted liveness category, a predicted domain category, and prediction results for at least one auxiliary task; determining multi-task loss information of the preset liveness detection model based on the first predicted liveness category, the predicted domain category, and the prediction results; and converging the preset liveness detection model based on the multi-task loss information to obtain the general liveness detection model.

[0015] In some embodiments, the at least one auxiliary task includes at least one of a depth reconstruction task, a normal estimation task, or a physiological signal estimation task.

[0016] In some embodiments, determining the multi-task loss information of the preset liveness detection model includes: determining the classification loss information of the first user image sample based on the first predicted liveness category and the predicted domain category; obtaining the annotation results of the at least one auxiliary task and comparing the prediction results with the annotation results to obtain auxiliary task loss information; and fusing the classification loss information and the auxiliary task loss information to obtain the multi-task loss information.

[0017] In some embodiments, determining the classification loss information of the first user image sample includes: obtaining a first labeled liveness category of the first user image sample and comparing the first labeled liveness category with the first predicted liveness category to obtain liveness classification loss information; obtaining a labeled domain category of the first user image sample and comparing the labeled domain category with the predicted domain category to obtain domain classification loss information; and using the liveness classification loss information and the domain classification loss information as the classification loss information.

[0018] In some embodiments, clustering the devices in a preset device set to obtain multiple candidate device sets includes: obtaining a second user image sample collected by each device in the preset device set within a preset time range; inputting the second user image sample into the general liveness detection model to obtain device initialization features corresponding to each device, and generating a device graph network corresponding to the preset device set based on the device connection relationships in the preset device set; and inputting the device initialization features into the device graph network to obtain target device features corresponding to each device, and clustering the devices in the preset device set based on the target device features to obtain multiple candidate device sets.

[0019] In some embodiments, generating a device graph network corresponding to the preset device set based on the device connection relationships in the preset device set includes: identifying the device connection relationships between each device in the preset device set based on preset connection conditions; generating an initial device graph network corresponding to the preset device set based on the device connection relationships, with each device as a node; and training the initial device graph network to obtain the device graph network.

[0020] In some embodiments, training the initial device graph network to obtain the device graph network includes: inputting the device initialization features corresponding to each device into the initial device graph network to obtain the updated device features of each device and the predicted risk result of each device within a historical time range, wherein the predicted risk result includes the predicted number or frequency of attacks on each device within the historical range; selecting the updated device feature set corresponding to connected devices from the updated device features, and comparing the updated device features in the updated device feature set to obtain feature consistency loss information, wherein the connected devices include at least two connected devices in the preset device set; obtaining the labeled risk result of each device, and comparing the predicted risk result with the labeled risk result to obtain risk prediction loss information; and fusing the feature consistency loss information and the risk prediction loss information, and converging the initial device graph network based on the fused graph network loss information to obtain the device graph network.

[0021] In some embodiments, the step of inputting the device initialization features into the device graph network to obtain the target device features corresponding to each device includes: selecting first-order neighbor nodes of the target node corresponding to each device in the device graph network; determining the attention weight of the first-order neighbor nodes, and weighting the device initialization features corresponding to the first-order neighbor nodes based on the attention weights; and performing feature aggregation on the device initialization features of each device and the corresponding weighted device initialization features to obtain the target device features corresponding to each device.

[0022] In some embodiments, updating the general liveness detection model to obtain a liveness detection model set includes: obtaining set similarity among the plurality of candidate device sets, and selecting at least one similar device set pair from the plurality of candidate device sets based on the set similarity; and for each similar device set pair in the at least one similar device set pair: obtaining a set of user image samples corresponding to the similar device set pair, and updating the general liveness detection model based on the set of user image samples to obtain a liveness detection model corresponding to each candidate device set in the similar device set pair.

[0023] In some embodiments, the similar device set pair includes a first device set and a second device set; and updating the general liveness detection model to obtain a liveness detection model corresponding to each candidate device set in the similar device set pair includes: obtaining the feature mean of the target device features of each device in the second device set, obtaining the first initial conditional input features corresponding to the first device set, and iteratively executing the update operation of the general liveness detection model based on the first initial conditional input features and the user image sample set until a preset iteration stop condition is reached, thereby obtaining a liveness detection model corresponding to each candidate device set in the similar device set pair.

[0024] In some embodiments, the user image sample set includes a third user image sample corresponding to the first device set and a fourth user image sample corresponding to the second device set;

[0025] The update operation of the general liveness detection model includes: updating the general liveness detection model based on the third user image sample and the first initial conditional input feature to obtain a first initial liveness detection model and a first initial conditional output feature corresponding to the first device set; updating the general liveness detection model corresponding to the first device set to the first initial liveness detection model and using the first initial conditional output feature as the second initial conditional input feature corresponding to the second device set; updating the general liveness detection model based on the second initial conditional input feature and the fourth user image sample to obtain a second initial liveness detection model and a second initial conditional output feature corresponding to the second device set; and updating the general liveness detection model corresponding to the second device set to the second initial liveness detection model and using the second initial conditional output feature as the first initial conditional input feature corresponding to the first device set.

[0026] In some embodiments, updating the general liveness detection model to obtain a first initial liveness detection model and a first initial conditional output feature corresponding to the first device set includes: performing feature encoding on the first initial conditional input feature and the third user image sample to obtain sample user features and the first initial conditional output feature; performing liveness classification on the third user image sample based on the first initial conditional output feature and the sample user feature to obtain a second predicted liveness category; obtaining a second labeled liveness category of the third user image sample and comparing the second labeled liveness category with the second predicted liveness category to obtain liveness classification loss information; and updating the network parameters of the general liveness detection model based on the liveness classification loss information to obtain the first initial liveness detection model corresponding to the first device set.

[0027] In some embodiments, determining the liveness detection model and conditional input features corresponding to the local device includes: obtaining the device identifier and current deployment scenario of the local device; determining the device type of the local device based on the device identifier and current deployment scenario, wherein the device type includes newly deployed devices and existing devices in the preset device set; and determining the liveness detection model and conditional input features corresponding to the local device based on the device type and the liveness detection model set.

[0028] In some embodiments, determining the liveness detection model and conditional input features corresponding to the local device includes: when the local device is an existing device, selecting a liveness detection model corresponding to a target device set from the liveness detection model set to obtain a liveness detection model corresponding to the local device, wherein the target device set is the set of devices to which the local device belongs; selecting a liveness detection model trained jointly with the liveness detection model corresponding to the local device from the liveness detection model set to obtain a candidate liveness detection model; selecting a candidate device set corresponding to the candidate liveness detection model from multiple candidate device sets to obtain an associated device set corresponding to the local device; and determining the mean feature value of the target device features of each device in the associated device set to obtain the interaction features of the associated device set, and using the interaction features as the conditional input features corresponding to the local device.

[0029] In some embodiments, determining the liveness detection model and conditional input features corresponding to the local device includes: when the local device is the newly deployed device, selecting neighboring devices of the local device from the preset device set based on the device location of the local device; selecting the current liveness detection model corresponding to the neighboring device from the liveness detection model set, and using the current liveness detection model as the liveness detection model corresponding to the local device; selecting a preset number of devices connected to the local device from the preset device set based on preset connection conditions to obtain the associated device set corresponding to the local device, and obtaining the candidate conditional output features of each device in the associated device set; and determining the feature mean of the candidate conditional output features of each device to obtain the interaction features of the associated device set, and using the interaction features as the conditional input features corresponding to the local device.

[0030] Thirdly, 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 and second aspects of this specification according to the instructions of the at least one instruction set.

[0031] As can be seen from the above technical solutions, the liveness detection method and system provided in this specification obtain a liveness detection model and conditional input features corresponding to a local device stored on a remote server. The local device includes newly deployed devices or existing devices in a preset set of devices. The conditional input features include interaction features of a set of associated devices that are related to the local device. Then, a target user image of the target user is obtained, and the target user image and conditional input features are input into the liveness detection model to obtain output information. The output information includes the attack probability of the target user, and based on the attack probability of the target user, the liveness detection result of the target user is determined and output. Since both existing devices and newly deployed devices can obtain the corresponding liveness detection model and conditional input features from the remote server on the cloud side, cross-scenario adaptation can be achieved while ensuring the performance of liveness detection. Moreover, during the liveness detection process, the interaction features corresponding to the set of associated devices that are related to the local device are used as conditional input features, thereby realizing algorithm evolution through multi-device interaction and improving the performance of liveness detection of the local device. Therefore, the accuracy of liveness detection can be improved.

[0032] 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

[0033] 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.

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

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

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

[0037] Figure 4 Another flowchart of a liveness detection method provided according to an embodiment of this specification is shown;

[0038] Figure 5 A schematic diagram illustrating the overall process of liveness detection in a face recognition scenario according to embodiments of this specification is shown; and

[0039] Figure 6 A schematic flowchart of the training process for an end-side liveness detection model based on conditional input / output, according to an embodiment of this specification, is shown. Detailed Implementation

[0040] 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.

[0041] 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.

[0042] 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.

[0043] 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.

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

[0045] Algorithm evolution: Utilizing cross-device communication to enhance the liveness detection algorithm capabilities of individual devices;

[0046] Liveness detection: In facial recognition systems, the method of detecting attacks using photos, screens, etc., is called liveness detection;

[0047] Cross-scenario adaptation: refers to the optimization and adaptation of algorithms when a new device is deployed to a new scenario.

[0048] Before describing the specific embodiments in this specification, the application scenarios of this specification will be introduced as follows:

[0049] The liveness detection method provided in this manual can be applied to any liveness detection scenario. For example, in a face payment scenario, the liveness detection method in this manual can be used to perform liveness detection on the collected face image of the user to be paid; in an identity verification scenario, the liveness detection method in this manual can be used to perform liveness detection on the collected identity image of the user; it can also be applied to any face recognition scenario, which will not be elaborated here.

[0050] 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.

[0051] 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 face recognition scenarios, etc. Figure 1 As shown, system 001 may include user 100, client 200, server 300, and network 400. Client 200 can be a local device or a client of a local device, and server 300 can be a remote server or other server that communicates with the local device.

[0052] User 100 can be the user who triggers the recognition of the target user's image. User 100 can perform liveness detection on the client 200. User 100 can be the target user or other users.

[0053] Client 200 can be a device for performing liveness detection on a target user image in response to a liveness detection operation by user 100. In some embodiments, the liveness detection method can be executed on client 200. In this case, client 200 may store data or instructions for executing the liveness detection method described herein, and may execute or be used to execute said data or instructions. In some embodiments, client 200 may include a hardware device with data information processing capabilities and the necessary programs required to drive the hardware device to operate. 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, such as receiving or sending images of a target user. In some embodiments, client 200 may include mobile devices, tablets, laptops, built-in devices in motor vehicles, or similar content, or any combination thereof. In some embodiments, the mobile device may include smart home devices, smart mobile devices, virtual reality devices, augmented reality devices, or similar devices, or any combination thereof. In some embodiments, the smart home device may include smart TVs, desktop computers, or any combination thereof. In some embodiments, the smart mobile device may include smartphones, personal digital assistants, gaming devices, navigation devices, or any combination thereof. In some embodiments, the virtual reality device or augmented reality device may include virtual reality headsets, virtual reality glasses, virtual reality controllers, augmented reality headsets, augmented reality glasses, augmented reality controllers, or similar content, or any combination thereof. For example, the virtual reality device or the augmented reality device may include Google Glass, head-mounted displays, VR, etc. In some embodiments, the built-in device in the motor vehicle may include an in-vehicle computer, an in-vehicle TV, etc. In some embodiments, the client 200 may include an image acquisition device for acquiring at least one image of the target user, thereby obtaining an image of the target user. In some embodiments, the image acquisition device may be a two-dimensional image acquisition device (such as an RGB camera), or a combination of 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.

[0054] In some embodiments, the client 200 may have one or more applications (APPs) installed. The APPs provide the 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 at least one user image of the target user for the client 200, thereby obtaining a target user image. In some embodiments, the user 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.

[0055] Server 300 may be a server providing various services, such as a backend server supporting liveness detection of target user images acquired on client 200. In some embodiments, the liveness detection method may be executed on server 300. In this case, server 300 may store data or instructions for executing the liveness detection method described herein, and may execute or be used to execute said data or instructions. In some embodiments, server 300 may include hardware devices with data processing capabilities and necessary programs for driving the hardware devices. Server 300 may communicate with multiple clients 200 and receive data sent by clients 200.

[0056] 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. TM Network, ZigBee TMA 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.

[0057] 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.

[0058] 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 the client 200 and partially on the server 300.

[0059] 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.

[0060] 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.

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

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

[0063] 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.

[0064] 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.

[0065] 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).

[0066] Figure 3A flowchart of a liveness detection method P100 applied to a local device 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:

[0067] S110: Obtain the liveness detection model and conditional input features corresponding to the local device stored on the remote server.

[0068] The remote server can be a server that communicates with the local device. This server can be server 300 or a cloud server that interacts with server 300.

[0069] The local devices can include newly deployed devices or existing devices from a preset device set. Newly deployed devices include at least one type of new device or devices deployed in a new scenario. New devices include devices not present in the preset device set, and new scenarios include scenarios not present in the preset scenario set. The types of deployment scenarios can be varied, such as public transportation scenarios, office building scenarios, unattended scenarios, attended scenarios, campus scenarios, company scenarios, residential community scenarios, scenic area scenarios, highway scenarios, or supermarket scenarios, etc. Existing devices can be pre-set or registered devices included in the preset device set, and these devices can be deployed in any scenario within the preset scenario set.

[0070] The conditional input features can include interaction features of a set of associated devices that are related to the local device. Interaction features can be understood as information exchanged across devices with the local device during algorithm evolution. These interaction features can help users improve or enhance the detection performance of the liveness detection model corresponding to the local device, thereby improving the accuracy of liveness detection. There are various types of interaction features. For example, if the local device is an existing device, the interaction features could be device features corresponding to the set of associated devices that are related to the local device. If the local device is a newly deployed device, the interaction features could be the average feature value of the conditional output features of the associated devices in the set of associated devices that are related to the local device. The set of associated devices can include either a set of similar devices similar to the target device set or a set of interactive devices corresponding to the local device. The target device set includes the set of devices to which the local device belongs within a preset device set, and the set of interactive devices includes a preset number of devices connected to the local device.

[0071] There are several ways to obtain the liveness detection model and conditional input features corresponding to the local device stored on a remote server, as follows:

[0072] For example, the processor 620 can directly obtain the liveness detection model and conditional input features corresponding to the local device stored on a remote server, or it can send a liveness detection request to the remote server and then receive the liveness detection model and conditional input features corresponding to the local device returned by the remote server based on the liveness detection request, and so on.

[0073] The remote server can generate a liveness detection model and conditional input features corresponding to the local device, and send these to the local device so that the local device can perform liveness detection on the target user based on the liveness detection model and conditional input features. Therefore, for the remote server, another liveness detection method P200 can also be provided. As before, the computing device 600 can execute the liveness detection method P200 of this specification. Specifically, the processor 620 can read the instruction set stored in its local storage medium, and then execute the liveness detection method P200 of this specification according to the provisions of the instruction set. Figure 4 As shown, method P200 may include:

[0074] S210: Obtain the first user image sample, and train the preset liveness detection model based on the first user image sample to obtain a general liveness detection model.

[0075] The preset liveness detection model can be a pre-defined detection model for liveness detection. The general liveness detection model can be a basic liveness detection model that has the same detection performance or accuracy for samples from different devices. The general liveness detection model is mainly used as a basic liveness detection model to further train or update different sets of devices, thereby obtaining the liveness detection model corresponding to each candidate set of devices.

[0076] There are several ways to obtain the first user image sample, including the following:

[0077] For example, the processor 620 can receive a first user image sample uploaded by the user 100 through the client 200 or terminal, or it can obtain at least one user image containing the user's biometrics from a network or image database and perform liveness annotation on the user image to obtain the first user image sample, or it can acquire at least one user image containing biometrics from the sample user through an image acquisition device and perform liveness annotation on the user image to obtain the first user image, and so on.

[0078] After obtaining the first user image sample, the processor 620 can train a preset liveness detection model based on the first user image sample to obtain a general liveness detection model. There are several ways to train the preset liveness detection model. For example, the processor 620 can input the first user image into the preset liveness detection model to obtain a first predicted user category, a prediction domain category, and prediction results of at least one auxiliary task. Based on the first predicted category, the prediction domain category, and the prediction results, the processor 620 determines the multi-task loss information of the preset liveness detection model and converges the preset liveness detection model based on the multi-task loss information to obtain a general liveness detection model.

[0079] The first predicted user category can be the predicted category obtained by performing liveness classification on the first user image sample using a preset liveness detection model, and the predicted domain category can be the predicted category obtained by performing domain classification on the first user image sample using a preset liveness detection model. At least one auxiliary task can include at least one of a depth reconstruction task, a normal estimation task, or a physiological signal estimation task (rPPG signal estimation). The depth reconstruction task can be to reconstruct the depth map corresponding to the first user image sample using a preset liveness detection model; the normal estimation task can be to estimate the normal of the pixels in the first user image sample using a preset liveness detection model; and the physiological signal estimation task can be to estimate the pulse signal or other physiological signals of the target user in the first user image sample using a preset liveness detection model.

[0080] The multi-task loss information can be the loss information generated by the preset liveness detection model during multi-task training, where the multi-task can be other tasks besides the liveness detection task. There are various ways to determine the multi-task loss information of the preset liveness detection model based on the first predicted liveness category, the prediction domain category, and the prediction result. For example, the processor 620 can determine the classification loss information of the first user image sample based on the first predicted liveness category and the prediction domain category, obtain the annotation result of at least one auxiliary task, compare the prediction result with the annotation result to obtain the auxiliary task loss information, and fuse the classification loss information and the auxiliary task loss information to obtain the multi-task loss information.

[0081] The classification loss information can be the loss information generated by the preset liveness detection model during the classification task. Since the classification task includes liveness classification and domain classification, the classification loss information can include liveness classification loss information and domain classification loss information. The liveness classification loss information can be the loss information generated by the preset liveness detection model during the liveness classification task, and the domain classification loss information can be the loss information generated by the preset liveness detection model during the domain classification task. There are multiple ways to determine the classification loss information. For example, the processor 620 can obtain the first labeled liveness category of the first user image sample and compare the first labeled liveness category with the first predicted liveness category to obtain liveness classification loss information; obtain the labeled domain category of the first user image sample and compare the labeled domain category with the predicted domain category to obtain domain classification loss information; or use the liveness classification loss information and the domain classification loss information as classification loss information.

[0082] The first labeled liveness category can be a liveness label for the first user image sample, representing or indicating the true liveness category of the first user image sample. The liveness category can include attacking users and normal users (live users). There are various ways to compare the first labeled liveness category with the first predicted liveness category. For example, the processor 620 can use a cross-entropy loss function to compare the first labeled liveness category with the first predicted liveness category to obtain liveness classification loss information. Alternatively, other types of loss functions can be used to compare the first labeled liveness category with the first predicted liveness category to obtain liveness classification loss information, and so on.

[0083] The labeled domain category can be the domain label of the first user image sample, representing or indicating the true domain category of the first user image. The domain category is mainly used to indicate the target data domain to which the first user image sample belongs. The method for determining the domain classification loss information can be similar to the method for determining the liveness classification loss information, as detailed above, and will not be repeated here.

[0084] After determining the liveness classification loss information and the domain classification loss, the processor 620 can use the liveness classification loss information and the domain classification loss information as the classification loss information corresponding to the first user image sample.

[0085] The auxiliary task loss information can be the loss information generated by the preset liveness detection model when completing at least one auxiliary task. The auxiliary task loss information can include the initial auxiliary task loss information corresponding to each of the at least one auxiliary task. The method for determining the initial auxiliary task loss information corresponding to each auxiliary task is similar to the method for determining the liveness classification loss information, as detailed above, and will not be repeated here.

[0086] After determining the classification loss information and the auxiliary task loss information, the processor 620 can fuse the classification loss information and the auxiliary task loss information to obtain multi-task loss information. There are several ways to fuse the classification loss information and the auxiliary task loss information. For example, the processor 620 can directly add the classification loss information and the auxiliary task loss information to obtain multi-task loss information, as shown in formula (1):

[0087] Loss1 = Loss cls +Loss aux +Loss domain (1)

[0088] Loss1 is the multi-task loss information, and Loss cls Loss information for liveness classification aux To assist in understanding task loss information, Loss domain Classify loss information for the domain.

[0089] In some embodiments, the processor 620 may also obtain multi-task loss weights, and based on the multi-task loss weights, weight the classification loss information and the auxiliary task loss information respectively, and fuse the weighted classification loss information and the weighted auxiliary task information to obtain the multi-task loss information corresponding to the first user image sample.

[0090] After determining the multi-task loss information, the processor 620 can converge the preset liveness detection model to obtain a general liveness detection model. There are several ways to converge the preset liveness detection model. For example, the processor 620 can use a gradient descent algorithm to update the network parameters of the preset liveness detection model based on the multi-task loss information or various loss information within the multi-task loss information, obtaining an updated liveness detection model. Then, it updates the preset liveness detection model to the updated liveness detection model and returns to the step of obtaining the first user image sample until the preset liveness detection model converges, thus obtaining the general liveness detection model. Alternatively, it can use other network parameter update algorithms to update the network parameters of the preset liveness detection model based on the multi-task loss information or various loss information within the multi-task loss information, obtaining an updated liveness detection model. Then, it updates the preset liveness detection model to the updated liveness detection model and returns to the step of obtaining the first user image sample until the preset liveness detection model converges, thus obtaining the general liveness detection model, and so on.

[0091] Traditional liveness detection models often rely on simple classification supervision signals during training, which can lead to overfitting and limit their cross-scene capabilities. This approach, however, introduces various additional supervision signals (such as depth reconstruction, normal vector estimation, or rPPG signal estimation) to enhance the detection performance of the trained general-purpose liveness detection model and reduce overfitting. Furthermore, by dividing the training data into several data domains and combining them with domain-specific classification loss, the model's ability to perceive across domains is further improved, thereby increasing the accuracy of liveness detection.

[0092] S220: Cluster the devices in the preset device set to obtain multiple candidate device sets, and update the general liveness detection model to obtain a liveness detection model set.

[0093] The liveness detection model set includes the liveness detection model corresponding to each of the multiple candidate device sets.

[0094] There are several ways to cluster devices in a preset set of devices, including the following:

[0095] For example, the processor 620 can obtain second user image samples collected by each device in the preset device set within a preset time range, input the second user image samples into a general liveness detection model to obtain device initialization features corresponding to each device, generate a device graph network corresponding to the preset device set based on the device connection relationship in the preset device set, input the device initialization features into the device graph network to obtain target device features corresponding to each device, and cluster the devices in the preset device set based on the target device features to obtain multiple candidate device sets.

[0096] The preset time range can be a pre-defined time range up to the current moment, such as the past 30 days, the past week, the past half month, or any other time range, etc.

[0097] The device initialization features can be initialization features that are used for feature aggregation or updating in the graph network. There are several ways to input the second user image samples into the general liveness detection model to obtain the device initialization features corresponding to each device. For example, the processor 620 can input the second user image samples into the general liveness detection model to obtain the image features or user features of each user image sample in the second user image samples, determine the feature mean of the image features or user features of the second user image samples corresponding to each device, and thus obtain the device initialization features corresponding to each device.

[0098] The user features can be the biometric information of the user contained in the second user image sample, such as facial features, fingerprint features, body features, or other biometric features, etc.

[0099] After obtaining the device initialization features corresponding to each device, the processor 620 can generate a device graph network corresponding to the preset device set based on the device connection relationships in the preset device set. The device connection relationship can represent whether any two devices in the preset device set are connected, and can include either connected devices or disconnected devices. The device graph network can be a graph network representing the connection relationships between devices in the preset device set. There are multiple ways to generate the device graph network corresponding to the preset device set. For example, the processor 620 can identify the device connection relationships between each device in the preset device set based on preset connection conditions, use each device as a node based on the device connection relationships, generate an initial device graph network corresponding to the preset device set, and train the initial device graph network to obtain the final device graph network.

[0100] The preset connection conditions can be the conditions required to characterize the connection between devices. When any two devices meet the preset connection conditions, it can be determined that the two devices are connected or have a connection relationship. The preset connection conditions can include at least one of the following: the distance between the devices is less than a preset distance threshold or the number of users interacting between the devices exceeds a preset number threshold. The types of interaction can be various, such as at least one of the following interactive behaviors: transaction, interaction, or login. Based on the preset connection conditions, there can be various ways to identify the device connection relationship between each device in the preset device set. For example, the processor 620 selects at least one device pair that meets the preset connection conditions from the preset device set, determines the device connection relationship between the devices in the at least one device pair as a device connection relationship, and determines the device connection relationship between other devices in the preset device set besides the at least one device pair as a device non-connection relationship.

[0101] After determining the device connection relationships between each device in the preset device set, the processor 620 can generate an initial device graph network corresponding to the preset device set, treating each device as a node based on these connections. There are several ways to generate the initial device graph network. For example, the processor 620 can treat each device as a node and connect the connected nodes in the preset device set with edges based on the device connection relationships, thereby obtaining the initial graph network corresponding to the preset device set.

[0102] After generating the initial device graph network, the processor 620 can train the initial device graph network to obtain the final device graph network. There are several ways to train the initial graph network. For example, the processor 620 can input the initial device features corresponding to each device into a preset device graph network to obtain the updated device features and the predicted risk results for each device within the historical range. From the updated device features, the processor can select the updated device feature set corresponding to the connected devices and compare the updated features in the updated device feature set to obtain feature consistency loss information. It can then obtain the labeled risk results for each device and compare the predicted risk results with the labeled risk results to obtain risk prediction loss information. Finally, it can fuse the feature consistency loss information and the risk prediction loss information, and converge the initial device graph network based on the fused graph network loss information to obtain the final device graph network.

[0103] The risk prediction results can include predicting the number or frequency of attacks each device will be attacked within a historical range. Updated device features can be the device features obtained by updating the initial device graph network for each device.

[0104] The connected devices include at least two connected devices from a preset device set. There are several ways to select the updated device feature set corresponding to the connected devices from the updated device features. For example, the processor 620 can select the updated device features corresponding to at least two connected devices from the updated device features to obtain the updated device feature set.

[0105] After selecting the updated device feature set, the processor 620 can compare the updated device features in the updated device feature set to obtain feature consistency loss information. Feature consistency loss information can be the loss information arising from the differences in updated device features between connected devices. The constraint condition for feature consistency loss information is that the feature difference between the updated device features of connected devices is less than a preset feature difference threshold; in other words, the features of connected devices should be as consistent as possible. There are several ways to determine feature consistency loss information. For example, the processor 620 can use a preset loss function to compare the updated device features of connected devices in the updated device set to obtain feature consistency loss information. Alternatively, it can determine the feature difference between the updated device features of connected devices in the updated device feature set and use the preset loss function and feature difference to determine feature consistency loss information, and so on.

[0106] The risk prediction loss information can be the loss information generated when the initial device network performs risk prediction. There are several ways to compare the predicted risk results with the labeled risk results to obtain the risk prediction loss information. For example, the processor 620 can compare the predicted risk results with the labeled risk results based on cross-entropy loss information to obtain the risk prediction loss information. Alternatively, it can compare the predicted risk results with the labeled risk results based on other types of loss functions to obtain the risk prediction loss information, and so on.

[0107] After determining the feature consistency loss information and the risk prediction loss information, the processor 620 can fuse the feature consistency loss information and the risk prediction loss information to obtain the fused graph network loss information. There are several ways to fuse the feature consistency loss information and the risk prediction loss information. For example, the processor 620 can directly add the feature consistency loss information and the risk prediction loss information to obtain the graph network loss information, as shown in formula (2).

[0108] Loss2 = Loss correlation +Loss attack (2)

[0109] Where Loss2 is the graph network loss information, Loss correlation For feature consistency loss information, Loss attack For risk prediction and loss information.

[0110] In some embodiments, the processor 620 may also obtain graph network weights, and weight the feature consistency loss information and risk prediction loss information based on the graph network weights respectively, and fuse the weighted feature consistency loss information and the weighted risk prediction loss information to obtain graph network loss information.

[0111] After determining the graph network loss information, the processor 620 can converge the initial device graph network based on the graph network loss information. The convergence method can be similar to the convergence method of the preset liveness detection model, as described above, and will not be repeated here.

[0112] After training the initial device graph network, the processor 620 can update the device initialization features of each device based on the trained device graph network. The update method can include the processor 620 inputting the initial device features into the device graph network to obtain the target device features corresponding to each device. There are several ways to input the initial device features into the device graph network to obtain the target device features corresponding to each device. For example, the processor 620 can select the first-order neighbor nodes of the target node corresponding to each device in the device graph network, determine the weighted initial device features of the devices corresponding to the first-order neighbor nodes, and perform feature aggregation between the initial device features of each device and the corresponding weighted initial device features to obtain the target device features corresponding to each device.

[0113] In this context, a first-order neighbor can be a node directly connected to the target node. For example, if node A is directly connected to node B, then node B can be a first-order neighbor of node A. Similarly, if node A is directly connected to node B, and node B is directly connected to node C, then node C can be a second-order neighbor of node A, and so on. There are several ways to determine the attention weights of first-order neighbors. For instance, the processor 620 can input the initial device features of at least one first-order neighbor into the attention network to obtain the attention weights for each first-order neighbor.

[0114] After obtaining the attention weights of the first-order neighbor nodes, the processor 620 can weight the device initialization features corresponding to each first-order neighbor node. Then, it performs feature aggregation on the device initialization features of each device and the corresponding weighted device initialization features to obtain the target device features for each device. There are various ways to perform feature aggregation. For example, the processor 620 can perform a linear transformation on the device initialization features of each device and the weighted device initialization features of the corresponding first-order neighbor nodes to obtain the target device features for each device. The essence of this linear transformation can be seen as inputting the device initial features and the corresponding weighted device initialization features into the fully connected layer (FC layer) corresponding to the linear transformation, thereby obtaining the target device features for each device.

[0115] After determining the target device features corresponding to each device, the processor 620 can cluster the devices in the preset device set based on the target device features, thereby obtaining multiple candidate device sets. There are various ways to cluster the devices in the preset device set. For example, the processor 620 can use KMeans (a clustering algorithm) to cluster the devices in the preset device set based on the target device features of each device, thereby obtaining K device sets. These K device sets are then used as multiple candidate device sets, where the number of candidate device sets K can be a positive integer greater than or equal to 1.

[0116] After clustering a preset set of devices, the processor 620 can update the general liveness detection model based on the multiple candidate device sets obtained after clustering, thereby obtaining a general liveness detection model. The main purpose of updating the general liveness detection model is to train a liveness detection model for each candidate device set in the multiple candidate device sets. When training the liveness detection model for each candidate device set, the training data is the training data corresponding to the corresponding candidate device set. There are several ways to update the general liveness detection model. For example, the processor 620 can obtain the set similarity between multiple candidate device sets, and based on the set similarity, select at least one similar device set pair from the multiple candidate device sets. For each similar device set pair in the at least one similar device set pair: obtain the user image sample set corresponding to the similar device set pair, and update the general liveness detection model based on the user image sample set to obtain the liveness detection model corresponding to each candidate device set in the similar device set pair.

[0117] Here, set similarity can refer to the similarity between multiple candidate device sets. There are several ways to obtain set similarity between multiple candidate device sets. For example, the processor 620 can obtain the mean feature value of the target device features of the devices in each candidate device set, obtain the device set features corresponding to each candidate device set, and determine the set similarity between multiple candidate device sets based on the device set features.

[0118] After determining the set similarity among multiple candidate device sets, the processor 620 can select at least one similar device set pair from the multiple candidate device sets based on the set similarity. The similar device set pair can be a pair consisting of the two most similar or closest candidate device sets among the multiple candidate device sets. There are several ways to select at least one similar device set pair. For example, the processor 620 can select the candidate device set with the highest set similarity from each candidate device set, thereby forming at least one similar device set pair.

[0119] After selecting at least one pair of similar devices, the processor 620 can, for each of the at least one pair of similar devices, take any pair of similar devices, including a first device set and a second device set, as an example, the processor 620 can obtain a set of user image samples corresponding to the pair of similar devices. This set of user image samples may include a third user image sample corresponding to the first device set and a fourth user image sample corresponding to the second device set. The method for obtaining the set of user image samples corresponding to the pair of similar devices is similar to the method for obtaining the first user image sample, and will not be described in detail here.

[0120] After obtaining the user image sample set corresponding to the similar device set pair, the processor 620 can update the general liveness detection model based on the user image samples to obtain the liveness detection model corresponding to each candidate device set in the similar device set. There are multiple ways to update the general liveness detection model. For example, the processor 620 can obtain the feature mean of the target device features of each device in the second device set, obtain the first initial conditional input features corresponding to the first device set, and iteratively execute the update operation of the general liveness detection model based on the first initial conditional input features and the user image sample set until a preset iteration stop condition is reached to obtain the liveness detection model corresponding to each candidate device set in the similar device set pair.

[0121] The update operation of the general liveness detection model may include: the processor 620 updating the general liveness detection model based on the third user image sample and the first initial condition input feature to obtain the first initial liveness detection model and the first initial condition output feature corresponding to the first device set; updating the general liveness detection model corresponding to the first device set to the first initial liveness detection model; and using the first initial condition output feature as the second initial condition input feature corresponding to the second device set; updating the general liveness detection model based on the second initial condition input feature and the fourth user image sample to obtain the second initial liveness detection model and the second initial condition output feature corresponding to the second device set; and updating the general liveness detection model corresponding to the second device set to the second initial liveness detection model; and using the second initial condition output feature as the first initial condition input feature corresponding to the first device set.

[0122] In one iteration, on the first device set side, the general liveness detection model is updated to obtain the first initial liveness detection model and the first initial conditional output features corresponding to the first device set. There are multiple ways to do this. For example, the processor 620 can encode the first initial conditional input features and the third user image sample to obtain the sample user features and the first initial conditional output features. Based on the first initial conditional output features and the sample user features, the third user image sample is classified for liveness to obtain the second predicted liveness category. The second labeled liveness category of the third user image sample is obtained, and the second labeled liveness category is compared with the second predicted liveness category to obtain liveness classification loss information. Based on the liveness classification loss information, the network parameters of the general liveness detection model are updated to obtain the first initial liveness detection model corresponding to the first device set.

[0123] The processor 620 obtains the first initial condition output feature corresponding to the first device set as the second initial condition input feature corresponding to the second device set, and then updates the general liveness detection model on the second device set side based on the second initial condition input feature and the fourth user image sample. The update method is detailed above and will not be repeated here.

[0124] It's important to note that when training the liveness detection model for each candidate device set in a similar device set pair, the entire training process can be viewed as training two models with identical network structures. Each model can consist of two parts: a feature encoding network (feature encoder) and a liveness classification network (liveness classifier). During iterative updates, each update involves sequential updates of both models. The update order can be either: updating the first initial liveness detection model for the first device set (i.e., updating the general liveness detection model for the first device set to obtain the first initial liveness detection model for the first device set), then updating the general liveness detection model for the second device set to obtain the second initial liveness detection model for the second device set; or updating the general liveness detection model for the second device set to obtain the second initial liveness detection model for the second device set, then updating the general liveness detection model for the first device set to obtain the first initial liveness detection model for the first device set. The update methods are essentially similar, only the order of updates differs. Additionally, it should be noted that in a single update, the conditional output features of one model serve as the conditional input features of another model. The initialization features of the conditional input features can be the mean of the target device features of the devices in the candidate device set (either the first or second device set) at the start of training. Taking the first initial liveness detection model corresponding to the first device set as an example, where the update order is first, the initialization features of the conditional input features can be the mean of the target device features of the devices in the second device set. Furthermore, the conditional output features of the general liveness detection model corresponding to the first device set can be used as the conditional input features of the general liveness detection model corresponding to the second device set. Similarly, taking the second initial liveness detection model corresponding to the second device set as an example, the initialization features of the conditional input features can be the mean of the target device features of the devices in the first device set. Furthermore, the conditional output features of the general liveness detection model corresponding to the second device set can be used as the conditional input features of the general liveness detection model corresponding to the first device set.

[0125] The processor 620 can iteratively execute the update operation of the general liveness detection model until a preset iteration stopping condition is met, thereby obtaining the liveness detection model corresponding to each candidate device set in the similar device set pair. The preset iteration stopping condition can be various, such as when two general liveness detection models converge, when a preset number of updates is reached, or when the detection accuracy of the two updated liveness detection models reaches a preset accuracy, and so on.

[0126] The processor 620 updates the general liveness detection model according to the above-described update operation, thereby generating a liveness detection model set. This liveness detection model set may include the liveness detection model corresponding to each of multiple candidate device sets.

[0127] S230: Based on the set of liveness detection models, determine the liveness detection model and conditional input features corresponding to the local device, and send the liveness detection model and conditional input features to the local device so that the local device can perform liveness detection on the target user based on the liveness detection model and conditional input features.

[0128] There are several ways to determine the corresponding liveness detection model and conditional input features for a local device based on the liveness detection model, as follows:

[0129] For example, the processor 620 can obtain the device identifier and current deployment scenario of the local device, determine the device type of the local device based on the device identifier and current deployment scenario, and determine the corresponding liveness detection model and conditional input features of the local device based on the device type and the set of liveness detection models.

[0130] The device identifier can be identification information representing the identity of the local device. The current deployment scenario can be the scenario information representing the current location of the local device. The device type can include newly deployed devices and existing devices in the preset device set. The specific definitions of newly deployed devices and existing devices are as described above and will not be repeated here. There are multiple ways to determine the device type of the local device based on the device identifier. For example, the processor 620 queries the device identifier of the local device in the preset device set and queries the current deployment scenario in the preset scenario set. If the device identifier of the local device is included in the preset device set and the current deployment scenario is included in the preset scenario set, the device type of the local device is determined to be an existing device. Alternatively, if the device identifier of the local device is not included in the preset device set, or if the current deployment scenario is not included in the preset scenario set, the local device is determined to be a newly deployed device.

[0131] After determining the device type of the local device, the processor 620 can determine the corresponding liveness detection model and conditional input features based on the device type and the liveness detection model set. There are several ways to determine the corresponding liveness detection model and conditional input features for the local device. For example, when the local device is an existing device, the processor 620 selects the liveness detection model corresponding to the target device set from the liveness detection model set to obtain the liveness detection model corresponding to the local device. The target device set is the set of devices to which the local device belongs. It then selects a liveness detection model that is jointly trained with the liveness detection model corresponding to the local device from the liveness detection model set to obtain a candidate liveness detection model. From multiple candidate device sets, it selects a candidate device set corresponding to the candidate liveness detection model to obtain the associated device set corresponding to the local device. Finally, it determines the mean of the target device features for each device in the associated device set to obtain the interaction features of the associated device set. Interaction features are used as conditional input features for the local device; or, when the local device is a newly deployed device, based on the device location of the local device, neighboring devices of the local device are selected from a preset device set, the current liveness detection model corresponding to the neighboring devices is selected from the liveness detection model, and the current liveness detection model is used as the liveness detection model corresponding to the local device. Based on preset connection conditions, a preset number of devices connected to the local device are selected from the preset device set to obtain the associated device set corresponding to the local device. Candidate conditional output features of each device in the associated device set are obtained, and the feature mean of the candidate conditional output features of each device is determined to obtain the interaction features of the associated device set, and the interaction features are used as conditional input features for the local device.

[0132] The candidate conditional output features can be the average of the historical conditional output features generated by each device in the associated device set during liveness detection. It should be noted that when the local device is an existing device, the corresponding liveness detection model can be directly obtained. When the local device is a newly deployed device, the liveness detection models of its neighboring devices can be used as the corresponding liveness detection model for the local device. Furthermore, when the local device is an existing device, the corresponding conditional input features can be the device set features of the other liveness detection model paired with the local device's liveness detection model during the training phase (the average of the target device features in the corresponding candidate device set). When the local device is a newly deployed device, the average of the candidate conditional output features of the 10 or any number of other associated devices (associated device set) connected to the local device can be directly used as the conditional input features. Therefore, in cross-scene / cross-device adaptation, there is no need to retrain the corresponding liveness detection model. Moreover, multi-device interaction can be used to enhance the performance of the liveness detection model, thereby improving the accuracy of liveness detection. For liveness detection of existing devices, the liveness detection model corresponding to the target device set can be used, as well as the device set features of similar device sets corresponding to the target device set as conditional input features, thereby realizing liveness detection for multi-device interaction, enhancing the detection performance of the liveness detection model, and thus improving the accuracy of liveness detection.

[0133] After determining the corresponding liveness detection model and conditional input features for local merging, the processor 620 can send the liveness detection model and conditional input features to the local device, so that the local device can perform liveness detection on the target user based on the liveness detection model and conditional input features. There are several ways to send the liveness detection model and conditional input features to the local device. For example, the processor 620 can directly send the liveness detection model and conditional input features to the corresponding local device, or it can receive a liveness detection request sent by the local device and send the liveness detection model and conditional input features to the local device based on the liveness detection request, and so on.

[0134] After obtaining the liveness detection model and conditional input features sent by the remote server, the local device can perform liveness detection on the target user based on the liveness detection model and conditional input features.

[0135] In some embodiments, when the local device is a newly deployed device, the local device can also directly obtain or generate the corresponding liveness detection model and conditional input features without needing to obtain them from a remote server. There are various ways to obtain or generate the corresponding liveness detection model and conditional input features. For example, the processor 620 can determine the neighboring devices of the local device based on the device location of the local device, obtain the current liveness detection model corresponding to the neighboring devices, and use the current liveness detection model as the liveness detection model corresponding to the local device. Based on preset connection conditions, it can select a preset number of devices connected to the local device from a preset device set to obtain an associated device set, and obtain the candidate conditional output features of each device in the associated device set, as well as determine the feature mean of the candidate conditional output features of each device, to obtain the interaction features of the associated device set, and use the interaction features as the conditional input features corresponding to the local device.

[0136] The preset connection conditions may include at least one of the following: the distance between devices is less than a preset distance threshold or the number of users interacting between devices exceeds a preset number threshold. For details, please refer to the above description, which will not be repeated here.

[0137] It should be noted that, for cross-device / cross-scenario scenarios, the way a local device obtains its liveness detection model and conditional input features is similar to the way a remote server determines the liveness detection model and conditional input features corresponding to that local device, as detailed above, and will not be repeated here.

[0138] After the local device obtains the corresponding liveness detection model and conditional input features, such as Figure 3 As shown, method P100 may also include:

[0139] S120: Obtain the target user image and input the target user image and conditional input features into the liveness detection model to obtain output information.

[0140] The target user image may include at least one image of the target user's biometric features. These biometric features may include at least one of the following: face, fingerprint, iris, sclera, palm print, or skeletal projection.

[0141] The output information can be the information output by the liveness detection model after performing liveness detection on the target user image. The output information may include the attack probability of the target user. The attack probability can be the probability that the target user is an attacker. The attacker could be a non-live user.

[0142] There are several ways to obtain the target user's image, including the following:

[0143] For example, the processor 620 can directly receive the target user image uploaded by user 100 or target user through client 200 or terminal; or, it can obtain the target user image by acquiring at least one user image of the target user through an image acquisition device; or, it can obtain the target user image by selecting at least one image containing the biometric features of the target user from a network or image database; or, when there are many target users or many target user images, it can also receive a liveness detection request, which carries the storage address of the target user image of the target user, and obtain the target user image of the target user based on the storage address, and so on.

[0144] After obtaining the target user image, the processor 620 can input the target user image and conditional input features into the liveness detection model to obtain output information. The output information may also include current conditional output features. The current conditional output features can be the features other than user features (face features) after the liveness detection model has encoded the conditional input features and the target user image.

[0145] After inputting the target user image and conditional input features into the liveness detection model and obtaining the output information, the processor 620 can also obtain the historical conditional output features of the local device, determine the feature mean of the historical conditional output features and the current conditional output features to obtain the candidate conditional output features of the local device, and send the candidate conditional output features of the local device to a remote server so that the remote server can determine the target conditional input features corresponding to the target device based on the candidate conditional output features of the local device. The target device may include a device connected to the local device.

[0146] The historical conditional output features can include at least one current conditional output feature output by the liveness detection model when performing liveness detection on other users before performing liveness detection on the target user. The candidate conditional output features output by the local device can determine the conditional input features of the target device (newly deployed device) connected to it.

[0147] In some embodiments, in addition to sending candidate condition output features to a remote server, the local device can also send the candidate condition output features to a connected target device, which can be a newly deployed device. This allows the target device to determine the target condition input features corresponding to the target device based on the candidate condition output features. Therefore, after obtaining the candidate condition output features of the local device, the processor 620 can also receive an adaptation request sent by the target device, and based on the adaptation request, send the candidate condition output features of the local device to the target device, so that the target device can determine the target condition input features corresponding to the target device based on the candidate condition output features.

[0148] The target device uses the average of the output features of a preset number of candidate conditions as the target condition input features. The target device can then perform liveness detection based on the target condition input features and the corresponding liveness detection model. The specific process of liveness detection can be found in the local device's liveness detection process, and will not be elaborated upon here.

[0149] S130: Based on the attack probability of the target user, determine the liveness detection result of the target user and output the liveness detection result.

[0150] The liveness detection result may include whether the target user is an attacking user or a normal user.

[0151] There are several ways to determine the liveness detection result of a target user based on the attack probability of that user, including the following:

[0152] For example, the processor 620 can select one of a first scheme and a second scheme to execute based on the attack probability of the target user. The first scheme may include: determining that the attack probability of the target user is greater than a preset attack probability threshold, and using the attacking user as the liveness detection result of the target user. The second scheme may include: determining that the attack probability of the target user is less than a preset attack probability threshold, and using the normal user as the liveness detection result of the target user, and so on.

[0153] After determining the liveness detection result of the target user, the processor 620 can output the liveness detection result. There are several ways to output the liveness detection result. For example, the processor 620 can directly send the liveness detection result to the user 100 or the client 200, terminal or server corresponding to the target user, so that the client 200, terminal or server can respond to the request of the target user or the target user based on the liveness detection result. Alternatively, the liveness detection result can be directly visualized, and so on.

[0154] There are several ways to visualize the liveness detection results. For example, the processor 620 can directly display the liveness detection result, or it can display the liveness detection result through sound and light (for example, by broadcasting the liveness detection result by voice, or by displaying different types of liveness detection results by displaying different colored lights, or by displaying the liveness detection result through sound and light linkage), or it can display the liveness detection result for specific types of liveness detection results (for example, only displaying the liveness detection result for the attacking user type, or only displaying the liveness detection result for the live user type, etc.), and so on.

[0155] In some embodiments, after determining or outputting the liveness detection result of the target user, the processor 620 may respond to the target user or the request corresponding to the target user based on the liveness detection result. There may be various ways to respond. For example, the processor 620 may directly intercept the target user or the request corresponding to the target user, or the processor 620 may directly perform secondary verification on the target user and, based on the secondary verification result, provide a final response to the target user or the request corresponding to the target user, and so on.

[0156] In facial recognition scenarios, this solution can adapt to cross-scenario liveness detection on the local device (edge ​​side) based on multi-device evolution. The overall detection process can include training liveness detection models for different device sets on the cloud side via a remote server, determining the liveness detection model and conditional input features corresponding to the local device, and sending the liveness detection model and conditional input features to the local device for liveness detection. Figure 5 As shown, it can mainly include four parts: basic model training, feature extraction and device graph clustering, edge model training based on conditional input and output, and liveness detection based on multi-device interaction, which can be specifically as follows:

[0157] (1) Basic model training: Traditional liveness detection model training often uses only simple classification supervision signals, which leads to overfitting of the trained model and thus limits the model's ability to cross scenes / devices. In this solution, we introduce a variety of additional supervision signals (such as depth reconstruction, normal estimation and rPPG signal estimation) as auxiliary tasks to enhance model performance and reduce overfitting. In addition, the training data can be divided into several data domains and combined with data domain classification loss to further improve the model's ability to perceive across domains, thereby obtaining a general liveness detection model after training. The specific training process can be found above and will not be repeated here.

[0158] (2) Feature Extraction and Device Graph Clustering: Traditional edge-side liveness detection methods treat all devices as a single data source, using data collected from all devices for model training and deploying the trained model to all devices. However, this training method ignores the differences and connections between devices. Therefore, in this scheme, we first establish relationships between devices through a graph network, then perform device clustering to obtain multiple sets of candidate devices. Subsequently, we train a targeted liveness detection model for each set of devices, thereby improving the targeting of the liveness detection model and thus improving the accuracy of liveness detection. Feature extraction mainly involves extracting facial features from all images of each device over the past 30 days using a general liveness detection model trained on a basic model. The average of these facial features is then used as the initial features for that device (for feature initialization of the graph network). After extracting the initial features for each device, a graph network can be constructed. In the graph network, devices are nodes. Two devices that satisfy at least one of the following conditions are connected: "the distance between two devices is less than a threshold m" or "more than n users have simultaneously conducted transactions on two devices". This results in the initial device graph network. Then, the initial device graph network is trained to obtain the trained device graph network. The training process can be as described above and will not be repeated here. The initial features of the devices are input into the trained device graph network for feature aggregation to obtain the target device features for each device. KMeans clustering is then performed using these target device features to obtain K device sets (multiple candidate device sets). Subsequently, the edge model can be trained specifically for each device set, using only the training data of the current device set during training.

[0159] (3) Edge Model Training Based on Conditional Input / Output: Each training iteration includes two models with identical structures (a general liveness detection model). Each model consists of two parts: a feature encoder and a liveness classifier. The feature encoder takes conditional input features and face images (from the current device set) as input and outputs face features and conditional output features. The liveness classifier takes face features and conditional input features as input and outputs the liveness detection result. The conditional output features of the two models can be the conditional input features of the other model, and the initialization features of the conditional input features can be the mean of the device features from the current device set. The general liveness detection model is converged based on the liveness classification loss, thus obtaining the liveness detection models corresponding to the two device sets. It should be noted that the two device sets can be the most similar or closest device sets, as shown in the example below. Figure 6 As shown.

[0160] (4) Liveness detection based on multi-device interaction: Liveness detection here can include liveness detection for existing devices, and can also include cross-device / cross-scenario adaptation for newly deployed devices. Liveness detection for existing devices can include collecting the face image of the target user after the target user starts face recognition, inputting the face image and conditional input features into the liveness detection model to obtain the attack probability p and conditional output features. When the attack probability p is greater than a pre-set threshold T, it is judged as an attack; otherwise, it is judged as a liveness. Then, the historical conditional output features (which may or may not include the current conditional output features) are used to obtain the conditional output features (candidate conditional output features) of the current device (existing device). Liveness detection for newly deployed devices can include first finding the nearest device based on its geographical location and then sending the liveness detection model corresponding to that nearest device to the newly deployed device. Using graph construction rules, the system identifies 10 devices connected to the newly deployed device and transmits their conditional output features to the newly deployed device. The average of these 10 conditional output features is then calculated to obtain the conditional input features corresponding to the newly deployed device, thus completing the adaptation. Then, liveness inference and detection are performed using the corresponding liveness detection model and conditional input features. The specific inference and detection process is described above and will not be repeated here. Furthermore, it should be noted that there are multiple ways to obtain the corresponding liveness detection model and conditional input features for newly deployed devices. For example, the processor 620 can directly receive or obtain the liveness detection model and conditional input features stored on a remote server. Alternatively, it can directly obtain the liveness detection models of adjacent devices and the conditional output features of the 10 devices connected to the newly deployed device to obtain the corresponding conditional input features. In other words, the newly deployed device directly obtains the liveness detection model and conditional input features without needing to request them from a remote server.

[0161] This solution first trains a basic model on the cloud to obtain a general liveness detection model. Then, different devices are clustered into multiple candidate device sets through a graph network, with each set having its own corresponding data. Next, different edge models are trained for different device sets, and additional conditional inputs and outputs are introduced as the basis for multi-device interaction. Finally, the trained model is deployed to the corresponding local device (client), and the algorithm is evolved and liveness detection is performed using multi-device interaction. This enables liveness detection for existing devices and new devices, especially allowing newly deployed devices to make full use of existing devices. The algorithm can be evolved quickly to adapt to new scenarios, thereby improving the accuracy of liveness detection.

[0162] In summary, the liveness detection method P100 and system 001 provided in this specification obtain a liveness detection model and conditional input features corresponding to a local device stored on a remote server. The local device includes newly deployed devices or existing devices in a preset device set. The conditional input features include interaction features of a set of associated devices that are related to the local device. Then, a target user image is obtained, and the target user image and conditional input features are input into the liveness detection model to obtain output information. The output information includes the attack probability of the target user, and based on the attack probability, the liveness detection result of the target user is determined and output. Since this solution allows both existing and newly deployed devices to obtain the corresponding liveness detection model and conditional input features from a remote server on the cloud side, cross-scenario adaptation can be achieved while ensuring the performance of liveness detection. Furthermore, during the liveness detection process, the interaction features corresponding to the set of associated devices related to the local device are used as conditional input features, thereby achieving algorithm evolution through multi-device interaction and improving the performance of liveness detection on the local device. Therefore, the accuracy of liveness detection can be improved.

[0163] 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.

[0164] 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.

[0165] 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.

[0166] 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.

[0167] 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.

[0168] 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.

[0169] 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 liveness detection method, applied to a local device, comprising: Obtain the liveness detection model and conditional input features corresponding to the local device stored on a remote server. The local device includes newly deployed devices or existing devices in a preset set of devices. The conditional input features include the interaction features of a set of associated devices that are related to the local device. The interaction features include information on cross-device communication between the set of associated devices and the local device. Obtain the target user image and input the target user image and the conditional input features into the liveness detection model to obtain output information, including the attack probability of the target user; and Based on the attack probability of the target user, determine the liveness detection result of the target user and output the liveness detection result.

2. The liveness detection method according to claim 1, wherein, The associated device set includes either a similar device set similar to the target device set or an interactive device set corresponding to the local device. The target device set includes the device set to which the local device belongs in the preset device set. The interactive device set includes a preset number of devices connected to the local device.

3. The liveness detection method according to claim 1, wherein, The newly deployed devices include at least one of new devices or devices deployed in a new scenario. The new devices include devices that do not exist in the preset device set, and the new scenario includes scenarios that do not exist in the preset scenario set.

4. The live detection method according to claim 1, wherein, Before obtaining the target user image of the target user, the process also includes: When the local device is the newly deployed device, the neighboring devices of the local device are determined based on the device location of the local device; Obtain the current liveness detection model corresponding to the adjacent device, and use the current liveness detection model as the liveness detection model corresponding to the local device; Based on preset connection conditions, a preset number of devices connected to the local device are selected from the preset device set to obtain an associated device set, and candidate condition output features for each device in the associated device set are obtained; and The mean value of the candidate conditional output features of each device is determined to obtain the interaction features of the associated device set, and the interaction features are used as the conditional input features corresponding to the local device.

5. The liveness detection method according to claim 4, wherein, The preset connection conditions include at least one of the following: the distance between devices is less than a preset distance threshold, or the number of users interacting with each other on the devices exceeds a preset number threshold.

6. The liveness detection method according to claim 1, wherein, The output information also includes current condition output features; as well as After inputting the target user image and the conditional input features into the liveness detection model to obtain output information, the method further includes: Obtain the historical conditional output characteristics of the local device. The mean values ​​of the historical conditional output features and the current conditional output features are determined to obtain the candidate conditional output features of the local device. The candidate condition output features of the local device are sent to a remote server so that the remote server can determine the target condition input features corresponding to the target device based on the candidate condition output features of the local device. The target device includes devices connected to the local device.

7. The liveness detection method according to claim 6, wherein, After determining the mean value of the historical conditional output features and the current conditional output features to obtain the candidate conditional output features of the local device, the method further includes: Receive the adaptation request sent by the target device; and Based on the adaptation request, the candidate condition output features of the local device are sent to the target device, so that the target device can determine the target condition input features corresponding to the target device based on the candidate condition output features.

8. The liveness detection method according to claim 1, wherein, Determining the liveness detection result of the target user based on the attack probability of the target user includes: Based on the attack probability of the target user, one of the first and second schemes is selected for execution, wherein: The first scheme includes: determining that the attack probability of the target user is greater than a preset attack probability threshold, and using the attacking user as the liveness detection result of the target user; and The second scheme includes: determining that the attack probability of the target user is less than the preset attack probability threshold, and using the normal user as the liveness detection result of the target user.

9. A method for generating and deploying a liveness detection model, applied to a remote server communicating with a local device, comprising: Obtain a first user image sample, and train a preset liveness detection model based on the first user image sample to obtain a general liveness detection model; Clustering is performed on the devices in the preset device set to obtain multiple candidate device sets. The general liveness detection model is then updated to obtain a liveness detection model set, which includes the liveness detection model corresponding to each of the multiple candidate device sets. Based on the set of liveness detection models, the liveness detection model and conditional input features corresponding to the local device are determined, and the liveness detection model and the conditional input features are sent to the local device so that the local device can perform the liveness detection method according to any one of claims 1-8 on the target user based on the liveness detection model and the conditional input features.

10. The method for generating and deploying a liveness detection model according to claim 9, wherein, The step of training a preset liveness detection model based on the first user image sample to obtain a general liveness detection model includes: The first user image sample is input into the preset liveness detection model to obtain the prediction results of the first predicted liveness category, the prediction domain category, and at least one auxiliary task. Based on the first predicted liveness category, the predicted domain category, and the prediction result, determine the multi-task loss information of the preset liveness detection model; and Based on the multi-task loss information, the preset liveness detection model is converged to obtain the general liveness detection model.

11. The method for generating and deploying a liveness detection model according to claim 10, wherein, The at least one auxiliary task includes at least one of a depth reconstruction task, a normal estimation task, or a physiological signal estimation task.

12. The method for generating and deploying a liveness detection model according to claim 10, wherein, The determination of the multi-task loss information of the preset liveness detection model includes: Based on the first predicted liveness category and the predicted domain category, the classification loss information of the first user image sample is determined; Obtain the annotation results of the at least one auxiliary task, and compare the prediction results with the annotation results to obtain auxiliary task loss information; and The classification loss information and the auxiliary task loss information are fused to obtain the multi-task loss information.

13. The method for generating and deploying a liveness detection model according to claim 12, wherein, The step of determining the classification loss information of the first user image sample includes: Obtain the first labeled liveness category of the first user image sample, and compare the first labeled liveness category with the first predicted liveness category to obtain liveness classification loss information; Obtain the labeled domain category of the first user image sample, and compare the labeled domain category with the predicted domain category to obtain domain classification loss information; and The liveness classification loss information and the domain classification loss information are used as the classification loss information.

14. The method for generating and deploying a liveness detection model according to claim 9, wherein, The process of clustering devices in a preset device set to obtain multiple candidate device sets includes: Obtain a second user image sample collected by each device in the preset device set within a preset time range; The second user image sample is input into the general liveness detection model to obtain the device initialization features corresponding to each device, and a device graph network corresponding to the preset device set is generated based on the device connection relationships in the preset device set; and The device initialization features are input into the device graph network to obtain the target device features corresponding to each device. Based on the target device features, the devices in the preset device set are clustered to obtain multiple candidate device sets.

15. The method for generating and deploying a liveness detection model according to claim 14, wherein, The step of generating a device graph network corresponding to the preset device set based on the device connection relationships in the preset device set includes: Based on preset connection conditions, the device connection relationship between each device in the preset device set is identified; Based on the device connection relationships, each device is treated as a node to generate an initial device graph network corresponding to a preset set of devices; and The initial device graph network is trained to obtain the device graph network.

16. The method for generating and deploying a liveness detection model according to claim 15, wherein, The step of training the initial device graph network to obtain the device graph network includes: The device initialization features corresponding to each device are input into the initial device graph network to obtain the updated device features of each device and the predicted risk results of each device within a historical time range. The predicted risk results include the predicted number or frequency of attacks on each device within a historical range. Select the set of updated device features corresponding to the connected device from the updated device features, and compare the updated device features in the updated device feature set to obtain feature consistency loss information. The connected device includes at least two connected devices in the preset device set. Obtain the labeled risk result for each device, and compare the predicted risk result with the labeled risk result to obtain risk prediction loss information; and The feature consistency loss information and the risk prediction loss information are fused together, and the initial device graph network is converged based on the fused graph network loss information to obtain the device graph network.

17. The method for generating and deploying a liveness detection model according to claim 14, wherein, The step of inputting the device initialization features into the device graph network to obtain the target device features corresponding to each device includes: In the device graph network, select the first-order neighbor nodes of the target node corresponding to each device; Determine the attention weights of the first-order neighbor nodes, and based on the attention weights, weight the device initialization features corresponding to the first-order neighbor nodes respectively; and The device initialization features of each device are aggregated with the corresponding weighted device initialization features to obtain the target device features corresponding to each device.

18. The method for generating and deploying a liveness detection model according to claim 9, wherein, The process of updating the general liveness detection model to obtain a set of liveness detection models includes: Obtain the set similarity among the plurality of candidate device sets, and based on the set similarity, select at least one similar device set pair from the plurality of candidate device sets; and For each of the at least one similar device set pairs: Obtain the user image sample set corresponding to the set of similar devices, and Based on the user image sample set, the general liveness detection model is updated to obtain the liveness detection model corresponding to each candidate device set in the similar device set pair.

19. The method for generating and deploying a liveness detection model according to claim 18, wherein, The similar device set includes a first device set and a second device set; as well as The step of updating the general liveness detection model to obtain the liveness detection model corresponding to each candidate device set in the similar device set pair includes: Obtain the mean feature value of the target device features for each device in the second device set, and obtain the first initial conditional input features corresponding to the first device set. Based on the first initial condition input features and the user image sample set, the update operation of the general liveness detection model is iteratively executed until the preset iteration stop condition is reached, so as to obtain the liveness detection model corresponding to each candidate device set in the similar device set pair.

20. The method for generating and deploying a liveness detection model according to claim 19, wherein, The user image sample set includes the third user image sample corresponding to the first device set and the fourth user image sample corresponding to the second device set; The update operation of the general liveness detection model includes: Based on the third user image sample and the first initial conditional input features, the general liveness detection model is updated to obtain the first initial liveness detection model and the first initial conditional output features corresponding to the first device set. The general liveness detection model corresponding to the first set of devices is updated to the first initial liveness detection model, and the first initial condition output feature is used as the second initial condition input feature corresponding to the second set of devices. Based on the second initial conditional input features and the fourth user image samples, the general liveness detection model is updated to obtain the second initial liveness detection model and the second initial conditional output features corresponding to the second device set, and The general liveness detection model corresponding to the second set of devices is updated to the second initial liveness detection model, and the second initial condition output feature is used as the first initial condition input feature corresponding to the first set of devices.

21. The method for generating and deploying a liveness detection model according to claim 20, wherein, The step of updating the general liveness detection model to obtain the first initial liveness detection model and the first initial conditional output features corresponding to the first set of devices includes: The first initial condition input features and the third user image samples are feature-encoded to obtain sample user features and the first initial condition output features; Based on the first initial condition input features and the sample user features, the third user image sample is subjected to liveness classification to obtain a second predicted liveness category; Obtain the second labeled liveness category of the third user image sample, and compare the second labeled liveness category with the second predicted liveness category to obtain liveness classification loss information; and Based on the liveness classification loss information, the network parameters of the general liveness detection model are updated to obtain the first initial liveness detection model corresponding to the first set of devices.

22. The method for generating and deploying a liveness detection model according to claim 9, wherein, The step of determining the liveness detection model and conditional input features corresponding to the local device includes: Obtain the device identifier and current deployment scenario of the local device; Based on the device identifier and the current deployment scenario, the device type of the local device is determined, including newly deployed devices and existing devices in the preset device set; and Based on the device type and the set of liveness detection models, determine the liveness detection model and conditional input features corresponding to the local device.

23. The method for generating and deploying a liveness detection model according to claim 22, wherein, Determining the liveness detection model and conditional input features corresponding to the local device includes: When the local device is the existing device, the liveness detection model corresponding to the target device set is selected from the liveness detection model set to obtain the liveness detection model corresponding to the local device, and the target device set is the device set to which the local device belongs; From the set of liveness detection models, a liveness detection model that is trained together with the liveness detection model corresponding to the local device is selected to obtain a candidate liveness detection model; From the plurality of candidate device sets, a candidate device set corresponding to the candidate liveness detection model is selected to obtain the associated device set corresponding to the local device; and The mean value of the target device features of each device in the associated device set is determined to obtain the interaction features of the associated device set, and the interaction features are used as the conditional input features corresponding to the local device.

24. The method for generating and deploying a liveness detection model according to claim 22, wherein, The process of determining the liveness detection model and conditional input features corresponding to the local device includes: When the local device is the newly deployed device, based on the device location of the local device, the adjacent devices of the local device are selected from the preset device set; Select the current liveness detection model corresponding to the adjacent device from the set of liveness detection models, and use the current liveness detection model as the liveness detection model corresponding to the local device; Based on preset connection conditions, a preset number of devices connected to the local device are selected from the preset device set, resulting in an associated device set corresponding to the local device, and candidate condition output features for each device in the associated device set are obtained; and The mean value of the candidate conditional output features of each device is determined to obtain the interaction features of the associated device set, and the interaction features are used as the conditional input features corresponding to the local device.

25. A liveness detection system, comprising: At least one storage medium storing at least one instruction set for performing liveness detection; as well as At least one processor is communicatively connected to the at least one storage medium. 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 according to any one of claims 1-8.

Citation Information

Patent Citations

  • Living body detection method and device, computer device and storage medium

    CN109858381A

  • Image joint reasoning recognition system and method based on cloud edge-end architecture

    CN115187847A

  • Account detection method and device, equipment and storage medium

    CN115310957A