Artificial intelligence-based face recognition method, device, equipment, and storage medium
By performing complex calculations of facial recognition in the cloud, the terminal hardware configuration requirements are reduced, the problem of high hardware costs in the prior art is solved, and the face recognition application of low-configuration devices is realized.
Patent Information
- Application Number
- CN202011412390.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-03
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2040-12-03
AI Technical Summary
Existing facial recognition technology has high requirements for hardware configuration and maintenance costs in applications such as face scanning payment, resulting in a high threshold.
By running artificial intelligence face recognition methods in the cloud, using cloud applications to generate facial data acquisition instructions and page rendering data, the terminal is only responsible for image acquisition and interface display, and performs complex calculations in the cloud, reducing terminal hardware configuration requirements.
It effectively reduces the terminal hardware price and maintenance costs, enables low-configuration devices to support facial recognition, and lowers the application threshold.
Smart Images

Figure CN114663929B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an artificial intelligence-based face recognition method, apparatus, device, and storage medium. Background Art
[0002] Facial recognition is a biometric technology that identifies individuals based on facial features. It involves a series of related technologies that use a camera or webcam to capture images or video streams containing faces, detect faces in the images, and then identify the detected faces.
[0003] During the research and practice of related technologies, the inventors of this application discovered that facial recognition is widely used in various fields, such as finance, transportation, and security. Taking facial payment as an example, facial payment requires complex calculation steps, such as running multiple algorithms and models. Therefore, facial payment requires high hardware configuration and maintenance costs. Summary of the Invention
[0004] The embodiments of the present application provide a facial recognition method, apparatus, device, and storage medium based on artificial intelligence, which can improve the efficiency of facial recognition.
[0005] The present invention provides an artificial intelligence-based face recognition method, including:
[0006] Receive a facial recognition request from the target application;
[0007] Based on the facial recognition request, triggering a cloud application corresponding to the target application to generate response data to the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of a facial recognition page in the target application. The facial data collection instruction is used to instruct the terminal to collect facial image data required for facial recognition, and the page rendering data is used for the terminal to display the facial recognition page.
[0008] Sending the response data to the target application;
[0009] receiving data to be identified sent by the target application based on the response data, wherein the data to be identified includes facial image data of the target user collected by the terminal;
[0010] performing a facial recognition operation on the facial image data through the cloud application to obtain a facial recognition result of the target user;
[0011] The facial recognition result is sent to the target application.
[0012] Accordingly, the embodiment of the present application also provides another facial recognition method based on artificial intelligence, including:
[0013] Send a facial recognition request to the server;
[0014] receiving response data generated by the cloud application of the server in response to the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of a facial recognition page in a target application;
[0015] Based on the page rendering data, displaying the face recognition page of the target application, so that the target user can perform a face recognition process through the face recognition page;
[0016] Based on the facial data collection instruction, collecting facial image data of the target user in the facial recognition process;
[0017] generating the target user's to-be-identified data based on the collected facial image data, and sending the to-be-identified data to the server;
[0018] Receive a facial recognition result of the target user generated by the server through the cloud application.
[0019] Accordingly, an embodiment of the present application further provides an artificial intelligence-based facial recognition device, comprising:
[0020] a request receiving unit, configured to receive a face recognition request sent by a target application;
[0021] a response data generating unit, configured to trigger, based on the facial recognition request, a cloud application corresponding to the target application to generate response data to the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of a facial recognition page in the target application, wherein the facial data collection instruction is used to instruct the terminal to collect facial image data required for facial recognition, and the page rendering data is used for the terminal to display the facial recognition page;
[0022] a response data sending unit, configured to send the response data to the target application;
[0023] a data-to-be-recognized receiving unit, configured to receive data to be recognized sent by the target application based on the response data, wherein the data to be recognized includes facial image data of the target user collected by the terminal;
[0024] a facial recognition unit, configured to perform a facial recognition operation on the facial image data through the cloud application to obtain a facial recognition result of the target user;
[0025] A result sending unit is used to send the face recognition result to the target application.
[0026] In one embodiment, the facial recognition request carries a user event of the target user; the response data generating unit includes:
[0027] a process determination subunit, configured to determine, based on the user event, a face recognition process triggered by the target user in the target application, wherein the face recognition process includes a face data collection step;
[0028] a first generating subunit, configured to trigger a cloud application corresponding to the target application to generate facial data collection instructions corresponding to the facial data collection step and page rendering data corresponding to the facial recognition process;
[0029] The second generating subunit is configured to generate response data for the facial recognition request based on the generated facial data collection instruction and the generated page rendering data.
[0030] In one embodiment, the facial image data includes at least one candidate image; and the facial recognition unit includes:
[0031] a target selection subunit, configured to select a target image required for performing a face recognition operation from the candidate images through the cloud application, wherein the target image includes target image channel data under at least one image channel;
[0032] a liveness detection subunit, configured to perform a liveness detection operation on the target image channel data based on the image channel to obtain a liveness detection result;
[0033] a feature extraction subunit, configured to extract facial information features of the target user from the target image channel data according to the liveness detection result;
[0034] The feature comparison subunit is used to perform feature comparison on the facial information features to determine the facial recognition result of the target user.
[0035] In one embodiment, the candidate image includes candidate image channel data under at least one image channel, where the image channel includes a color channel and a depth channel; and the target selection subunit is configured to:
[0036] Based on the data distribution of the candidate image channel data under the color channel, the planar attribute coefficients of the target facial area in the candidate image are determined; based on the data distribution of the candidate image channel data under the depth channel, the stereo attribute coefficients of the target facial area in the candidate image are determined; and based on the planar attribute coefficients and the stereo attribute coefficients, the target image required for the facial recognition operation is selected from the candidate images.
[0037] In one embodiment, the target selection subunit is specifically configured to:
[0038] Based on the data distribution of the candidate image channel data in the depth channel, the depth statistical features and the facial masking features of the target facial area in the candidate image are calculated; based on the depth statistical features and the facial masking features, the stereo attribute coefficients of the target facial area in the candidate image are determined.
[0039] In one embodiment, the image channel includes a color channel and a depth channel; the living body detection subunit is configured to:
[0040] Based on the target color channel data under the color channel, facial contour detection is performed on the target image to obtain a contour detection result; based on the contour detection result and the target depth channel data under the depth channel, facial liveness detection is performed on the target image to obtain a liveness detection result.
[0041] In one embodiment, the living body detection subunit is specifically used to:
[0042] Determine a liveness detection model required for face detection; when it is detected that the face contour detection of the target image passes, input the target depth channel data into the liveness detection model to perform face liveness detection on the target image to obtain a liveness detection result.
[0043] In one embodiment, the target image includes at least one candidate facial region corresponding to a candidate user; the feature extraction subunit is configured to:
[0044] When it is detected that the liveness test has passed, the region position information and region size information of the candidate facial region are determined; based on the region position information and the region size information, a target facial region corresponding to the target user is determined from the candidate facial regions; and facial information features of the target user are extracted from the target facial region.
[0045] In one embodiment, the data to be identified includes user identification information of the target user; the feature comparison subunit is configured to:
[0046] Based on the user identification information and the facial information features, a feature comparison request is generated for the target user; the feature comparison request is sent to a feature comparison module to trigger the feature comparison module to perform a feature comparison on the facial information features based on the user identification; the feature comparison result returned by the feature comparison module is obtained, and the facial recognition result of the target user is determined based on the feature comparison result.
[0047] Accordingly, the embodiment of the present application also provides another facial recognition device based on artificial intelligence, including:
[0048] A request sending unit, configured to send a face recognition request to a server;
[0049] a response data receiving unit, configured to receive response data generated by the cloud application of the server in response to the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of a facial recognition page in a target application;
[0050] a page display unit, configured to display a face recognition page of the target application based on the page rendering data, so that a target user can perform a face recognition process through the face recognition page;
[0051] A facial data collection unit, configured to collect facial image data of the target user during the facial recognition process based on the facial data collection instruction;
[0052] a to-be-identified data generating unit, configured to generate the to-be-identified data of the target user based on the collected facial image data, and send the to-be-identified data to the server;
[0053] A result receiving unit is configured to receive a facial recognition result of the target user generated by the server through the cloud application.
[0054] Accordingly, an embodiment of the present application further provides a storage medium on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the artificial intelligence-based face recognition method as shown in the embodiment of the present application are implemented.
[0055] Accordingly, an embodiment of the present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the artificial intelligence-based facial recognition method as shown in the embodiment of the present application are implemented.
[0056] This solution can trigger a corresponding cloud application on a server to generate facial data collection instructions and page rendering data based on a facial recognition request from a target application on a terminal. The generated facial data collection instructions and page rendering data are then sent to the terminal, triggering the terminal to collect the facial image data required for facial recognition based on the facial data collection instructions and display the facial recognition page based on the page rendering data. Furthermore, in this solution, after receiving the facial image data collected by the terminal, the server's cloud application can perform facial recognition operations in the cloud and send the generated facial recognition results to the terminal. In this way, by utilizing cloud applications, this solution offloads the complex computational steps involved in facial recognition, such as data screening and liveness detection algorithms, as well as the resource-intensive interface rendering operations, to the cloud. The terminal only needs to collect camera data, input user events, and display the cloud application interface. This effectively reduces the hardware requirements for the terminal, enabling even low-profile terminal devices to support facial recognition. This effectively saves terminal hardware costs and maintenance, lowers the barrier to entry for facial recognition in practical applications, and promotes its promotion and development. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0058] Figure 1 Schematic diagram of a scenario of the artificial intelligence-based face recognition method provided in this embodiment;
[0059] Figure 2 is a flow chart of the artificial intelligence-based face recognition method provided in this embodiment;
[0060] Figure 3 is a schematic diagram of an application of the artificial intelligence-based face recognition method provided in this embodiment;
[0061] Figure 4 Schematic diagram of face recognition based on artificial intelligence provided by this embodiment;
[0062] Figure 5 is a timing diagram of the artificial intelligence-based face recognition method provided in this embodiment;
[0063] Figure 6 is another flowchart of the artificial intelligence-based face recognition method provided in this embodiment;
[0064] Figure 7is another application diagram of the artificial intelligence-based face recognition method provided in this embodiment;
[0065] Figure 8 is another flowchart of the artificial intelligence-based face recognition method provided in this embodiment;
[0066] Figure 9 Schematic diagram of the structure of the artificial intelligence-based face recognition device provided in this embodiment;
[0067] Figure 10 is another structural diagram of the artificial intelligence-based face recognition device provided in this embodiment;
[0068] Figure 11 is another structural diagram of the artificial intelligence-based face recognition device provided in this embodiment;
[0069] Figure 12 is another structural diagram of the artificial intelligence-based face recognition device provided in this embodiment;
[0070] Figure 13 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application;
[0071] Figure 14 This is a schematic diagram of the structure of the blockchain system provided in the embodiment of the present application;
[0072] Figure 15 This is another structural diagram of the blockchain system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0073] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.
[0074] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, autonomous driving, drones, robots, smart medical care, smart customer service, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0075] Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also involves studying the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.
[0076] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0077] The solutions provided in the embodiments of the present application relate to technologies such as computer vision of artificial intelligence, specifically, computer vision technology (Computer Vision, CV) Computer vision is a science that studies how to make machines "see", and more specifically, it refers to machine vision such as using cameras and computers to replace human eyes to identify and measure targets, and further performs graphic processing so that computer processing becomes an image that is more suitable for human eye observation or transmission to instrument detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multidimensional data. Computer vision technology generally includes image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, synchronous positioning and map construction, and also includes common biometric recognition technologies such as face recognition and fingerprint recognition. It is specifically described by the following embodiments:
[0078] The embodiments of the present application provide a facial recognition method, apparatus, device and storage medium based on artificial intelligence. Specifically, the embodiments of the present application provide a facial recognition device for a first computer device (for distinction, it can be referred to as a first facial recognition device). The first computer device can be a network-side device such as a server. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms, and cloud applications can be run on the cloud server. The embodiments of the present application also provide a facial recognition device for a second computer device (for distinction, it can be referred to as a second facial recognition device). The second computer device can be a terminal or other device. The terminal can be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this; optionally, it can be a device that supports facial recognition, such as a facial payment device.
[0079] In the embodiment of the present application, the first computer device is used as a server and the second computer device is used as a terminal as an example to introduce the face recognition method based on artificial intelligence.
[0080] refer to Figure 1 The embodiment of the present application provides an artificial intelligence-based facial recognition system including a server 10 and a terminal 20. The server 10 and the terminal 20 are connected via a network, such as a wired or wireless network. A first facial recognition device is integrated into the server, which may be a cloud server on which a cloud application may run. A second facial recognition device may be integrated into the terminal, such as a client. The terminal may be a device that supports facial recognition, such as a facial payment device. A target facial payment application may run on the facial payment device, which corresponds to the cloud application running on the server.
[0081] Among them, the server 10 can be used to receive a facial recognition request sent by a target application; based on the facial recognition request, trigger the cloud application corresponding to the target application to generate response data for the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of the facial recognition page in the target application, the facial data collection instruction is used to instruct the terminal to collect facial image data required for facial recognition, and the page rendering data is used for the terminal to display the facial recognition page; send the response data to the target application; receive the data to be recognized sent by the target application based on the response data, wherein the data to be recognized includes the facial image data of the target user collected by the terminal; perform a facial recognition operation on the facial image data through the cloud application to obtain the facial recognition result of the target user; and send the facial recognition result to the target application.
[0082] In one embodiment, server 10 is a cloud server, and terminal 20 is a facial payment device. Furthermore, a target facial payment application may be running on terminal 20, and a cloud application corresponding to the target application may be running on server 10. In this embodiment, after detecting that the target user's face has been recognized, server 10 may attach payment credentials to the facial recognition result, allowing terminal 20 to initiate order payment for the target user based on the payment credentials.
[0083] Accordingly, the terminal 20 can be used to send a facial recognition request to the server; receive response data generated by the cloud application of the server for the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of the facial recognition page in the target application; based on the page rendering data, display the facial recognition page of the target application for the target user to perform the facial recognition process through the facial recognition page; based on the facial data collection instruction, collect the facial image data of the target user in the facial recognition process; based on the collected facial image data, generate the data to be recognized of the target user, and send the data to be recognized to the server; receive the facial recognition result of the target user generated by the server through the cloud application.
[0084] It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.
[0085] The embodiments of the present application will be described from the perspective of a first facial recognition device, which can be integrated into a server. Specifically, the server can be a cloud server, and a cloud application can be run on the cloud server.
[0086] Cloud is a metaphor for the network and the internet. Clouds are categorized into private, public, hybrid, and industry clouds. Clouds are often used when outlining network topologies or structures. Historically, clouds were often used in diagrams to represent telecommunications networks, but later also to represent the internet and underlying infrastructure.
[0087] In practice, cloud computing is a form of distributed computing. It involves breaking down massive data processing programs into countless smaller programs via a network "cloud." These programs are then processed and analyzed by a system of multiple servers, generating results and returning them to users. With the advancement of technology, cloud services are no longer simply a form of distributed computing; rather, they represent the hybrid evolution and advancement of computer technologies, including distributed computing, utility computing, load balancing, parallel computing, network storage, hot backup redundancy, and virtualization.
[0088] Cloud servers are simple, efficient, secure, reliable, and elastically scalable computing services. They are more easily managed and efficient than physical servers. Users can quickly create and deploy as many cloud servers as they want, without having to purchase hardware in advance.
[0089] Cloud applications are a subset of the concept of "cloud computing," representing the application layer of cloud computing technology. The key difference between cloud applications and cloud computing is that cloud computing exists as a macro-technological development concept, while cloud applications are products that directly address real-world customer needs.
[0090] The embodiment of the present application provides an artificial intelligence-based face recognition method, which can be executed by a processor of a server, such as Figure 2 As shown, the specific process of the face recognition method based on artificial intelligence can be as follows:
[0091] 101. Receive a facial recognition request sent by a target application.
[0092] Among them, the target application can be an application running on the terminal and supporting facial recognition. For example, in a payment scenario, the target application can be a facial payment application on the terminal; for example, in a security scenario, the target application can be an identity authentication application based on facial recognition on the terminal; and so on.
[0093] Correspondingly, the server side can run a cloud application corresponding to the target application. There can be many ways for the cloud application to correspond to the target application. For example, the cloud application can be an application synchronized with the target application. When the user uses the target application on the terminal, the terminal operation can be synchronized with the cloud so that the cloud application on the cloud can operate synchronously, or simulate the target application of the terminal in real time; for example, the cloud application can interact with the target application, such as receiving data uploaded by the target application and responding to the data to assist the target application in executing actual application functions; and so on.
[0094] The target application can obtain the data collected by the terminal device, for example, Figure 3 The target application can obtain the relevant data required for facial recognition collected by the terminal device, such as user input events and sensor data. Furthermore, the target application can generate a facial recognition request based on the user event, so that the cloud application can be triggered to respond to the request through the facial recognition request, such as performing function execution and user interface (UI) rendering calculation in the cloud, and returning response data, thereby assisting the target application to perform the actual facial recognition function.
[0095] Specifically, refer to Figure 3 The target application running on the terminal can collect relevant data for facial recognition, such as sensor data and user input events. After generating a facial recognition request based on the user's input data, the terminal can send the facial recognition request to the cloud server, so that the cloud application running on the cloud server can receive the facial recognition request sent by the target application.
[0096] Among them, user events or user input events can be events in which a user directly or indirectly transmits a facial recognition signal to a terminal or triggers facial recognition. For example, in some embodiments, a user event can be an event triggered on the terminal by a user through an interactive module such as a screen or a button provided by the terminal. A user event can be a specific touch operation, such as a single-click operation, a long-press operation, a double-click operation, and a sliding operation, etc. It can also be triggered by voice. Optionally, a user event can also be a combination of a series of operations. In this case, the user event can be an event directly transmitted by the user to the terminal;
[0097] For example, in some other embodiments, when a terminal captures or collects data required for user facial recognition through a sensor, such as a facial recognition camera, facial recognition of the user may be triggered. Therefore, it can be considered that a user event is generated accordingly. In this case, a user event is an event that can be indirectly triggered by the user at the terminal.
[0098] For example, in other embodiments, a user event may be an event that is indirectly transmitted or triggered by a user to a terminal through instructions, programs, etc. For example, a user event may be a facial recognition call-up operation initiated by a user to a terminal through communication instructions between programs. In this case, the user event may be an event that is directly transmitted by the user to the terminal; and so on.
[0099] In this embodiment, after obtaining facial recognition data collected by the terminal device, such as user events, the target application can generate a facial recognition request based on the data and send the facial recognition request to the server. The cloud application on the server side can then receive the facial recognition request sent by the target application in response.
[0100] In one embodiment, the artificial intelligence-based facial recognition method introduced in this solution can be applied to a facial payment scenario, and a target application for facial payment can be run on the facial payment device of the terminal, which is an application that supports facial recognition; the server side can run a cloud application corresponding to the target application, and the correspondence between the cloud application and the target application can be: the cloud application runs the calculations required for facial payment, and the target application is responsible for the input of sensor data and user events, as well as the interface display of the cloud application.
[0101] refer to Figure 5 Customers can interact with the facial payment device on the terminal to initiate facial payment. During the interaction process, the terminal can collect the user event that triggers the initiation of facial payment, and after generating a facial recognition request based on the user event, send the facial recognition request to the cloud application. Correspondingly, the cloud application can receive the facial recognition request sent by the target application, wherein the facial recognition request carries the data of the user event.
[0102] 102. Based on the facial recognition request, trigger the cloud application corresponding to the target application to generate response data for the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of the facial recognition page in the target application. The facial data collection instruction is used to instruct the terminal to collect facial image data required for facial recognition, and the page rendering data is used for the terminal to display the facial recognition page.
[0103] The response data generated by the cloud application can be data generated in response to the terminal's facial recognition request. The response data can include multiple pieces of information. For example, in this embodiment, the response data can include a facial capture instruction and page rendering data for the facial recognition page in the target application.
[0104] The facial data collection instruction may be an instruction for instructing the terminal to collect facial image data required for facial recognition. For example, the facial data collection instruction may instruct the terminal to collect facial image data in real time using a sensor, or may instruct the terminal to collect facial image data by accessing existing resources, etc.
[0105] In one embodiment, after receiving the facial data collection instruction, the terminal may utilize a sensor to collect the required facial image data. For example, the sensor may be a facial recognition camera, which may be of various types, such as 2D (two-dimensional) cameras and 3D (three-dimensional) cameras. 2D cameras may include color cameras and infrared cameras, while 3D cameras may include structural depth cameras and time-of-flight cameras.
[0106] The page rendering data may be the relevant data required to display the facial recognition page. In actual applications, before displaying the facial recognition page, it is necessary to first perform rendering calculations on the facial recognition page to be displayed. After generating the page rendering data, the facial recognition page is then displayed based on the page rendering data. Therefore, in this embodiment, after receiving the facial recognition request sent by the target application, the cloud application can perform rendering calculations on the facial recognition page in the cloud to obtain the page rendering data, and then add the generated page rendering data and facial data collection instructions to the response data generated in response to the facial recognition request.
[0107] In one embodiment, the artificial intelligence-based face recognition method introduced in this application can be applied to face payment scenarios, refer to Figure 5 After receiving a facial recognition request including user event data, the server's cloud application can initiate a facial payment process on the cloud application. Specifically, this process can include synchronizing the target application's user interface (UI), generating page rendering data on the cloud for the terminal to display a facial recognition page, and generating a facial data collection instruction to instruct the terminal to activate its camera to capture the facial image data required for facial recognition. The cloud application can then add the generated facial data collection instruction and page rendering data to the response data in response to the facial recognition request.
[0108] Because the facial recognition request sent by the target application can carry user events of the target user, for example, user events generated by the target user whose facial recognition is to be performed during interaction with the terminal, the server can generate facial data collection instructions and page rendering data in response to the facial recognition request based on the user events, and then generate response data to the facial recognition request. Specifically, the step of "based on the facial recognition request, triggering the cloud application corresponding to the target application to generate response data to the facial recognition request" may include:
[0109] Based on the user event, determining a facial recognition process triggered by the target user in the target application, wherein the facial recognition process includes a facial data collection step;
[0110] Triggering the cloud application corresponding to the target application to generate facial data collection instructions corresponding to the facial data collection step and page rendering data corresponding to the facial recognition process;
[0111] Based on the generated facial data collection instruction and the generated page rendering data, response data for the facial recognition request is generated.
[0112] The facial recognition process may specify the steps and logic required to perform a facial recognition operation, and the facial recognition process may include facial data collection steps. In actual applications, different facial recognition processes may exist for different scenarios and needs, and the facial recognition process may include conditional judgments and branches. Therefore, the facial recognition process triggered by the target user may exist in a variety of situations and is not fixed.
[0113] There are many ways to determine the facial recognition process triggered by the target user in the target application. For example, it can be determined based on the user event of the target user.
[0114] Among them, the target user can be the user to be facial recognized. For example, when the facial recognition method based on artificial intelligence is applied in the facial payment scenario, the target user can be a customer who uses facial payment; for example, when the facial recognition method based on artificial intelligence is applied in the security scenario based on facial recognition, the target user can be a person whose identity is to be verified; and so on.
[0115] Since a user event can be an event in which a user directly or indirectly transmits a facial recognition signal to a terminal or triggers facial recognition, there are many ways to determine the facial recognition process triggered by a target user in a target application based on the user event.
[0116] For example, in a facial payment scenario, different facial recognition processes may be included, including, for example, a customer-side facial recognition process, a cashier-side facial recognition process, and so on. In one embodiment, when a customer triggers facial payment on a terminal through an interactive module such as a screen or button provided by the terminal, the user event is initiated and generated by the customer. Therefore, the facial recognition process triggered by the terminal's facial recognition application can be determined to be the customer-side facial recognition process. In another embodiment, when a cashier transmits a facial recognition signal to the terminal through inter-program instructions, such as instructions between a cash register system and a facial recognition system, to perform facial recognition on the customer, the facial recognition trigger signal is initiated by the cashier and covers the customer. Therefore, the facial recognition process triggered by the terminal's facial recognition application can be determined to be the cashier-side facial recognition process.
[0117] For example, in a facial recognition-based security scenario, different facial recognition processes can be included, such as a facial recognition process for a single user, a facial recognition process for multiple users, and so on. In one embodiment, for example, a facial recognition system installed at a customs gate that targets a single user at a time, when a terminal captures or collects facial image data of a single user through a sensor, such as a facial recognition camera, the facial recognition process applied by the terminal's facial recognition application can be determined to be a facial recognition process for a single user. In other words, the facial recognition process triggered by the target user's facial image data at the terminal is a facial recognition process for a single user. In another embodiment, for example, a facial recognition system installed in a public place such as a train station or high-speed rail station that targets multiple users, when a terminal captures or collects facial image data of multiple users through a sensor, such as a facial recognition camera, the facial recognition process applied by the terminal's facial recognition application can be determined to be a facial recognition process for multiple users. In other words, the facial recognition process triggered by the target user's facial image data at the terminal is a facial recognition process for multiple users.
[0118] Due to the diversity of facial recognition processes, the facial data collection steps and corresponding facial recognition pages within each facial recognition process can also vary. Therefore, after determining the facial recognition process triggered by the target user in the target application based on a user event, the cloud application can be further triggered to generate facial data collection instructions corresponding to the facial data collection steps in the facial recognition process. The server then performs rendering calculations on the facial recognition page corresponding to the facial recognition process to generate the page rendering data required to display the facial recognition page. Furthermore, based on the generated facial data collection instructions and the generated page rendering data, the cloud server can generate response data to the facial recognition request.
[0119] 103. Send response data to the target application.
[0120] After generating response data for the facial recognition request, the cloud application of the server may send the response data to the target application of the terminal.
[0121] For example, reference Figure 3 After receiving the facial recognition request sent by the terminal, the server can trigger the cloud application to generate response data for the facial recognition request based on the facial recognition request, and send the response data to the target application.
[0122] In one embodiment, the artificial intelligence-based face recognition method introduced in this application can be applied to face payment scenarios, refer to Figure 5After receiving a facial recognition request carrying a user event, the cloud application can determine the facial recognition process triggered by the terminal based on the user event, wherein the facial recognition process includes a facial data collection step.
[0123] The cloud application can render the page rendering data required to display the facial recognition page corresponding to the facial recognition process on the computing terminal on the server side, and generate a facial data collection instruction corresponding to the facial data collection step, instructing the terminal to activate the camera to capture facial image data of the target user. Furthermore, the cloud application can send response data including the page rendering data and the facial data collection instruction to the target application, thereby delivering remote rendering data to the target application and triggering the terminal to activate the camera command.
[0124] In actual applications, the server sends response data to the target application, which may include steps such as data compression, data encryption, and data sending.
[0125] 104. Receive data to be identified sent by the target application based on the response data, where the data to be identified includes facial image data of the target user collected by the terminal.
[0126] The data to be identified may be data required for facial recognition of the target user. The data to be identified may include various data, for example, facial image data of the target user collected by the terminal, user identification information of the target user, and so on.
[0127] Because the response data sent by the server to the target application includes facial data collection instructions and page rendering data for the facial recognition page, the target application can display the facial recognition page on the terminal and collect facial image data of the target user based on the received response data. Furthermore, the terminal can generate the target user's unrecognized data based on the collected facial image data and send this unrecognized data to the server-side cloud application. Therefore, the server can correspondingly receive the unrecognized data sent by the target application based on the response data.
[0128] The facial image data refers to data including facial image information of the target user. For example, the facial image data may include a video clip captured by the terminal and required for facial recognition of the target user, and the video clip may include data of the target user's facial image. Another example is that the facial image data may include multiple candidate images captured by the terminal and required for facial recognition of the target user, and the candidate images may include an area corresponding to the target user's facial image, and so on.
[0129] Facial image data can be collected in a variety of formats. For example, since facial image data can be collected by sensors such as facial recognition cameras, the collected facial image data can have different formats depending on the facial recognition camera. For example, facial image data collected by a color camera can be images in a red, green, and blue (RGB) color mode. For another example, facial image data collected by a depth camera can include depth information, such as images in a red, green, and blue (RGB-D) mode. And so on.
[0130] In one embodiment, the artificial intelligence-based face recognition method introduced in this application can be applied to face payment scenarios, refer to Figure 5 After the cloud application sends response data including facial data collection instructions and page rendering data to the terminal, it can receive the data to be identified sent by the target application of the terminal based on the response data, wherein the data to be identified includes camera data collected by the terminal, and the camera data may include facial image data of the target user collected by the terminal through the facial recognition camera.
[0131] In actual applications, the terminal sends the data to be identified to the server, which may include steps such as data compression, data encryption, and data sending. The server receives the data to be identified sent by the terminal, which may include steps such as data reception, data decompression, and data decryption.
[0132] 105. Perform a facial recognition operation on the facial image data through a cloud application to obtain a facial recognition result of the target user.
[0133] Facial recognition is a biometric technology that uses facial features to identify individuals. It involves a series of related technologies that use a camera or webcam to capture images or video streams containing faces, detect faces in the images, and then identify the detected faces.
[0134] In one embodiment, the facial recognition operation can be performed based on 3D facial recognition, and the facial recognition operation based on artificial intelligence introduced in this application can be applied to the facial payment scenario, refer to Figure 4 The core process of a facial payment may include the following steps:
[0135] Camera acquisition: The terminal can use a 3D structured light camera or a Time of Flight (ToF) camera to collect image and depth information of the customer's face, and then pass it to the next stage for processing;
[0136] Basic optimization: Appropriate images ensure the correct operation of facial recognition. Therefore, basic optimization can be used to select target images suitable for steps such as face liveness detection, feature extraction, and cloud comparison from facial image data obtained during the camera acquisition phase.
[0137] Face liveness: Algorithmic analysis of the depth and color information of the target image is performed to determine whether a face exists in the target image and whether the face in the target image is real.
[0138] Feature extraction: Extract the customer's facial features from the target image so that feature comparison can be performed based on the facial features.
[0139] Cloud comparison: After obtaining the customer's facial features, these features and related parameters can be used to request a cloud-based feature comparison from the backend to confirm the customer's facial recognition results. If facial recognition passes, the customer's payment voucher will be obtained.
[0140] Obtaining payment credentials: After generating the customer's payment credentials, the server can return the payment credentials so that the target application of the terminal can transmit the payment credentials to the merchant for payment.
[0141] Because the data to be recognized received by the server includes facial image data of the target user captured by the terminal, in some embodiments, the facial image data may include at least one candidate image. For example, it may include candidate images whose clarity and face size are both suitable for facial recognition, or it may include candidate images whose clarity or face size is not suitable for facial recognition. Therefore, it is possible to first select a target image suitable for facial recognition from the candidate images, and then perform other steps of the facial recognition operation. Specifically, the step of "performing a facial recognition operation on the facial image data through a cloud application to obtain a facial recognition result of the target user" may include:
[0142] Selecting a target image required for performing a face recognition operation from the candidate images through a cloud application, wherein the target image includes target image channel data under at least one image channel;
[0143] Based on the image channel, a liveness detection operation is performed on the target image channel data to obtain a liveness detection result;
[0144] According to the liveness detection results, the facial information features of the target user are extracted from the target image channel data;
[0145] Perform feature comparison on facial information features to determine the facial recognition result of the target user.
[0146] The following will introduce the step of "selecting a target image required for a face recognition operation from candidate images through a cloud application, wherein the target image includes target image channel data under at least one image channel."
[0147] The target image may be an image that has a facial region corresponding to the target user and has image quality suitable for facial recognition. For example, if the facial region corresponding to the target user has an appropriate position and size in the candidate image, and the image channel data in the depth channel of the candidate image has an appropriate depth mean, facial pose effect, and degree of obscuration, then the image can be considered suitable for facial recognition and can be determined as the target image.
[0148] The image may include at least one image channel, and the image may have corresponding image channel data on each image channel. For example, in RGB mode, the image may include three image channels: a red (Red, R) channel, a green (Green, G) channel, and a blue (Blue, B) channel, and each pixel in the image may have a corresponding pixel value on the R channel, the G channel, and the B channel, respectively. The pixel value may have a range of various forms, for example, between 0 and 255 or between 0 and 1, etc.
[0149] The target image channel data may be data describing the distribution characteristics of the target image in each image channel, and correspondingly, the candidate image channel data may be data describing the distribution characteristics of the candidate image in each image channel.
[0150] For example, if the target image is an RGB image, the target image may include three image channels: R channel, G channel, and B channel. Furthermore, the pixel value of each pixel in the target image in the R channel may constitute the target image channel data of the target image under the R channel; the pixel value of each pixel in the target image in the G channel may constitute the target image channel data of the target image under the G channel; and the pixel value of each pixel in the target image in the B channel may constitute the target image channel data of the target image under the B channel.
[0151] It is worth noting that the data in the target image channel data can have various data formats, for example, it can be related to the data acquisition method corresponding to each image channel of the target image. For example, if the target image is an RGB-D image, and the terminal uses a 3D structured light camera to capture the target image, then the target image can include a D channel in addition to the R channel, G channel, and B channel, and the target image channel data of the target image on the D channel is the facial depth data collected by the 3D structured light camera.
[0152] The process of selecting a target image from candidate images can also be considered as the process of selecting a target image suitable for facial recognition from candidate images. In one embodiment, the candidate image may include candidate image channel data under at least one image channel, and the image channel may include a color channel and a depth channel. Therefore, the image quality of the candidate image can be determined by evaluating the image quality corresponding to the color channel and the image quality corresponding to the depth channel of the candidate image, that is, determining whether the candidate image is a target image suitable for facial recognition. Specifically, the step of "selecting a target image required for facial recognition from candidate images through a cloud application" may include:
[0153] Determining the plane attribute coefficients of the target facial region in the candidate image based on the data distribution of the candidate image channel data under the color channel;
[0154] Determining the stereo attribute coefficients of the target face region in the candidate image based on the data distribution of the candidate image channel data under the depth channel;
[0155] A target image required for the face recognition operation is selected from the candidate images according to the planar attribute coefficients and the stereo attribute coefficients.
[0156] The color channel can be an image channel used to record the color information of the candidate image. Since the image color information of the candidate image can be collected by different devices, the color channel can have various situations accordingly. For example, in RGB mode, the color channel can include the R channel, the G channel, and the B channel; for example, in the Hue Saturation Value (HSV) color system, the color channel can include the Hue (H) channel, the Saturation (S) channel, and the Value (V) channel; and so on.
[0157] Among them, the target facial area can be the area where the target user's face is located in the candidate image. If the target user is single, the target facial area is the area corresponding to the face of the single target user. If there are multiple target users, then accordingly, the target facial area includes the areas corresponding to the faces of the multiple target users.
[0158] The plane attribute coefficients can be used to evaluate the image quality of candidate images from a plane perspective. For example, since the candidate image channel data under the color channel can describe the color presentation of the candidate image on the plane through the color values of each pixel in the candidate image, the data distribution of the candidate image channel data under the color channel can be used to evaluate whether the candidate image is a target image suitable for face recognition from a plane perspective.
[0159] There are many ways to calculate the plane attribute coefficient. For example, the target facial area in the candidate image can be first marked with a face recognition rectangular box Rect(x,y,w,h), where x represents the horizontal coordinate of the upper left corner pixel of the rectangular box, y represents the vertical coordinate of the upper left corner pixel of the rectangular box, w represents the width of the rectangular box, and h represents the height of the rectangular box. Furthermore, the position and size of the target facial area can be evaluated by the rectangular box, and the plane attribute coefficient of the target facial area in the candidate image can be determined based on the position and size. In this way, inappropriate candidate images can be screened out by calculating the plane attribute coefficient, such as candidate images whose target facial area is too biased or too small in size, making it unfavorable for face recognition operations.
[0160] The depth channel may be an image channel for recording depth information of the candidate image. It is worth noting that, since the image depth information of the candidate image can be collected by different devices, the data structure of the candidate image channel data under the depth channel can have various situations.
[0161] The stereo attribute coefficients can be used to evaluate the image quality of candidate images from a stereoscopic perspective. For example, since the candidate image channel data in the depth channel can be used to describe the image depth information of the candidate image, for example, the bitmap can be used to determine whether the depth map conforms to the stereoscopic outline of a portrait. Therefore, the data distribution of the candidate image channel data in the depth channel can be used to evaluate whether the candidate image is a target image suitable for face recognition from a stereoscopic perspective.
[0162] There are many ways to calculate the stereo attribute coefficient. For example, the stereo attribute coefficient can be calculated by analyzing multiple factors. For example, facial posture estimation can be performed on the target facial area, and the depth statistical features and facial masking features of the target facial area can be analyzed. The stereo attribute coefficient of the candidate image can be calculated based on the facial posture estimation, depth statistical features and facial masking features.
[0163] Among them, facial pose estimation can be used to obtain the angle information of the face orientation. Generally, it can be represented by a rotation matrix, rotation vector, quaternion or Euler angle (these four quantities can also be converted to each other). For example, the Euler angles pitch (pitch angle, describing the rotation of the object around the x-axis), yaw (yaw angle, describing the rotation of the object around the y-axis) and roll (roll angle, indicating the rotation of the object around the z-axis) can be calculated based on the registration points to achieve facial pose estimation of the target facial area in the candidate image.
[0164] By taking into account the depth statistical features and facial masking features of the target facial region, the stereo attribute coefficients of the target facial region in the candidate image can be determined more comprehensively. Specifically, the step of "determining the stereo attribute coefficients of the target facial region in the candidate image based on the data distribution of the candidate image channel data in the depth channel" may include:
[0165] Calculate the depth statistical features and facial masking features of the target facial area in the candidate image based on the data distribution of the candidate image channel data in the depth channel;
[0166] Based on the depth statistical features and the facial masking features, the stereo attribute coefficients of the target facial region in the candidate image are determined.
[0167] The depth statistical features can be used to describe the statistical characteristics of the candidate image channel data in the depth channel. For example, the depth statistical features can be used to describe the concentration, dispersion, and distribution shape of the candidate image channel data in the depth channel. Specifically, the depth statistical features may include the mean feature, maximum feature, etc. of the candidate image channel data in the depth channel.
[0168] There are many ways to calculate depth statistical features based on the data distribution of candidate image channel data under the depth channel. For example, for a candidate image, the candidate image channel data of the candidate image under the depth channel can be obtained, and the data range of the target facial area can be determined. The depth statistical features of the candidate image are determined by calculating the depth mean of the target facial area.
[0169] The facial mask feature can be used to describe the degree of facial masking within the target facial region in the candidate image. If the target facial region in the candidate image is significantly masked, effective facial recognition based on the facial image will be ineffective. Therefore, the facial mask feature can be used as a screening feature for the target image. There are various ways to calculate the facial mask feature based on the distribution of candidate image channel data in the depth channel. For example, the facial mask feature can be calculated based on the confidence level of facial feature registration points.
[0170] After determining the depth statistical features and facial masking features of the candidate image, there are many ways to determine the stereoscopic attribute coefficients of the target facial area in the candidate image based on the depth statistical features and facial masking features. For example, feature screening intervals can be set for the depth statistical features and facial masking features respectively, and candidate images with a higher hit rate in the feature screening interval can be assigned a higher stereoscopic attribute coefficient; and so on.
[0171] Furthermore, after determining the planar attribute coefficients and stereo attribute coefficients of the target facial area in the candidate image, the image quality of the candidate image can be further evaluated based on the planar attribute coefficients and the stereo attribute coefficients, that is, whether the candidate image is a target image suitable for facial recognition, so as to select the target image required for facial recognition operation from the candidate images.
[0172] There are many ways to evaluate candidate images. For example, different weights can be assigned to the planar attribute coefficients and stereo attribute coefficients of a candidate image. This allows the image quality score of the candidate image to be determined by calculating the weighted values of the planar attribute coefficients and the stereo attribute coefficients, and the target image is selected from the candidate images based on the image quality score. For example, the candidate image with the highest image quality score can be selected as the target image; in another example, the candidate image with an image quality score above a preset threshold can be selected as the target image; and so on. The specific evaluation method can be set based on business needs and is not limited by this application.
[0173] After the target image is selected from the candidate images, liveness detection may be further performed on the target image based on the image channels of the target image to determine a liveness detection result.
[0174] In one embodiment, reference Figure 5 ,When the AI based facial recognition method is applied in the ,face payment scenario, the cloud application can further perform ,face liveness detection.
[0175] The following will introduce the step of "based on the image channel, performing a liveness detection operation on the target image channel data to obtain a liveness detection result".
[0176] Since the image channel of the target image may include a color channel and a depth channel, liveness detection on the target image may be performed based on target color channel data of the target image under the color channel and target depth channel data of the target image under the depth channel. Specifically, the step of "performing a liveness detection operation on the target image channel data based on the image channel to obtain a liveness detection result" may include:
[0177] Based on the target color channel data under the color channel, facial contour detection is performed on the target image to obtain a contour detection result;
[0178] Based on the contour detection result and the target depth channel data under the depth channel, face liveness detection is performed on the target image to obtain the liveness detection result.
[0179] The target color channel data is the image channel data corresponding to the target image under the color channel. For example, the color channel may include the R channel, the G channel, and the B channel, and the target color channel data may include the pixel value of each pixel of the target image on the R channel, the pixel value of each pixel of the target image on the G channel, and the pixel value of each pixel of the target image on the B channel; for another example, the color channel may include the H channel, the S channel, and the V channel, and the target color channel data may include the pixel value of each pixel of the target image on the H channel, the pixel value of each pixel of the target image on the S channel, and the pixel value of each pixel of the target image on the V channel; and so on.
[0180] Facial contour detection can be used to determine whether a target image contains a facial region. There are various ways to implement facial contour detection, including knowledge-based approaches. These methods leverage prior knowledge to consider the face as a combination of organ features, detecting faces based on the characteristics of organs such as the eyes, eyebrows, mouth, and nose, as well as their geometric relationships. These methods primarily include template matching, facial features, shape and edges, texture characteristics, and color features.
[0181] Another example is a statistical approach that treats the face as a holistic pattern—a two-dimensional pixel matrix. From a statistical perspective, a facial pattern space can be constructed from a large number of facial image samples, and the presence of a face can be determined based on similarity metrics. These methods primarily include principal component analysis and eigenfaces, neural network methods, support vector machines, hidden Markov models, and the Adaboost algorithm.
[0182] In one embodiment, a classifier can be trained to determine whether a target image includes a facial area. Specifically, target color channel data of the target image under a color channel can be input into the trained classifier to obtain a classification result of the classifier, thereby obtaining a contour detection result of the target facial image.
[0183] Furthermore, when the contour detection result indicates that the contour detection passes, facial liveness detection may be performed on the target image to determine a liveness detection result of the target image. Specifically, the step of "performing facial liveness detection on the target image based on the contour detection result and the target depth channel data under the depth channel to obtain a liveness detection result" may include:
[0184] Determine the liveness detection model required for face detection;
[0185] When it is detected that the face contour detection of the target image passes, the target depth channel data is input into the liveness detection model to perform face liveness detection on the target image to obtain a liveness detection result.
[0186] Among them, liveness detection can be used to detect whether the target image includes the user's real physiological characteristics. For example, liveness detection can be used to resist common attack methods such as photos, face swapping, masks, occlusions, and screen reshoots, thereby effectively performing facial recognition.
[0187] There are many ways to implement liveness detection, including cooperative liveness detection, silent liveness detection, and so on. In practical applications, a liveness detection model required for liveness detection can be trained and run on a server. When the facial contour detection of a target image passes, i.e., when the target image contains a facial area, the target depth channel data of the target image is input into the trained liveness detection model to perform facial liveness detection on the target image and obtain a liveness detection result.
[0188] In one embodiment, the target depth channel data of the target image may be a point cloud image and a depth image including a face and a background. The target depth channel data may be input into a trained liveness detection classifier to obtain a classification result of the liveness detection classifier, thereby determining the liveness detection result of the target image.
[0189] After selecting a target image from the candidate images and determining the liveness detection result of the target image, facial information features of the target user may be further extracted so that a facial recognition result of the target user may be subsequently determined based on the facial information features.
[0190] The following will introduce the step of "extracting facial information features of the target user from the target image channel data based on the liveness detection results."
[0191] Among them, the facial information features can be features that characterize facial information. For example, the facial information features can be geometric features that characterize the geometric relationship between facial features such as eyes, nose and mouth, such as distance, area and angle. For example, the facial information features can be global or local features extracted by some algorithms based on the grayscale information of the facial image. In some special cases, a local image including the target facial area in the target image can be used as the facial information feature of the target image.
[0192] Since the target image may include not only the target user's facial region but also the facial regions of other users, for example, when applying AI-based facial recognition methods in facial payment scenarios, the target image may include not only the facial region of the current paying customer but also the facial regions of the background or surrounding people. Therefore, considering that the target image may include at least one candidate facial region corresponding to a candidate user, facial features of the target user may be further extracted when a liveness test is detected. Specifically, the step of "extracting facial features of the target user from the target image channel data based on the liveness test result" may include:
[0193] When it is detected that the liveness test is passed, determining the region position information and region size information of the candidate face region;
[0194] Determine a target facial region corresponding to the target user from the candidate facial regions based on the region position information and the region size information;
[0195] Extract the target user's facial information features from the target face area.
[0196] The region position information can be used to describe the location of the candidate facial region on the target image, specifically, the location of the candidate facial region on the target image. The region size information can be used to describe the size of the candidate facial region on the target image, specifically, the size of the candidate facial region on the target image.
[0197] Therefore, there are many ways to determine the region position information and region size information of the candidate facial region. For example, each candidate facial region can be marked using a facial rectangular frame Rect(x, y, w, h), and the position of the candidate facial region on the target image and the size of the candidate facial region on the target image can be calculated based on the x, y, w, and h parameters in the facial rectangular frame, thereby determining the region position information and region size information of the candidate facial region.
[0198] Furthermore, the target face region corresponding to the target user can be determined from the candidate face regions of the target image based on the region position information and region size information of each candidate face region. Figure 5 ,When the AI based facial recognition method is applied in the ,face payment scenario, the cloud application can determine the target facial area corresponding to the ,target user in the target image by performing a face ,selection operation.
[0199] When the AI-based facial recognition method is applied in a facial payment scenario, the target user is the customer currently making facial payment. The target facial area corresponding to the target user should be located in a relatively central position in the target image and have a larger size.
[0200] In actual applications, when determining the target facial region corresponding to the target user from the candidate facial regions of the target image, corresponding screening thresholds can be set for the region position and region size of the target facial region, respectively, so that the target facial region can be determined from the multiple candidate facial regions included in the target image based on the region position information and region size information of the candidate facial regions.
[0201] Furthermore, facial information features of the target user may be extracted from the target facial region. There are many ways to extract facial information features.
[0202] In one embodiment, a partial image of the target image including the target facial region may be used as the facial information feature of the target image. For example, a partial image corresponding to the facial rectangle of the target facial region may be captured from the target image, and the captured partial image may be used as the first facial information feature of the target user.
[0203] In another embodiment, facial features of the target user may be further extracted from the captured partial image. For example, the captured partial image may be input into a feature extraction model to trigger the feature extraction model to output facial features of the target user based on the captured partial image. The facial features may then be used as the second facial features of the target user.
[0204] As an example, the captured partial image can be scaled to a size of 224*224*3, and the scaled partial image can be input into the feature extraction model to trigger the feature extraction model to generate a 512*1 feature vector based on the 224*224*3 partial image. The generated feature vector can then be used as the second facial information feature of the target user.
[0205] After extracting the facial information features of the target user from the target image, the facial information features may be further subjected to feature comparison to determine the facial recognition result of the target user.
[0206] In one embodiment, reference Figure 5 When the AI-based facial recognition method is applied in a facial payment scenario, before the server performs feature comparison on the extracted facial information features through the background service, the cloud application can also use the facial information features to request the target user's payment credentials from the background service, so that when the target user's feature comparison passes, the background service can return the target user's payment credentials, and the cloud application can accordingly return the payment credentials together with the facial recognition results to the terminal, so that the terminal can perform subsequent facial payment operations based on the payment credentials.
[0207] The following will introduce the step of "performing feature comparison on facial information features to determine the facial recognition result of the target user".
[0208] The data to be recognized sent by the terminal based on the response data may include, in addition to the facial image data of the target user, also the user identification information of the target user. Therefore, the user identification information may be used to assist in feature comparison. Specifically, the step of "performing feature comparison on facial information features to determine the facial recognition result of the target user" may include:
[0209] Generate a feature comparison request for the target user based on the user identification information and facial information features;
[0210] Sending a feature comparison request to a feature comparison module to trigger the feature comparison module to perform feature comparison on facial information features based on the user identifier;
[0211] Obtain the feature comparison result returned by the feature comparison module, and determine the face recognition result of the target user based on the feature comparison result.
[0212] Among them, the user identification information can be relevant information that identifies the user's identity. For example, the user identification information may include the target user's name, social account, mobile phone number, ID card number and other real-name authentication information.
[0213] The feature comparison module may be a module capable of performing feature comparison on facial information features. It is worth noting that the feature comparison module may be part of an AI-based facial recognition system. For example, the feature comparison module may be an internal feature comparison module of a cloud application running on a cloud server. The feature comparison module may also be an external feature comparison module of an AI-based facial recognition system. For example, the feature comparison module may be a service module that provides functions such as facial information feature comparison and real-name information verification.
[0214] The feature comparison module can provide feature comparison services. Therefore, the server can trigger the feature comparison module to perform feature comparison by generating a feature comparison request, and determine the face recognition result of the target user based on the feature comparison result returned by the feature comparison module.
[0215] In one embodiment, the facial information features of the target user extracted from the target image channel data may include a first facial information feature and a second facial information feature, wherein the first facial information feature may be a partial image captured from the target image, the partial image including the target facial region of the target user;
[0216] The second facial information feature may be a facial information feature further extracted from the partial image. For example, the second facial information feature may be a feature characterizing the facial information of the target user. For example, the second facial information feature may be a geometric feature characterizing the geometric relationship between facial features such as the eyes, nose, and mouth, such as distance, area, and angle. For another example, the second facial information feature may be a global or local feature extracted by some algorithm based on the target image channel data of the facial image, such as a feature vector of the partial image. And so on.
[0217] The server may generate a first feature comparison request for the target user based on the user identification information and the first facial information feature of the target user, and generate a second feature comparison request for the target user based on the user identification information and the second facial information feature of the target user.
[0218] Furthermore, the server can send the first feature comparison request to the external feature comparison module, so that the external feature comparison module can compare the image to be compared in the first feature comparison request with the authenticated image corresponding to the user identification information in the external feature comparison module system based on the user identification information in the first feature comparison request, such as real-name authentication information, thereby generating a first facial feature comparison result and returning it to the cloud application on the server.
[0219] Furthermore, the server may send the second feature comparison request to the internal feature comparison module, so that the internal feature comparison module may compare the facial information features to be compared in the second feature comparison request with the authenticated facial information features corresponding to the social account in the internal feature comparison module based on the user identifier in the second feature comparison request, such as the social account, thereby generating a second facial feature comparison result.
[0220] Furthermore, the server may determine the target user's facial recognition result based on the first facial feature comparison result and the second facial feature comparison result. For example, if both the first facial feature comparison result and the second facial feature comparison result are matched, the target user's facial recognition result may be determined to be a pass. In another example, the first facial feature comparison result and the second facial feature comparison result may be assigned different weights, and after calculating the weighted result, the weighted result may be compared with a preset threshold to determine the target user's facial recognition result. And so on.
[0221] 106. Send the facial recognition result to the target application.
[0222] After obtaining the face recognition result of the target user, the server can send the face recognition result to the target application of the terminal to trigger the target application to perform other steps based on the face recognition result. Figure 5When the AI-based facial recognition method is applied in the facial payment scenario, the terminal can also obtain the payment credentials returned by the cloud application, and further transmit the payment credentials to the merchant for payment, thereby completing the facial payment.
[0223] Accordingly, the terminal can send a facial recognition request to the server; receive response data generated by the server's cloud application for the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of the facial recognition page in the target application; based on the page rendering data, display the facial recognition page of the target application for the target user to perform the facial recognition process through the facial recognition page; based on the facial data collection instruction, collect the facial image data of the target user in the facial recognition process; based on the collected facial image data, generate the target user's data to be recognized, and send the data to be recognized to the server; receive the facial recognition result of the target user generated by the server through the cloud application.
[0224] Specifically, the process of the terminal performing face recognition may refer to the description of the following embodiment.
[0225] As can be seen from the above, this embodiment can receive a facial recognition request sent by a target application; based on the facial recognition request, trigger the cloud application corresponding to the target application to generate response data for the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of the facial recognition page in the target application, the facial data collection instruction is used to instruct the terminal to collect facial image data required for facial recognition, and the page rendering data is used for the terminal to display the facial recognition page; send the response data to the target application; receive the data to be recognized sent by the target application based on the response data, wherein the data to be recognized includes the facial image data of the target user collected by the terminal; perform facial recognition operations on the facial image data through the cloud application to obtain the facial recognition result of the target user; send the facial recognition result to the target application.
[0226] This solution can trigger a corresponding cloud application on a server to generate facial data collection instructions and page rendering data based on a facial recognition request from a target application on a terminal. The generated facial data collection instructions and page rendering data are then sent to the terminal, triggering the terminal to collect facial image data required for facial recognition based on the facial data collection instructions and display a facial recognition page based on the page rendering data. Furthermore, in this solution, after receiving the facial image data collected by the terminal, the server's cloud application can perform facial recognition operations in the cloud and send the generated facial recognition results to the terminal. In this way, by utilizing a cloud application, the complex computational steps involved in facial recognition, such as data screening and liveness detection algorithms, and the resource-intensive interface rendering operations, are run in the cloud. The terminal only needs to collect camera data, input user events, and display the cloud application interface. This effectively reduces the hardware requirements for the terminal, enabling even low-profile terminal devices to support facial recognition. This effectively saves terminal hardware costs and maintenance, lowers the barrier to entry for practical facial recognition applications, and promotes the promotion and development of facial recognition.
[0227] Furthermore, this solution leverages cloud applications to offload data storage, computing, and rendering to the cloud, while real-time application screens are streamed to the terminal for display and ultimately presented to the user. In this way, cloud applications transform the original terminal application functionality into a service available to consumers, eliminating the need for users to constantly purchase or upgrade terminals and the tedious process of downloading and updating content. This improves the usability of facial recognition in terms of cost, time, content, and maintenance.
[0228] According to the method described in the above embodiment, the following examples are given to further illustrate the method in detail.
[0229] In the embodiments of the present application, an example is given in which the first facial recognition device is integrated in a server and the second facial recognition device is integrated in a terminal. The server may be a single server or a server cluster composed of multiple servers, for example, a server that can execute cloud applications; the terminal may be a mobile phone, a tablet computer, a laptop computer or other device, for example, a device that supports facial recognition, such as a facial payment device.
[0230] In this embodiment, the face recognition method based on artificial intelligence can be applied in the face payment scenario, specifically, Figure 6 As shown in FIG, a facial recognition method based on artificial intelligence, the specific process is as follows:
[0231] 201. The terminal sends a face recognition request to the server.
[0232] Among them, the terminal can run a target application, such as a face recognition application. In addition, the terminal can also be provided with a device that can interact with the user, such as a screen, buttons, etc.
[0233] In one embodiment, the terminal may generate a facial recognition request based on a user event of the target user on the terminal and send the facial recognition request to the server. The user event may be an event in which the target user directly or indirectly transmits a facial recognition signal to the terminal or triggers facial recognition.
[0234] 202. The server receives a face recognition request sent by a target application.
[0235] 203. Based on the facial recognition request, the server triggers the cloud application corresponding to the target application to generate response data for the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of the facial recognition page in the target application. The facial data collection instruction is used to instruct the terminal to collect facial image data required for facial recognition, and the page rendering data is used for the terminal to display the facial recognition page.
[0236] 204. The server sends the response data to the target application.
[0237] 205. The terminal receives response data generated by the cloud application of the server in response to the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of a facial recognition page in the target application.
[0238] 206. The terminal displays the face recognition page of the target application based on the page rendering data, so that the target user can perform the face recognition process through the face recognition page;
[0239] 207. Based on the facial data collection instruction, the terminal collects facial image data of the target user in the facial recognition process.
[0240] For example, reference Figure 7 , the terminal device for face payment can collect the target user's facial image data through the camera during the face recognition process based on the facial data collection instruction.
[0241] 208. The terminal generates the target user's to-be-recognized data based on the collected facial image data, and sends the to-be-recognized data to the server.
[0242] In one embodiment, the terminal may obtain the target user's user identification information, such as the target user's real-name authentication information, and generate the target user's to-be-identified data based on the user identification information and the collected facial image data. Figure 7 , the terminal can send the data to be identified to the server.
[0243] 209. The server receives the data to be recognized sent by the target application based on the response data, wherein the data to be recognized includes facial image data of the target user collected by the terminal.
[0244] 210. The server performs a facial recognition operation on the facial image data through a cloud application to obtain a facial recognition result of the target user.
[0245] In one embodiment, reference Figure 7 The server can implement facial recognition operations by performing liveness detection operations, target facial area optimization operations, feature comparison operations, and other steps on facial image data, and determine the facial recognition results of the target user based on the operation results of the steps.
[0246] It is worth noting that the reference Figure 7 When the AI-based facial recognition method is applied in the facial payment scenario, the server can also request the target user's payment credentials from the background, and when the target user's facial recognition passes, the payment credentials are attached to the facial recognition result, so that the terminal can complete the subsequent payment steps based on the payment credentials.
[0247] 211. The server sends the facial recognition result to the target application.
[0248] 212. The terminal receives the facial recognition result of the target user generated by the server through the cloud application.
[0249] In one embodiment, reference Figure 7 When the target user's face recognition is passed, the face recognition result sent by the server to the terminal may carry the target user's payment credentials. Therefore, the terminal can obtain the target user's payment credentials by receiving the face recognition result returned by the server, and further transmit the payment credentials to the merchant for payment.
[0250] As can be seen from the above, embodiments of the present application can trigger a corresponding cloud application on a server to generate facial data collection instructions and page rendering data based on a facial recognition request from a target application on a terminal. The generated facial data collection instructions and page rendering data are then sent to the terminal, triggering the terminal to collect facial image data required for facial recognition based on the facial data collection instructions and display a facial recognition page based on the page rendering data. Furthermore, in this solution, after receiving the facial image data collected by the terminal, the server's cloud application can perform facial recognition operations in the cloud and send the generated facial recognition results to the terminal. In this way, by using a cloud application, the complex computational steps in facial recognition, such as data screening and liveness detection algorithms, and the interface rendering operations that consume more computing resources, are run in the cloud. The terminal only needs to collect camera data, input user events, and display the cloud application interface. This effectively reduces the requirements for terminal hardware configuration, allowing even low-configuration terminal devices to support facial recognition, thereby effectively saving the price and maintenance costs of terminal hardware and lowering the threshold for facial recognition in practical applications, which is conducive to the promotion and development of facial recognition.
[0251] According to the method described in the above embodiment, the following examples are given to further illustrate the method in detail.
[0252] In the embodiments of the present application, an example is given in which the first facial recognition device is integrated in a server and the second facial recognition device is integrated in a terminal. The server may be a single server or a server cluster composed of multiple servers, for example, a server that can execute cloud applications; the terminal may be a mobile phone, a tablet computer, a laptop computer or other device, for example, a device that supports facial recognition, such as a facial payment device.
[0253] In this embodiment, the face recognition method based on artificial intelligence can be applied in the face payment scenario, specifically, Figure 8 As shown in FIG, a facial recognition method based on artificial intelligence, the specific process is as follows:
[0254] 301. The terminal sends a face recognition request to the server.
[0255] 302. The server receives a face recognition request sent by a target application.
[0256] 303. Based on the facial recognition request, the server triggers the cloud application corresponding to the target application to generate response data for the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of the facial recognition page in the target application. The facial data collection instruction is used to instruct the terminal to collect facial image data required for facial recognition, and the page rendering data is used for the terminal to display the facial recognition page.
[0257] 304. The server sends response data to the target application.
[0258] Specifically, since the target application can be run on the terminal, the server can send the response data through the terminal to achieve sending the response data to the target application.
[0259] 305. The terminal receives response data generated by the cloud application of the server in response to the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of a facial recognition page in the target application.
[0260] 306. The terminal displays the face recognition page of the target application based on the page rendering data, so that the target user can perform a face recognition process through the face recognition page.
[0261] 307. The terminal collects facial image data of the target user in a facial recognition process based on the facial data collection instruction.
[0262] 308. The terminal generates the target user's to-be-identified data based on the collected facial image data, and sends the to-be-identified data to the server.
[0263] 309. The terminal performs a facial recognition operation on the target user based on the data to be recognized to obtain a first facial recognition result of the target user.
[0264] Optionally, for high-risk scenarios of facial recognition scenarios or facial payment scenarios, for example, a scenario in which the network connection between the terminal and the server fails; another example, a scenario in which the facial recognition service provided by the server's cloud application has a delayed response; another example, a scenario in which there are suspicious or similar results when performing facial recognition on the target user based on the target user's facial information features; and so on.
[0265] For high-risk scenarios such as facial recognition scenarios or facial payment scenarios, the terminal generates the target user's data to be recognized and sends the data to be recognized to the server to trigger the server's cloud application to perform facial recognition operations on the target user based on the data to be recognized. At the same time, the terminal also performs facial recognition operations on the target user locally based on the data to be recognized to obtain the first facial recognition result of the target user.
[0266] It is worth noting that the execution steps included in the facial recognition operation performed by the terminal based on the data to be recognized can be based on the limitations or restrictive factors of the terminal hardware or scenario, and can be achieved by selectively executing some or all of the sub-steps performed by referring to the cloud application to implement the facial recognition operation.
[0267] For example, the data to be recognized may include facial image data of a target user, and the facial image data may include at least one candidate image. The step of "the terminal performing a facial recognition operation on the target user based on the data to be recognized to obtain a first facial recognition result of the target user" may include:
[0268] A target image required for performing a facial recognition operation is selected from the candidate images, wherein the target image includes target image channel data under at least one image channel; based on the image channel, a liveness detection operation is performed on the target image channel data to obtain a liveness detection result; based on the liveness detection result, facial information features of a target user are extracted from the target image channel data; and feature comparison is performed on the extracted facial information features to determine a first facial recognition result for the target user.
[0269] In one embodiment, the candidate image channel may include candidate image channel data under at least one image channel, where the image channel may include a color channel and a depth channel. The step of “selecting a target image required for performing a face recognition operation from the candidate image” may include:
[0270] Based on the data distribution of the candidate image channel data under the color channel, the planar attribute coefficients of the target facial area in the candidate image are determined; based on the data distribution of the candidate image channel data under the depth channel, the stereo attribute coefficients of the target facial area in the candidate image are determined; based on the planar attribute coefficients and the stereo attribute coefficients, the target image required for the facial recognition operation is selected from the candidate images.
[0271] In one embodiment, the step of “determining the stereo attribute coefficients of the target facial region in the candidate image based on the data distribution of the candidate image channel data in the depth channel” may include:
[0272] Based on the data distribution of the candidate image channel data under the depth channel, the depth statistical features and the face masking features of the target face area in the candidate image are calculated; based on the depth statistical features and the face masking features, the stereo attribute coefficients of the target face area in the candidate image are determined.
[0273] In one embodiment, the image channel may include a color channel and a depth channel. The step of “performing a liveness detection operation on the target image channel data based on the image channel to obtain a liveness detection result” may include:
[0274] Based on the target color channel data under the color channel, facial contour detection is performed on the target image to obtain a contour detection result; based on the contour detection result and the target depth channel data under the depth channel, facial liveness detection is performed on the target image to obtain a liveness detection result.
[0275] In one embodiment, the step of “performing facial liveness detection on the target image based on the contour detection result and the target depth channel data under the depth channel to obtain a liveness detection result” may include:
[0276] Determine the liveness detection model required for face detection; when it is detected that the face contour detection of the target image passes, input the target depth channel data into the liveness detection model to perform face liveness detection on the target image and obtain a liveness detection result.
[0277] In one embodiment, the target image includes at least one candidate facial region corresponding to a candidate user. The step of “extracting facial information features of the target user from the target image channel data based on the liveness detection result” may include:
[0278] When the liveness test is detected, the region position information and region size information of the candidate facial region are determined; based on the region position information and the region size information, the target facial region corresponding to the target user is determined from the candidate facial regions; and the facial information features of the target user are extracted from the target facial region.
[0279] In one embodiment, the data to be recognized includes user identification information of a target user. The step of “performing a feature comparison on the extracted facial information features to determine a first facial recognition result of the target user” may include:
[0280] Based on the user identification information and facial information features, a feature comparison request is generated for the target user; the feature comparison request is sent to the feature comparison module to trigger the feature comparison module to perform a feature comparison on the facial information features based on the user identification; the feature comparison result returned by the feature comparison module is obtained, and a first facial recognition result of the target user is determined based on the feature comparison result.
[0281] 310. The server receives data to be identified sent by the target application based on the response data, where the data to be identified includes facial image data of the target user collected by the terminal.
[0282] 311. The server performs a facial recognition operation on the facial image data through a cloud application to obtain a second facial recognition result of the target user, and sends the second facial recognition result to the terminal.
[0283] Among them, the execution steps included in the server performing facial recognition operations on facial image data through cloud applications can refer to the description of step 105 in the aforementioned application embodiment, and selectively execute some or all of the sub-steps therein to obtain a second facial recognition result of the target user.
[0284] 312. The terminal receives a second facial recognition result of the target user generated by the server through the cloud application.
[0285] 313. The terminal compares the first facial recognition result with the second facial recognition result to determine a target facial recognition result of the target user.
[0286] There are many ways to compare the first facial recognition result with the second facial recognition result.
[0287] For example, for high-risk scenarios such as facial recognition or facial payment, different weight parameters can be set for the first facial recognition result and the second facial recognition result, and the target facial recognition result for the target user can be determined by comprehensive consideration in a weighted manner;
[0288] For another example, it can be set that the target facial recognition result of the target user is determined to be recognized as passed only when the first facial recognition result and the second facial recognition result are both recognized as passed; otherwise, the target facial recognition result is determined to be recognized as failed;
[0289] For another example, when the first face recognition result and the second face recognition result are inconsistent, the one with a higher confidence level may be used as the target face recognition result of the target user;
[0290] For another example, when the first facial recognition result is inconsistent with the second facial recognition result, the facial recognition operation can be performed on the target user again to update the first facial recognition result or the second facial recognition result, and then the target facial recognition result of the target user can be determined by comparing the updated first facial recognition result or the updated second facial recognition result.
[0291] For another example, when the facial recognition service provided by the cloud application has a delayed response, or when the network connection between the terminal and the server fails, the target facial recognition result can be determined based on the first facial recognition result; and so on.
[0292] As can be seen from the above, embodiments of the present application can trigger a corresponding cloud application on a server to generate facial data collection instructions and page rendering data based on a facial recognition request from a target application on a terminal. The generated facial data collection instructions and page rendering data are then sent to the terminal, triggering the terminal to collect facial image data required for facial recognition based on the facial data collection instructions and display a facial recognition page based on the page rendering data. Furthermore, in this solution, after receiving the facial image data collected by the terminal, the server's cloud application can perform facial recognition operations in the cloud and send the generated facial recognition results to the terminal. In this way, by using a cloud application, the complex computational steps in facial recognition, such as data screening and liveness detection algorithms, and the interface rendering operations that consume more computing resources, are run in the cloud. The terminal only needs to collect camera data, input user events, and display the cloud application interface. This effectively reduces the requirements for terminal hardware configuration, allowing even low-configuration terminal devices to support facial recognition, thereby effectively saving the price and maintenance costs of terminal hardware and lowering the threshold for facial recognition in practical applications, which is conducive to the promotion and development of facial recognition.
[0293] In addition, the embodiments of the present application can perform facial recognition operations both locally on the terminal and in the cloud in high-risk scenarios, and determine the target facial recognition result of the target user by comparing the facial recognition results generated at both ends, so that the artificial intelligence-based facial recognition method provided by the present application covers more application scenarios, and facial recognition can be performed efficiently even in high-risk scenarios.
[0294] To better implement the above method, the present invention also provides an artificial intelligence-based facial recognition device (i.e., a first facial recognition device) in accordance with the present invention. The first facial recognition device can be integrated into a server. The server can be a single server or a server cluster consisting of multiple servers, such as a server that can execute cloud applications.
[0295] For example, Figure 9 As shown, the artificial intelligence-based facial recognition device may include a request receiving unit 401, a response data generating unit 402, a response data sending unit 403, a to-be-recognized data receiving unit 404, a facial recognition unit 405, and a result sending unit 406, as follows:
[0296] A request receiving unit 401 is configured to receive a face recognition request sent by a target application;
[0297] A response data generating unit 402 is configured to trigger, based on the facial recognition request, the cloud application corresponding to the target application to generate response data to the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of a facial recognition page in the target application. The facial data collection instruction is used to instruct the terminal to collect facial image data required for facial recognition, and the page rendering data is used for the terminal to display the facial recognition page.
[0298] A response data sending unit 403 is configured to send the response data to the target application;
[0299] a data-to-be-recognized receiving unit 404, configured to receive data to be recognized sent by the target application based on the response data, wherein the data to be recognized includes facial image data of the target user collected by the terminal;
[0300] A facial recognition unit 405 is configured to perform a facial recognition operation on the facial image data through the cloud application to obtain a facial recognition result of the target user;
[0301] The result sending unit 406 is configured to send the facial recognition result to the target application.
[0302] In one embodiment, reference Figure 10 The face recognition request carries the user event of the target user; the response data generating unit 402 includes:
[0303] The process determination subunit 4021 may be configured to determine, based on the user event, a facial recognition process triggered by the target user in the target application, wherein the facial recognition process includes a facial data collection step;
[0304] The first generating sub-unit 4022 may be used to trigger the cloud application corresponding to the target application to generate facial data collection instructions corresponding to the facial data collection step and page rendering data corresponding to the facial recognition process;
[0305] The second generating subunit 4023 may be configured to generate response data for the facial recognition request based on the generated facial data collection instruction and the generated page rendering data.
[0306] In one embodiment, reference Figure 11 The facial image data includes at least one candidate image; the facial recognition unit 405 includes:
[0307] The target selection subunit 4051 may be configured to select a target image required for performing a face recognition operation from the candidate images through the cloud application, wherein the target image includes target image channel data under at least one image channel;
[0308] The liveness detection subunit 4052 may be configured to perform a liveness detection operation on the target image channel data based on the image channel to obtain a liveness detection result;
[0309] The feature extraction subunit 4053 may be configured to extract facial information features of the target user from the target image channel data according to the liveness detection result;
[0310] The feature comparison subunit 4054 may be used to perform feature comparison on the facial information features to determine the facial recognition result of the target user.
[0311] In one embodiment, the candidate image includes candidate image channel data under at least one image channel, where the image channel includes a color channel and a depth channel; the target selection subunit 4051 may be configured to:
[0312] Based on the data distribution of the candidate image channel data under the color channel, the planar attribute coefficients of the target facial area in the candidate image are determined; based on the data distribution of the candidate image channel data under the depth channel, the stereo attribute coefficients of the target facial area in the candidate image are determined; and based on the planar attribute coefficients and the stereo attribute coefficients, the target image required for the facial recognition operation is selected from the candidate images.
[0313] In one embodiment, the target selection subunit 4051 may be specifically configured to:
[0314] Based on the data distribution of the candidate image channel data in the depth channel, the depth statistical features and the facial masking features of the target facial area in the candidate image are calculated; based on the depth statistical features and the facial masking features, the stereo attribute coefficients of the target facial area in the candidate image are determined.
[0315] In one embodiment, the image channel includes a color channel and a depth channel; the living body detection subunit 4052 can be used to:
[0316] Based on the target color channel data under the color channel, facial contour detection is performed on the target image to obtain a contour detection result; based on the contour detection result and the target depth channel data under the depth channel, facial liveness detection is performed on the target image to obtain a liveness detection result.
[0317] In one embodiment, the living body detection subunit 4052 may be specifically used to:
[0318] Determine a liveness detection model required for face detection; when it is detected that the face contour detection of the target image passes, input the target depth channel data into the liveness detection model to perform face liveness detection on the target image to obtain a liveness detection result.
[0319] In one embodiment, the target image includes at least one candidate facial region corresponding to a candidate user; the feature extraction subunit 4053 may be configured to:
[0320] When it is detected that the liveness test has passed, the region position information and region size information of the candidate facial region are determined; based on the region position information and the region size information, a target facial region corresponding to the target user is determined from the candidate facial regions; and facial information features of the target user are extracted from the target facial region.
[0321] In one embodiment, the data to be identified includes user identification information of the target user; the feature comparison subunit 4054 may be used to:
[0322] Based on the user identification information and the facial information features, a feature comparison request is generated for the target user; the feature comparison request is sent to a feature comparison module to trigger the feature comparison module to perform a feature comparison on the facial information features based on the user identification; the feature comparison result returned by the feature comparison module is obtained, and the facial recognition result of the target user is determined based on the feature comparison result.
[0323] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can be found in the previous method embodiments and will not be repeated here.
[0324] As can be seen from the above, in the first facial recognition device of this embodiment, the request receiving unit 401 receives the facial recognition request sent by the target application; the response data generating unit 402 triggers the cloud application corresponding to the target application to generate response data for the facial recognition request based on the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of the facial recognition page in the target application, the facial data collection instruction is used to instruct the terminal to collect facial image data required for facial recognition, and the page rendering data is used for the terminal to display the facial recognition page; the response data sending unit 403 sends the response data to the target application; the to-be-recognized data receiving unit 404 receives the to-be-recognized data sent by the target application based on the response data, wherein the to-be-recognized data includes the facial image data of the target user collected by the terminal; the facial recognition unit 405 performs a facial recognition operation on the facial image data through the cloud application to obtain a facial recognition result of the target user; and the result sending unit 406 sends the facial recognition result to the target application.
[0325] This solution can trigger a corresponding cloud application on a server to generate facial data collection instructions and page rendering data based on a facial recognition request from a target application on a terminal. The generated facial data collection instructions and page rendering data are then sent to the terminal, triggering the terminal to collect the facial image data required for facial recognition based on the facial data collection instructions and display the facial recognition page based on the page rendering data. Furthermore, in this solution, after receiving the facial image data collected by the terminal, the server's cloud application can perform facial recognition operations in the cloud and send the generated facial recognition results to the terminal. In this way, by utilizing cloud applications, this solution offloads the complex computational steps involved in facial recognition, such as data screening and liveness detection algorithms, as well as the resource-intensive interface rendering operations, to the cloud. The terminal only needs to collect camera data, input user events, and display the cloud application interface. This effectively reduces the hardware requirements for the terminal, enabling even low-profile terminal devices to support facial recognition. This effectively saves terminal hardware costs and maintenance, lowers the barrier to entry for facial recognition in practical applications, and promotes its promotion and development.
[0326] In order to better implement the above method, accordingly, the embodiment of the present application also provides an artificial intelligence-based facial recognition device (i.e., a second facial recognition device), wherein the second facial recognition device can be integrated into a terminal, which can be a mobile phone, tablet computer, laptop computer or other device; optionally, it can be a device that supports facial recognition.
[0327] For example, Figure 12As shown, the second facial recognition device may include a request sending unit 501, a response data receiving unit 502, a page display unit 503, a facial data collection unit 504, a to-be-recognized data generation unit 505, and a result receiving unit 506, as follows:
[0328] A request sending unit 501 is used to send a face recognition request to a server;
[0329] a response data receiving unit 502, configured to receive response data generated by the cloud application of the server in response to the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of a facial recognition page in a target application;
[0330] A page display unit 503 is configured to display a face recognition page of the target application based on the page rendering data, so that the target user can perform a face recognition process through the face recognition page;
[0331] A facial data collection unit 504 is configured to collect facial image data of the target user during the facial recognition process based on the facial data collection instruction;
[0332] a to-be-identified data generating unit 505, configured to generate the to-be-identified data of the target user based on the collected facial image data, and to send the to-be-identified data to the server;
[0333] The result receiving unit 506 is configured to receive the face recognition result of the target user generated by the server through the cloud application.
[0334] The second facial recognition device provided in the embodiment of the present application can effectively reduce the requirements for terminal hardware configuration, so that low-configuration terminal devices can also support facial recognition, thereby effectively saving the price cost and maintenance cost of terminal hardware, and lowering the threshold for facial recognition in practical applications, which is conducive to the promotion and development of facial recognition.
[0335] In addition, the embodiment of the present application also provides a computer device, which can be a server or terminal device, such as Figure 13 , which shows a schematic diagram of the structure of the computer device involved in the embodiment of the present application, specifically:
[0336] The computer device may include a memory 601 having one or more computer-readable storage media, an input unit 602, a display unit 603, a sensor 604, an audio circuit 605, a wireless fidelity (WiFi) module 606, a processor 607 having one or more processing cores, and a power supply 608. Those skilled in the art will appreciate that Figure 13 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.
[0337] The memory 601 can be used to store software programs and modules, and the processor 607 executes various functional applications and data processing by running the software programs and modules stored in the memory 601. The memory 601 may mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the computer device (such as audio data, a phone book, etc.). In addition, the memory 601 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 601 may also include a memory controller to provide the processor 607 and the input unit 602 with access to the memory 601.
[0338] The input unit 602 can be used to receive digital or character input and generate keyboard, mouse, joystick, optical, or trackball signal input related to user settings and function control. Specifically, in one embodiment, the input unit 602 may include a touch-sensitive surface and other input devices. A touch-sensitive surface, also known as a touch display or touchpad, can detect user touch operations on or near it (for example, operations performed by a user using a finger, stylus, or any other suitable object or accessory on or near the touch-sensitive surface) and drive corresponding connected devices according to a pre-set program. Optionally, the touch-sensitive surface may include a touch detection device and a touch controller. The touch detection device detects the user's touch position and detects signals generated by the touch operation, transmitting the signals to the touch controller. The touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 607. The touch controller can also receive and execute commands from the processor 607. Furthermore, touch-sensitive surfaces can be implemented using various types of devices, including resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface, the input unit 602 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.
[0339] The display unit 603 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the computer device, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 603 may include a display panel. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch-sensitive surface may cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it is transmitted to the processor 607 to determine the type of touch event. The processor 607 then provides corresponding visual output on the display panel according to the type of touch event. Although in Figure 13 In the embodiment, the touch-sensitive surface and the display panel are used as two independent components to realize input and output functions, but in some embodiments, the touch-sensitive surface and the display panel can be integrated to realize input and output functions.
[0340] The computer device may also include at least one sensor 604, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may turn off the display panel and / or backlight when the computer device is moved to the ear. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that recognize the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that the computer device can also be configured with, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be described in detail here.
[0341] Audio circuit 605, speakers, and microphones provide an audio interface between the user and the computer device. Audio circuit 605 converts received audio data into electrical signals and transmits them to the speaker, which then converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuit 605 and converted into audio data. The audio data is then processed by processor 607 and transmitted via RF circuit 601 to, for example, another computer device. Alternatively, the audio data is output to memory 601 for further processing. Audio circuit 605 may also include an earphone jack to allow communication between external headphones and the computer device.
[0342] WiFi is a short-range wireless transmission technology. Computer devices can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 606. It provides users with wireless broadband Internet access. Figure 13 A WiFi module 606 is shown, but it is understandable that it is not an essential component of the computer device and can be omitted as needed without changing the essence of the invention.
[0343] Processor 607 is the control center of the computer device, connecting all parts of the mobile phone using various interfaces and lines. By running or executing software programs and / or modules stored in memory 601 and accessing data stored in memory 601, it performs various functions of the computer device and processes data, thereby performing overall testing of the mobile phone. Optionally, processor 607 may include one or more processing cores; preferably, processor 607 may integrate an application processor and a modem processor, wherein the application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 607.
[0344] The computer device also includes a power supply 608 (e.g., a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 607 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 608 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.
[0345] Although not shown, the computer device may also include a camera, a Bluetooth module, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 607 in the computer device will load the executable files corresponding to the processes of one or more application programs into the memory 601 according to the following instructions, and the processor 607 will run the application programs stored in the memory 601 to implement various functions as follows:
[0346] Receive a facial recognition request sent by a target application; based on the facial recognition request, trigger a cloud application corresponding to the target application to generate response data for the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of a facial recognition page in the target application, the facial data collection instruction is used to instruct the terminal to collect facial image data required for facial recognition, and the page rendering data is used for the terminal to display the facial recognition page; send the response data to the target application; receive the data to be recognized sent by the target application based on the response data, wherein the data to be recognized includes facial image data of the target user collected by the terminal; perform a facial recognition operation on the facial image data through the cloud application to obtain a facial recognition result of the target user; and send the facial recognition result to the target application.
[0347] or
[0348] Sending a facial recognition request to a server; receiving response data generated by the server's cloud application in response to the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of a facial recognition page in a target application; based on the page rendering data, displaying the facial recognition page of the target application for a target user to perform a facial recognition process through the facial recognition page; based on the facial data collection instruction, collecting facial image data of the target user in the facial recognition process; generating data to be recognized of the target user based on the collected facial image data, and sending the data to be recognized to the server; receiving a facial recognition result of the target user generated by the server through the cloud application.
[0349] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0350] As can be seen from the above, the computer device of this embodiment can trigger the corresponding cloud application on the server to generate facial data collection instructions and page rendering data based on the facial recognition request of the target application on the terminal, and send the generated facial data collection instructions and page rendering data to the terminal, thereby triggering the terminal to collect facial image data required for facial recognition based on the facial data collection instructions and display the facial recognition page based on the page rendering data. Furthermore, after receiving the facial image data collected by the terminal, the cloud application on the server can perform facial recognition operations in the cloud and send the generated facial recognition results to the terminal. In this way, the computer device of this embodiment runs the complex computational steps in facial recognition, such as data screening and liveness detection algorithms, and the interface rendering operations that consume more computing resources, in the cloud by adopting a cloud application. The terminal only needs to collect camera data, input user events, and display the cloud application interface. This can effectively reduce the requirements for terminal hardware configuration, allowing even low-configuration terminal devices to support facial recognition, thereby effectively saving the price and maintenance costs of terminal hardware, and lowering the threshold for facial recognition in practical applications, which is conducive to the promotion and development of facial recognition.
[0351] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0352] To this end, an embodiment of the present application provides a storage medium storing a plurality of instructions that can be loaded by a processor to execute the steps of any of the artificial intelligence-based face recognition methods provided in the embodiments of the present application. For example, the instructions can execute the following steps:
[0353] Receive a facial recognition request sent by a target application; based on the facial recognition request, trigger a cloud application corresponding to the target application to generate response data for the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of a facial recognition page in the target application, the facial data collection instruction is used to instruct the terminal to collect facial image data required for facial recognition, and the page rendering data is used for the terminal to display the facial recognition page; send the response data to the target application; receive the data to be recognized sent by the target application based on the response data, wherein the data to be recognized includes facial image data of the target user collected by the terminal; perform a facial recognition operation on the facial image data through the cloud application to obtain a facial recognition result of the target user; and send the facial recognition result to the target application.
[0354] or
[0355] Sending a facial recognition request to a server; receiving response data generated by the server's cloud application in response to the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of a facial recognition page in a target application; based on the page rendering data, displaying the facial recognition page of the target application for a target user to perform a facial recognition process through the facial recognition page; based on the facial data collection instruction, collecting facial image data of the target user in the facial recognition process; generating data to be recognized of the target user based on the collected facial image data, and sending the data to be recognized to the server; receiving a facial recognition result of the target user generated by the server through the cloud application.
[0356] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0357] The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0358] Since the instructions stored in the storage medium can execute the steps of any one of the artificial intelligence-based facial recognition methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the artificial intelligence-based facial recognition methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0359] According to one aspect of the present application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations of the aforementioned artificial intelligence-based facial recognition.
[0360] The system involved in the embodiments of the present application can be a distributed system formed by connecting a client and multiple nodes (any form of computing devices in the access network, such as servers and user terminals) through network communication.
[0361] Taking the distributed system as the blockchain system as an example, see Figure 14 , Figure 14This is an optional structural diagram of the AI-based facial recognition system 100 provided in an embodiment of the present application, applied to a blockchain system. The system consists of multiple nodes (any form of computing device connected to the network, such as a server or user terminal) and clients, forming a peer-to-peer (P2P) network between the nodes. The P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). In a distributed system, any machine, such as a server or terminal, can join and become a node. Nodes include hardware layers, middle layers, operating system layers, and application layers.
[0362] See also Figure 14 The functions of each node in the blockchain system shown include:
[0363] 1) Routing: A basic function of a node, used to support communication between nodes.
[0364] In addition to the routing function, nodes can also have the following functions:
[0365] 2) Applications, deployed in the blockchain, implement specific services based on actual business needs, record data related to the implementation of functions to form record data, carry digital signatures in the record data to indicate the source of the task data, and send the record data to other nodes in the blockchain system for other nodes to add the record data to a temporary block when they successfully verify the source and integrity of the record data.
[0366] For example, the services implemented by the application include:
[0367] 2.1) Wallet: This provides the functionality for conducting electronic currency transactions, including initiating transactions (i.e., sending the current transaction record to other nodes in the blockchain system. Upon successful verification by other nodes, the transaction record data is stored in a temporary block of the blockchain as a response to acknowledge the transaction's validity). The wallet also supports querying the remaining electronic currency in an electronic currency address.
[0368] 2.2) Shared ledgers are used to store, query, and modify account data. Records of operations on account data are sent to other nodes in the blockchain system. After verification, other nodes acknowledge the validity of the account data by storing the recorded data in a temporary block. They can also send a confirmation to the node that initiated the operation.
[0369] 2.3) Smart contracts are computerized protocols that can enforce the terms of a contract. These are implemented through code deployed on a shared ledger that is executed when certain conditions are met. Based on actual business needs, the code is used to complete automated transactions. For example, upon detecting a target user’s facial recognition pass, the target user’s payment credentials are returned to the terminal. Of course, smart contracts are not limited to executing contracts for transactions, but can also execute contracts that process received information.
[0370] 2.4) User Information Confidential Box: This is used to store user information. This is established by leveraging the decentralized, tamper-proof, transparent, and traceable nature of blockchain. Unique human features, such as facial information, are used as the key to the user information confidentiality box, thereby ensuring the confidentiality of user information.
[0371] 3) Blockchain, including a series of blocks that are connected to each other in the order of their generation. Once a new block is added to the blockchain, it will not be removed. The block records the record data submitted by the nodes in the blockchain system.
[0372] See also Figure 15 , Figure 15 This is an optional schematic diagram of the block structure provided by the embodiment of the present application. Each block includes the hash value of the transaction record stored in this block (the hash value of this block) and the hash value of the previous block. The blocks are connected by hash values to form a blockchain. In addition, the block can also include information such as the timestamp when the block was generated. Blockchain is essentially a decentralized database, a series of data blocks generated using cryptographic methods. Each data block contains relevant information used to verify the validity of its information (anti-counterfeiting) and generate the next block.
[0373] The above is a detailed introduction to the artificial intelligence-based facial recognition method, device, equipment and storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core ideas. At the same time, for technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A facial recognition method based on artificial intelligence, applied to a server, characterized in that: The server side runs a cloud application corresponding to the target application; including: Receive a face recognition request sent by a target application; wherein the face recognition request carries a user event of a target user; Based on the facial recognition request, triggering the cloud application corresponding to the target application to generate response data for the facial recognition request, including: based on the user event, determining the facial recognition process triggered by the target user in the target application, wherein the facial recognition process includes a facial data collection step; triggering the cloud application corresponding to the target application to generate a facial data collection instruction corresponding to the facial data collection step, and page rendering data corresponding to the facial recognition process; based on the generated facial data collection instruction and the generated page rendering data, generating response data for the facial recognition request; wherein the response data includes the facial data collection instruction and page rendering data of the facial recognition page in the target application, wherein the facial data collection instruction is used to instruct the terminal to collect facial image data required for facial recognition, and the page rendering data is used for the terminal to display the facial recognition page; the facial recognition process specifies the steps and logic required to perform the facial recognition operation, wherein different scenarios and requirements correspond to different facial recognition processes; Sending the response data to the target application; receiving data to be identified sent by the target application based on the response data, wherein the data to be identified includes facial image data of the target user collected by the terminal; performing a facial recognition operation on the facial image data through the cloud application to obtain a facial recognition result of the target user; The facial recognition result is sent to the target application.
2. The artificial intelligence-based face recognition method according to claim 1, characterized in that: The facial image data includes at least one candidate image; Performing a facial recognition operation on the facial image data by the cloud application to obtain a facial recognition result of the target user includes: Selecting, by the cloud application, a target image required for performing a face recognition operation from the candidate images, wherein the target image includes target image channel data under at least one image channel; Based on the image channel, performing a liveness detection operation on the target image channel data to obtain a liveness detection result; Extracting facial information features of the target user from the target image channel data according to the liveness detection result; Perform feature comparison on the facial information features to determine the facial recognition result of the target user.
3. The artificial intelligence-based face recognition method according to claim 2, characterized in that: The candidate image includes candidate image channel data under at least one image channel, and the image channel includes a color channel and a depth channel; Selecting, by the cloud application, a target image required for performing a face recognition operation from the candidate images, including: determining a plane attribute coefficient of a target facial region in the candidate image based on data distribution of the candidate image channel data under the color channel; Determining a stereo attribute coefficient of a target facial region in the candidate image based on data distribution of the candidate image channel data in the depth channel; A target image required for performing a face recognition operation is selected from the candidate images according to the planar attribute coefficients and the stereo attribute coefficients.
4. The artificial intelligence-based face recognition method according to claim 3, characterized in that: Determining a stereo attribute coefficient of a target facial region in the candidate image based on data distribution of the candidate image channel data in the depth channel includes: Calculating depth statistical features and facial masking features of a target facial region in the candidate image based on data distribution of the candidate image channel data in the depth channel; Based on the depth statistical features and the facial masking features, a stereo attribute coefficient of the target facial region in the candidate image is determined.
5. The artificial intelligence-based face recognition method according to claim 2, characterized in that: The image channels include a color channel and a depth channel; Based on the image channel, performing a liveness detection operation on the target image channel data to obtain a liveness detection result, including: Performing facial contour detection on the target image based on the target color channel data under the color channel to obtain a contour detection result; Based on the contour detection result and the target depth channel data under the depth channel, face liveness detection is performed on the target image to obtain a liveness detection result.
6. The artificial intelligence-based face recognition method according to claim 5, characterized in that: Based on the contour detection result and the target depth channel data under the depth channel, performing face liveness detection on the target image to obtain a liveness detection result, including: Determine the liveness detection model required for face detection; When it is detected that the face contour detection of the target image passes, the target depth channel data is input into the liveness detection model to perform face liveness detection on the target image to obtain a liveness detection result.
7. The artificial intelligence-based face recognition method according to claim 2, characterized in that: The target image includes at least one candidate face region corresponding to a candidate user; Extracting facial information features of the target user from the target image channel data according to the liveness detection result includes: When it is detected that the liveness test is passed, determining the region position information and region size information of the candidate face region; determining a target facial region corresponding to a target user from the candidate facial regions according to the region position information and the region size information; Extracting facial information features of the target user from the target facial area.
8. The artificial intelligence-based face recognition method according to claim 2, characterized in that: The data to be identified includes user identification information of the target user; Performing feature comparison on the facial information features to determine the facial recognition result of the target user includes: generating a feature comparison request for the target user based on the user identification information and the facial information features; Sending the feature comparison request to a feature comparison module to trigger the feature comparison module to perform feature comparison on the facial information features based on the user identifier; Acquire the feature comparison result returned by the feature comparison module, and determine the face recognition result of the target user based on the feature comparison result.
9. An artificial intelligence-based face recognition method using the method according to claim 1, characterized in that: include: Send a facial recognition request to the server; receiving response data generated by the cloud application of the server in response to the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of a facial recognition page in a target application; Based on the page rendering data, displaying the face recognition page of the target application, so that the target user can perform a face recognition process through the face recognition page; Based on the facial data collection instruction, collecting facial image data of the target user in the facial recognition process; generating the target user's to-be-identified data based on the collected facial image data, and sending the to-be-identified data to the server; Receive a facial recognition result of the target user generated by the server through the cloud application.
10. A facial recognition device based on artificial intelligence, applied to a server, characterized in that: The server side runs a cloud application corresponding to the target application; the device includes: A request receiving unit, configured to receive a face recognition request sent by a target application; wherein the face recognition request carries a user event of a target user; A response data generating unit is configured to trigger, based on the facial recognition request, a cloud application corresponding to the target application to generate response data for the facial recognition request, including: determining, based on the user event, a facial recognition process triggered by the target user in the target application, wherein the facial recognition process includes a facial data collection step; triggering the cloud application corresponding to the target application to generate a facial data collection instruction corresponding to the facial data collection step, and page rendering data corresponding to the facial recognition process; generating response data for the facial recognition request based on the generated facial data collection instruction and the generated page rendering data; wherein the response data includes a facial data collection instruction and page rendering data of a facial recognition page in the target application, wherein the facial data collection instruction is used to instruct the terminal to collect facial image data required for facial recognition, and the page rendering data is used for the terminal to display the facial recognition page; the facial recognition process specifies the steps and logic required to perform a facial recognition operation, wherein different scenarios and requirements correspond to different facial recognition processes; a response data sending unit, configured to send the response data to the target application; a data-to-be-recognized receiving unit, configured to receive data to be recognized sent by the target application based on the response data, wherein the data to be recognized includes facial image data of the target user collected by the terminal; a facial recognition unit, configured to perform a facial recognition operation on the facial image data through the cloud application to obtain a facial recognition result of the target user; A result sending unit is used to send the face recognition result to the target application.
11. An artificial intelligence-based facial recognition device using the device as claimed in claim 10, characterized in that: include: A request sending unit, configured to send a face recognition request to a server; a response data receiving unit, configured to receive response data generated by the cloud application of the server in response to the facial recognition request, wherein the response data includes a facial data collection instruction and page rendering data of a facial recognition page in a target application; a page display unit, configured to display a face recognition page of the target application based on the page rendering data, so that a target user can perform a face recognition process through the face recognition page; A facial data collection unit, configured to collect facial image data of the target user during the facial recognition process based on the facial data collection instruction; a to-be-identified data generating unit, configured to generate the to-be-identified data of the target user based on the collected facial image data, and send the to-be-identified data to the server; A result receiving unit is configured to receive a facial recognition result of the target user generated by the server through the cloud application.
12. An electronic device, characterized in that: It comprises a memory and a processor; the memory stores an application program, and the processor is used to run the application program in the memory to perform the operations in the artificial intelligence-based face recognition method according to any one of claims 1 to 9.
13. A storage medium, characterized in that: The storage medium stores a plurality of instructions, which are suitable for loading by a processor to execute the steps of the artificial intelligence-based face recognition method according to any one of claims 1 to 9.
14. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the artificial intelligence-based face recognition method according to any one of claims 1 to 9.
Citation Information
Patent Citations
A method and apparatus for brush face payment
CN109377234A
A human face living body detection method and device based on a depth image
CN109684925A
Identity authentication method and system, computer equipment and computer readable storage medium
CN110502885A