Facial recognition method and device and electronic equipment
By emitting light to the face area of the target user and transmitting reflected light information to the second electronic device for live detection, the problem that the prior art cannot perform off-site face recognition, and efficient off-site face recognition is achieved.
Patent Information
- Application Number
- CN202510243770.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-06-13
AI Technical Summary
The existing facial recognition technology cannot perform effective live detection in other places, resulting in the inability to complete facial recognition in other places.
The plurality of cameras of the first electronic device emit light to the face area of the target user, and receive reflected light information, and transmit it to the second electronic device for live detection.
It realizes efficient completion of facial recognition in other places, solving the problem that users cannot perform facial recognition in other places.
Smart Images

Figure CN120148084A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of face recognition, and specifically relates to a face recognition method, device, and electronic device. Background Art
[0002] Current face recognition technology requires the user to face the camera to complete operations such as closing eyes and blinking, and complete functions such as application unlocking, data transmission, and information sharing through on-site face recognition of the user. The face recognition process includes: live detection, portrait photography, face comparison, and result return. Among them, live detection generally ensures that it is the user himself by emitting light from the electronic device onto the face and receiving the reflected light signal.
[0003] If the user is in a different location and face recognition needs to be performed on the user locally, the local personnel use one device to have a video chat with the remote personnel, and use another device to log in to the account corresponding to the remote personnel to open face recognition, and verify the remote personnel at the other end of the video screen. Since during the face recognition process, the above-mentioned "live detection" can only detect a plane (i.e., the electronic device screen), and there is no fluctuation in the received reflected light, face recognition cannot be passed. Summary of the Invention
[0004] The purpose of the embodiments of this application is to provide a face recognition method, device, and electronic device, which can solve the problem that the existing face recognition solution cannot perform face recognition in different locations.
[0005] In a first aspect, the embodiments of this application provide a face recognition method, which is applied to a first electronic device and includes:
[0006] When receiving a face recognition request, emit light to the target face area of the target user through a target camera, where the target camera is the camera for face recognition among the multiple cameras of the first electronic device;
[0007] Receive the reflected light information reflected by the light in the target face area, and transmit the reflected light information to a second electronic device, where the second electronic device is used to perform live detection on the target user according to the reflected light information.
[0008] In a second aspect, the embodiments of this application provide a face recognition device, which is applied to a first electronic device and includes:
[0009] A transmitting module, configured to emit light to the target face area of the target user through a target camera when receiving a face recognition request, where the target camera is the camera for face recognition among the multiple cameras of the first electronic device;
[0010] A first transmission module, configured to receive the reflected light information of the light reflected by the target face area, and transmit the reflected light information to a second electronic device, where the second electronic device is configured to perform liveness detection on the target user according to the reflected light information.
[0011] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory. The memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented.
[0012] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0013] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor, and the processor is configured to run a program or instruction to implement the method described in the first aspect.
[0014] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium, and the program product is executed by at least one processor to implement the method described in the first aspect.
[0015] In the embodiment of the present application, when the first electronic device receives a face recognition request, it emits light to the target face area of the target user through the target camera for face recognition in the first electronic device, and receives the reflected light information of the emitted light reflected by the target face area, and transmits the reflected light information to the second electronic device. Thus, the reflected light signal obtained by the second electronic device is the real reflected light signal of the target user's face, and the second electronic device can directly perform liveness detection on the target user based on the reflected light signal to efficiently complete remote face recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is one of the flow diagrams of the face recognition method provided by the embodiment of the present application;
[0017] Figure 2 is a schematic diagram of entering the face recognition mode provided by the embodiment of the present application;
[0018] Figure 3 is a schematic diagram of the camera of the first electronic device provided by the embodiment of the present application;
[0019] Figure 4 is a schematic diagram of face information positioning provided by the embodiment of the present application;
[0020] Figure 5 is one of the schematic flowcharts of the face recognition method provided by an embodiment of the present application;
[0021] Figure 6 is one of the communication diagrams of remote users provided by an embodiment of the present application;
[0022] Figure 7 is the schematic diagram of the hardware module configuration of the VR glasses provided by an embodiment of the present application;
[0023] Figure 8 is one of the schematic diagrams of the structure of the VR glasses provided by an embodiment of the present application;
[0024] Figure 9 is the second schematic diagram of the structure of the VR glasses provided by an embodiment of the present application;
[0025] Figure 10 is the second schematic flowchart of the face recognition method provided by an embodiment of the present application;
[0026] Figure 11 is the second communication diagram of remote users provided by an embodiment of the present application;
[0027] Figure 12 is the schematic diagram of the structure of the face recognition device provided by an embodiment of the present application;
[0028] Figure 13 is the block diagram of the structure of an electronic device provided by an embodiment of the present application;
[0029] Figure 14 is the block diagram of the structure of another electronic device provided by an embodiment of the present application. Detailed implementation manners
[0030] Next, the technical solutions in the embodiments of the present application will be clearly described with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application belong to the scope of protection of the present application.
[0031] The terms "first", "second", etc. in the description and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances so that the embodiments of this application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same category and do not limit the number of objects. For example, the first object can be one or more. In addition, "and / or" in the description and claims means at least one of the connected objects, and the character " / " generally indicates an "or" relationship between the associated objects before and after.
[0032] The following will describe the face recognition method provided by the embodiments of this application with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0033] As Figure 1 shown, the embodiments of this application provide a face recognition method applied to a first electronic device, which may specifically include the following steps:
[0034] Step 101, when receiving a face recognition request, emit light to the target face area of the target user through a target camera, where the target camera is the camera for face recognition among the multiple cameras of the first electronic device.
[0035] If the target user of the first electronic device needs to perform off-site face recognition, a video call connection is first established between the second electronic device and the first electronic device. Both the first electronic device and the second electronic device jump to the face recognition mode. One of the cameras of the second electronic device (such as the rear camera) is video-connected to the first electronic device, and the other camera of the second electronic device (such as the front camera) is used for face recognition. At this time, the screen of the second electronic device can be in the picture-in-picture mode, that is, one picture is the picture captured by the camera of the second electronic device, and the other picture is the face picture of the target user captured by the camera of the first electronic device obtained. Thus, the second electronic device can watch the dynamic face picture captured by the first electronic device in real time to determine that the picture captured by the first electronic device is the real face picture of the target user. For example: As Figure 2 shown, before the second electronic device enters the face recognition mode, a prompt message "Entering face recognition mode" is displayed on the screen. And since the second electronic device is video-connected to the first electronic device through the rear camera, a prompt message "Rear camera video in progress" is displayed on the screen of the second electronic device.
[0036] It should be noted that the face recognition request can be sent from the second electronic device to the first electronic device, or can be generated by the first electronic device according to the operation of the target user.
[0037] A plurality of cameras are provided on the first electronic device. One or more cameras used for face recognition among the plurality of cameras are the target cameras, that is, the number of target cameras is one or more. When the first electronic device receives a face recognition request, light is emitted through all the target cameras on the first electronic device to the complete face area (i.e., the target face area) of the target user who is using the first electronic device. If the number of target cameras is one, then this target camera emits light to the complete face area; if the number of target cameras is multiple, then each target camera emits light to a part of the face area, and the face areas where the multiple target cameras emit light form the complete face area.
[0038] As Figure 3 shown, the first electronic device is provided with two front cameras, namely a front main camera 31 and a front sub-camera 32. The front sub-camera 32 of the first electronic device can be used as the target camera. In the daily shooting scenario, the front sub-camera 32 is controlled by the user to shoot the depth of field and defocus, and does not form an image alone. However, in the off-site face recognition scenario, the front sub-camera 32 can be called as the target camera to form an image alone for face recognition.
[0039] Step 102: Receive the reflected light information of the light reflected in the target face area, and transmit the reflected light information to the second electronic device, where the second electronic device is used to perform a live detection on the target user according to the reflected light information.
[0040] The target camera emits light to the target face area, and the light is reflected in the target face area. Thus, the target camera obtains the reflected light information of the light reflection. The first electronic device transmits the reflected light information to the second electronic device. After receiving the reflected light information, the second electronic device performs a live detection in face recognition on the target user according to the reflected light information to obtain a live detection result, thereby completing the live detection step in face recognition.
[0041] In the embodiment of the present application, when the first electronic device receives a face recognition request, light is emitted through the target camera for face recognition in the first electronic device to the target face area of the target user, and the reflected light information of the emitted light reflected in the target face area is received, and the reflected light information is transmitted to the second electronic device. Thus, the reflected light signal obtained by the second electronic device is the real reflected light signal of the target user's face, and the second electronic device can directly perform a live detection on the target user based on this reflected light signal to efficiently complete off-site face recognition.
[0042] As an optionally specific embodiment, the reflected light information in step 102 includes: coordinates of multiple facial key points and the reflected light signals corresponding to the coordinates of each facial key point.
[0043] The target camera of the first electronic device emits light rays to each facial key point in the target facial area. After reflection by each facial key point, the emitted light information of each facial key point is obtained. The reflected light information of each facial key point includes: the coordinates (x, y) of this facial key point and the reflected light signal β corresponding to the coordinates of the facial key point. Thus, the reflected light information of each facial key point is represented by an array: [(x, y), β], and the facial information positioning schematic diagram as shown is obtained. Thus, the coordinates of each facial key point and the corresponding reflected light signal can be accurately positioned. After obtaining the reflected light information of each frame, the array results of each frame (i.e., the reflected light information) are fed back to the second electronic device through the network for liveness detection, which can improve the accuracy of liveness detection. Figure 4 As shown in the figure, the facial information positioning schematic diagram can accurately locate the coordinates of each facial key point and the corresponding reflected light signal. After obtaining the reflected light information of each frame, the array results of each frame (i.e., the reflected light information) are fed back to the second electronic device through the network for liveness detection, which can improve the accuracy of liveness detection.
[0044] As another optionally specific embodiment, the method may further include:
[0045] Step 103, when receiving the facial recognition request sent by the second electronic device, obtaining a first facial image of the target facial area through the target camera;
[0046] Step 104, transmitting the first facial image to the second electronic device, and the second electronic device is used to perform a face comparison on the target user according to the first facial image.
[0047] When the first electronic device receives the facial recognition request sent by the second electronic device, the first electronic device obtains a first facial image of the target facial area in real time through the target camera (i.e., taking a portrait photo in facial recognition). For each frame of the first facial image captured, the first facial image is transmitted to the second electronic device through the network. The second electronic device uses its face dynamic modeling module to perform a face comparison between the first facial image and the ID card portrait to obtain a face comparison result (i.e., the returned result in facial recognition).
[0048] It should be noted that facial recognition also requires auxiliary verification of real-time actions such as opening the mouth, blinking, and shaking the head. Therefore, when the second electronic device issues a facial recognition request for real-time actions such as opening the mouth, blinking, and shaking the head, the second electronic device sends the facial recognition request for this real-time action to the first electronic device. The first electronic device obtains the first facial information of the target user's real-time actions such as opening the mouth, blinking, and shaking the head in real time through the target camera, and transmits the first facial information to the second electronic device for face comparison to improve the accuracy of facial recognition.
[0049] As another optional specific embodiment, the method may further include:
[0050] Step 105: If the first facial image does not meet the face comparison requirement, generate prompt information based on the first facial image and feed it back to the target user to prompt the target user to adjust the relative position of the first electronic device and the target facial area.
[0051] If the first facial image captured by the first electronic device does not meet the face comparison requirements (e.g., not meeting the face comparison requirements means that it is not a complete facial image), it means that the current first electronic device is unable to capture the complete facial area of the target user, and it is necessary to adjust the relative position of the first electronic device and the target facial area to obtain the complete facial area. Therefore, the first device may generate prompt information based on the missing part of the first facial image and feed it back to the target user, so as to prompt the target user to adjust the relative position of the first electronic device and the target facial area, so as to ensure that the target camera of the first electronic device can capture the complete facial area of the target user.
[0052] The prompt information may be voice prompt information, which is fed back to the target user in the form of voice broadcast; the prompt information may also be text prompt information, which is fed back to the target user in the form of screen display.
[0053] like Figure 5 As shown, the above facial recognition process is described below through a specific embodiment:
[0054] Step 501: A first electronic device establishes a video connection with a second electronic device. Figure 6 As shown, the target user of the first electronic device 61 and the user of the second electronic device 62 conduct face-to-face video.
[0055] Step 502: The first electronic device initiates a facial recognition request through the front main camera.
[0056] Step 503: The first electronic device transmits light to the target facial area of the target user through the front secondary camera (ie, the target camera). The light reaches the target facial area and is reflected, so that the front secondary camera receives the reflected light information reflected by the target facial area.
[0057] Step 504: The first electronic device obtains a first facial image of a target facial area of a target user through the front secondary camera.
[0058] Step 505: The first electronic device transmits the reflected light information and the first facial image to the front main camera of the second electronic device for liveness detection and face comparison.
[0059] The following uses a first electronic device, a virtual reality (VR) glasses, as an example to illustrate the above face recognition process:
[0060] Step 101 above emits light to the target face area of the target user through the target camera, specifically including:
[0061] When the number of the target cameras is multiple, light is emitted to different face key point areas in the target face area through different target cameras.
[0062] As Figure 7 shown, the first electronic device is VR glasses, and the hardware module configuration of the VR glasses is as follows:
[0063] The multiple target cameras configured in the VR glasses communicate with the Security Operations Center (SOC) 73 through signals such as the Mobile Industry Processor Interface (MIPI) and the Inter-Integrated Circuit (IIC) multi-directional control bus in the circuit. To save MIPI Lane ports, multiple front cameras 71 (including front camera 1 to front camera n) and multiple rear cameras 72 (including rear camera 1 to rear camera n) can be shared through the MIPI switch. When the first electronic device communicates with the second electronic device in real time, the captured image is sent in real time through the network, and a face dynamic modeling module 74 is set in the first electronic device for collecting specific face information. In addition, a sensor module 75, an audio module 76, a charging and power module 77, a display module 78, a WIFI module 79, etc. are also set in the first electronic device.
[0064] Among them, MIPI uses differential signal design, which is suitable for high-speed data transmission, such as the interfaces of cameras and displays. A MIPI Lane is a unidirectional or bidirectional differential signal channel for data transmission in the MIPI standard.
[0065] As Figure 8 and Figure 9As shown in the figure, in order to take a picture of a person's face while wearing VR glasses, the upper and lower frames of the VR glasses are both designed as outward slopes. That is, after the target user wears the VR glasses, the upper frame of the VR glasses faces upward and away from the target user's face, and the lower frame of the VR glasses faces downward and away from the target user's face, thus forming two upper and lower slopes. Three wide-angle cameras 81 are arranged as target cameras on each slope. Each wide-angle camera 81 is connected to the main board 83 by means of an extension cable 82 and is arranged at various positions on the slope, and is respectively used to capture images and emit light in the areas of the forehead, eyebrows, ears, mouth, chin, facial contour, and nose of the facial key points. That is, the 6 wide-angle cameras respectively correspond to the forehead area, eyebrow area, ear and mouth area, chin area, facial contour area, and nose area. In addition, an eye movement tracking camera 84 is also arranged on the VR glasses as a target camera, which is used to capture images and emit light in the area of the eyes and the surrounding areas.
[0066] In addition, a strip-shaped battery 85 is arranged on the VR glasses to provide power. A rear camera 86 is also arranged on the rear side of the VR glasses. An inner ring 87 with a retractable design is arranged on the rear side of the VR glasses to place the rear camera 86. After entering the face recognition mode, a video call is maintained through the rear camera 86.
[0067] As an optional specific embodiment, step 103 of obtaining the first facial image of the target facial area through the target camera includes:
[0068] When the number of the target cameras is multiple, second facial images of different facial key point areas in the target facial area are obtained through different target cameras;
[0069] The second facial images of different facial key point areas in the target facial area are synthesized to obtain the first facial image.
[0070] Since the number of the target cameras is multiple, different target cameras capture second facial images of different facial key point areas. The second facial images captured by all the target cameras are synthesized and processed, and thus a facial image that meets the requirements of face comparison, that is, the first facial image, can be obtained. For example: the 6 wide-angle cameras respectively capture second facial images of the forehead, eyebrows, ears, mouth, chin, facial contour, and nose areas, and the eye movement tracking camera captures second facial images of the eyes and the surrounding areas. The second facial images of the forehead, eyebrows, ears, mouth, chin, facial contour, nose areas, and the eyes and the surrounding areas are synthesized and processed, and a first facial image that meets the requirements of face comparison can be generated. By obtaining second facial images of different facial key point areas through multiple target cameras and then generating a complete first facial image, the accuracy of the first facial image can be improved, thereby improving the accuracy of face recognition.
[0071] It should be noted that since the VR glasses press the area around the eye sockets during wearing, resulting in incomplete shooting, the first facial image obtained is a facial image that does not meet the requirements for face comparison. The VR glasses generate a prompt message according to the missing part and feedback it to the target user to prompt the target user to finely adjust the relative position of the first electronic device and the target facial area up, down, left, and right, so as to ensure that the first facial image meets the requirements for face comparison.
[0072] As Figure 10 shown, the following uses a specific embodiment to illustrate the facial recognition process of the above VR glasses:
[0073] Step 901, the first VR glasses (i.e., the first electronic device) establish a video connection with the second VR glasses (i.e., the second electronic device). As Figure 11 shown, the target user of the first VR glasses 111 and the user of the second VR glasses 112 conduct a face-to-face video.
[0074] Step 902, the first VR glasses initiate a face recognition request through the rear camera.
[0075] Step 903, the first VR glasses emit light rays to the forehead, eyebrows, ears, mouth, chin, facial contour, and nose areas respectively through 6 front wide-angle cameras. The light rays reach each area and are reflected. Thus, each wide-angle camera receives the reflected light information. And the first VR glasses emit light rays to the eyes and the surrounding areas through the eye movement tracking camera. The light rays reach the eyes and the surrounding areas and are reflected. Thus, the eye movement tracking camera receives the reflected light information.
[0076] Step 904, the first VR glasses take pictures of the forehead, eyebrows, ears, mouth, chin, facial contour, and nose areas respectively through 6 front wide-angle cameras, and take pictures of the eyes and the surrounding areas through the eye movement tracking camera, obtain the second facial images of each facial key point area, and synthesize the second facial images of each facial key point area to obtain the first facial image.
[0077] Step 905, the first VR glasses transmit the reflected light information and the first facial image to the second VR glasses for liveness detection and face comparison. Among them, the second VR glasses can be VR glasses with the same structure as the first VR glasses, or VR glasses with different structures.
[0078] In summary, in the embodiments of the present application, the first electronic device emits light to the target facial area of the target user through the target camera, receives the reflected light information reflected by the emitted light in the target facial area, and transmits the reflected light information to the second electronic device. Thus, the reflected light signal obtained by the second electronic device is the true reflected light signal of the target user's face. The second electronic device can directly perform liveness detection on the target user based on the reflected light signal to efficiently complete face recognition across different locations, solving the problem that face recognition cannot be performed when the user is in a different location. Moreover, different second facial images of different facial key point areas can be obtained through multiple target cameras and then synthesized into a complete first facial image, which can improve the accuracy of the first facial image and thus improve the accuracy of face recognition. Also, when the first facial image obtained by the first electronic device is missing, the target user is prompted to adjust the relative position between the first electronic device and the target facial area through a prompt message to ensure that the target camera of the first electronic device can capture the complete facial area of the target user, improving the accuracy of face recognition. The above solutions expand the camera application scenarios of VR glasses and multi-camera terminals and can provide a richer user experience for users.
[0079] In the facial recognition method provided by the embodiments of the present application, the execution subject can be a facial recognition device. In the embodiments of the present application, taking the facial recognition device executing the facial recognition method as an example, the facial recognition device provided by the embodiments of the present application is described.
[0080] As Figure 12 shown, the embodiments of the present application also provide a facial recognition device 1200, which is applied to the first electronic device and specifically includes:
[0081] A transmitting module 1201, configured to emit light to the target facial area of the target user through the target camera when receiving a facial recognition request, where the target camera is the camera for facial recognition among multiple cameras of the first electronic device;
[0082] A first transmission module 1202, configured to receive the reflected light information reflected by the light in the target facial area and transmit the reflected light information to the second electronic device, where the second electronic device is configured to perform liveness detection on the target user according to the reflected light information.
[0083] Optionally, the reflected light information includes: coordinates of multiple facial key points and the reflected light signal corresponding to each facial key point coordinate.
[0084] Optionally, when the transmitting module 1201 emits light to the target facial area of the target user through the target camera, it is specifically configured to:
[0085] When the number of the target cameras is multiple, light rays are emitted to different facial key point regions in the target facial region through different target cameras.
[0086] Optionally, the device further includes:
[0087] An acquisition module, configured to acquire a first facial image of the target facial region through the target camera when receiving a facial recognition request;
[0088] A second transmission module, configured to transmit the first facial image to the second electronic device, and the second electronic device is configured to perform face comparison on the target user according to the first facial image.
[0089] Optionally, when acquiring the first facial image of the target facial region through the target camera, the acquisition module is specifically configured to:
[0090] When the number of the target cameras is multiple, acquire second facial images of different facial key point regions in the target facial region through different target cameras;
[0091] Synthesize the second facial images of different facial key point regions in the target facial region to obtain the first facial image.
[0092] Optionally, the device further includes:
[0093] A processing module, configured to generate prompt information according to the first facial image and feedback it to the target user to prompt the target user to adjust the relative position between the first electronic device and the target facial region when the first facial image does not meet the face comparison requirement.
[0094] The facial recognition device in the embodiments of the present application can be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than terminals. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a handheld computer, an in-vehicle electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. It can also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations.
[0095] The facial recognition device in the embodiments of the present application can be a device with an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems. The embodiments of the present application do not make specific limitations.
[0096] The facial recognition device provided in the embodiments of the present application can implement Figures 1 to 11 each process implemented by the method embodiments. To avoid repetition, it will not be elaborated here.
[0097] Optionally, as Figure 13 shown, the embodiments of the present application further provide an electronic device 1300. This electronic device is a first electronic device and includes a processor 1301 and a memory 1302. A program or instruction that can run on the processor 1301 is stored on the memory 1302. When the program or instruction is executed by the processor 1301, it implements each step of the above-mentioned facial recognition method embodiments and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.
[0098] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0099] Figure 14 Schematic diagram of the hardware structure of an electronic device for implementing the embodiments of the present application.
[0100] The electronic device 1000 is a first electronic identification, including but not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010 and other components.
[0101] Those skilled in the art can understand that the electronic device 1000 may further include a power supply (such as a battery) for supplying power to each component. The power supply can be logically connected to the processor 1010 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. Figure 14 The structure of the electronic device shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0102] Wherein, the processor 1010 is configured to, when receiving a face recognition request, emit light to a target face area of a target user through a target camera, and the target camera is a camera for face recognition among multiple cameras of the first electronic device;
[0103] Receive reflected light information reflected by the light in the target face area, and transmit the reflected light information to a second electronic device, and the second electronic device is configured to perform a live detection on the target user according to the reflected light information.
[0104] Optionally, the reflected light information includes: coordinates of multiple face key points and reflected light signals corresponding to the coordinates of each face key point.
[0105] Optionally, when the processor 1010 emits light to a target face area of a target user through a target camera, it is specifically configured to:
[0106] When the number of the target cameras is multiple, emit light to different face key point areas in the target face area through different target cameras.
[0107] Optionally, the processor 1010 is further configured to:
[0108] When receiving a face recognition request, obtain a first face image of the target face area through the target camera;
[0109] Transmit the first face image to the second electronic device, and the second electronic device is configured to perform a face comparison on the target user according to the first face image.
[0110] Optionally, when the processor 1010 acquires the first facial image of the target facial area through the target camera, it is specifically configured to:
[0111] When the number of the target cameras is multiple, acquire second facial images of different facial key point areas in the target facial area through different target cameras;
[0112] Synthesize the second facial images of different facial key point areas in the target facial area to obtain the first facial image.
[0113] Optionally, the processor 1010 is further configured to:
[0114] When the first facial image does not meet the face comparison requirement, generate a prompt message according to the first facial image and feedback it to the target user to prompt the target user to adjust the relative position between the first electronic device and the target facial area.
[0115] It should be understood that in the embodiments of the present application, the input unit 1004 may include a Graphics Processing Unit (GPU) 10041 and a microphone 10042. The graphics processor 10041 processes the image data of static pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes at least one of a touch panel 10071 and other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. The other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be elaborated here.
[0116] The memory 1009 can be used to store software programs and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data. Among them, the first storage area may store an operating system, application programs or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both a volatile and a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synch link dynamic random access memory (SLDRAM), and a direct rambus random access memory (DRRAM). The memory 1009 in the embodiments of the present application includes, but is not limited to, these and any other suitable types of memories.
[0117] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor. Among them, the application processor mainly processes operations related to the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above modem processor may not be integrated into the processor 1010 either.
[0118] The embodiments of the present application also provide a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, it implements each process of the above embodiments of the face recognition method and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.
[0119] Among them, the processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media such as computer read-only memory ROM, random access memory RAM, magnetic disks, or optical discs.
[0120] Another embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is configured to run programs or instructions to implement each process of the above embodiment of the face recognition method, and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0121] It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, system chip, chip system, or system-on-chip.
[0122] The embodiments of the present application provide a computer program product. The program product is stored in a storage medium and is executed by at least one processor to implement each process of the above embodiment of the face recognition method, and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0123] It should be noted that in this article, the term "including", "comprising", or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or device including a series of elements includes not only those elements but also other elements not expressly listed, or further includes elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article, or device including such element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved. For example, the described method may be executed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0124] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence or the part that contributes to the prior art, can be embodied in the form of a computer software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0125] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific implementation manners. The above specific implementation manners are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them belong to the protection scope of the present application.
Claims
1. A facial recognition method, characterized in that: Applicable to a first electronic device, comprising: When a facial recognition request is received, emitting light to a target facial area of a target user through a target camera, wherein the target camera is a camera used for facial recognition among a plurality of cameras of the first electronic device; Reflected light information of the light reflected from the target facial area is received, and the reflected light information is transmitted to a second electronic device, where the second electronic device is used to perform liveness detection on the target user according to the reflected light information.
2. The method according to claim 1, characterized in that The reflected light information includes: coordinates of a plurality of facial key points and a reflected light signal corresponding to each facial key point coordinate.
3. The method according to claim 1, characterized in that The emitting light to the target facial area of the target user through the target camera includes: In the case that there are multiple target cameras, light is emitted to different facial key point areas in the target facial area through different target cameras.
4. The method according to claim 1, characterized in that: The method further comprises: Upon receiving a facial recognition request, acquiring a first facial image of the target facial area through the target camera; The first facial image is transmitted to the second electronic device, and the second electronic device is used to perform a face comparison on the target user based on the first facial image.
5. The method according to claim 4, characterized in that The step of acquiring a first facial image of the target facial area through the target camera includes: In the case where there are multiple target cameras, obtaining second facial images of different facial key point areas in the target facial area through different target cameras; The second facial images of different facial key point areas in the target facial area are synthesized to obtain the first facial image.
6. The method according to claim 4, characterized in that The method further comprises: In the case that the first facial image does not meet the face comparison requirement, prompt information is generated according to the first facial image and fed back to the target user to prompt the target user to adjust the relative position of the first electronic device and the target facial area.
7. A facial recognition device, characterized in that: Applicable to a first electronic device, comprising: a transmitting module, configured to transmit light to a target facial area of a target user through a target camera when a facial recognition request is received, wherein the target camera is a camera used for facial recognition among a plurality of cameras of the first electronic device; The first transmission module is used to receive the reflected light information of the light reflected from the target facial area, and transmit the reflected light information to the second electronic device, and the second electronic device is used to perform liveness detection on the target user according to the reflected light information.
8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the facial recognition method according to any one of claims 1 to 6 are implemented.
9. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the facial recognition method according to any one of claims 1 to 6 are implemented.
10. A chip, characterized in that: The chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the facial recognition method according to any one of claims 1-6.