Facial recognition method, device, equipment and storage medium based on artificial intelligence
By establishing communication connections between facial recognition devices, direct data interaction is achieved, and when the recognition fails, auxiliary requests and time attributes are used to determine the result, which solves the problem of low data storage and interaction efficiency in facial recognition, and improves recognition efficiency. efficiency and accuracy.
Patent Information
- Application Number
- CN202110019138.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-07
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2041-01-07
AI Technical Summary
In facial recognition technology, existing technology is difficult to effectively improve data storage and interaction efficiency, resulting in low data interaction efficiency in the facial recognition process.
By establishing a communication connection relationship between the first face recognition device and the second face recognition device, direct data interaction within a preset distance range is achieved. When the first face recognition fails, the second face recognition device The device sends an auxiliary request, uses its database to assist recognition, and determines the final result based on the time attribute of the recognition result.
The efficiency of facial recognition is improved. By optimizing the cross-device data interaction method, the efficiency of data interaction is improved, thereby improving the accuracy and speed of facial recognition.
Smart Images

Figure CN112989922B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a face recognition method, device, equipment and storage medium based on artificial intelligence. Background Art
[0002] Facial recognition technology is a type of biometric recognition technology that uses the biological characteristics of an organism (generally referring to a person), such as facial information, to distinguish between individuals. In the application of facial recognition technology, facial recognition technology is combined with data storage technology to expand the application scenarios of facial recognition technology.
[0003] During the research and practice of related technologies, the inventors of this application discovered that in the application of facial recognition technology, data storage technology can provide technical support for the storage and access of data in the facial recognition process. However, how to further improve the efficiency of data interaction in the facial recognition process based on data storage technology remains to be solved and optimized. 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 application provides a face recognition method based on artificial intelligence, including:
[0006] Determining a first facial recognition device to perform facial recognition, wherein a communication connection relationship is established between the first facial recognition device and at least one second facial recognition device, and the communication connection relationship is used to enable the first facial recognition device and the second facial recognition device to directly exchange data within a preset distance range;
[0007] Acquiring a facial recognition request through the first facial recognition device, wherein the facial recognition request includes target facial data of a target user;
[0008] Based on first historical user facial data stored in a facial database of the first facial recognition device, performing first facial recognition on the target facial data;
[0009] When the first facial recognition fails, sending an auxiliary facial recognition request to at least one of the second facial recognition devices, so as to perform a second facial recognition on the target facial data of the target user based on the auxiliary facial recognition request and the second historical user facial data stored in the facial database of the second facial recognition device, and obtain at least one facial recognition result;
[0010] The facial recognition result of the target user is determined according to the time attribute of the facial recognition result.
[0011] Accordingly, the embodiment of the present application also provides a facial recognition device based on artificial intelligence, including:
[0012] a device determining unit, configured to determine a first facial recognition device to be used for facial recognition, wherein a communication connection relationship is established between the first facial recognition device and at least one second facial recognition device, and the communication connection relationship is used to enable the first facial recognition device and the second facial recognition device to directly exchange data within a preset distance range;
[0013] a request acquisition unit, configured to acquire a face recognition request through the first face recognition device, wherein the face recognition request includes target face data of a target user;
[0014] a first recognition unit, configured to perform a first facial recognition on the target facial data based on first historical user facial data stored in a facial database of the first facial recognition device;
[0015] a second recognition unit, configured to, when the first facial recognition fails, send an auxiliary facial recognition request to at least one of the second facial recognition devices, so as to perform a second facial recognition on the target facial data of the target user based on the auxiliary facial recognition request and the second historical user facial data stored in the facial database of the second facial recognition device, and obtain at least one facial recognition result;
[0016] The result determination unit is used to determine the face recognition result of the target user according to the time attribute of the face recognition result.
[0017] In one embodiment, the target facial data includes at least two candidate facial images; the first recognition unit includes:
[0018] a quality calculation subunit, configured to identify a target facial region of the target user in the candidate facial image, and calculate an image quality of the target facial region in at least one quality assessment dimension;
[0019] A target selection subunit, configured to select a target facial image required for facial recognition from the candidate facial images according to the calculation result;
[0020] A feature extraction subunit, used to extract features from the target facial image to obtain target facial information features of the target facial image;
[0021] The first recognition subunit is configured to perform a first face recognition on the target face information features based on the first historical user face data stored in the face database of the first face recognition device.
[0022] In one embodiment, the first identification subunit is used to:
[0023] Acquire a first historical facial information feature corresponding to the first historical user facial data; perform feature comparison between the target facial information feature and the acquired first historical facial information feature to obtain a first comparison result, wherein the first comparison result represents a feature similarity between the target facial information feature and the first historical facial information feature; and determine a facial recognition result of the target user in the first facial recognition device based on the first comparison result.
[0024] In one embodiment, in the face database of the first face recognition device, a user behavior feature tag is further provided corresponding to the first historical user face data; the first recognition subunit is specifically used for:
[0025] According to the current time and the geographic location of the target user, a user behavior feature label of the target user is determined; first historical user facial data whose user behavior feature label matches the user behavior feature label of the target user is determined; and a first historical facial information feature corresponding to the matched first historical user facial data is obtained.
[0026] In one embodiment, the auxiliary face recognition request includes target face information features of the target face data; the second recognition unit includes:
[0027] a first sending subunit, configured to send an auxiliary facial recognition request to at least one of the second facial recognition devices when the first facial recognition fails;
[0028] The first trigger subunit is used to trigger the second facial recognition device to parse the target facial information features from the auxiliary facial recognition request; based on the second historical user facial data stored in the facial database of the second facial recognition device, perform a second facial recognition on the target facial information features to obtain a facial recognition result of the second facial recognition.
[0029] In one embodiment, the auxiliary face recognition request includes user identification information of the first historical user; the second recognition unit includes:
[0030] a second sending subunit, configured to send an auxiliary facial recognition request to at least one of the second facial recognition devices when the first facial recognition fails;
[0031] a second triggering subunit, configured to trigger the second facial recognition device to obtain facial data of a target second historical user from a facial database of the second facial device based on the user identification information of the first historical user, and send the facial data to the first facial recognition device, wherein the second historical user corresponding to the facial data of the target second historical user is not the first historical user;
[0032] a target receiving subunit, configured to receive the target second historical user facial data, and update the facial database of the first facial device based on the target second historical user facial data;
[0033] The second recognition subunit is used to perform a second facial recognition on the target facial data of the target user based on the target second historical user facial data to obtain a facial recognition result of the second facial recognition.
[0034] In one embodiment, if the facial recognition request is a request triggered by a second facial recognition performed in the same business process, and the first facial recognition of the business process passes; the artificial intelligence-based facial recognition device further includes:
[0035] an identification determination unit, configured to determine user identification information of a user identified in the first facial recognition process according to a recognition result of the first facial recognition;
[0036] The auxiliary face recognition request includes the user identification information of the recognition passing user and the target face data of the target user; the second recognition unit includes:
[0037] a third sending subunit, configured to send an auxiliary facial recognition request to at least one of the second facial recognition devices when the first facial recognition fails;
[0038] The third trigger subunit is used to trigger the second facial recognition device to parse the user identification information of the identified user and the target facial data of the target user from the auxiliary facial recognition request, and determine the associated user of the identified user based on the user identification information; obtain the target second historical user facial data from the facial database of the second facial recognition device, wherein the target second historical user facial data includes the facial data of the identified user and the facial data of the associated user; perform a second facial recognition on the target facial data of the target user based on the obtained target second historical user facial data, and obtain a facial recognition result corresponding to the second facial recognition.
[0039] In one embodiment, the result determination unit includes:
[0040] a result sorting subunit, used for sorting the face recognition results according to the time attributes of the face recognition results;
[0041] a target selection subunit, configured to select a target recognition result from the face recognition results according to the sorting result;
[0042] The result determination subunit is used to determine that the face recognition result of the target user is a recognition pass when it is detected that the target recognition result is a recognition pass.
[0043] In one embodiment, the result determination unit further includes:
[0044] A cloud request generation subunit, configured to generate a cloud face recognition request according to the target face data when it is detected that the target recognition result is a recognition failure;
[0045] A cloud request sending subunit, used to send the cloud face recognition request to the server, so as to trigger the server to perform cloud face recognition on the target user based on the target face data, and obtain a cloud face recognition result of the target user;
[0046] The cloud result acquisition subunit is used to acquire the cloud face recognition result of the target user.
[0047] In one embodiment, the artificial intelligence-based face recognition device further includes:
[0048] An information generating subunit, configured to generate facial data update information of a cloud facial database corresponding to the first facial recognition device according to the facial recognition result of the target user;
[0049] The information sending subunit is used to send the facial data update information to the server to trigger the server to update the cloud facial database corresponding to the first facial recognition device, wherein the updated cloud facial database includes the target facial data of the target user.
[0050] In one embodiment, the artificial intelligence-based face recognition device further includes:
[0051] an update information acquisition subunit, configured to acquire database update information for the first facial recognition device sent by the server, wherein the database update information is generated based on data in a cloud facial database corresponding to the first facial recognition device;
[0052] A database updating unit is used to update the face database of the first face recognition device according to the database update information.
[0053] 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.
[0054] Correspondingly, an embodiment of the present application also provides a computer device, including 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 face recognition method as shown in the embodiment of the present application are implemented.
[0055] The embodiment of the present application can determine a first facial recognition device to be used for facial recognition, wherein a communication connection relationship is established between the first facial recognition device and at least one second facial recognition device, and the communication connection relationship is used to enable the first facial recognition device and the second facial recognition device to directly exchange data within a preset distance range; obtain a facial recognition request through the first facial recognition device, wherein the facial recognition request includes target facial data of a target user; perform a first facial recognition on the target facial data based on first historical user facial data stored in a facial database of the first facial recognition device; when the first facial recognition fails, send an auxiliary facial recognition request to at least one of the second facial recognition devices, so as to perform a second facial recognition on the target facial data of the target user based on the auxiliary facial recognition request and the second historical user facial data stored in the facial database of the second facial recognition device, and obtain at least one facial recognition result; determine the facial recognition result of the target user according to the time attribute of the facial recognition result.
[0056] The solution can utilize the communication connection relationship between the first face recognition device and the second face recognition device, so that in the application scenario where data storage technology and face recognition technology are combined, the efficiency of face recognition is improved by optimizing the data interaction mode between cross-face recognition devices. When the target user fails to pass the first face recognition in the face database of the first face recognition device, the solution can send an auxiliary face recognition request to the second face recognition device to assist the first face recognition device to further perform face recognition on the target user based on the face database of the second face recognition device. In this way, direct face data interaction can be performed across the terminals within a preset distance range, thereby improving the efficiency of face recognition by improving the efficiency of data interaction. In addition, the solution takes into account that when direct data interaction is performed within a preset data range, the target face recognition result is determined by the time attribute of at least one face recognition result generated, so that on the basis of improving the efficiency of data interaction, the efficiency of face recognition is further improved by combining specific application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. 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 is a schematic diagram of a scenario of an artificial intelligence-based face recognition method provided in an embodiment of the present application;
[0059] Figure 2 is a flow chart of an artificial intelligence-based face recognition method provided in an embodiment of the present application;
[0060] Figure 3 is a schematic diagram of a device for an artificial intelligence-based face recognition method provided in an embodiment of the present application;
[0061] Figure 4 is another flow chart of the artificial intelligence-based face recognition method provided in an embodiment of the present application;
[0062] Figure 5 Schematic diagram of the system architecture of the artificial intelligence-based face recognition method provided in the embodiment of the present application;
[0063] Figure 6 is a schematic diagram of the structure of an artificial intelligence-based face recognition device provided in an embodiment of the present application;
[0064] Figure 7 is another structural schematic diagram of an artificial intelligence-based face recognition device provided in an embodiment of the present application;
[0065] Figure 8 is another structural schematic diagram of an artificial intelligence-based face recognition device provided in an embodiment of the present application;
[0066] Fig. 9 is another structural schematic diagram of an artificial intelligence-based face recognition device provided in an embodiment of the present application;
[0067] Fig.10 is another structural schematic diagram of an artificial intelligence-based face recognition device provided in an embodiment of the present application;
[0068] Fig.11 is another structural schematic diagram of an artificial intelligence-based face recognition device provided in an embodiment of the present application;
[0069] Fig.12 is another structural schematic diagram of an artificial intelligence-based face recognition device provided in an embodiment of the present application;
[0070] Fig.13 is another structural schematic diagram of an artificial intelligence-based face recognition device provided in an embodiment of the present application;
[0071] Fig.14 is another structural schematic diagram of an artificial intelligence-based face recognition device provided in an embodiment of the present application;
[0072] Fig.15 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application;
[0073] Fig.16 It is a structural diagram of the blockchain system provided in the embodiment of the present application;
[0074] Fig.17 It is another structural schematic diagram of the blockchain system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0075] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0076] 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, automatic driving, drones, robots, smart medical care, smart customer service, etc. I believe that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0077] Among them, Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0078] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0079] The solution provided in the embodiment of the present application relates 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 further, it refers to machine vision such as using cameras and computers to replace human eyes to identify, track and measure targets, and further do graphic processing to make computer processing become 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. Specifically illustrated by the following embodiments:
[0080] The embodiments of the present application provide a facial recognition method, device, equipment and storage medium based on artificial intelligence. Specifically, the embodiments of the present application provide a facial recognition device based on artificial intelligence suitable for computer equipment. Among them, the computer equipment can be a terminal or server and other equipment, and the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a 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, etc. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or 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.
[0081] The embodiment of the present application will be introduced by taking the artificial intelligence-based face recognition method executed by a terminal as an example.
[0082] refer to Figure 1 The embodiment of the present application provides an artificial intelligence-based face recognition system including a terminal, which may include at least two face recognition devices, for example, the terminal may include Figure 1 The first facial recognition device, the second facial recognition device 1, the second facial recognition device 2, the second facial recognition device N, etc. are shown, where N is a positive integer.
[0083] The terminals may be connected via a wired or wireless network, etc. In addition, a communication connection relationship may be established between the terminals, and the communication connection relationship may be used to enable direct data interaction between the terminals, for example, Figure 1 The first facial recognition device can establish a communication connection relationship with N second facial recognition devices, including the second facial recognition device 1, the second facial recognition device 2 to the second facial recognition device N, respectively, wherein the communication connection relationship can be used to enable the first facial recognition device and the second facial recognition device to directly exchange data within a preset distance range.
[0084] The artificial intelligence-based facial recognition system can determine a first facial recognition device to be used for facial recognition, wherein a communication connection relationship is established between the first facial recognition device and at least one second facial recognition device, and the communication connection relationship is used to enable the first facial recognition device and the second facial recognition device to directly exchange data within a preset distance range; obtain a facial recognition request through the first facial recognition device, wherein the facial recognition request includes target facial data of a target user;
[0085] Furthermore, a first facial recognition can be performed on the target facial data based on the first historical user facial data stored in the facial database of the first facial recognition device; when the first facial recognition fails, an auxiliary facial recognition request is sent to at least one second facial recognition device; a second facial recognition is triggered based on the auxiliary facial recognition request and the second historical user facial data stored in the facial database of the second facial recognition device, and the target facial data of the target user is subjected to a second facial recognition to obtain at least one facial recognition result; and the facial recognition result of the target user is determined according to the time attribute of the facial recognition result.
[0086] In another embodiment, reference Figure 1 The artificial intelligence-based facial recognition system may also include a server. When the first facial recognition device detects that the target recognition result is a failed recognition, it can generate a cloud facial recognition request based on the target facial data; send the cloud facial recognition request to the server to trigger the server to perform cloud facial recognition on the target user based on the target facial data to obtain the cloud facial recognition result of the target user; and obtain the cloud facial recognition result of the target user.
[0087] In addition, the first facial recognition device can also generate facial data update information for the cloud facial database corresponding to the first facial recognition device based on the facial recognition result of the target user; and send the facial data update information to the server to trigger the server to update the cloud facial database corresponding to the first facial recognition device, wherein the updated cloud facial database includes the target facial data of the target user.
[0088] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.
[0089] The embodiment of the present application takes the face recognition method based on artificial intelligence executed by a terminal as an example for explanation. Specifically, the face recognition method based on artificial intelligence is executed by a face recognition device based on artificial intelligence integrated in the terminal, such as Figure 2 The specific process of the artificial intelligence-based face recognition method can be as follows:
[0090] 101. Determine a first facial recognition device to perform facial recognition, wherein a communication connection relationship is established between the first facial recognition device and at least one second facial recognition device, and the communication connection relationship is used to enable the first facial recognition device and the second facial recognition device to directly exchange data within a preset distance range.
[0091] Among them, facial payment can be a payment method based on facial feature information. For example, face payment can be a type of face payment. Face payment is a new payment method based on artificial intelligence, machine vision, 3D sensing, big data and other technologies, which has the advantages of being more convenient, safer and having a better experience.
[0092] The facial payment device may be a device that supports facial payment, and the device may include at least one camera, at least one screen, a barcode scanner, a keyboard, a sensor, and other parts; optionally, the facial payment device may also support multiple payment methods such as barcode scanning payment and password payment. For example, a facial recognition device may include a 3D (three-dimensional) camera, which is similar to a traditional camera and has added living body-related hardware and software, including a depth camera and an infrared camera, to help ensure information security. As an example, Figure 3 A facial recognition device is shown.
[0093] With the widespread application of facial recognition technology, facial recognition devices are also widely distributed everywhere. In this embodiment, different facial recognition devices can be distinguished by "first" and "second".
[0094] The communication connection relationship refers to the relationship that a facial recognition device has, which enables it to communicate with other facial recognition devices. Specifically, if a communication connection relationship is established between the first facial recognition device and the second facial recognition device, it means that when the distance between the two is within a preset distance range, the two can directly exchange data.
[0095] Data interaction may include data sending, data receiving and other interaction modes. Direct data interaction describes the end-to-end data interaction that can be achieved without going through an intermediate medium. For example, the direct data interaction between terminal A and terminal B can be data exchanged directly between terminal A and terminal B without going through a server.
[0096] There are many ways to establish a communication connection between facial payment devices, for example, it can be established through Bluetooth, Near Field Communication (NFC), etc.
[0097] The preset distance range can be adjusted based on the way of establishing the communication connection relationship. For example, if the communication connection relationship between the facial recognition devices is established via Bluetooth, the upper limit of the preset distance range can be the maximum distance between the facial recognition devices when the facial recognition devices directly interact with each other based on Bluetooth; the lower limit of the preset distance range can be the minimum distance between the facial recognition devices.
[0098] For another example, if a communication connection relationship between facial recognition devices is established through NFC technology, the upper limit of the preset distance range may be the maximum distance between the facial recognition devices when the facial recognition devices perform direct data interaction based on NFC; the lower limit of the preset distance range may similarly be the minimum distance between the facial recognition devices; and so on.
[0099] There may be a variety of ways to determine the first facial recognition device to be used for facial recognition. For example, the user may trigger the determination on the facial recognition device. For example, when facial recognition device A detects that a "pay by face swiping" control is triggered, facial recognition device A may be determined to be the first facial recognition device to be used for facial recognition.
[0100] In this embodiment, the AI-based facial recognition method described in this application can be applied to offline payment scenarios. Specifically, most stores currently have multiple Internet of Things (IoT) facial recognition devices, such as face payment devices. It is common for users to use related services across multiple facial recognition devices in the same store. Therefore, the communication connection relationship between facial recognition devices can be determined and established through the following initialization steps:
[0101] Each facial recognition device in the store is equipped with a Bluetooth module, and the backend can use a string serial number (SN) to uniquely identify a facial recognition device and a store identifier (MCH_ID) to uniquely identify a store. Before the facial recognition device is shipped to the store, the backend can establish a mapping relationship table between MCH_ID and SN.
[0102] After the facial recognition device is started, the related facial recognition application can obtain the SN and MCH_ID of the current facial recognition device, and then establish a Bluetooth connection between the facial recognition devices, that is, establish a communication connection relationship between the facial recognition devices.
[0103] By setting MCH_ID based on SN, it is possible to prevent facial recognition devices in different stores from being mistakenly connected due to proximity of stores. When a Bluetooth connection is established, if the MCH_IDs between the two are different, the connection will be disconnected. In this way, it is ensured that facial recognition devices across stores will not be stored in the warehouse for cross-end facial recognition. Therefore, optionally, in this embodiment, the preset distance range can also take into account realistic factors such as store area and distance between different stores.
[0104] 102. Obtain a facial recognition request through a first facial recognition device, wherein the facial recognition request includes target facial data of a target user.
[0105] The target user is the user to be face-recognized; the target face data is face-related data of the target user. The face-related data of the target user may be image data or video data including the face of the target user, such as a face image, a face video, etc.; or may be target face information features of the target user, such as a feature vector, etc. In this embodiment, the target face data of the target user may be image data or video data including the face of the target user collected by the first face recognition device.
[0106] The target facial data may be acquired by the first facial recognition device, for example, an image or video containing a face may be acquired by a camera, and therefore, the format of the data in the target facial data may be related to the data acquisition device. For example, the facial image data acquired by a color camera may be an image in a red, green, blue (RGB) color mode; for another example, the facial image data acquired by a structural depth camera may be image data including depth of field information, such as an image in a red, green, blue-depth (RGB-D) mode; and so on.
[0107] In one embodiment, a facial recognition-related application running on the first facial recognition device may obtain a facial recognition request of a target user through the first facial recognition device. For example, when the facial recognition-related application detects a facial recognition trigger operation of the target user, the target facial data of the target user may be collected through the first facial recognition device, and a facial recognition request may be generated based on the target facial data.
[0108] Among them, the facial recognition triggering operation of the target user can be actively triggered by the target user or passively triggered by the target user. For example, in the facial payment scenario of an offline store, the target user can trigger facial payment on the first facial recognition device through the interactive modules such as the screen and buttons provided by the first facial recognition device, and it can be considered that the target user actively triggered the facial recognition triggering operation; for another example, when the cashier transmits the facial recognition signal to the first facial recognition device through the instructions between the programs, such as the instructions between the cashier system and the facial recognition system, to perform facial recognition on the target user, the facial recognition triggering operation of the target user is initiated by the cashier and covers the target user, and it can be considered that the target user recognizes and triggers the facial recognition triggering operation. For another example, in the security scenario based on facial recognition, when the first facial recognition device captures or collects the target facial data of the target user, it can generate a facial recognition request for the target user, and it can be considered that the target user passively triggered the facial recognition triggering operation.
[0109] 103. Perform first facial recognition on the target facial data based on the first historical user facial data stored in the facial database of the first facial recognition device.
[0110] The face database is a database storing historical face data of historical users. The historical face data is face-related data of historical users. The face-related data of historical users may be image data or video data including faces of historical users, such as face images, face videos, etc.; in particular, it may also be historical face information features of historical users, such as feature vectors, etc. In this embodiment, the historical face data of historical users may be image data or video data including faces of historical users stored in the face database of the first face recognition device.
[0111] Therefore, in this embodiment and the following description, the historical user of the first facial recognition device may be referred to as the first historical user, and the face-related data of the first historical user may be referred to as the first historical user face data. Accordingly, the face recognition of the target face data of the target user performed on the first facial recognition device may be referred to as the first face recognition, and the face database of the first facial recognition device may be referred to as the first face database.
[0112] Since the target facial data of the target user may be an image or video stream containing the target user's face collected by a camera, the target facial data may have only one candidate facial image or may include at least two candidate facial images. When the target facial data includes at least two candidate facial images, the target facial image required for facial recognition may be selected from the candidate facial images. In particular, if the target facial data includes only one candidate facial image, the candidate facial image may be determined as the target facial image. Furthermore, the target facial information features corresponding to the target user may be extracted from the target facial image so that the first facial recognition may be performed based on the target facial information features. Specifically, the step of "performing a first facial recognition on the target facial data based on the first historical user facial data stored in the facial database of the first facial recognition device" may include:
[0113] Identifying a target facial region of a target user in the candidate facial image, and calculating image quality of the target facial region in at least one quality assessment dimension;
[0114] Selecting a target facial image required for facial recognition from the candidate facial images according to the calculation result;
[0115] Extracting features of the target facial image to obtain target facial information features of the target facial image;
[0116] Based on the first historical user facial data stored in the facial database of the first facial recognition device, a first facial recognition is performed for target facial information features.
[0117] The target face region is the region corresponding to the target user's face in the candidate face image, and the image quality measures whether the image is suitable for face recognition.
[0118] Among them, the quality assessment dimension is a dimension used to evaluate the image quality of the target facial area in the candidate facial image. For example, the quality assessment dimension may include the area size of the target facial area, the angle of the face in the target facial area, etc. Optionally, when selecting the target facial image from the candidate facial images, multiple elements such as the brightness of the candidate facial image and the clarity of the candidate facial image may also be taken into comprehensive consideration.
[0119] After calculating the image quality of the target facial region in at least one quality assessment dimension, the calculation results of the image quality in each quality assessment dimension can be obtained accordingly. Further, the target facial image can be selected from the candidate facial images based on the calculation results.
[0120] In one embodiment, a facial recognition-related application (Application, APP) may be run on the first facial recognition device, and the core of the APP may include facial recognition services, facial databases, Bluetooth forwarding services, etc. The APP may identify the target facial area of the target user in the candidate facial image, and select the target facial image through comprehensive evaluation of the area size and facial angle of the target facial area in the candidate facial image, as well as coefficient indicators such as image contrast, image brightness, and image clarity of the candidate facial image.
[0121] There are many ways to select a target facial image from the candidate facial images based on the calculation results. For example, different weights can be assigned to the calculation results of each dimension, and the final quality score of the candidate facial images can be obtained through weighted calculation, and the target facial image can be selected from at least two candidate facial images based on the final quality score, etc.; for example, different priorities and thresholds can be assigned to the calculation results of each dimension, and the calculation results of each dimension can be judged according to the priorities and corresponding thresholds to determine the final target facial image; and so on.
[0122] 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.
[0123] There are many ways to extract features. For example, a regional image including a target facial region can be extracted from a target facial image, and target facial information features of a target user can be extracted from the regional image. For example, target facial information features of a target user can be extracted from the regional image by an image processing method such as a pixel-based calculation method, such as a Haar feature, etc.; for another example, a neural network method such as a feature extraction model can be used to input the regional image into the feature extraction model to obtain target facial information features generated by the feature extraction model, such as a feature vector, etc.
[0124] Feature extraction methods can be summarized into two categories: one is a knowledge-based representation method; the other is a representation method based on algebraic features or statistics. The knowledge-based representation method mainly obtains feature data that is helpful for face classification based on the shape description of facial organs and the distance characteristics between them. Its feature components usually include the Euclidean distance, curvature and angle between feature points. The face is composed of parts such as eyes, nose, mouth, and chin. The geometric description of these parts and the structural relationship between them can be used as important features for identifying the face. These features are called geometric features. Knowledge-based face representation mainly includes methods based on geometric features and template matching methods. In one embodiment, feature extraction can refer to converting facial image information into feature string information that uniquely identifies a user.
[0125] Since the target facial information features of the target user are extracted from the target facial image, the first facial recognition of the target facial data can be realized by performing the first facial recognition on the target facial information features based on the first historical user facial data stored in the facial database of the first facial recognition device. Specifically, the step of "performing the first facial recognition on the target facial information features based on the first historical user facial data stored in the facial database of the first facial recognition device" may include:
[0126] Acquire first historical facial information features corresponding to first historical user facial data;
[0127] Performing feature comparison on the target facial information feature and the acquired first historical facial information feature to obtain a first comparison result, wherein the first comparison result represents a feature similarity between the target facial information feature and the first historical facial information feature;
[0128] Based on the first comparison result, a facial recognition result of the target user in the first facial recognition device is determined.
[0129] Since the first historical user facial data is stored in the first facial database, the first historical facial information features corresponding to all or part of the first historical user facial data in the first facial database may be obtained.
[0130] In one embodiment, the first face database is a SQLite database, which is a lightweight database and a relational database management system that complies with the elements of atomicity, consistency, isolation and persistence. For each first historical user, the corresponding first historical user facial data and the first historical facial information features extracted during the historical facial recognition process can be stored. Therefore, the first facial recognition device can obtain the first historical facial information features corresponding to all or part of the first historical user facial data by requesting data from the database.
[0131] There may be a variety of ways to compare features. For example, the data form of facial information features may be feature vectors. Then, the target facial information features and the first historical facial information features may be compared by calculating the distance between feature vectors, such as the Euclidean distance, to obtain a first comparison result representing the feature similarity between the two.
[0132] Furthermore, the facial recognition result of the target user in the first facial recognition device can be determined based on the first comparison result. For example, the first historical facial information feature with the highest feature similarity can be selected from each first comparison result obtained by comparing the target facial information feature with each first historical facial information feature, and the highest similarity value can be compared with a preset threshold value. If the highest similarity value is greater than the threshold value, it can be considered that the facial recognition of the target user in the first facial recognition device has passed, otherwise, it is considered that it has failed.
[0133] In actual applications, there may be multiple ways to obtain the first historical facial information features corresponding to the facial data of the first historical user. For example, in the first facial database, for each first historical user, in addition to storing the corresponding first historical user facial data and the first historical facial information features, the corresponding first historical user facial data may also be provided with a user behavior feature label, which may be used to characterize the user behavior features of the first historical user. Therefore, the feature label may be used to obtain the first historical user facial data that matches the user behavior feature label from the first facial database. In this way, the subsequent target facial information features only need to be feature-matched with the first historical facial information features corresponding to the matched first historical user facial data, which may improve the efficiency of feature comparison. Specifically, the step of "obtaining the first historical facial information features corresponding to the facial data of the first historical user" may include:
[0134] Determine the user behavior feature label of the target user based on the current time and the target user's geographical location;
[0135] Determine first historical user facial data whose user behavior feature tag matches the user behavior feature tag of the target user;
[0136] The first historical facial information feature corresponding to the matched first historical user facial data is obtained.
[0137] The user behavior characteristic tag is a tag indicating the behavior characteristic of the user, and the first historical user may be given a corresponding user behavior characteristic tag in the first facial database based on the historical facial recognition behavior of the first historical user in the first facial recognition device. For example, the user behavior characteristic tag may be determined by analyzing the time data and location data in the historical facial recognition behavior.
[0138] As an example, in the scenario of offline catering stores, facial recognition technology can be applied to face-swiping payment. When face-swiping payment is made, the facial recognition device can record the time information and location information of the user's facial recognition behavior. Accordingly, the user's user behavior feature label can be determined based on the time information and location information. Among them, the time information may include the time taken to eat, the payment time, etc.; the location information may include the business district, store location, and the location of commonly used facial recognition devices.
[0139] Therefore, the user behavior feature label corresponding to the target user during the current face recognition behavior of the target user can be determined according to the current time and the geographical location of the target user.
[0140] For the sake of distinction and understanding, the user behavior feature label of the target user may be referred to as the target label below; the user behavior feature label corresponding to the first historical user or the first historical user facial data in the first facial database may be referred to as the first historical label.
[0141] After determining the user behavior feature label of the target user, first historical user facial data whose first historical label matches the target label can be further selected in the first facial database, and the first historical facial information feature corresponding to the matched first historical user facial data can be obtained, so that feature comparison can be performed on the target facial information feature based on the matched first historical facial information feature and a first comparison result can be generated.
[0142] There are multiple ways of matching, for example, full matching and partial matching. For example, the target tag of the target user may include tag A, tag B and tag C. Then, full matching may mean that the matched first historical user face data is also provided with the first historical tag including tag A, tag B and tag C in the first face database; partial matching may mean that the matched first historical user face data is provided with the first historical tag including tag A or tag B or tag C in the first face database.
[0143] 104. When the first facial recognition fails, an auxiliary facial recognition request is sent to at least one second facial recognition device to perform a second facial recognition on the target facial data of the target user based on the auxiliary facial recognition request and the second historical user facial data stored in the facial database of the second facial recognition device to obtain at least one facial recognition result.
[0144] Among them, the auxiliary facial recognition request is a request generated by the first facial device when the first facial recognition of the target user fails, and sent to at least one second facial recognition device, which is intended to request at least one second facial recognition device to assist in facial recognition of the target user.
[0145] In one embodiment, a face recognition related APP may be run on the first face recognition device, and the core of the APP may include a face recognition service, a face database, a Bluetooth forwarding service, etc. Among them, the Bluetooth forwarding service may be used to enable the first face recognition device and the second face recognition device to perform direct data exchange within a preset distance range.
[0146] Specifically, taking the application scenario of an offline store as an example, when the first facial recognition fails, the first facial recognition device can establish a Bluetooth communication connection with other facial recognition devices in the same store through the Bluetooth forwarding service, and send an auxiliary facial recognition request and receive a second facial recognition result through the Bluetooth communication connection.
[0147] In one embodiment, the Bluetooth forwarding service will only transmit once and will not be cascaded. For example, a Bluetooth connection is established between the first facial recognition device, the second facial recognition device A, and the second facial recognition device B. When the first facial recognition device needs to initiate an auxiliary facial recognition request, the first facial recognition device can generate an auxiliary facial recognition request and forward it to the second facial recognition device A via Bluetooth. The first facial recognition device can also send the generated auxiliary facial recognition request to the second facial recognition device B via Bluetooth, but the second facial recognition device A and the second facial recognition device B will not forward to each other, that is, there will be no cascade query across the end via Bluetooth.
[0148] For the sake of distinction and understanding, the face database of the second face recognition device may be referred to as the second face database, and the second historical face information feature corresponding to the second historical user face data in the second face database may be referred to as the second historical feature.
[0149] Since the auxiliary facial recognition request sent to the second facial recognition device can carry different data, there can be multiple ways to complete the second facial recognition of the target user by sending an auxiliary facial recognition request to at least one second facial recognition device when the first facial recognition fails.
[0150] For example, the auxiliary facial recognition request may include target facial information features of the target facial data. Specifically, the step of "when the first facial recognition fails, sending an auxiliary facial recognition request to at least one second facial recognition device, so as to perform a second facial recognition on the target facial data of the target user based on the auxiliary facial recognition request and the second historical user facial data stored in the facial database of the second facial recognition device, and obtain at least one facial recognition result" may include:
[0151] When the first facial recognition fails, sending an auxiliary facial recognition request to at least one second facial recognition device;
[0152] The second facial recognition device is triggered to parse the target facial information features from the auxiliary facial recognition request, and based on the second historical user facial data stored in the facial database of the second facial recognition device, a second facial recognition is performed on the target facial information features to obtain a facial recognition result of the second facial recognition.
[0153] Among them, the second historical user facial data stored in the second facial database can be image data or video data including the second historical user's face, such as facial image, facial video, etc.; specifically, it can also be the second historical facial information features of the second historical user, such as feature vectors, etc.
[0154] Therefore, after the second facial recognition device parses the target facial information features from the auxiliary facial recognition request, it can perform feature comparison between the target facial information features and the second historical features, thereby obtaining a facial recognition result of the second facial recognition.
[0155] Since the second facial recognition device performs the second facial recognition on the target user based on the target facial information features, the specific execution steps of the second facial recognition can refer to the first facial recognition and are not described in detail here.
[0156] In another embodiment, the auxiliary facial recognition request may include the user identification information of the first historical user. Therefore, the second facial recognition device may extract the facial data of the second historical user that is not in the first facial database from the second facial database according to the user identification information, and send it to the first facial recognition device. In this way, the first facial database can be updated, and the first facial recognition device can perform facial recognition again for the target user based on the updated first facial database. Specifically, the step of "when the first facial recognition fails, sending an auxiliary facial recognition request to at least one second facial recognition device to perform a second facial recognition on the target facial data of the target user based on the auxiliary facial recognition request and the facial data of the second historical user stored in the facial database of the second facial recognition device to obtain at least one facial recognition result" may include:
[0157] When the first facial recognition fails, sending an auxiliary facial recognition request to at least one second facial recognition device;
[0158] triggering the second facial recognition device to obtain facial data of a target second historical user from a facial database of the second facial device based on the user identification information of the first historical user, and sending the facial data to the first facial recognition device, wherein the second historical user corresponding to the facial data of the target second historical user is not the first historical user;
[0159] receiving target second historical user facial data, and updating a facial database of the first facial device based on the target second historical user facial data;
[0160] Based on the target second historical user facial data, a second facial recognition is performed on the target facial data of the target user to obtain a facial recognition result of the second facial recognition.
[0161] For the convenience of distinction and understanding, the identification information of the first historical user of the first facial recognition device may be referred to as first identification information below.
[0162] Among them, the user identification information is relevant information used to identify the user, for example, the user identification information can be the user's name, email address, phone number, ID card, social application account, etc.
[0163] After obtaining the auxiliary facial recognition request, the second facial recognition device can parse the first identification information from the auxiliary facial recognition request, and select the target second historical user facial data from the second facial database, wherein the second historical user corresponding to the target second historical user facial data is not the first historical user, that is, if the intersection of the first facial database and the second facial database is set A, then the complement of set A is generated in the second facial database according to the first identification information.
[0164] As an example, the first identification information may include "001", "002", and "003", respectively representing different first historical users. Each piece of data in the second face database may exist in the form of {user identification information of the second historical user, second historical user face data}, and the second face database may include the following 5 pieces of data:
[0165] {010, face data 010}, {011, face data 011}, {002, face data 2}, {003, face data 3}, and {012, face data 012};
[0166] Then, the target second historical user facial data acquired by the second facial recognition device may include “facial data 010”, “facial data 011”, and “facial data 012”. Furthermore, the second facial recognition device may send the acquired target second historical user facial data to the first facial recognition device.
[0167] Accordingly, the first facial recognition device may receive the target second historical user facial data, and update the facial database of the first facial device based on the target second historical user facial data.
[0168] Furthermore, the first facial recognition device can perform a second facial recognition on the target facial data of the target user based on the received target second historical user facial data to obtain a facial recognition result of the second facial recognition. Since the first facial recognition device performs the second facial recognition on the target user based on the facial image data, the specific execution steps of the second facial recognition can refer to the first facial recognition and are not described in detail here.
[0169] In another embodiment, the complete business process may include two facial recognitions. For example, in some face-swiping payment scenarios, a facial recognition operation needs to be performed when selecting face-swiping payment, and a facial recognition operation needs to be performed again when making a payment. In addition, the recognized user who passed the first facial recognition can have an association relationship with other users, and the association relationship can be used to enable the recognized user and its associated user to share the same identity certificate in the preset business. For example, in the face-swiping payment application scenario, user A can have an association relationship with user B, and the association relationship sets user A and user B to share a common deduction account. For example, whether user A or user B uses face-swiping payment, deductions are made from the common deduction account. In this case, it can be considered that in the business of deducting money from the common deduction account, user A and user B share the same identity certificate.
[0170] If the target user's facial recognition request is a request triggered by a second facial recognition performed in the same business process, and the first facial recognition of the business process is passed, for example, in a face-swiping payment scenario where two facial recognitions need to be performed, user A performs the first facial recognition and passes the facial recognition, and then, when user B performs the second facial recognition, user B is the target user in this application. Then, the artificial intelligence-based facial recognition method described in this application may also include: determining the user identification information of the user who passed the first facial recognition process based on the recognition result of the first facial recognition. For example, it means determining the user identification information of user A.
[0171] Furthermore, the user identification information of the user who passed the recognition and the target facial data of the target user may be added to the auxiliary facial recognition request to trigger the second facial recognition device to perform a second facial recognition more intelligently based on the association between the user who passed the recognition and the target user. Specifically, the step of "when the first facial recognition fails, sending an auxiliary facial recognition request to at least one second facial recognition device to perform a second facial recognition on the target facial data of the target user based on the auxiliary facial recognition request and the facial data of the second historical user stored in the facial database of the second facial recognition device to obtain at least one facial recognition result" may include:
[0172] When the first facial recognition fails, sending an auxiliary facial recognition request to at least one second facial recognition device;
[0173] The second facial recognition device is triggered to parse the user identification information of the recognized user and the target facial data of the target user from the auxiliary facial recognition request, and determine the associated users of the recognized user based on the user identification information; obtain the target second historical user facial data from the facial database of the second facial recognition device, wherein the target second historical user facial data includes the facial data of the recognized user and the facial data of the associated users; perform a second facial recognition on the target facial data of the target user based on the obtained target second historical user facial data, and obtain a facial recognition result corresponding to the second facial recognition.
[0174] The associated user of the identified user is a user that has an associated relationship with the identified user, and the associated relationship can be used to enable the identified user and its associated user to share the same identity communication certificate in a preset service.
[0175] The establishment of associations between users can be achieved by establishing associations between user identification information. For example, the associations between users can be recorded by establishing a relationship mapping table. For example, the relationship mapping table can record the user identification information of each user with an association relationship. Since the user identification information can be mapped to the corresponding user, the associated user of the user can be determined by querying the association relationship to which the user identification information belongs in the relationship mapping table.
[0176] The second facial recognition device can determine the associated user of the identified user based on the user identification information of the identified user, and further, can obtain the target second historical user facial data from the second facial database, wherein the target second historical user facial data includes the facial data of the identified user and the facial data of the associated user.
[0177] In this case, the second facial recognition device can perform a second facial recognition on the target facial data of the target user based on the acquired target second historical user facial data, and obtain a facial recognition result corresponding to the second facial recognition.
[0178] For example, it is recognized that user A has two associated users: associated user A and associated user B, wherein associated user A is also the target user in this application. In this case, as long as user A is recognized, the facial recognition result of any user of associated user A or associated user B in the second facial recognition device is recognized as passed, the second facial recognition result of the target user in the second facial recognition device can be considered as recognized as passed. Since the second facial recognition device performs the second facial recognition based on facial image data, the specific execution steps of the second facial recognition can refer to the first facial recognition, which will not be repeated here.
[0179] 105. Determine the facial recognition result of the target user according to the time attribute of the facial recognition result.
[0180] The time attribute of the facial recognition result is used to describe the relevant time information when the second facial recognition device generates the facial recognition result of the second facial recognition. For example, the time attribute can be the time when the facial recognition result is generated; for another example, the time attribute can be the time when the first facial recognition device receives the facial recognition result; and so on.
[0181] In the present application, since the first facial recognition device can send an auxiliary facial recognition request to at least one second facial recognition device, the first facial recognition device can correspondingly obtain at least one facial recognition result, and determine the final facial recognition result of the target user according to the time attribute of each facial recognition result. Specifically, the step of "determining the facial recognition result of the target user according to the time attribute of the facial recognition result" may include:
[0182] sorting the face recognition results according to their time attributes;
[0183] According to the sorting result, select the target recognition result from the face recognition results;
[0184] When it is detected that the target recognition result is recognition passed, it is determined that the face recognition result of the target user is recognition passed.
[0185] In one embodiment, the facial recognition results can be sorted according to the generation time of the facial recognition results generated by each second facial recognition device, and the facial recognition result with the earliest generation time is determined as the target recognition result. When it is detected that the target recognition result is recognized as passed, it can be determined that the facial recognition result of the target user is recognized as passed.
[0186] In another embodiment, the first facial recognition device may preferentially select the facial recognition result that is returned the fastest as the target recognition result, and when the target recognition result is detected as being recognized as passed, determine that the facial recognition result of the target user is recognized as passed. For example, in the application scenario of offline stores, facial recognition devices are limited, the overall facial database of the store is small, and the misrecognition rate is low. Therefore, the facial recognition result that is returned the fastest can be directly used as the target recognition result.
[0187] If the face recognition across the face recognition devices still does not produce any result, a face recognition request may be made to the cloud. Specifically, the face recognition method based on artificial intelligence may further include:
[0188] When it is detected that the target recognition result is recognition failure, a cloud face recognition request is generated according to the target face data;
[0189] Sending a cloud face recognition request to the server to trigger the server to perform cloud face recognition on the target user based on the target face data, and obtaining the cloud face recognition result of the target user;
[0190] Get the target user's cloud-based facial recognition results.
[0191] In one embodiment, when the first facial recognition device detects that the target recognition result is a recognition failure, a cloud facial recognition request can be generated based on the target facial data. For example, the target facial data can be added to the cloud facial recognition request. Furthermore, the first facial recognition device can send a cloud facial recognition request to the server to trigger the server to perform cloud facial recognition on the target user based on the target facial data to obtain the cloud facial recognition result of the target user. Accordingly, the first facial recognition device can obtain the cloud facial recognition result of the target user. Optionally, the first facial recognition device can further cache the target facial data of the target user based on the cloud facial recognition result for use when performing facial recognition on the target user next time.
[0192] In addition to providing the facial recognition function, the cloud server may also be provided with a cloud-based facial database corresponding to the facial recognition device. Therefore, after the first facial recognition device obtains the facial recognition result of the target user, it may further update the cloud-based facial database. Specifically, the facial recognition method based on artificial intelligence may also include:
[0193] Generate facial data update information of a cloud facial database corresponding to the first facial recognition device according to the facial recognition result of the target user;
[0194] The facial data update information is sent to the server to trigger the server to update the cloud facial database corresponding to the first facial recognition device, wherein the updated cloud facial database includes the target facial data of the target user.
[0195] The facial data update information is related information instructing the server to update the cloud facial database corresponding to the first facial recognition device. For example, the facial data update information may include the device identifier of the first facial recognition device, the target facial data of the target user, etc.
[0196] For example, when the facial recognition result of the target user is recognition passed, the first facial recognition device can add the target facial data of the target user, the user identification information of the target user, the facial recognition time and other data to the facial data update information, and send the facial data update information to the server, so that the server can update the cloud facial database corresponding to the first facial recognition device based on the facial data update information. In this way, the updated cloud facial database includes the target facial data of the target user, and it is convenient for the server to build a unified facial database.
[0197] Accordingly, the face recognition-related APP running on the first face recognition device can provide not only face recognition services, face database, Bluetooth forwarding services, etc., but also database update reception services. In this way, the first face recognition device can receive database update information sent by the server, and update the first face database based on the database update information, so that when the device storage has problems and the hard disk is replaced, the relevant face database can be quickly backed up from the back end. Specifically, the face recognition method based on artificial intelligence can also include:
[0198] Obtaining database update information for the first facial recognition device sent by the server, wherein the database update information is generated based on data in a cloud facial database corresponding to the first facial recognition device;
[0199] The face database of the first face recognition device is updated according to the database update information.
[0200] Among them, the database update information is relevant information instructing the first facial recognition device to update the first facial database. For example, the database update information may include facial data of some or all users in the cloud facial database; for example, the database update information may include incremental facial data from the last database update of the first facial database to the present; for another example, the database update information may include all facial data in the cloud facial database; and so on.
[0201] After obtaining the database update information, the first facial recognition device may update the first facial database according to the database update information, for example, perform an incremental update, or directly overwrite the original first facial database; and so on.
[0202] As can be seen from the above, this embodiment can determine a first facial recognition device to be used for facial recognition, wherein a communication connection relationship is established between the first facial recognition device and at least one second facial recognition device, and the communication connection relationship is used to enable the first facial recognition device and the second facial recognition device to directly exchange data within a preset distance range; obtain a facial recognition request through the first facial recognition device, wherein the facial recognition request includes target facial data of a target user; perform a first facial recognition on the target facial data based on the first historical user facial data stored in the facial database of the first facial recognition device; when the first facial recognition fails, send an auxiliary facial recognition request to at least one of the second facial recognition devices; trigger a second facial recognition on the target facial data of the target user based on the auxiliary facial recognition request and the second historical user facial data stored in the facial database of the second facial recognition device, and obtain at least one facial recognition result; determine the facial recognition result of the target user according to the time attribute of the facial recognition result.
[0203] The solution can utilize the communication connection relationship between the first face recognition device and the second face recognition device, so that in the application scenario where data storage technology and face recognition technology are combined, the efficiency of face recognition is improved by optimizing the data interaction mode between cross-face recognition devices. When the target user fails to pass the first face recognition in the face database of the first face recognition device, the solution can send an auxiliary face recognition request to the second face recognition device to assist the first face recognition device to further perform face recognition on the target user based on the face database of the second face recognition device. In this way, direct face data interaction can be performed across the terminals within a preset distance range, thereby improving the efficiency of face recognition by improving the efficiency of data interaction. In addition, the solution takes into account that when direct data interaction is performed within a preset data range, the target face recognition result is determined by the time attribute of at least one face recognition result generated, so that on the basis of improving the efficiency of data interaction, the efficiency of face recognition is further improved by combining specific application scenarios.
[0204] According to the method described in the above embodiment, the following will give an example to further illustrate in detail.
[0205] In this embodiment, an example of integrating an artificial intelligence-based facial recognition device in a server and a terminal is used for explanation. The terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto; alternatively, it may be a device that supports facial recognition, such as a facial recognition device, etc. The server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or 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.
[0206] like Figure 4 As shown, a facial recognition method based on artificial intelligence, the specific process is as follows:
[0207] 201. Determine a first facial recognition device to perform facial recognition, wherein a communication connection relationship is established between the first facial recognition device and at least one second facial recognition device, and the communication connection relationship is used to enable the first facial recognition device and the second facial recognition device to directly exchange data within a preset distance range.
[0208] In one embodiment, the first facial recognition device to be used for facial recognition may be Figure 5 The A device in the embodiment of the present invention can establish a communication connection relationship with the first facial recognition device, and the second facial recognition device can be Figure 5 In addition, the first face recognition device and the second face recognition device are both provided with a 3D camera, a face recognition APP, a face feature library, a Bluetooth forwarding service, and a library update receiving service.
[0209] Among them, reference Figure 5 The first facial recognition device has a corresponding device identifier SN1, the second facial recognition device has a corresponding device identifier SN2, and the first facial recognition device and the second facial recognition device have a common store identifier MCH_ID, indicating that the first facial recognition device and the second facial recognition device are facial recognition devices belonging to the same store.
[0210] 202. The first facial recognition device obtains a facial recognition request, where the facial recognition request includes target facial data of a target user.
[0211] In one embodiment, the target user may trigger a facial recognition trigger event on the first facial recognition device, and the first facial recognition device may collect target facial data of the target user through a 3D camera, and generate a facial recognition request based on the collected target facial data.
[0212] 203. The first facial recognition device performs first facial recognition on the target facial data based on the first historical user facial data stored in its facial database.
[0213] In one embodiment, reference Figure 5 The facial recognition service provided by the first facial recognition device may include facial collection, feature extraction, feature comparison, and storage request services. The first facial recognition device may obtain the target facial information features of the target user by calling the feature extraction service, and implement feature comparison by using the facial feature library of the first facial device, thereby performing the first facial recognition on the target facial data.
[0214] 204. When the first facial recognition fails, the first facial recognition device sends an auxiliary facial recognition request to at least one second facial recognition device to perform a second facial recognition on the target facial data of the target user based on the auxiliary facial recognition request and the second historical user facial data stored in the facial database of the second facial recognition device to obtain at least one facial recognition result.
[0215] In one embodiment, reference Figure 5 , the first facial recognition device can send an auxiliary facial recognition request to the second facial recognition device through the Bluetooth forwarding service. The second facial recognition device can perform a second facial recognition on the target facial data of the target user based on the auxiliary facial recognition request and the second historical user facial data stored in the facial feature library of the second facial recognition device, generate a facial recognition result, and send the generated facial recognition result to the first facial recognition device through the Bluetooth forwarding service.
[0216] 205. The first facial recognition device determines a facial recognition result of the target user according to a time attribute of the facial recognition result.
[0217] For example, the first facial recognition device may preferentially select the facial recognition result that is returned the fastest as the target recognition result, and when the target recognition result is detected as being recognized as passed, determine that the facial recognition result of the target user is recognized as passed. For example, in the application scenario of offline stores, facial recognition devices are limited, the overall facial database of the store is small, and the misrecognition rate is low. Therefore, the facial recognition result that is returned the fastest can be directly used as the target recognition result.
[0218] 206. When it is detected that the target recognition result is recognition failure, the first facial recognition device generates a cloud facial recognition request according to the target facial data, and sends the cloud facial recognition request to the server.
[0219] In one embodiment, reference Figure 5When it is detected that the target recognition result is a recognition failure, the first facial recognition device can send a cloud facial recognition request to the cloud server through the facial recognition APP to call the facial recognition service of the cloud server to determine the target recognition result of the target user.
[0220] 207. The server receives the cloud facial recognition request, performs cloud facial recognition on the target user based on the target facial data, obtains a cloud facial recognition result of the target user, and sends the cloud facial recognition result to the first facial recognition device.
[0221] In one embodiment, reference Figure 5 The back-end cloud server can receive the cloud face recognition request, and by calling the cloud face recognition service, perform cloud face recognition on the target user based on the target face data to obtain the cloud face recognition result of the target user. Further, the server can send the cloud face recognition result to the first face recognition device.
[0222] There are many ways to perform face recognition on the server side. For example, the server can compare the target face data with Figure 5 The facial data in the middle and back-end facial databases are compared. Since the back-end facial database includes the facial data in the facial databases of each facial recognition device in the store, that is, the back-end facial database includes the facial data corresponding to all historical users of each facial recognition device in the store, the back-end facial database can be used to compare the target facial data with the entire back-end data, thereby performing cloud-based facial recognition on the target user.
[0223] 208. The first facial recognition device generates facial data update information of a cloud facial database corresponding to the first facial recognition device according to the facial recognition result of the target user, and sends the facial data update information to the server.
[0224] In one embodiment, reference Figure 5 The first facial recognition device may generate facial data update information based on the device identifier SN1, the facial recognition time, and the target facial data of the target user, and send the facial data update information to the server by calling the storage request service of the facial recognition APP.
[0225] 209. The server receives the facial data update information, and based on the facial data update information, updates the cloud facial database corresponding to the first facial recognition device, wherein the updated cloud facial database includes the target facial data of the target user.
[0226] In one embodiment, reference Figure 5The server can receive the facial data update information sent by the first facial recognition device through the storage request service. Further, the server can synchronize the target facial data of the target user to the backend facial database based on the facial data update information, and synchronize it to the facial database corresponding to the first facial recognition device in the cloud.
[0227] Alternatively, the server can call Figure 5 The database push service shown in the figure generates database update information for the first facial recognition device, wherein the database update information is generated based on the data in the cloud facial database corresponding to the first facial recognition device. Accordingly, the first facial recognition device can obtain the database update information and update the facial database of the first facial recognition device according to the database update information.
[0228] As can be seen from the above, the embodiment of the present application utilizes the communication connection relationship between the first face recognition device and the second face recognition device, so that in the application scenario where data storage technology and face recognition technology are combined, the efficiency of face recognition is improved by optimizing the data interaction mode between cross-face recognition devices. The embodiment of the present application can send an auxiliary face recognition request to the second face recognition device when the target user fails the first face recognition in the face database of the first face recognition device, so as to assist the first face recognition device to further perform face recognition for the target user based on the face database of the second face recognition device. In this way, direct face data interaction can be performed across the terminals within a preset distance range, so that the efficiency of face recognition can be improved by improving the efficiency of data interaction. In addition, the embodiment of the present application takes into account that when direct data interaction is performed within a preset data range, the target face recognition result is determined by the time attribute of at least one face recognition result generated, so that on the basis of improving the efficiency of data interaction, the efficiency of face recognition is further improved by combining specific application scenarios.
[0229] In order to better implement the above method, the embodiment of the present application also provides an artificial intelligence-based face recognition device, wherein the artificial intelligence-based face recognition device can be integrated in a server or a terminal. The server can be a single server or a server cluster composed of multiple servers; the terminal can be a mobile phone, a tablet computer, a laptop computer, and other devices.
[0230] For example, Figure 6 As shown, the artificial intelligence-based face recognition apparatus may include a device determination unit 301, a request acquisition unit 302, a first recognition unit 303, a second recognition unit 304, and a result determination unit 305, as follows:
[0231] The device determining unit 301 is used to determine a first facial recognition device to be used for facial recognition, wherein a communication connection relationship is established between the first facial recognition device and at least one second facial recognition device, and the communication connection relationship is used to enable the first facial recognition device and the second facial recognition device to directly exchange data within a preset distance range;
[0232] A request acquisition unit 302, configured to acquire a face recognition request through the first face recognition device, wherein the face recognition request includes target face data of a target user;
[0233] A first recognition unit 303, configured to perform a first facial recognition on the target facial data based on first historical user facial data stored in a facial database of the first facial recognition device;
[0234] The second recognition unit 304 is configured to, when the first facial recognition fails, send an auxiliary facial recognition request to at least one of the second facial recognition devices, so as to perform a second facial recognition on the target facial data of the target user based on the auxiliary facial recognition request and the second historical user facial data stored in the facial database of the second facial recognition device, and obtain at least one facial recognition result;
[0235] The result determination unit 305 is used to determine the face recognition result of the target user according to the time attribute of the face recognition result.
[0236] In one embodiment, reference Figure 7 , the target facial data includes at least two candidate facial images; the first recognition unit 303 may include:
[0237] The quality calculation subunit 3031 may be used to identify a target facial region of the target user in the candidate facial image, and calculate the image quality of the target facial region in at least one quality assessment dimension;
[0238] The target selection subunit 3032 may be used to select a target facial image required for facial recognition from the candidate facial images according to the calculation result;
[0239] The feature extraction subunit 3033 may be used to extract features from the target facial image to obtain target facial information features of the target facial image;
[0240] The first recognition subunit 3034 may be configured to perform a first facial recognition on the target facial information features based on the first historical user facial data stored in the facial database of the first facial recognition device.
[0241] In one embodiment, the first identification subunit 3034 may be used to:
[0242] Acquire a first historical facial information feature corresponding to the first historical user facial data; perform feature comparison between the target facial information feature and the acquired first historical facial information feature to obtain a first comparison result, wherein the first comparison result represents a feature similarity between the target facial information feature and the first historical facial information feature; and determine a facial recognition result of the target user in the first facial recognition device based on the first comparison result.
[0243] In one embodiment, in the face database of the first face recognition device, a user behavior feature tag is further provided corresponding to the first historical user face data; the first recognition subunit 3034 may be specifically used for:
[0244] According to the current time and the geographic location of the target user, a user behavior feature label of the target user is determined; first historical user facial data whose user behavior feature label matches the user behavior feature label of the target user is determined; and a first historical facial information feature corresponding to the matched first historical user facial data is obtained.
[0245] In one embodiment, reference Figure 8 , the auxiliary face recognition request includes target face information features of the target face data; the second recognition unit 304 may include:
[0246] A first sending subunit 3041 is configured to send an auxiliary facial recognition request to at least one of the second facial recognition devices when the first facial recognition fails;
[0247] The first trigger subunit 3042 can be used to trigger the second facial recognition device to parse the target facial information features from the auxiliary facial recognition request; based on the second historical user facial data stored in the facial database of the second facial recognition device, perform a second facial recognition on the target facial information features to obtain a facial recognition result of the second facial recognition.
[0248] In one embodiment, reference Fig. 9 , the auxiliary face recognition request includes user identification information of the first historical user; the second recognition unit 304 may include:
[0249] A second sending subunit 3043, configured to send an auxiliary facial recognition request to at least one of the second facial recognition devices when the first facial recognition fails;
[0250] The second trigger subunit 3044 may be used to trigger the second facial recognition device to obtain facial data of a target second historical user from a facial database of the second facial device based on the user identification information of the first historical user, and send the facial data to the first facial recognition device, wherein the second historical user corresponding to the facial data of the target second historical user is not the first historical user;
[0251] The target receiving subunit 3045 may be configured to receive the target second historical user facial data, and update the facial database of the first facial device based on the target second historical user facial data;
[0252] The second recognition subunit 3046 may be configured to perform a second facial recognition on the target facial data of the target user based on the target second historical user facial data to obtain a facial recognition result of the second facial recognition.
[0253] In one embodiment, reference Fig.10 , if the facial recognition request is a request triggered by a second facial recognition performed in the same business process, and the first facial recognition of the business process is passed; the artificial intelligence-based facial recognition device also includes:
[0254] The identification determination unit 306 may be configured to determine user identification information of a user identified in the first facial recognition process according to the recognition result of the first facial recognition;
[0255] The auxiliary face recognition request includes the user identification information of the recognition passing user and the target face data of the target user; the second recognition unit 304 may include:
[0256] A third sending subunit 3047, configured to send an auxiliary facial recognition request to at least one of the second facial recognition devices when the first facial recognition fails;
[0257] The third trigger subunit 3048 can be used to trigger the second facial recognition device to parse the user identification information of the identified user and the target facial data of the target user from the auxiliary facial recognition request, and determine the associated user of the identified user based on the user identification information; obtain the target second historical user facial data from the facial database of the second facial recognition device, wherein the target second historical user facial data includes the facial data of the identified user and the facial data of the associated user; perform a second facial recognition on the target facial data of the target user based on the acquired target second historical user facial data, and obtain a facial recognition result corresponding to the second facial recognition.
[0258] In one embodiment, reference Fig.11 , the result determination unit 305 may include:
[0259] A result sorting subunit 3051 may be used to sort the face recognition results according to the time attributes of the face recognition results;
[0260] The target selection subunit 3052 may be used to select a target recognition result from the face recognition results according to the sorting result;
[0261] The result determination subunit 3053 may be used to determine that the face recognition result of the target user is a recognition pass when it is detected that the target recognition result is a recognition pass.
[0262] In one embodiment, reference Fig.12 The result determination unit 305 may further include:
[0263] The cloud request generation subunit 3054 may be used to generate a cloud face recognition request according to the target face data when it is detected that the target recognition result is a recognition failure;
[0264] The cloud request sending subunit 3055 may be used to send the cloud face recognition request to the server to trigger the server to perform cloud face recognition on the target user based on the target face data to obtain the cloud face recognition result of the target user;
[0265] The cloud result acquisition subunit 3056 may be used to acquire the cloud face recognition result of the target user.
[0266] In one embodiment, reference Fig.13 , the artificial intelligence-based face recognition device may further include:
[0267] The information generating unit 307 may be used to generate facial data update information of the cloud facial database corresponding to the first facial recognition device according to the facial recognition result of the target user;
[0268] The information sending unit 308 may be configured to send the facial data update information to the server to trigger the server to update the cloud facial database corresponding to the first facial recognition device, wherein the updated cloud facial database includes the target facial data of the target user.
[0269] In one embodiment, reference Fig.14 , the artificial intelligence-based face recognition device further comprises:
[0270] An update information acquisition unit 309 may be used to acquire database update information for the first facial recognition device sent by the server, wherein the database update information is generated based on data in a cloud facial database corresponding to the first facial recognition device;
[0271] The database updating unit 310 may be configured to update the face database of the first face recognition device according to the database updating information.
[0272] 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 refer to the previous method embodiments, which will not be repeated here.
[0273] As can be seen from the above, in the artificial intelligence-based face recognition apparatus of this embodiment, the device determination unit 301 determines a first face recognition device to be used for face recognition, wherein a communication connection relationship is established between the first face recognition device and at least one second face recognition device, and the communication connection relationship is used to enable the first face recognition device and the second face recognition device to directly exchange data within a preset distance range; the request acquisition unit 302 acquires a face recognition request through the first face recognition device, wherein the face recognition request includes target face data of a target user; the first recognition unit 303 receives a face recognition request based on the first face recognition device. The first historical user facial data stored in the facial database of the second facial recognition device is used to perform a first facial recognition on the target facial data; when the first facial recognition fails, the second recognition unit 304 sends an auxiliary facial recognition request to at least one of the second facial recognition devices, so as to perform a second facial recognition on the target facial data of the target user based on the auxiliary facial recognition request and the second historical user facial data stored in the facial database of the second facial recognition device, and obtain at least one facial recognition result; the result determination unit 305 determines the facial recognition result of the target user according to the time attribute of the facial recognition result.
[0274] The solution can utilize the communication connection relationship between the first face recognition device and the second face recognition device, so that in the application scenario where data storage technology and face recognition technology are combined, the efficiency of face recognition is improved by optimizing the data interaction mode between cross-face recognition devices. When the target user fails to pass the first face recognition in the face database of the first face recognition device, the solution can send an auxiliary face recognition request to the second face recognition device to assist the first face recognition device to further perform face recognition on the target user based on the face database of the second face recognition device. In this way, direct face data interaction can be performed across the terminals within a preset distance range, thereby improving the efficiency of face recognition by improving the efficiency of data interaction. In addition, the solution takes into account that when direct data interaction is performed within a preset data range, the target face recognition result is determined by the time attribute of at least one face recognition result generated, so that on the basis of improving the efficiency of data interaction, the efficiency of face recognition is further improved by combining specific application scenarios.
[0275] In addition, the embodiment of the present application also provides a computer device, which can be a server or a terminal. Fig.15 As shown, it shows a schematic diagram of the structure of the computer device involved in the embodiment of the present application, specifically:
[0276] The computer device may include a memory 401 having one or more computer-readable storage media, an input unit 402, a sensor 403, a wireless fidelity (WiFi) module 404, a processor 405 having one or more processing cores, and a power supply 406. Those skilled in the art will appreciate that Fig.15 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 the components differently. Among them:
[0277] The memory 401 can be used to store software programs and modules, and the processor 405 executes various functional applications and data processing by running the software programs and modules stored in the memory 401. The memory 401 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device (such as audio data, a phone book, etc.), etc. In addition, the memory 401 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 devices. Accordingly, the memory 401 may also include a memory controller to provide the processor 405 and the input unit 402 with access to the memory 401.
[0278] The input unit 402 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, in a specific embodiment, the input unit 402 may include a touch-sensitive surface and other input devices. The touch-sensitive surface, also known as a touch display screen or a touchpad, can collect the user's touch operations on or near it (such as the user's operation on or near the touch-sensitive surface using any suitable object or accessory such as a finger, a stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch-sensitive surface may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 405, and can receive and execute the command sent by the processor 405. In addition, the touch-sensitive surface can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic waves. In addition to the touch-sensitive surface, the input unit 402 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.
[0279] The computer device may also include at least one sensor 403, 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 each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify 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 can also be configured in the computer device, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0280] 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 WiFi module 404. It provides users with wireless broadband Internet access. Fig.15 A WiFi module 404 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.
[0281] The processor 405 is the control center of the computer device, which uses various interfaces and lines to connect various parts of the entire mobile phone, and executes various functions of the computer device and processes data by running or executing software programs and / or modules stored in the memory 401, and calling data stored in the memory 401. Optionally, the processor 405 may include one or more processing cores; preferably, the processor 405 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 405.
[0282] The computer device also includes a power supply 406 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 405 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 406 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0283] 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 405 in the computer device will load the executable files corresponding to the processes of one or more application programs into the memory 401 according to the following instructions, and the processor 405 will run the application programs stored in the memory 401 to implement various functions, as follows:
[0284] Determine a first facial recognition device to be used for facial recognition, wherein a communication connection relationship is established between the first facial recognition device and at least one second facial recognition device, and the communication connection relationship is used to enable the first facial recognition device and the second facial recognition device to directly exchange data within a preset distance range; obtain a facial recognition request through the first facial recognition device, wherein the facial recognition request includes target facial data of a target user; perform a first facial recognition on the target facial data based on first historical user facial data stored in a facial database of the first facial recognition device; when the first facial recognition fails, send an auxiliary facial recognition request to at least one of the second facial recognition devices, so as to perform a second facial recognition on the target facial data of the target user based on the auxiliary facial recognition request and the second historical user facial data stored in the facial database of the second facial recognition device, and obtain at least one facial recognition result; determine the facial recognition result of the target user according to a time attribute of the facial recognition result.
[0285] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0286] As can be seen from the above, the computer device of this embodiment can utilize the communication connection relationship between the first face recognition device and the second face recognition device, so that in the application scenario where the data storage technology and the face recognition technology are combined, the efficiency of face recognition is improved by optimizing the data interaction mode between the cross-face recognition devices. When the target user fails to pass the first face recognition in the face database of the first face recognition device, the computer device of this embodiment can send an auxiliary face recognition request to the second face recognition device to assist the first face recognition device to further perform face recognition on the target user based on the face database of the second face recognition device. In this way, direct face data interaction can be performed across the terminals within a preset distance range, so that the efficiency of face recognition can be improved by improving the efficiency of data interaction. In addition, the computer device of this embodiment considers that when performing direct data interaction within a preset data range, the target face recognition result is determined by the time attribute of at least one face recognition result generated, so that on the basis of improving the efficiency of data interaction, the efficiency of face recognition is further improved by combining specific application scenarios.
[0287] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed 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.
[0288] To this end, an embodiment of the present application provides a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one 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:
[0289] Determine a first facial recognition device to be used for facial recognition, wherein a communication connection relationship is established between the first facial recognition device and at least one second facial recognition device, and the communication connection relationship is used to enable the first facial recognition device and the second facial recognition device to directly exchange data within a preset distance range; obtain a facial recognition request through the first facial recognition device, wherein the facial recognition request includes target facial data of a target user; perform a first facial recognition on the target facial data based on first historical user facial data stored in a facial database of the first facial recognition device; when the first facial recognition fails, send an auxiliary facial recognition request to at least one of the second facial recognition devices, so as to perform a second facial recognition on the target facial data of the target user based on the auxiliary facial recognition request and the second historical user facial data stored in the facial database of the second facial recognition device, and obtain at least one facial recognition result; determine the facial recognition result of the target user according to a time attribute of the facial recognition result.
[0290] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0291] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0292] Since the instructions stored in the storage medium can execute the steps in 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.
[0293] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being 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 method provided in the various optional implementations of the above-mentioned artificial intelligence-based face recognition. For example, the method may perform the following steps:
[0294] Determine a first facial recognition device to be used for facial recognition, wherein a communication connection relationship is established between the first facial recognition device and at least one second facial recognition device, and the communication connection relationship is used to enable the first facial recognition device and the second facial recognition device to directly exchange data within a preset distance range; obtain a facial recognition request through the first facial recognition device, wherein the facial recognition request includes target facial data of a target user; perform a first facial recognition on the target facial data based on first historical user facial data stored in a facial database of the first facial recognition device; when the first facial recognition fails, send an auxiliary facial recognition request to at least one of the second facial recognition devices, so as to perform a second facial recognition on the target facial data of the target user based on the auxiliary facial recognition request and the second historical user facial data stored in the facial database of the second facial recognition device, and obtain at least one facial recognition result; determine the facial recognition result of the target user according to a time attribute of the facial recognition result.
[0295] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0296] The system involved in the embodiments of the present application may be a distributed system formed by connecting a client and multiple nodes (any form of computing devices in an access network, such as a server and a user terminal) through network communication.
[0297] Take the distributed system as the blockchain system as an example, see Fig.16 , Fig.16This is an optional structural diagram of the face recognition system 100 based on artificial intelligence provided by the embodiment of the present application applied to the blockchain system, which is formed by multiple nodes (any form of computing devices in the access network, such as servers, user terminals) and clients, and the nodes form a peer-to-peer (P2P, Peer To Peer) network. The P2P protocol is an application layer protocol running on the Transmission Control Protocol (TCP, Transmission Control Protocol) protocol. In a distributed system, any machine such as a server or a terminal can join and become a node, and the node includes a hardware layer, an intermediate layer, an operating system layer, and an application layer.
[0298] See also Fig.16 The functions of each node in the blockchain system shown include:
[0299] 1) Routing: a basic function of a node, used to support communication between nodes.
[0300] In addition to the routing function, the node can also have the following functions:
[0301] 2) Applications are deployed in the blockchain to implement specific businesses 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.
[0302] For example, the services implemented by the application include:
[0303] 2.1) Wallet, used to provide the function of conducting electronic currency transactions, including initiating transactions (i.e., sending the transaction record of the current transaction to other nodes in the blockchain system. After the other nodes successfully verify the transaction, as a response to acknowledge the validity of the transaction, the transaction record data is stored in the temporary block of the blockchain; of course, the wallet also supports querying the remaining electronic currency in the electronic currency address;
[0304] 2.2) Shared ledger, which is used to provide functions such as storage, query and modification of account data. The record data of the operation on the account data is sent to other nodes in the blockchain system. After other nodes verify the validity, as a response to acknowledging the validity of the account data, the record data is stored in a temporary block, and a confirmation can also be sent to the node that initiated the operation.
[0305] 2.3) Smart contracts are computerized protocols that can execute the terms of a contract. They are implemented by deploying code on a shared ledger that is executed when certain conditions are met. The code is used to complete automated transactions based on actual business needs. For example, when the target user's face recognition is detected, 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 for processing received information.
[0306] 2.4) User information confidentiality box is used to retain user information. The user information confidentiality box is established by utilizing the decentralization, immutability, transparency, and traceability of blockchain. At the same time, the unique characteristics of the human body, such as facial information, are used as important keys to the user information confidentiality box, thereby achieving confidential retention of user information.
[0307] 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.
[0308] See also Fig.17 , Fig.17 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. Each block is connected by the hash value 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 string of data blocks generated by cryptographic methods. Each data block contains relevant information for verifying the validity of its information (anti-counterfeiting) and generating the next block.
[0309] The above is a detailed introduction to the artificial intelligence-based facial recognition method, device and system 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 idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method 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, It is characterized in that include: Determining a first facial recognition device to perform facial recognition, wherein a communication connection relationship is established between the first facial recognition device and at least one second facial recognition device, and the communication connection relationship is used to enable the first facial recognition device and the second facial recognition device to directly exchange data within a preset distance range; Obtaining a facial recognition request through the first facial recognition device, wherein the facial recognition request includes target facial data of a target user, the facial recognition request is a request triggered by a second facial recognition performed in the same business process, and the first facial recognition of the business process passes; Based on first historical user facial data stored in a facial database of the first facial recognition device, performing first facial recognition on the target facial data; Determining, according to the recognition result of the first facial recognition, user identification information of the user recognized in the first facial recognition process; When the first facial recognition fails, sending an auxiliary facial recognition request to at least one of the second facial recognition devices, so as to perform a second facial recognition on the target facial data of the target user based on the auxiliary facial recognition request and the second historical user facial data stored in the facial database of the second facial recognition device, and obtain at least one facial recognition result, wherein the auxiliary facial recognition request includes the user identification information of the user who passed the recognition and the target facial data of the target user; Determining a facial recognition result of the target user according to a time attribute of the facial recognition result; Wherein, when the first facial recognition fails, sending an auxiliary facial recognition request to at least one of the second facial recognition devices, so as to perform a second facial recognition on the target facial data of the target user based on the auxiliary facial recognition request and the second historical user facial data stored in the facial database of the second facial recognition device, and obtaining at least one facial recognition result, includes: When the first facial recognition fails, sending an auxiliary facial recognition request to at least one of the second facial recognition devices; The second facial recognition device is triggered to parse the user identification information of the identified user and the target facial data of the target user from the auxiliary facial recognition request, and determine the associated user of the identified user based on the user identification information; obtain the target second historical user facial data from the facial database of the second facial recognition device, wherein the target second historical user facial data includes the facial data of the identified user and the facial data of the associated user; perform a second facial recognition on the target facial data of the target user based on the obtained target second historical user facial data, and obtain a facial recognition result corresponding to the second facial recognition.
2. The artificial intelligence-based face recognition method according to claim 1, It is characterized in that The target facial data includes at least two candidate facial images; The performing first facial recognition on the target facial data based on the first historical user facial data stored in the facial database of the first facial recognition device includes: Identifying a target facial region of the target user in the candidate facial image, and calculating image quality of the target facial region in at least one quality assessment dimension; Selecting a target facial image required for facial recognition from the candidate facial images according to the calculation result; Extracting features of the target facial image to obtain target facial information features of the target facial image; Based on the first historical user facial data stored in the facial database of the first facial recognition device, a first facial recognition is performed on the target facial information features.
3. The artificial intelligence-based face recognition method according to claim 2, It is characterized in that The first facial recognition is performed on the target facial information features based on the first historical user facial data stored in the facial database of the first facial recognition device, including: Acquire first historical facial information features corresponding to the first historical user facial data; Performing feature comparison between the target facial information feature and the acquired first historical facial information feature to obtain a first comparison result, wherein the first comparison result represents a feature similarity between the target facial information feature and the first historical facial information feature; Based on the first comparison result, a facial recognition result of the target user in the first facial recognition device is determined.
4. The face recognition method based on artificial intelligence according to claim 3, It is characterized in that In the face database of the first face recognition device, a user behavior feature label is also provided corresponding to the first historical user face data; The obtaining of the first historical facial information feature corresponding to the first historical user facial data includes: Determine a user behavior feature label of the target user according to the current time and the geographical location of the target user; Determine first historical user facial data whose user behavior feature tag matches the user behavior feature tag of the target user; The first historical facial information feature corresponding to the matched first historical user facial data is obtained.
5. The face recognition method based on artificial intelligence according to claim 1, It is characterized in that The auxiliary face recognition request includes target face information features of the target face data; When the first facial recognition fails, sending an auxiliary facial recognition request to at least one of the second facial recognition devices, so as to perform a second facial recognition on the target facial data of the target user based on the auxiliary facial recognition request and the second historical user facial data stored in the facial database of the second facial recognition device, and obtain at least one facial recognition result, including: When the first facial recognition fails, sending an auxiliary facial recognition request to at least one of the second facial recognition devices; The second facial recognition device is triggered to parse the target facial information features from the auxiliary facial recognition request, and based on the second historical user facial data stored in the facial database of the second facial recognition device, a second facial recognition is performed on the target facial information features to obtain a facial recognition result of the second facial recognition.
6. The artificial intelligence-based face recognition method according to claim 1, It is characterized in that The auxiliary face recognition request includes user identification information of the first historical user; When the first facial recognition fails, sending an auxiliary facial recognition request to at least one of the second facial recognition devices, so as to perform a second facial recognition on the target facial data of the target user based on the auxiliary facial recognition request and the second historical user facial data stored in the facial database of the second facial recognition device, and obtain at least one facial recognition result, including: When the first facial recognition fails, sending an auxiliary facial recognition request to at least one of the second facial recognition devices; triggering the second facial recognition device to obtain facial data of a target second historical user from a facial database of the second facial recognition device based on the user identification information of the first historical user, and sending the facial data to the first facial recognition device, wherein the second historical user corresponding to the facial data of the target second historical user is not the first historical user; receiving the target second historical user facial data, and updating the facial database of the first facial recognition device based on the target second historical user facial data; Based on the target second historical user facial data, a second facial recognition is performed on the target facial data of the target user to obtain a facial recognition result of the second facial recognition.
7. The artificial intelligence-based face recognition method according to claim 1, It is characterized in that The determining the face recognition result of the target user according to the time attribute of the face recognition result includes: sorting the facial recognition results according to the time attributes of the facial recognition results; selecting a target recognition result from the face recognition results according to the sorting result; When it is detected that the target recognition result is a recognition pass, it is determined that the face recognition result of the target user is a recognition pass.
8. The artificial intelligence-based face recognition method according to claim 7, It is characterized in that The method further comprises: When it is detected that the target recognition result is recognition failure, generating a cloud face recognition request according to the target face data; Sending the cloud face recognition request to the server to trigger the server to perform cloud face recognition on the target user based on the target face data, and obtaining a cloud face recognition result of the target user; Obtain the cloud-based face recognition result of the target user.
9. The artificial intelligence-based face recognition method according to claim 1, It is characterized in that The method further comprises: Generate facial data update information of a cloud facial database corresponding to the first facial recognition device according to the facial recognition result of the target user; The facial data update information is sent to a server to trigger the server to update a cloud-based facial database corresponding to the first facial recognition device, wherein the updated cloud-based facial database includes the target facial data of the target user.
10. The artificial intelligence-based face recognition method according to claim 9, It is characterized in that The method further comprises: Acquire database update information for the first facial recognition device sent by the server, wherein the database update information is generated based on data in a cloud facial database corresponding to the first facial recognition device; The face database of the first face recognition device is updated according to the database update information.
11. A facial recognition device based on artificial intelligence, It is characterized in that include: a device determining unit, configured to determine a first facial recognition device to be used for facial recognition, wherein a communication connection relationship is established between the first facial recognition device and at least one second facial recognition device, and the communication connection relationship is used to enable the first facial recognition device and the second facial recognition device to directly exchange data within a preset distance range; a request acquisition unit, configured to acquire a facial recognition request through the first facial recognition device, wherein the facial recognition request includes target facial data of a target user, and the facial recognition request is a request triggered by a second facial recognition performed in the same business process, and the first facial recognition of the business process passes; a first recognition unit, configured to perform a first facial recognition on the target facial data based on first historical user facial data stored in a facial database of the first facial recognition device; an identification determination unit, configured to determine user identification information of a user identified in the first facial recognition process according to a recognition result of the first facial recognition; a second recognition unit, configured to, when the first facial recognition fails, send an auxiliary facial recognition request to at least one of the second facial recognition devices, so as to perform a second facial recognition on the target facial data of the target user based on the auxiliary facial recognition request and the second historical user facial data stored in the facial database of the second facial recognition device, and obtain at least one facial recognition result, wherein the auxiliary facial recognition request includes the user identification information of the user who passed the recognition and the target facial data of the target user; A result determination unit, configured to determine the face recognition result of the target user according to the time attribute of the face recognition result; The second recognition unit is further used to: when the first facial recognition fails, send an auxiliary facial recognition request to at least one of the second facial recognition devices; trigger the second facial recognition device to parse the user identification information of the user who has passed the recognition and the target facial data of the target user from the auxiliary facial recognition request, and determine the associated user of the user who has passed the recognition based on the user identification information; obtain the target second historical user facial data from the facial database of the second facial recognition device, wherein the target second historical user facial data includes the facial data of the user who has passed the recognition and the facial data of the associated user; perform a second facial recognition on the target facial data of the target user based on the obtained target second historical user facial data, and obtain a facial recognition result corresponding to the second facial recognition.
12. An electronic device, It is 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 10.
13. A storage medium, It is characterized in that The storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the artificial intelligence-based face recognition method according to any one of claims 1 to 10.
