Identity recognition method and electronic device
By using ultrasonic signals and echo signals in electronic devices combined with biometric information, the problem of difficulty in continuously identifying electronic devices in complex environments is solved, and the convenience and security of users are improved.
Patent Information
- Application Number
- CN202510018818.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-01-07
AI Technical Summary
In complex environments, it is difficult for electronic devices to continuously realize identity recognition functions, which affects the user's convenience of use.
By applying an identity recognition method in an electronic device, the ultrasonic signal and the echo signal are used to identify the identity in a scenario where the biometric information cannot be obtained, and the identity verification is performed when it is available.
It realizes continuous identity recognition in a variety of complex scenarios, improving the convenience and security of users' use of electronic devices.
Smart Images

Figure CN119442203B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and more particularly, to an identity recognition method and an electronic device. Background Art
[0002] In the process of using an electronic device, on the basis of improved usability, the need to better protect personal privacy has gradually emerged. To meet the needs of users, some electronic devices provide a continuous identity recognition function.
[0003] The continuous identity recognition function may refer to the electronic device periodically collecting the user's facial information according to a preset period and determining whether the user has the permission to use the electronic device based on the facial information. If the user has the permission to use the electronic device, the information that can be viewed within the permission is displayed to the user. If the user does not have the permission to use the electronic device, the relevant information is not displayed to the user. However, in the process of using the electronic device by the user, there may be a situation where the user's facial information cannot be collected due to environmental changes. In this case, the electronic device cannot implement the continuous identity recognition function, affecting the usability of the electronic device by the user.
[0004] Based on this, how to implement the continuous identity recognition function in a complex environment to improve the usability of the electronic device by the user has become an urgent problem to be solved. Summary of the Invention
[0005] The present application provides an identity recognition method, which can implement the continuous identity recognition function in a complex environment, thereby improving the usability of the electronic device by the user.
[0006] In a first aspect, an identity recognition method is provided. The method is applied to an electronic device and includes:
[0007] In a first scenario, obtaining first biometric information for continuous identity recognition to obtain a first recognition result;
[0008] If the electronic device switches from the first scenario to the second scenario, sending an ultrasonic signal and obtaining an echo signal corresponding to the ultrasonic signal, where the second scenario includes a scenario where biometric information cannot be obtained;
[0009] Determining a second recognition result based on the echo signal and the first recognition result.
[0010] Wherein, the first biometric information includes the facial image of the first user, the eye pattern image, etc., which are feature information that can identify the user's body. The embodiments of the present application do not limit this. The first user may refer to the user who is using the electronic device. For example, the first user is the user who is holding the electronic device upright.
[0011] The result of the first device may refer to the result of the electronic device performing identity recognition. For example, the first recognition result may indicate that the user holding the electronic device has the permission to use the electronic device, or the first recognition result may indicate that the user holding the electronic device does not have the permission to use the electronic device.
[0012] The first scenario may refer to a scenario where user biometric information (i.e., the first biometric information) can be collected, and the second scenario may refer to a scenario where user biometric information cannot be collected.
[0013] The identity recognition method provided by the embodiments of the present application is applied to an electronic device. In the first scenario, the first biometric information is obtained for continuous identity recognition to obtain a first recognition result. When the electronic device switches from the first scenario to the second scenario, an ultrasonic signal is emitted, and an echo signal corresponding to the ultrasonic signal is obtained. Then, a second recognition result is determined based on the echo signal and the first recognition result. Here, the second scenario includes a scenario where biometric information cannot be obtained. In this way, it is equivalent to that in the scenario where biometric information cannot be obtained, the electronic device can emit an ultrasonic signal and, based on the echo signal corresponding to the ultrasonic signal and the first recognition result determined in the scenario where biometric information can be obtained, continuously recognize the identity information of the user, that is, the second recognition result, so that the electronic device can perform continuous identity recognition in a variety of complex scenarios, improving the convenience of using the electronic device.
[0014] In combination with the first aspect, in some embodiments of the first aspect, determining the second recognition result based on the echo signal and the first recognition result includes: determining whether the first user in the first scenario is away from the electronic device based on the echo signal; if the first user is not away from the electronic device, determining the second recognition result based on the first recognition result.
[0015] It can be understood that if the first user is not away from the electronic device, it means that the user using the electronic device has not changed. Therefore, the electronic device can maintain the first recognition result in the first scenario as the second recognition result in the second scenario.
[0016] In some possible cases, the first user is not away from the electronic device, but other users approach the electronic device. In this case, the electronic device continues to determine whether other users are approaching the electronic device. If no other users are approaching the electronic device, the electronic device can maintain the first recognition result in the first scenario as the second recognition result in the second scenario; if other users are approaching the electronic device, since biometric information of other users cannot be collected in the second scenario, identity recognition is performed on other users approaching the electronic device. Therefore, the electronic device can prevent users from using the electronic device when other users approach the electronic device, improving the security of using the electronic device.
[0017] In combination with the first aspect, in some embodiments of the first aspect, if the first user does not move away from the electronic device, determining the second recognition result based on the first recognition result includes: if the first user does not move away from the electronic device, determining whether a third user approaches the electronic device based on the echo signal; if there is no third user approaching the electronic device, using the first recognition result as the second recognition result.
[0018] For the identity recognition method provided by the embodiments of the present application, when it is determined in the second scenario that the first user does not move away from the electronic device and there is no third user approaching the electronic device, the first recognition result in the first scenario is maintained as the second recognition result in the second scenario, enabling the electronic device to perform continuous identity recognition in various complex scenarios and improving the convenience of using the electronic device.
[0019] In combination with the first aspect, in some embodiments of the first aspect, if there is a third user approaching the electronic device, when the second scenario switches to the first scenario, obtain the second biometric information; determine the third recognition result based on the second biometric information.
[0020] For the identity recognition method provided by the embodiments of the present application, when it is determined in the second scenario that there is a third user approaching the electronic device, when the second scenario switches to the first scenario, re-obtain the second biometric information, and then determine the third recognition result based on the second biometric information. In this way, in the second scenario where the user's biometric information cannot be collected, if there is a third user approaching the electronic device, only after re-obtaining the second biometric information of the third user will it be determined whether to allow the third user to use the electronic device based on the second biometric information, improving the security of using the electronic device.
[0021] In combination with the first aspect, in some embodiments of the first aspect, if the first user moves away from the electronic device, when the second scenario switches to the first scenario, obtain the second biometric information; determine the third recognition result based on the second biometric information.
[0022] It can be understood that in the second scenario, if the first user moves away from the electronic device, it means that the user using the electronic device has changed. In this case, the electronic device can re-obtain the second biometric information when the second scenario switches to the first scenario, and then determine the third recognition result based on the second biometric information. In this way, in the second scenario where the user's biometric information cannot be collected, if the first user moves away from the electronic device, that is, when the user using the electronic device changes, only after re-obtaining the second biometric information will it be determined whether to allow the user to continue using the electronic device based on the second biometric information, improving the security of using the electronic device.
[0023] It should be understood that the electronic device can also obtain the second biometric information when switching from the second scenario to the third scenario. Herein, the third scenario can refer to a scenario that is different from the first scenario but can normally obtain the user's biometric information.
[0024] Combined with the first aspect, in some embodiments of the first aspect, the above-mentioned determination of the second recognition result based on the echo signal and the first recognition result includes: inputting the echo signal and the first recognition result into an identity recognition model to obtain the second recognition result, and the identity recognition model is a neural network model.
[0025] The identity recognition method provided by the embodiments of the present application can input the echo signal and the first recognition result into an identity recognition model to obtain the second recognition result. Among them, the identity recognition model is a neural network model, which is equivalent to directly obtaining the second recognition result through the neural network model, improving the convenience of obtaining the second recognition result.
[0026] Combined with the first aspect, in some embodiments of the first aspect, the above-mentioned determination of whether the first user in the first scenario is far away from the electronic device based on the echo signal includes: processing the echo signal using an ultrasonic ranging algorithm to determine whether the first user in the first scenario is far away from the electronic device.
[0027] Among them, the ultrasonic ranging algorithm usually calculates the distance to the obstacle according to the time difference between the ultrasonic signal and the echo signal.
[0028] The identity recognition method provided by the embodiments of the present application can process the echo signal using an ultrasonic ranging algorithm to determine whether the first user in the first scenario is far away from the electronic device. Since the ultrasonic ranging algorithm simply determines the distance information between the electronic device and the first user according to the time difference between the echo signal and the ultrasonic signal, it can improve the convenience of obtaining the distance information between the electronic device and the first user, and further improve the convenience of determining whether the first user is far away from the electronic device based on the distance change between the electronic device and the first user.
[0029] Combined with the first aspect, in some embodiments of the first aspect, the above-mentioned determination of whether a third user approaches the electronic device based on the echo signal includes: inputting the echo signal into a multi-person scenario recognition model, and outputting whether a third user approaches the electronic device, and the multi-person scenario recognition model is a neural network model.
[0030] The identity recognition method provided by the embodiments of the present application can input the echo signal into a multi-person scenario recognition model, and output whether a third user approaches the electronic device through the multi-person scenario recognition model. Among them, the multi-person scenario recognition model is a neural network model, which is equivalent to directly determining whether a third user approaches the electronic device through the neural network model, improving the convenience of determining whether a third user approaches the electronic device.
[0031] In combination with the first aspect, in certain embodiments of the first aspect, the first biometric information is a facial image.
[0032] In combination with the first aspect, in certain embodiments of the first aspect, the second scenario is a scenario where the light intensity is less than a preset light intensity threshold.
[0033] Exemplarily, the second scenario may be, for example, Figure 3 the scenario at time T3 in
[0034] In combination with the first aspect, in certain embodiments of the first aspect, the second scenario is a scenario where the user's face is not within the acquisition range of the camera device of the electronic device.
[0035] Exemplarily, the second scenario may be, for example, Figure 2 the scenario at time T1 in
[0036] In combination with the first aspect, in certain embodiments of the first aspect, the electronic device does not have an infrared camera device.
[0037] In the embodiments of the present application, the electronic device does not have an infrared camera device. Therefore, when the electronic device is in a scenario where the light intensity is less than the light intensity threshold, it is unable to collect the user's facial image, and thus unable to confirm the user's identity information through the facial image. In this case, the electronic device can emit an ultrasonic signal and receive an echo signal corresponding to the ultrasonic signal, and then determine a second recognition result in the scenario where the light intensity is less than the light intensity threshold based on the echo signal and the first recognition result in the first scenario, improving the adaptability of the electronic device without an infrared camera device for continuous identity recognition.
[0038] In combination with the first aspect, in certain embodiments of the first aspect, the speaker of the electronic device emits an ultrasonic signal, and the microphone of the electronic device receives an echo signal corresponding to the ultrasonic signal.
[0039] The identity recognition method provided by the embodiments of the present application can emit an ultrasonic signal through the speaker in the electronic device and receive an echo signal corresponding to the ultrasonic signal through the microphone in the electronic device, so that the electronic device can determine the second recognition result in the second scenario through the echo signal of the ultrasonic signal without additionally adding a transmitting device and a receiving device for the ultrasonic signal, effectively reducing the cost of the electronic device.
[0040] In a second aspect, an identity recognition device is provided, including a unit for executing any one of the methods in the first aspect. The device may be a server, or a terminal device, or a chip in the terminal device. The device may include an input unit and a processing unit.
[0041] When the device is a terminal device, the processing unit may be a processor, and the input unit may be a communication interface; the terminal device may further include a memory, which is used to store computer program code. When the processor executes the computer program code stored in the memory, the terminal device is caused to execute any one of the methods in the first aspect.
[0042] When the device is a chip within a terminal device, the processing unit may be a processing unit inside the chip, and the input unit may be an output interface, a pin, a circuit, etc.; the chip may further include a memory, which may be a memory within the chip (for example, a register, a cache, etc.), or may be a memory located outside the chip (for example, a read-only memory, a random access memory, etc.); the memory is used to store computer program code. When the processor executes the computer program code stored in the memory, the chip is caused to execute any one of the methods in the first aspect.
[0043] In a possible implementation, the memory is used to store computer program code; a processor, which executes the computer program code stored in the memory. When the computer program code stored in the memory is executed, the processor is used to execute: in a first scenario, obtain first biometric information for continuous identity recognition to obtain a first recognition result; if the electronic device switches from the first scenario to a second scenario, emit an ultrasonic signal and obtain an echo signal corresponding to the ultrasonic signal, where the second scenario includes a scenario where biometric information cannot be obtained; determine a second recognition result based on the echo signal and the first recognition result.
[0044] In a third aspect, there is provided a computer-readable storage medium storing computer program code, which, when run by an identity recognition device, causes the identity recognition device to execute any one of the identity recognition methods in the first aspect.
[0045] In a fourth aspect, there is provided a computer program product, which includes: computer program code, which, when run by an identity recognition device, causes the identity recognition device to execute any one of the identity recognition methods in the first aspect.
[0046] The identity recognition method provided by the embodiment of the present application is applied to an electronic device. In the first scenario, the first biometric information is obtained for continuous identity recognition to obtain a first recognition result. When the electronic device switches from the first scenario to the second scenario, an ultrasonic signal is emitted, and the echo signal corresponding to the ultrasonic signal is obtained. Then, based on the echo signal and the first recognition result, a second recognition result is determined. Among them, the second scenario includes a scenario where biometric information cannot be obtained. In this way, it is equivalent to that in the scenario where biometric information cannot be obtained, the electronic device can emit an ultrasonic signal, and based on the echo signal corresponding to the ultrasonic signal and the first recognition result determined in the scenario where biometric information can be obtained, continuously recognize the user's identity information, that is, the second recognition result, so that the electronic device can perform continuous identity recognition in a variety of complex scenarios, improving the convenience of using the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 is a schematic diagram of a display interface for continuous identity recognition of an electronic device;
[0048] Figure 2 is a schematic diagram of an electronic device switching from the first scenario to the second scenario;
[0049] Figure 3 is a schematic diagram of an electronic device switching from the first scenario to the second scenario;
[0050] Figure 4 is a schematic diagram of an electronic device switching from the first scenario to the second scenario;
[0051] Figure 5 is a schematic diagram of a hardware system of an electronic device applicable to the present application;
[0052] Figure 6 is a flowchart of the identity recognition method provided by the embodiment of the present application;
[0053] Figure 7 is a schematic diagram of a microphone and a speaker in an electronic device provided by the embodiment of the present application;
[0054] Figure 8 is a schematic diagram of a detection range formed by an ultrasonic signal and an echo signal provided by the embodiment of the present application;
[0055] Figure 9 is a flowchart of the identity recognition method provided by the embodiment of the present application;
[0056] Figure 10 is a schematic diagram of processing an echo signal provided by the embodiment of the present application;
[0057] Figure 11It is a schematic diagram showing the processing of echo signals through a neural network model provided by an embodiment of the present application;
[0058] Figure 12 It is a schematic diagram showing the preprocessing of echo signals provided by an embodiment of the present application;
[0059] Figure 13 It is a schematic diagram of an identity recognition device provided by the present application;
[0060] Figure 14 It is a schematic diagram of an electronic device for identity recognition provided by the present application. Detailed implementation manners
[0061] Next, the technical solutions in the embodiments of the present application will be described in conjunction with the accompanying drawings in the embodiments of the present application. Among them, in the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B may represent A or B; herein, "and / or" is merely a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.
[0062] Hereinafter, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first", "second", and "third" may explicitly or implicitly include one or more of such features.
[0063] During the process of using an electronic device by a user, on the basis of improved usability, there is also a need to better protect personal privacy. To meet the user's needs, some electronic devices provide a continuous identity recognition function.
[0064] The continuous identity recognition function may refer to that the electronic device periodically collects the user's facial information according to a preset period and determines whether the user has the permission to use the electronic device based on the facial information. If the user has the permission to use the electronic device, the information that can be viewed within the permission is displayed to the user. If the user does not have the permission to use the electronic device, the relevant information is not displayed to the user.
[0065] Exemplarily, if the mobile phone determines that the user has the permission to use the mobile phone, all the information of the message is displayed in the notification bar. For example, as Figure 1 shown in (a) in the figure, the notification bar 1011 displays "Headhunter A" and "How about the last position you considered?". If the mobile phone determines that the user does not have the permission to use the mobile phone, only a prompt message is displayed in the notification bar. For example, as Figure 1As shown in (b) of [reference], the notification bar 1012 displays "Message" and "A Notification".
[0066] However, during the process of using an electronic device by a user, there may be a situation where the user's facial information cannot be collected due to environmental changes.
[0067] For example, as Figure 2 shown, at time T0, the user holds the mobile phone, and the front camera of the mobile phone can periodically collect the user's facial information so that the mobile phone can determine whether the user has the permission to use the mobile phone based on the facial information. If at time T1, the user places the mobile phone flat on the desktop, the user's face is not within the field of view (FOV) of the front camera of the mobile phone. Therefore, the mobile phone cannot collect the user's facial information, and thus the function of continuous identity recognition cannot be achieved.
[0068] Another example, as Figure 3 shown, at time T2, the user holds the mobile phone in a bright environment, and the front camera of the mobile phone periodically collects the user's facial information so that the mobile phone can determine whether the user has the permission to use the mobile phone based on the facial information. If at time T3, the user holds the mobile phone and enters a dark environment, when the front camera on the mobile phone is not an infrared camera, the front camera of the mobile phone cannot collect the user's facial information in the dark environment, and thus the function of continuous identity recognition cannot be achieved.
[0069] Another example, as Figure 4 shown, at time T4, when the user is taking a moving vehicle, the front camera of the mobile phone periodically collects the user's facial information so that the mobile phone can determine whether the user has the permission to use the mobile phone based on the facial information. If at time T5, the vehicle starts to jolt, causing the facial information collected by the mobile phone to become blurred, the mobile phone cannot identify the user's identity based on the blurred facial information, and thus the function of continuous identity recognition cannot be achieved. Among them, the above-mentioned vehicles include, but are not limited to, cars, ships, trains, airplanes, and electric bicycles.
[0070] In view of this, an embodiment of the present application provides an identity recognition method, which is applied to an electronic device. In a first scenario, first biometric information is obtained for continuous identity recognition to obtain a first recognition result. When the electronic device switches from the first scenario to a second scenario, an ultrasonic signal is emitted, and an echo signal corresponding to the ultrasonic signal is obtained. Then, a second recognition result is determined based on the echo signal and the first recognition result. Among them, the second scenario includes a scenario where biometric information cannot be obtained. In this way, it is equivalent to that in a scenario where biometric information cannot be obtained, the electronic device can emit an ultrasonic signal, and based on the echo signal corresponding to the ultrasonic signal and the first recognition result determined in a scenario where biometric information can be obtained, continuously recognize the user's identity information, that is, the second recognition result, so that the electronic device can perform continuous identity recognition in a variety of complex scenarios, improving the convenience of using the electronic device.
[0071] The identity recognition method provided by the embodiment of the present application can be applied to an electronic device. Optionally, the electronic device includes a terminal device, and the terminal device can also be referred to as a terminal, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), etc. The terminal device can be a mobile phone, a smart TV, a wearable device, a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, and so on. The embodiments of the present application do not limit the specific technologies and specific device forms adopted by the terminal device.
[0072] Exemplarily, Figure 5A schematic structural diagram of the electronic device 100 is shown. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0073] It can be understood that the structure schematically shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0074] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0075] Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.
[0076] A memory can also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can hold the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from the said memory. This avoids repeated accesses and reduces the waiting time of the processor 110, thus improving the efficiency of the system.
[0077] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0078] It can be understood that the interface connection relationships among the modules illustrated in the embodiments of the present application are only illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods or a combination of multiple interface connection methods in the above embodiments.
[0079] The wireless communication function of the electronic device 100 can be implemented through antenna 1, antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc.
[0080] The electronic device 100 can implement the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc.
[0081] The camera 193 is used to capture static images or videos. An object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in standard formats such as RGB and YUV. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0082] It can be understood that the camera 193 of the electronic device 100 may include a front camera, and the user's facial information is collected through the front camera. In the embodiments of the present application, the camera 193 of the electronic device 100 may not be an infrared camera.
[0083] The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor, etc. For example, music playback, recording, etc.
[0084] The audio module 170 is used to convert the digital audio information into an analog audio signal for output, and is also used to convert the analog audio input into a digital audio signal. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
[0085] The speaker 170A, also known as the "loudspeaker", is used to convert the audio electrical signal into a sound signal. The electronic device 100 can listen to music or hands-free calls through the speaker 170A.
[0086] The receiver 170B, also known as the "earpiece", is used to convert the audio electrical signal into a sound signal. When the electronic device 100 answers a call or a voice message, the voice can be listened to by placing the receiver 170B close to the ear.
[0087] The microphone 170C, also known as a "microphone" or "transmitter", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak close to the microphone 170C with their mouth to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In some other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also implement a noise reduction function. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, and implement functions such as directional recording.
[0088] It can be understood that the sound wave frequencies audible to the human ear are from 20 Hz to 20 kHz. Sound waves exceeding this upper frequency limit are called ultrasonic waves and cannot be perceived by the human ear. In addition to emitting sound waves in the range of 20 Hz to 20 kHz that can be perceived by humans, the speaker 170A of the electronic device 100 usually also has the ability to emit ultrasonic waves in the range of 20 kHz - 24 kHz. Therefore, the speaker 170A can also be used as an ultrasonic transmitter.
[0089] In addition, the sampling frequency of the microphone 170C of the electronic device 100 can usually cover all the frequency bands emitted by the above-mentioned speaker 170A, such as the sound waves in the range of 20 kHz - 24 kHz. Therefore, the microphone 170C can also receive the ultrasonic waves emitted by the speaker 170A and act as a receiver for ultrasonic waves. Thus, the electronic device 100 can implement ultrasonic wave transmission and reception through the speaker 170A and the microphone 170C, and further enable the electronic device 100 to use ultrasonic waves for ranging or positioning.
[0090] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., the x-axis, y-axis, and z-axis) can be determined through the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake during shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of jitter of the electronic device 100, calculates the distance that the lens module needs to compensate based on the angle, and makes the lens offset the jitter of the electronic device 100 through reverse movement to achieve anti-shake. In some possible cases, the electronic device 100 can also determine that the electronic device 100 is in a bumpy state based on the data collected by the gyroscope sensor 180B. For example, as Figure 4 shown.
[0091] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of the electronic device and is applied to functions such as horizontal and vertical screen switching and pedometers. For example, the electronic device 100 can determine whether the electronic device 100 has changed from a held state to a placed state based on the data collected by the acceleration sensor 180E, as Figure 2 shown.
[0092] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance through infrared or laser. In some embodiments, in the shooting scene, the electronic device 100 can use the distance sensor 180F to measure distance to achieve rapid focusing. In some possible situations, the electronic device 100 can also determine whether there is a person approaching or moving away from the electronic device 100 through the distance sensor 180F.
[0093] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the sensed ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance during photography. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket to prevent accidental touch. In some possible situations, the electronic device 100 can determine whether the electronic device 100 has entered a dim environment from a bright environment based on the data collected by the ambient light sensor 180L, as Figure 3 shown.
[0094] It should be noted that any electronic device mentioned in the embodiments of this application may include more or fewer modules in the electronic device 100.
[0095] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture.
[0096] Next, the application scenarios provided by the embodiments of this application will be described with reference to the accompanying drawings.
[0097] The identity recognition method provided by the embodiments of this application can be applied in a scenario of continuous identity recognition through a camera. And during the process of continuous identity recognition through the camera, the environment of the electronic device changes, making the electronic device unable to continue continuous identity recognition through the camera. Here, the electronic device is taken as a mobile phone for illustration. For example, the identity recognition method provided by the embodiments of this application can be applied in Figures 2 to 4 the application scenario shown.
[0098] Application scenario one.
[0099] AsFigure 2 As shown, at time T0, the user holds the mobile phone, and the camera in the mobile phone (such as the front camera) can periodically collect the user's facial information, so that the mobile phone can determine whether the user has the permission to use the mobile phone based on the collected facial information and continuously perform identity authentication until time T1. If at time T1, the user places the mobile phone flat on the desktop and the user's face is not within the field of view (FOV) of the front camera of the mobile phone, therefore, the mobile phone cannot collect the user's facial information, and thus cannot continuously identify the user's identity by collecting the user's facial information. In this case, the mobile phone can send an ultrasonic signal through the speaker and receive the echo signal reflected back by the obstacle from the ultrasonic signal through the microphone, and then determine whether the user is far away from the mobile phone based on the echo signal. If the user has not moved away from the mobile phone, it is determined that the user still has the permission to use the mobile phone; if the user moves away from the mobile phone, the display of the privacy information in the mobile phone is stopped.
[0100] Application scenario two.
[0101] As Figure 3 shown, at time T2, the user holds the mobile phone in a bright environment, and the camera in the mobile phone periodically collects the user's facial information, so that the mobile phone can determine whether the user holding the mobile phone has the permission to use the mobile phone based on the facial information collected by the camera. If at time T3, the user holds the mobile phone and enters a dark environment, and the camera on the mobile phone is not an infrared camera, the camera of the mobile phone cannot collect the user's facial information in the dark environment, and thus cannot implement the function of continuous identity recognition. In this case, the mobile phone can also send an ultrasonic signal through the speaker and receive the echo signal reflected back by the obstacle from the ultrasonic signal through the microphone, and then determine whether the user is far away from the mobile phone based on the echo signal. If the user has not moved away from the mobile phone, it is determined that the user still has the permission to use the mobile phone; if the user moves away from the mobile phone, the display of the privacy information in the mobile phone is stopped.
[0102] Application scenario three.
[0103] As Figure 4As shown, at time T4, when the user is riding in a moving vehicle, the camera in the mobile phone periodically collects the user's facial information, so that the mobile phone determines whether the user has the permission to use the mobile phone based on the collected facial information. If at time T5, the vehicle starts to jolt, causing the facial information collected by the mobile phone to become blurred, the mobile phone cannot identify the user's identity based on the blurred facial information, and thus cannot implement the function of continuous identity recognition. Among them, the above-mentioned vehicles include but are not limited to cars, ships, trains, airplanes, and electric bicycles. In this case, the mobile phone can also send ultrasonic signals through the speaker and receive the echo signals reflected back by the obstacles through the microphone, and then determine whether the user is away from the mobile phone based on the echo signals. If the user has not moved away from the mobile phone, it is determined that the user still has the permission to use the mobile phone; if the user moves away from the mobile phone, the privacy information in the mobile phone is stopped from being displayed.
[0104] It should be understood that the above is an example illustration of the application scenario and does not limit the application scenario of the present application in any way.
[0105] The following combines Figures 6 to 12 to describe in detail the identity recognition method provided by the embodiments of the present application.
[0106] Figure 6 is a schematic flowchart of an identity recognition method provided by an embodiment of the present application. As Figure 6 shown, the method includes:
[0107] S101. In the first scenario, obtain biometric information for continuous identity recognition to obtain a first recognition result.
[0108] Among them, the biometric information may refer to the facial image, eye pattern image, etc. of the first user, which can identify the characteristics of the user's body, and the embodiments of the present application do not limit this. The first user may refer to the user who is using the electronic device. For example, the first user is the user who is holding the electronic device.
[0109] Exemplarily, the electronic device can collect the facial information of the first user holding the electronic device through the front camera, and perform image recognition on the collected facial information to determine whether the facial information of the first user is the facial information of the user with the permission to use pre-stored in the electronic device. If the facial information of the first user matches the facial information of the user with the permission to use pre-stored in the electronic device, the electronic device determines that the first user has the permission to use the electronic device. If the facial information of the first user does not match the facial information of the user with the permission to use pre-stored in the electronic device, the electronic device determines that the first user does not have the permission to use the electronic device.
[0110] Among them, the permissions to use the electronic device include, but are not limited to, viewing information in the electronic device, modifying the configuration of the electronic device, sending information through the electronic device, and receiving information through the electronic device.
[0111] The continuous authentication of biometric information by the electronic device may refer to the electronic device periodically obtaining the biometric information of the first user according to a preset period, and periodically verifying whether the biometric information of the first user matches the user with usage permissions pre-stored in the electronic device.
[0112] If the biometric information of the first user matches the biometric information of the user with usage permissions each time, the electronic device continuously allows the first user to use the electronic device. When the obtained biometric information of the first user does not match the biometric information of the user with usage permissions, the electronic device does not allow the first user to use the electronic device.
[0113] If the biometric information collected last time matches the biometric information of the user with usage permissions, but the biometric information collected at the current moment does not match the biometric information of the user with usage permissions, it indicates that the first user has changed from a user with the permission to use the electronic device to a user without the permission to use the electronic device.
[0114] For example, Xiao Wang has the permission to use the electronic device. The biometric information of the first user collected by the electronic device before the first moment all matches Xiao Wang's biometric information. Therefore, the electronic device allows the first user to use the electronic device before the first moment. Xiao Wang hands over the electronic device to someone else, such as Xiao Li, at the first moment. Then the biometric information collected by the electronic device at the first moment does not match Xiao Wang's biometric information. Therefore, the electronic device does not allow the first user to use the electronic device starting from the first moment.
[0115] The first recognition result may indicate the result of the electronic device performing identity recognition at the first moment. For example, the first recognition result may mean that at the first moment, the user holding the electronic device has the permission to use the electronic device, or the first recognition result may mean that at the first moment, the user holding the electronic device does not have the permission to use the electronic device.
[0116] The first scenario may refer to a scenario where biometric information can be obtained. For example, the first scenario may refer to a scenario with bright light. The first scenario may also refer to a scenario where the user holds the electronic device and the user's face is within the coverage of the electronic device for collecting biometric information. The first scenario may also refer to a stable and non-bumpy environment that enables the electronic device to collect clear biometric information. The embodiments of the present application do not limit this.
[0117] S102. If the electronic device switches from the first scenario to the second scenario, it emits an ultrasonic signal and acquires the echo signal corresponding to the ultrasonic signal.
[0118] Among them, the second scenario may refer to a scenario where biometric information cannot be normally collected.
[0119] For example, the second scenario may refer to a scenario where the acquisition range of the electronic device for collecting biometric information cannot cover the user. Exemplarily, when the electronic device acquires the user's facial image through a camera, the second scenario may refer to a scenario where the user's face is not within the shooting range of the camera.
[0120] For example, the second scenario may refer to a scenario with low light intensity. In the second scenario, due to the low light intensity, the electronic device cannot normally acquire the user's facial image.
[0121] For example, the second scenario may refer to a scenario where the biometric information collected by the electronic device is inaccurate due to the electronic device being jolted. Exemplarily, the second scenario may refer to a scenario where in a jolting vehicle, the electronic device cannot acquire a clear facial image in the jolting vehicle, so identity recognition cannot be performed through the acquired facial image.
[0122] The electronic device switching from the first scenario to the second scenario may mean that when the user holds the electronic device to acquire the user's facial image, the user places the electronic device flat on the table, and the camera of the electronic device can no longer acquire the user's facial image, as Figure 2 shown.
[0123] The electronic device switching from the first scenario to the second scenario may also mean that the user carries the electronic device from a bright environment into a dim environment, and the electronic device cannot acquire the user's biometric information, such as a facial image, in the dim environment. Therefore, the electronic device can no longer perform identity recognition through biometric information, as Figure 3 shown.
[0124] The electronic device switching from the first scenario to the second scenario may also mean that a smoothly moving vehicle travels to a bumpy section, resulting in the vehicle jolting, and further causing the electronic device on the vehicle to be unable to acquire a clear facial image of the user, as Figure 4 shown.
[0125] When the electronic device switches from the first scenario to the second scenario, the electronic device can emit an ultrasonic signal through the speaker and receive the echo signal obtained by the reflection of the above ultrasonic signal by an obstacle through the microphone.
[0126] Among them, there may be only one microphone and one speaker in the electronic device, or there may be multiple microphones and multiple speakers. The embodiments of the present application do not limit this. In some possible cases, the electronic device may also include one microphone and multiple speakers; in some possible cases, the electronic device may include multiple microphones and one speaker.
[0127] Exemplarily, as Figure 7 shown, the electronic device may include two microphones and two speakers. Among them, the two microphones are microphone 11 and microphone 12 respectively, and the two speakers are speaker 21 and speaker 22 respectively. Microphone 11 and speaker 21 are arranged at the top of the electronic device, as Figure 7 shown. Microphone 12 and speaker 22 are arranged at the bottom of the electronic device, as Figure 7 shown.
[0128] It can be understood that ultrasonic signals usually have directivity. When there is only one set of ultrasonic paths composed of a speaker and a microphone in the electronic device, the range within which the user's position can be detected is limited; when the electronic device includes multiple sets of ultrasonic paths composed of a speaker and a microphone, the formed ultrasonic paths are also richer, so the range within which the electronic device can detect the user's position will be larger.
[0129] Exemplarily, as Figure 8 shown, there are two microphones and one speaker on the mobile phone. The two microphones are microphone 13 and microphone 14 respectively, and one speaker can be called speaker 23. Among them, speaker 23 and microphone 13 can be arranged at the bottom of the mobile phone, as Figure 8 shown; microphone 14 can be arranged at the top of the mobile phone, as Figure 8 shown. The ultrasonic path formed between speaker 23 and microphone 13 can detect the position information of the user within the first range. Among them, the first range can be as Figure 8 shown; the ultrasonic path formed between speaker 23 and microphone 14 can detect whether the user is far away from the mobile phone within the second range. The second range is as Figure 8 shown. That is to say, the range within which the electronic device can detect the user is the larger range interval composed of the first range and the second range.
[0130] It should be noted that the ultrasonic signal is reflected by the obstacles within the range corresponding to the ultrasonic path formed by the speaker and the microphone, and the formed echo signal is relatively large. The electronic device can directly process these echo signals to determine the position information of the obstacles.
[0131] In some possible cases, the ultrasonic signal is reflected by an obstacle outside the range formed by the ultrasonic path formed by the speaker and the microphone. The resulting echo signal is usually small, and the electronic device generally cannot directly process these echo signals to determine the position information of the obstacle. However, the electronic device can process these echo signals to increase the difference between the echo signal formed by the obstacle and the noise signal in the echo signal, so that the electronic device can process the echo signal to determine the position information of the obstacle. For example, the electronic device can input the weaker echo signal into a neural network model, and process the echo signal through the neural network model to determine the position information of the obstacle.
[0132] S103. Determine a second recognition result based on the echo signal and the first recognition result.
[0133] As can be seen from the description in S102, the electronic device can determine the position information of the obstacle within the ultrasonic path formed by the speaker and the microphone based on the echo signal. Based on this, the electronic device can further determine whether the obstacle is the user using the electronic device in the first scenario according to the position information of the obstacle. Then, based on whether the obstacle is the user using the electronic device in the first scenario and the first recognition result, determine the second recognition result.
[0134] The second recognition result can indicate the result of the electronic device performing identity recognition after switching from the first scenario to the second scenario. For example, the second recognition result can mean that after switching from the first scenario to the second scenario, the user has the permission to use the electronic device, or the second recognition result can mean that after switching from the first scenario to the second scenario, the user does not have the permission to use the electronic device.
[0135] For the convenience of description, the user using the electronic device in the first scenario can be called the first user, and the user in the second scenario can be called the second user.
[0136] For example, the electronic device can determine, based on the echo signal, whether the second user is farther away from the electronic device than the first user. If the second user is not farther away from the electronic device, then the second user is the first user, and the second recognition result is the same as the first recognition result. If the second user is farther away from the electronic device than the first user, then the second user is not the first user, and identity recognition needs to be performed again through biometric information.
[0137] For another example, the electronic device can determine, based on the echo signal, whether the number of second users is greater than the number of first users, so as to determine whether there are other people approaching the electronic device. For example, if the number of second users is greater than the number of first users, it is determined that there are other users approaching the electronic device, and identity recognition needs to be performed again through biometric information.
[0138] The identity recognition method provided by the embodiment of the present application is applied to an electronic device. In the first scenario, the first biometric information is obtained for continuous identity recognition to obtain a first recognition result. When the electronic device switches from the first scenario to the second scenario, an ultrasonic signal is emitted, and the echo signal corresponding to the ultrasonic signal is obtained. Then, based on the echo signal and the first recognition result, a second recognition result is determined. Among them, the second scenario includes a scenario where biometric information cannot be obtained. In this way, it is equivalent to that in the scenario where biometric information cannot be obtained, the electronic device can emit an ultrasonic signal, and based on the echo signal corresponding to the ultrasonic signal and the first recognition result determined in the scenario where biometric information can be obtained, continuously identify the user's identity information, that is, the second recognition result, so that the electronic device can perform continuous identity recognition in a variety of complex scenarios, improving the convenience of using the electronic device.
[0139] Exemplarily, taking the biometric information as the facial image of the user as an example, it is described how the electronic device performs continuous identity recognition through ultrasonic signals.
[0140] As Figure 9 shown, a possible continuous identity recognition method includes:
[0141] S201. Obtain the first facial image in the first scenario, and determine the first recognition result according to the first facial image.
[0142] Among them, the first recognition result indicates whether the first user has the permission to use the electronic device. The first facial image may refer to the facial image collected by the electronic device in the first scenario, such as the facial image of the first user holding the electronic device. The electronic device can perform image recognition on the facial image of the first user to determine whether the first user has the permission to use the electronic device, that is, the first recognition result.
[0143] S202. If switching from the first scenario to the second scenario, emit an ultrasonic signal and obtain the echo signal corresponding to the ultrasonic signal.
[0144] The process of emitting an ultrasonic signal and obtaining the echo signal corresponding to the ultrasonic signal when switching from the first scenario to the second scenario can refer to the description of S102 above, and will not be elaborated here.
[0145] S203. Based on the echo signal, determine whether the first user is far away from the electronic device.
[0146] The electronic device can use an ultrasonic ranging algorithm for the echo signal to determine the second distance between the second user and the electronic device. If the difference between the second distance and the first distance is less than the preset difference threshold, the second user in the second scenario is the first user in the first scenario, which is equivalent to that the first user is not far away from the electronic device.
[0147] The first distance may refer to the distance between the first user and the electronic device in the first scenario. In the first scenario, the electronic device captures the first facial image of the first user. The electronic device can perform image ranging based on the first facial image of the first user to determine the first distance, that is, the distance between the first user and the electronic device.
[0148] In some possible cases, at the moment when the electronic device switches from the first scenario to the second scenario, the first distance between the first user and the electronic device is usually the distance between the second user and the electronic device. The electronic device can measure the second distance from the second user based on the ultrasonic signal and use the second distance as the first distance.
[0149] Among them, the ultrasonic ranging algorithm may refer to an algorithm that calculates the distance based on the propagation speed of ultrasonic waves in the air and the time difference between the emitted ultrasonic signal and the echo signal. The principle of ultrasonic ranging is similar to that of radar ranging, both of which calculate the distance by measuring the time difference between signal transmission and reception. The specific process includes:
[0150] 1. The speaker emits ultrasonic waves. When the ultrasonic waves are emitted, the timer starts timing.
[0151] 2. The ultrasonic waves propagate in the air and are immediately reflected back after hitting an obstacle (such as the second user) on the way.
[0152] 3. After the microphone receives the echo signal, the timer immediately stops timing.
[0153] 4. According to the time t (seconds) recorded by the timer and the propagation speed v of ultrasonic waves in the air (usually 340 m / s), the distance s from the emission point to the obstacle can be calculated, that is, s = vt / 2.
[0154] During the process of ranging through the ultrasonic signal, the ultrasonic signal may refer to a frequency-modulated continuous wave (FMCW) or a channel impulse response (CIR). The embodiments of the present application do not limit this.
[0155] The electronic device can also process the echo signal using an ultrasonic distance-away detection algorithm to determine whether the first user is moving away from the electronic device.
[0156] Among them, the ultrasonic distance-away detection algorithm may refer to a neural network model algorithm. The echo signal is used as the input of the ultrasonic distance-away detection algorithm, and the ultrasonic distance-away detection algorithm outputs information indicating that the first user is moving away from the electronic device or information indicating that the first user is not moving away from the electronic device.
[0157] The identity recognition method provided by the embodiment of the present application can input the echo signal and the first recognition result into the identity recognition model to obtain the second recognition result. Among them, the identity recognition model is a neural network model. In this way, it is equivalent to being able to directly obtain the second recognition result through the neural network model, improving the convenience of obtaining the second recognition result.
[0158] Taking the ultrasonic signal as FMCW as an example for illustration. The process of determining whether the first user is away from the electronic device through the ultrasonic distance detection algorithm can be referred to Figure 10 as shown.
[0159] If the ultrasonic signal emitted by the electronic device is FWCW, then after being reflected by the obstacle and returning to the electronic device, the echo signal received by the microphone of the electronic device is also FWCW.
[0160] Exemplarily, as Figure 10 shown, the received echo signal is demodulated, that is, the band signal is restored to the baseband signal to obtain the demodulated signal; then the Fourier Transform (FFT) is performed on the demodulated signal to convert the demodulated signal from the time-domain signal to the frequency-domain signal to obtain the converted signal; then the phase analysis is performed on the converted signal, and finally the signal after the phase analysis is input into the ultrasonic distance detection model to output the distance change information between the first user and the electronic device. For example, the information that the first user is away from the electronic device, or the information that the first user is not away from the electronic device is output.
[0161] If the first user is away from the electronic device, then the second facial image is acquired, and the third recognition result is determined according to the second facial image, that is, S204 is executed.
[0162] If the first user is not away from the electronic device, then it is determined whether a third user is approaching the electronic device, that is, S205 is executed.
[0163] S204. Determine the third recognition result according to the second facial image.
[0164] The second facial image may refer to the facial image acquired by the electronic device after the electronic device resumes from the second scene to the first scene. That is to say, when the electronic device is switched from the first scene to the second scene, in the case where the first user is away from the electronic device, the electronic device cannot continue continuous identity recognition, and can only acquire the second facial image again for identity recognition to obtain the third recognition result when it resumes to the scene where the facial image can be acquired (such as the first scene).
[0165] S205. Determine that a third user is approaching the electronic device.
[0166] It can be understood that the echo signal includes reflected signals with amplitudes lower than the preset amplitude threshold and reflected signals with relatively long reflection distances. The probability that these two types of reflected signals are reflected by a third user close to the electronic device is higher. Therefore, the electronic device can extract the time-domain multimodal features of these two types of reflected signals. For example, the electronic device can extract multiple frames of CIR phase diagrams or multiple frames of original time-domain diagrams from the two types of reflected signals as the time-domain multimodal features. Then, the electronic device can input the time-domain multimodal features into a multi-person scene recognition model, and determine whether there are multiple people around the electronic device through the multi-person scene recognition model. Among them, the multi-person scene recognition model can be a neural network model for determining whether the current scene is a multi-person scene based on the time-domain multimodal features generated by the echo signal.
[0167] Exemplarily, as Figure 11 shown, after the time-domain multimodal features are input into the neural network model, they sequentially pass through the input layer, the first convolutional layer, the first pooling layer, the second convolutional layer, the second pooling layer, and the output layer, and output information on whether there are multiple people around the electronic device, that is, whether the current scene is a multi-person scene.
[0168] If there are multiple people around the electronic device, that is, there are other users close to the electronic device besides the first user, for example, a third user is close to the electronic device.
[0169] If there are no multiple people around the electronic device, that is, there are no other users close to the electronic device besides the first user, and the user around the electronic device is still the first user. Therefore, the electronic device can keep the first recognition result as the recognition result for continuous identity recognition.
[0170] If a third user is close to the electronic device, obtain the second facial image, and determine the third recognition result according to the second facial image, that is, execute S204.
[0171] In the identity recognition method provided by the embodiments of the present application, when it is determined in the second scene that there is a third user close to the electronic device, when the second scene switches to the first scene, re-obtain the second biometric information, and then determine the third recognition result based on the second biometric information. This makes it such that in the second scene where the user's biometric information cannot be collected, if there is a third user close to the electronic device, only after re-obtaining the second biometric information of the third user will it be determined based on the second biometric information whether to allow the third user to use the electronic device, improving the security of using the electronic device.
[0172] If there is no third user close to the electronic device, use the first recognition result as the second recognition result, that is, execute S206.
[0173] In the identity recognition method provided by the embodiments of the present application, when it is determined in the second scenario that the first user has not moved away from the electronic device and there is no third user approaching the electronic device, the first recognition result in the first scenario is maintained as the second recognition result in the second scenario, enabling the electronic device to perform continuous identity recognition in various complex scenarios and improving the convenience of using the electronic device.
[0174] In some possible cases, the second scenario is relatively complex, including multiple people and some interfering reflectors, such as a desktop, objects on the desktop, the user's palm, etc. In this case, the electronic device can first filter the echo signal to remove the interfering objects in the echo signal, and then determine whether there are multiple people in the second scenario based on the filtered echo signal.
[0175] Exemplarily, the interference signal caused by the environment can be as Figure 12 shown, where the abscissa represents time and the ordinate represents the normalized amplitude. That is to say, the ordinate of 0 represents the echo signal caused by the reflector in the environment, the ordinate of 1 (not shown in the figure) represents the maximum echo signal that the sensor (such as a microphone) can receive, and the interference signal of 0.2 is 0.2 times the maximum signal that the sensor can receive, so it has no unit. As Figure 12 shown, the signal can refer to the echo signal formed when the mobile phone is placed flat on the desktop, which includes the interference signal caused by the environment. Among them, as Figure 12 the interference signal in the ellipse in Figure 12 represents the interference signal caused by other structures in the mobile phone, and the spike with a higher amplitude is the nuisance signal reflected by the interfering object on the nearby surface. For example, as
[0176] shown, the spike with a higher amplitude is the interference signal caused by the desktop. The electronic device can clip the spike in the echo signal to remove the signal reflected by the interfering object.
[0177] In the identity recognition method provided by the embodiments of the present application, the echo signal and the first recognition result can be input into the identity recognition model to obtain the second recognition result, where the identity recognition model is a neural network model. In this way, it is equivalent to directly obtaining the second recognition result through the neural network model, improving the convenience of obtaining the second recognition result.
[0178] S206: Use the first recognition result as the second recognition result.
[0179] It should be understood that although the steps in the flowcharts in the above embodiments are shown sequentially in the direction of the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.
[0180] It can be understood that in order to implement the above functions, the electronic device includes corresponding hardware and / or software modules for executing each function. Combining the algorithm steps of each example described in the embodiments disclosed in this article, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the manner of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of the present application.
[0181] The embodiments of the present application can divide the electronic device into functional modules according to the above method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one module. It should be noted that the division of modules in the embodiments of the present application is illustrative, only a logical function division, and there can be other division methods in actual implementation. It should be noted that the names of the modules in the embodiments of the present application are illustrative, and there is no limitation on the names of the modules in actual implementation.
[0182] Figure 13 It is a schematic structural diagram of an identity recognition device provided by an embodiment of the present application.
[0183] It should be understood that the identity recognition device 600 can execute Figures 6 to 12 the identity recognition method shown; the identity recognition device 600 includes: an acquisition unit 610 and a processing unit 620.
[0184] The processing unit 620 is used to obtain first biometric information for continuous identity recognition in the first scenario to obtain a first recognition result, and when the electronic device switches from the first scenario to the second scenario, send out an ultrasonic signal and obtain an echo signal corresponding to the ultrasonic signal, and then determine a second recognition result based on the echo signal and the first recognition result.
[0185] The identity recognition device provided in this embodiment is used to execute the identity recognition method of the above embodiment. The technical principles and technical effects are similar and will not be elaborated here.
[0186] It should be noted that the above identity recognition device 600 is embodied in the form of functional units. The term "unit" here can be implemented in the form of software and / or hardware, and no specific limitation is made thereto.
[0187] For example, the "unit" can be a software program, a hardware circuit, or a combination of both to implement the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group of processors, etc.) for executing one or more software or firmware programs, and a memory, a merged logic circuit, and / or other suitable components to support the described functions.
[0188] Therefore, the units of each example described in the embodiments of the present application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0189] Figure 14 The structural schematic diagram of an electronic device provided by the present application is shown. Figure 14 The dashed line in indicates that the unit or the module is optional. The electronic device 700 can be used to implement the identity recognition method described in the above method embodiments.
[0190] The electronic device 700 includes one or more processors 701, and the one or more processors 701 can support the electronic device 700 to implement the identity recognition method in the method embodiments. The processor 701 can be a general-purpose processor or a dedicated processor. For example, the processor 701 can be a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, such as discrete gate, transistor logic devices, or discrete hardware components.
[0191] The processor 701 can be used to control the electronic device 700, execute software programs, and process the data of software programs. The electronic device 700 may further include a communication unit 705 for implementing signal input (reception) and output (transmission).
[0192] For example, the electronic device 700 may be a chip, and the communication unit 705 may be the input and / or output circuit of the chip. Alternatively, the communication unit 705 may be the communication interface of the chip, and the chip may be a component of a terminal device or other electronic devices.
[0193] As another example, the electronic device 700 may be a terminal device, and the communication unit 705 may be the transceiver of the terminal device. Alternatively, the communication unit 705 may be the transceiver circuit of the terminal device.
[0194] The electronic device 700 may include one or more memories 702 on which a program 704 is stored. The program 704 can be run by the processor 701 to generate instructions 703, enabling the processor 701 to execute the impedance matching method described in the above method embodiments according to the instructions 703.
[0195] Optionally, data may also be stored in the memory 702. Optionally, the processor 701 may also read the data stored in the memory 702. The data may be stored at the same storage address as the program 704, or the data may be stored at a different storage address from the program 704.
[0196] The processor 701 and the memory 702 may be provided separately or integrated together; for example, integrated on a system on chip (SOC) of a terminal device.
[0197] Exemplarily, the memory 702 may be used to store the relevant program 704 of the identity recognition method provided in the embodiments of the present application. The processor 701 may be used to call the relevant program 704 of the identity recognition method stored in the memory 702 when performing identity recognition, and execute the identity recognition method of the embodiments of the present application; including: in a first scenario, obtaining first biometric information for continuous identity recognition to obtain a first recognition result, and when the electronic device switches from the first scenario to a second scenario, emitting an ultrasonic signal and obtaining an echo signal corresponding to the ultrasonic signal, and then determining a second recognition result based on the echo signal and the first recognition result.
[0198] The present application also provides a computer program product which, when executed by the processor 701, implements the identity recognition method described in any method embodiment of the present application.
[0199] The computer program product can be stored in the memory 702, such as the program 704. After processes such as preprocessing, compilation, assembly, and linking, the program 704 is finally converted into an executable target file that can be executed by the processor 701.
[0200] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a computer, it implements the identity recognition method described in any method embodiment of the present application. The computer program can be a high-level language program or an executable target program.
[0201] The computer-readable storage medium is, for example, the memory 702. The memory 702 can be a volatile memory or a non-volatile memory, or the memory 702 can include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory can 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 can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM), and direct rambus random access memory (DR RAM).
[0202] In the present application, "at least one" means one or more, and "a plurality" means two or more. "At least one of the following" or its similar expression means any combination of these items, including any combination of single item(s) or plural item(s). For example, at least one of a, b, or c can represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, c can be single or multiple.
[0203] It should be understood that in various embodiments of the present application, the magnitudes of the sequence numbers of the above processes do not imply the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0204] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0205] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0206] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0207] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0208] In addition, the functional units in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
[0209] As described above, only the specific implementation manners of the present application are provided, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present application, and all should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. An identity recognition method, characterized in that: The method is applied in an electronic device, and the method comprises: In the first scenario, first biometric information is obtained for continuous identity recognition to obtain a first recognition result; If the electronic device switches from the first scene to a second scene, emits an ultrasonic signal, and obtains an echo signal corresponding to the ultrasonic signal, the second scene includes a scene in which biometric information cannot be obtained; determining a second recognition result based on the echo signal and the first recognition result; Wherein, determining the second recognition result based on the echo signal and the first recognition result includes: determining whether a first user in the first scene is away from the electronic device based on the echo signal; If the first user is not far away from the electronic device, the second recognition result is determined based on the first recognition result.
2. The method according to claim 1, characterized in that If the first user is not away from the electronic device, determining the second recognition result based on the first recognition result includes: If the first user is not far away from the electronic device, determining whether a third user is close to the electronic device based on the echo signal; If there is no third user near the electronic device, the first recognition result is used as the second recognition result.
3. The method according to claim 2, characterized in that The method further comprises: If there is a third user close to the electronic device, when the second scene switches to the first scene, obtaining second biometric information; A third recognition result is determined based on the second biometric information.
4. The method according to claim 1, characterized in that The method further comprises: If the first user is away from the electronic device, when the second scene switches to the first scene, obtaining second biometric information; A third recognition result is determined based on the second biometric information.
5. The method according to any one of claims 1 to 4, characterized in that: The determining a second recognition result based on the echo signal and the first recognition result comprises: The echo signal and the first recognition result are input into an identity recognition model to obtain the second recognition result, and the identity recognition model is a neural network model.
6. The method according to any one of claims 1 to 4, characterized in that: The determining, based on the echo signal, whether the first user in the first scene is away from the electronic device comprises: The echo signal is processed by using an ultrasonic ranging algorithm to determine whether the first user in the first scene is far away from the electronic device.
7. The method according to any one of claims 2 to 4, characterized in that: The determining whether a third user is close to the electronic device based on the echo signal comprises: The echo signal is input into a multi-person scene recognition model to output whether a third user is close to the electronic device, and the multi-person scene recognition model is a neural network model.
8. The method according to any one of claims 1 to 4, characterized in that: The first biometric information is a facial image.
9. The method according to claim 8, characterized in that The second scene is a scene where the light intensity is less than a preset light intensity threshold.
10. The method according to claim 8, characterized in that The second scene is a scene in which the user's face is not within the acquisition range of the camera device of the electronic device.
11. The method according to any one of claims 1 to 4, characterized in that: The electronic device has no infrared camera device.
12. The method according to any one of claims 1 to 4, characterized in that: The sending out of the ultrasonic signal and obtaining the echo signal corresponding to the ultrasonic signal includes: The speaker of the electronic device sends out the ultrasonic signal, and the microphone of the electronic device receives an echo signal corresponding to the ultrasonic signal.
13. An electronic device, characterized in that: The electronic device comprises means for performing the method according to any one of claims 1 to 12.
14. An electronic device, characterized in that: include: one or more processors; Memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device performs the method according to any one of claims 1 to 12.
15. A chip system, characterized in that: The chip system includes a processor for calling and running a computer program from a memory, so that an electronic device equipped with the chip system executes the method according to any one of claims 1 to 12.
16. A computer-readable storage medium comprising a computer program, characterized in that: When the computer program is executed on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Method and equipment for controlling content on display of electronic device
CN109947236A
System and methods for user authentication using continuous facial recognition
US20240248972A1