WO2022222702A1 - Screen unlocking method and electronic device - Google Patents

Screen unlocking method and electronic device Download PDF

Info

Publication number
WO2022222702A1
WO2022222702A1 PCT/CN2022/083580 CN2022083580W WO2022222702A1 WO 2022222702 A1 WO2022222702 A1 WO 2022222702A1 CN 2022083580 W CN2022083580 W CN 2022083580W WO 2022222702 A1 WO2022222702 A1 WO 2022222702A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
unlocking
category
electronic device
user
Prior art date
Application number
PCT/CN2022/083580
Other languages
French (fr)
Chinese (zh)
Inventor
吕帅林
孙斐然
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022222702A1 publication Critical patent/WO2022222702A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/32User authentication using biometric data, e.g. fingerprints, iris scans or voiceprints
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/66Substation equipment, e.g. for use by subscribers with means for preventing unauthorised or fraudulent calling
    • H04M1/667Preventing unauthorised calls from a telephone set
    • H04M1/67Preventing unauthorised calls from a telephone set by electronic means
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/725Cordless telephones

Definitions

  • the present application relates to the technical field of smart terminals, and in particular, to a screen unlocking method and an electronic device.
  • the present application provides a screen unlocking method and electronic device, which can improve the screen unlocking efficiency of the electronic device under harsh conditions and improve user experience.
  • an embodiment of the present application provides a screen unlocking method, which is applied to an electronic device, including: acquiring a first unlocking image; if unlocking fails according to the unlocking image, determining a first image category to which the first unlocking image belongs, and the first image The category is used to describe the scene in which the electronic device is located when the first unlocking image is obtained; count the number of failed unlocking of the first image category; obtain the second unlocking image; unlock the screen according to the second unlocking image, and obtain the unlocking of the first image category The number of failures.
  • first prompt information is displayed, and the first prompt information is used to prompt the user to update the unlocked image of the first image category.
  • the number of failed unlocking of the first image category is counted, and if the number of failed unlocking times exceeds a first threshold, the user is prompted to update the unlocked image of the first image category, so that the next time the user is in the scene corresponding to the image category, the The success rate of screen unlocking improves the screen unlocking efficiency and user experience.
  • determining the first image category to which the first unlocked image belongs includes: using a preset first model to detect the image category to which the first unlocked image belongs to obtain the first image category; preset the first model Used to detect which image class the unlock image belongs to.
  • the method before acquiring the first unlocking image, further includes: judging that there is no unlocking image of the second image category in the unlocking image set by the user, and generating an unlocking image of the second image category according to the unlocking image set by the user .
  • generating the unlocking image of the second image category according to the unlocking image set by the user includes: obtaining the unlocking image of the third image category from the unlocking image set by the user, and obtaining the unlocking image of the third image category according to the unlocking image of the third image category An unlock image of the second image category is generated.
  • an embodiment of the present application provides a screen unlocking method, which is applied to an electronic device, including: acquiring a first unlocking image; if unlocking fails according to the first unlocking image, determining a first image category to which the first unlocking image belongs, An image category is used to describe the scene of the electronic device when the first unlock image is obtained; count the number of failed unlocks of the first image category; obtain a second unlock image; unlock the screen according to the second unlock image, and obtain the first The number of failed unlocking of the image category. When the number of failed unlocking of the first image category exceeds the first threshold, an unlocking image of the first image category is generated according to the preset unlocking image.
  • determining the first image category to which the first unlocked image belongs includes: using a preset first model to detect the image category to which the first unlocked image belongs to obtain the first image category; preset the first model Used to detect which image class the unlock image belongs to.
  • generating an unlock image of the first image category according to a preset unlock image includes: if there is no unlock image of the first image category in the preset unlock image, generating the first image according to the preset unlock image The unlocking image of the category; if there is an unlocking image of the first image category in the preset unlocking image, and the unlocking image of the first image category is the unlocking image set by the user, the unlocking image of the first image category is generated according to the preset unlocking image; if There is an unlock image of the first image category in the preset unlock image, and the unlock image of the first image category is an unlock image generated according to the first preset unlock image, and the unlock image of the first image category is generated according to the second preset unlock image .
  • generating the unlocking image of the first image category according to the preset unlocking image includes: acquiring the unlocking image of the fourth image category from the preset unlocking image, and generating the third image according to the unlocking image of the fourth image category. An unlocked image of an image category.
  • embodiments of the present application provide an electronic device, including a processor and a memory, where the memory is used to store a computer program, and when the processor executes the computer program, the electronic device is made to perform any one of the methods of the first aspect.
  • an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory is used to store a computer program, and when the processor executes the computer program, the electronic device is made to perform any method of the second aspect
  • embodiments of the present application provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program runs on a computer, causes the computer to execute the method of any one of the first aspect.
  • embodiments of the present application provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program runs on a computer, causes the computer to execute the method of any one of the second aspect.
  • the present application provides a computer program for performing the method of the first aspect when the computer program is executed by a computer.
  • the program in the seventh aspect may be stored in whole or in part on a storage medium packaged with the processor, or may be stored in part or in part in a memory not packaged with the processor.
  • FIG. 1A is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • 1B is a schematic diagram of a software structure of an electronic device according to an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of an embodiment of a screen unlocking method of the application
  • 3A is a UI interface diagram of a preset stage in the screen unlocking method of the application
  • 3B is a UI interface diagram of the unlocking stage in the screen unlocking method of the application.
  • 3C is a schematic flowchart of another embodiment of the screen unlocking method of the present application.
  • FIG. 5 is a schematic flowchart of another embodiment of the screen unlocking method of the application.
  • FIG. 6 is a schematic flowchart of another embodiment of the screen unlocking method of the application.
  • FIG. 7 is a schematic structural diagram of another embodiment of the electronic device of the present application.
  • the user generally pre-sets the user's face image in the electronic device as the comparison standard for screen unlocking; when the user triggers the screen unlocking, the electronic device collects the user's face image, It is compared with the preset face image in the electronic device, and if the comparison result is consistent, the screen is unlocked, otherwise the screen is not unlocked.
  • Whether the face unlock is successful or not is related to the scene where the user and the electronic device are located.
  • the above-mentioned scene includes the objective conditions of the environment where the user and the electronic device are located, such as lighting conditions, and the user's facial features.
  • the lighting conditions when the user unlocks the screen is similar to the lighting conditions when the face image is set, and the user's face does not change significantly
  • the face image collected by the electronic device when the screen is unlocked is similar to the face image preset by the user , the electronic device can unlock the screen, and the user successfully unlocks the screen.
  • the lighting conditions when the user unlocks the screen is quite different from the lighting conditions when the user presets the face image, for example, the light intensity is relatively small or relatively large, the face is backlit, etc., or the user's face changes, such as appearing
  • the face image collected by the electronic device when the screen is triggered to unlock may be quite different from the face image preset by the user, so that the electronic device cannot unlock the screen, and the user fails to unlock the screen. If the scene in which the electronic device collects the face image does not change, it may happen that the user fails to unlock the screen multiple times, which reduces the screen unlocking efficiency and the user experience.
  • the user generally pre-stores several fingerprint images of the user in the electronic device as the comparison standard for screen unlocking.
  • the electronic device collects the user's fingerprint image and uses it Compare with the pre-stored fingerprint image, if the result is the same, the screen is unlocked successfully, otherwise the screen is not unlocked.
  • the user can unlock the screen by entering a fingerprint.
  • the user's fingerprint may have dry, wet, cracked, or low-temperature fingerprints, which may cause the screen to fail to unlock.
  • Dry fingerprint means that the user's finger is too dry; wet fingerprint means that the user's finger is too wet; fingerprint under low temperature means that the temperature of the user's finger is too low.
  • the problem of mismatch so that it cannot be compared with the fingerprint image preset by the user, resulting in the unlocking failure; the above cracked fingerprint refers to the cracking of the user's fingerprint due to cracks, injuries, etc.
  • the fingerprint image collected by the electronic device cannot be compared with the fingerprint image preset by the user, resulting in the unlocking failure. If the above situation of the fingerprint cannot be alleviated, the user will fail to unlock the screen for many times in a row, or even cannot unlock the screen at all, which reduces the screen unlocking efficiency and reduces the user experience.
  • the embodiments of the present application provide a screen unlocking method and electronic device, which can improve screen unlocking efficiency under severe conditions and improve user experience.
  • FIG. 1A is a schematic structural diagram of an electronic device 100 .
  • Electronic device 100 may include cell phones, foldable electronic devices, tablet computers, desktop computers, laptop computers, handheld computers, notebook computers, ultra-mobile personal computers (UMPCs), netbooks, cell phones, personal computers Digital assistant (personal digital assistant, PDA), augmented reality (augmented reality, AR) device, virtual reality (virtual reality, VR) device, artificial intelligence (artificial intelligence, AI) device, wearable device, vehicle-mounted device, smart home equipment, or at least one of smart city equipment.
  • PDA personal digital assistant
  • augmented reality augmented reality, AR
  • VR virtual reality
  • AI artificial intelligence
  • wearable device wearable device
  • vehicle-mounted device smart home equipment
  • smart home equipment smart home equipment
  • smart home equipment smart home equipment
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) connector 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera module 193, display screen 194 , and a subscriber identification module (subscriber identification module, SIM) card interface 195 and the like.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air 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, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural-network processing unit neural-network processing unit
  • the processor can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in the processor 110 may be a cache memory.
  • the memory may store instructions or data that are used by the processor 110 or are frequently used. If the processor 110 needs to use the instructions or data, it can be called directly from this memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
  • the processor 110 may be connected to modules such as a touch sensor, an audio module, a wireless communication module, a display, a camera, and the like through at least one of the above interfaces.
  • the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the USB connector 130 is an interface conforming to the USB standard specification, which can be used to connect the electronic device 100 and peripheral devices, and specifically can be a Mini USB connector, a Micro USB connector, a USB Type C connector, and the like.
  • the USB connector 130 can be used to connect to a charger, so that the charger can charge the electronic device 100, and can also be used to connect to other electronic devices, so as to transmit data between the electronic device 100 and other electronic devices. It can also be used to connect headphones to output audio stored in electronic devices through the headphones.
  • This connector can also be used to connect other electronic devices, such as VR devices, etc.
  • the standard specifications of the Universal Serial Bus may be USB1.x, USB2.0, USB3.x, and USB4.
  • the charging management module 140 is used for receiving charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera module 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
  • the application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), bluetooth low power power consumption (bluetooth low energy, BLE), ultra wide band (UWB), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other electronic devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technology, etc.
  • the GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (quasi- zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device 100 may implement a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • Display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • electronic device 100 may include one or more display screens 194 .
  • the electronic device 100 may implement a camera function through a camera module 193, an ISP, a video codec, a GPU, a display screen 194, an application processor AP, a neural network processor NPU, and the like.
  • the camera module 193 can be used to collect color image data and depth data of the photographed object.
  • the ISP can be used to process the color image data collected by the camera module 193 .
  • the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera module 193 .
  • the camera module 193 may be composed of a color camera module and a 3D sensing module.
  • the photosensitive element of the camera of the color camera module may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CCD charge coupled device
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the 3D sensing module may be a time of flight (TOF) 3D sensing module or a structured light (structured light) 3D sensing module.
  • the structured light 3D sensing is an active depth sensing technology, and the basic components of the structured light 3D sensing module may include an infrared (Infrared) emitter, an IR camera module, and the like.
  • the working principle of the structured light 3D sensing module is to first emit a light spot of a specific pattern on the object to be photographed, and then receive the light coding of the light spot pattern on the surface of the object, and then compare the similarities and differences with the original projected light spot. And use the principle of trigonometry to calculate the three-dimensional coordinates of the object.
  • the three-dimensional coordinates include the distance between the electronic device 100 and the object to be photographed.
  • the TOF 3D sensing can be an active depth sensing technology, and the basic components of the TOF 3D sensing module can include an infrared (Infrared) transmitter, an IR camera module, and the like.
  • the working principle of the TOF 3D sensing module is to calculate the distance (ie depth) between the TOF 3D sensing module and the object to be photographed through the time of infrared reentry to obtain a 3D depth map.
  • Structured light 3D sensing modules can also be used in face recognition, somatosensory game consoles, industrial machine vision detection and other fields.
  • TOF 3D sensing modules can also be applied to game consoles, augmented reality (AR)/virtual reality (VR) and other fields.
  • AR augmented reality
  • VR virtual reality
  • the camera module 193 may also be composed of two or more cameras.
  • the two or more cameras may include color cameras, and the color cameras may be used to collect color image data of the photographed object.
  • the two or more cameras may use stereo vision technology to collect depth data of the photographed object.
  • Stereoscopic vision technology is based on the principle of human eye parallax. Under natural light sources, two or more cameras are used to capture images of the same object from different angles, and then operations such as triangulation are performed to obtain the electronic device 100 and the object. The distance information between the objects, that is, the depth information.
  • the electronic device 100 may include one or more camera modules 193 .
  • the electronic device 100 may include a front camera module 193 and a rear camera module 193 .
  • the front camera module 193 can usually be used to collect the color image data and depth data of the photographer facing the display screen 194, and the rear camera module can be used to collect the shooting objects (such as people, landscapes, etc.) that the photographer faces. etc.) color image data and depth data.
  • the CPU, GPU or NPU in the processor 110 may process the color image data and depth data collected by the camera module 193 .
  • the NPU can recognize the color image data collected by the camera module 193 (specifically, the color camera module) through a neural network algorithm based on the skeleton point recognition technology, such as a convolutional neural network algorithm (CNN). , to determine the skeleton point of the person being photographed.
  • CNN convolutional neural network algorithm
  • the CPU or GPU can also run the neural network algorithm to realize the determination of the skeletal points of the photographed person according to the color image data.
  • the CPU, GPU or NPU can also be used to confirm the figure (such as the body of the person being photographed) according to the depth data collected by the camera module 193 (which may be a 3D sensing module) and the identified skeletal points. ratio, the fatness and thinness of the body parts between the skeletal points), and can further determine the body beautification parameters for the photographed person, and finally process the photographed image of the photographed person according to the body beautification parameters, so that the photographed image
  • the body shape of the person to be photographed is beautified. Subsequent embodiments will introduce in detail how to perform body beautification processing on the image of the person being photographed based on the color image data and depth data collected by the camera module 193 , which will not be described here.
  • Digital signal processors are used to process digital signals and can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG Moving Picture Experts Group
  • MPEG2 moving picture experts group
  • MPEG3 MPEG4
  • MPEG4 Moving Picture Experts Group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 .
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card. Or transfer music, video and other files from electronic devices to external memory cards.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the processor 110 executes various functional methods or data processing of the electronic device 100 by executing the instructions stored in the internal memory 121 and/or the instructions stored in the memory provided in the processor.
  • the electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
  • the audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also referred to as a "speaker" is used to convert audio electrical signals into sound signals.
  • the electronic device 100 may listen to music through the speaker 170A, or output an audio signal for a hands-free call.
  • the receiver 170B also referred to as "earpiece" is used to convert audio electrical signals into sound signals.
  • the voice can be answered by placing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
  • the earphone jack 170D is used to connect wired earphones.
  • the earphone interface 170D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals.
  • the pressure sensor 180A may be provided on the display screen 194 .
  • the capacitive pressure sensor may be comprised of at least two parallel plates of conductive material.
  • the electronic device 100 determines the intensity of the pressure according to the change in capacitance.
  • a touch operation acts on the display screen 194
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions.
  • the instruction for viewing the short message is executed.
  • the instruction to create a new short message is executed.
  • the gyro sensor 180B may be used to determine the motion attitude of the electronic device 100 .
  • the angular velocity of electronic device 100 about three axes ie, x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and controls the reverse movement of the lens to offset the shaking of the electronic device 100 to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D.
  • the magnetic sensor 180D can be used to detect the folding or unfolding of the electronic device, or the folding angle.
  • the electronic device 100 when the electronic device 100 is a flip machine, the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).
  • the magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the electronic device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the electronic device 100 emits infrared light to the outside through the light emitting diode.
  • Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When the intensity of the detected reflected light is greater than the threshold, it may be determined that there is an object near the electronic device 100 . When the intensity of the detected reflected light is less than the threshold, the electronic device 100 may determine that there is no object near the electronic device 100 .
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L may be used to sense ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is blocked, eg, the electronic device is in a pocket. When it is detected that the electronic device is blocked or in a pocket, some functions (such as touch functions) can be disabled to prevent misuse.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking pictures with fingerprints, answering incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature detected by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in the performance of the processor in order to reduce the power consumption of the electronic device to implement thermal protection.
  • the electronic device 100 heats the battery 142 when the temperature detected by the temperature sensor 180J is below another threshold. In other embodiments, the electronic device 100 may boost the output voltage of the battery 142 when the temperature is below yet another threshold.
  • Touch sensor 180K also called “touch device”.
  • the touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also referred to as a "touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal.
  • the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibration bone block obtained by the bone conduction sensor 180M, and realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
  • the keys 190 may include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key.
  • the electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
  • Motor 191 can generate vibrating cues.
  • the motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback.
  • touch operations acting on different applications can correspond to different vibration feedback effects.
  • the motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be contacted and separated from the electronic device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 .
  • the electronic device 100 may support one or more SIM card interfaces.
  • the SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. Multiple cards can be of the same type or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication.
  • the electronic device 100 employs an eSIM, ie: an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiments of the present application take an Android system with a layered architecture as an example to exemplarily describe the software structure of the electronic device 100 .
  • FIG. 1B is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the Android system is divided into five layers, from top to bottom, the application layer, the application framework layer, the Android runtime (Android runtime, ART) and the native C/C++ library, and the hardware abstraction layer (Hardware abstraction layer). Abstract Layer, HAL) and kernel layer.
  • the application layer can include a series of application packages.
  • the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include window managers, content providers, view systems, resource managers, notification managers, activity managers, input managers, and the like.
  • the window manager provides window management services (Window Manager Service, WMS), WMS can be used for window management, window animation management, surface management and as a transfer station for the input system.
  • WMS Window Manager Service
  • Content providers are used to store and retrieve data and make these data accessible to applications.
  • This data can include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications.
  • a display interface can consist of one or more views.
  • the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
  • the resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
  • the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
  • Activity Manager can provide activity management services (Activity Manager Service, AMS), AMS can be used for system components (such as activities, services, content providers, broadcast receivers) startup, switching, scheduling and application process management and scheduling work .
  • AMS Activity Manager Service
  • system components such as activities, services, content providers, broadcast receivers
  • the input manager can provide an input management service (Input Manager Service, IMS), and the IMS can be used to manage the input of the system, such as touch screen input, key input, sensor input and so on.
  • IMS Input Manager Service
  • IMS fetches events from input device nodes, and distributes events to appropriate windows through interaction with WMS.
  • the Android runtime includes the core library and the Android runtime.
  • the Android runtime is responsible for converting source code to machine code.
  • the Android runtime mainly includes the use of ahead or time (AOT) compilation technology and just in time (JIT) compilation technology.
  • the core library is mainly used to provide the functions of basic Java class libraries, such as basic data structures, mathematics, IO, tools, databases, networks and other libraries.
  • the core library provides an API for users to develop Android applications.
  • a native C/C++ library can include multiple functional modules. For example: surface manager, Media Framework, libc, OpenGL ES, SQLite, Webkit, etc.
  • the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
  • the media framework supports playback and recording of many common audio and video formats, as well as still image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • OpenGL ES provides the drawing and manipulation of 2D graphics and 3D graphics in applications. SQLite provides a lightweight relational database for applications of the electronic device 100 .
  • the hardware abstraction layer runs in user space, encapsulates the kernel layer driver, and provides a calling interface to the upper layer.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
  • a corresponding hardware interrupt is sent to the kernel layer.
  • the kernel layer processes touch operations into raw input events (including touch coordinates, timestamps of touch operations, etc.). Raw input events are stored at the kernel layer.
  • the application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the camera application icon, for example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer.
  • the camera module 193 captures still images or video.
  • FIG. 1A and FIG. 1B will take the electronic device having the structure shown in FIG. 1A and FIG. 1B as an example, and combine the drawings and application scenarios to specifically describe the methods provided by the embodiments of the present application.
  • the screen unlocking methods include face unlocking, fingerprint unlocking, iris unlocking, etc., and different unlocking images are used in different screen unlocking methods.
  • the face image and iris image can be captured by the camera, and the fingerprint image can be captured by the fingerprint sensor.
  • face unlocking and fingerprint unlocking are mainly used as examples.
  • FIG. 2 is a flowchart of an embodiment of the screen unlocking method of the present application. As shown in FIG. 2 , the method may include:
  • Step 201 The electronic device acquires a first unlock image.
  • the user performs a specified operation on the electronic device to trigger the electronic device to perform the screen unlocking process. Accordingly, the electronic device can obtain the corresponding unlocking image according to the screen unlocking method triggered by the user. For example, if the screen unlocking method triggered by the user is fingerprint unlocking, then The first unlocking image may be a fingerprint image, and the screen unlocking method triggered by the user is face unlocking, and the first unlocking image may be a face image.
  • Step 202 If the unlocking fails according to the first unlocking image, the electronic device determines the first image category to which the first unlocking image belongs, and the first image category is used to describe the scene where the electronic device is located when the first unlocking image is acquired.
  • the scene when the face is unlocked can be divided into image categories such as normal, dark light, occlusion, strong light, backlight, and others.
  • the first unlocked image is a face image
  • the first image category can be the above-mentioned image categories.
  • One of the image categories such as normal, dark light, occlusion, strong light, backlight, and others.
  • the scene when fingerprints are unlocked can be divided into dry fingerprints, wet fingerprints, cold fingerprints, strong light fingerprints, dark light fingerprints, cracked fingerprints, and others.
  • Image category if the first unlock image is a fingerprint image, the first image category may be one of the above image categories such as dry fingerprint, wet fingerprint, cold fingerprint, bright light fingerprint, dark light fingerprint, crack fingerprint and others.
  • Step 203 The electronic device counts the number of failed unlocking of the first image category.
  • the number of failed unlocking of the first image category is used to record the number of failed times to unlock the screen using the face image belonging to the first image category within the first time period, and the first time period may be a pre-determined end time point with the execution time of step 203.
  • a time period with a duration is set, and the specific duration of the first time period is not limited in this embodiment of the present application.
  • the electronic device can record the occurrence time of each unlocking failure and the image category to which the face image used for the unlocking failure belongs, then the electronic device can conveniently count the unlocking using the face image belonging to the first image category within the first time period. The number of screen failures.
  • Step 204 The electronic device acquires the second unlock image.
  • the user performs a specified operation on the electronic device to trigger the electronic device to perform the screen unlocking process. Accordingly, the electronic device can obtain the corresponding unlocking image according to the screen unlocking method triggered by the user. For example, if the screen unlocking method triggered by the user is fingerprint unlocking, then The second unlocking image may be a fingerprint image, and the screen unlocking method triggered by the user is face unlocking, and the second unlocking image may be a face image.
  • the first unlocking image and the second unlocking image are unlocking images obtained when the user triggers the electronic device to perform two screen unlocking processes. Therefore, the first unlocking image and the second unlocking image may be unlocking images in the same or different screen unlocking methods. , the embodiments of the present application are not limited.
  • the first unlock image obtained by the electronic device is a face image
  • the second unlock image obtained by the electronic device is a fingerprint image
  • the user triggers face unlock for the first time, correspondingly, the first unlock image obtained by the electronic device is a face image
  • the acquired second unlock image is a face image.
  • Step 205 the electronic device unlocks the screen according to the second unlock image, and obtains the number of failed unlocks of the first image category, and when the number of failed unlocks of the first image category exceeds the first threshold, displays first prompt information, and the first prompt information is used for prompting The user updates the unlocked image of the first image category.
  • the specific value of the first threshold is not limited in this embodiment of the present application.
  • the number of failed unlocking of the first image category is counted, and if the number of failed unlocking times exceeds a first threshold, the user is prompted to update the unlocked image of the first image category, so that the next time the user is in the scene corresponding to the image category, the The success rate of unlocking the screen of the electronic device improves the screen unlocking efficiency of the electronic device and improves the user experience.
  • the screen unlocking method provided by the embodiment of the present application may be applicable to the screen unlocking method of face unlocking.
  • the screen unlocking method provided by the embodiments of the present application may include two stages: a preset stage and an unlock stage.
  • an image library is preset in the electronic device, and the image library is used to store face images of various image categories. Face images of at least two image categories can be set in the image database of the present application, and at least one face image can be set for each image category.
  • the set face image may be, for example, the face image of the owner of the electronic device, such as the owner.
  • the image category of the face image is used to describe the scene in which the electronic device obtains the face image. For example, in FIG. 3A , a total of 6 image categories including normal, dark light, occlusion, strong light, backlight, and others are preset as examples.
  • the above six image categories are related to the scene where the user and the electronic device are located when the user unlocks the screen using the face unlock method.
  • the above-mentioned three image categories of "dark light”, “strong light” and “backlight” are mainly related to the light intensity and lighting direction in the scene. Face occlusion is related.
  • the image category “Normal” is the scene that the user unlocks daily. In this scene, the light intensity, light direction, and the user's own face are all within a certain standard.
  • the image category “Other” corresponds to the scene corresponding to the above image category. outside scene. Unless the user customizes the electronic device, when the electronic device is not used by the user, the face images stored under each image category in the image library can be empty, waiting for the user to set it independently after using the electronic device.
  • FIG. 3A an example diagram of a user interface (user interface, UI) for setting a face image in an image library for a user, wherein,
  • the user can enter the unlock password setting interface 210 of the electronic device, and select the "face" control to enter the face setting interface 220 .
  • the face setting interface 220 the above-mentioned six image categories preset for face images in the image library are displayed, and the user can choose according to his own wishes and scene conditions (such as the light intensity in the environment when setting, the direction of the light, whether the face is blocked, etc.).
  • the electronic device can also specify that the user must set the face images of a certain image category (such as the category "normal”); taking Figure 3A as an example, the user selects the image category "normal” corresponding to "Settings" control, enter the face image setting interface 230 of the category "Normal".
  • the user can perform editing operations of “normal” category face images in the face image setting interface 230, and the above editing operations may include, but are not limited to, operations such as adding a face image, deleting a face image, and the like. The specific process of adding a face image is not shown in FIG. 3A.
  • the electronic device detects the operation of adding a face image, starts the camera to capture an image, and starts from the captured image.
  • a face image is detected in the system, and the detected face image is stored to complete the setting of the face image.
  • the number of face images set for each image category is not limited in this application. If the user wants to activate face unlock, the user needs to set at least one face image in at least one of the above image categories. For example, the user sets the face image "face 1" in the normal image category, and then, Only electronic devices can activate face unlock.
  • the user can not only open the face setting interface 220 during the above-mentioned process of starting face unlocking to set the face ID, but also open the face setting interface 220 at any time after starting the face unlocking for each image category. Add, delete and other editing operations on the face image.
  • the interface 220 is an optional interface. If the user needs to start face unlocking, he can also enter the unlocking password setting interface 210 of the electronic device, and select the "face" control. Correspondingly, the electronic device displays the face image setting interface 230 to the user. In the face image setting interface 230 All face images in the image library can be displayed. In this implementation manner, the electronic device may not prompt the user of the image category to which the face image belongs in the face image setting interface, but only list the face images set by the user for the user to edit the face image.
  • a first model is preset in the electronic device, and the first model is used to detect the image category to which the face image belongs. For example, taking the above six image categories as an example, the first model can be used to detect which image category the face image belongs to among the above six image categories.
  • the first model may be a trained n-classifier, where n is the total number of image categories. Continuing the example of the above six image categories, the value of n is 6.
  • an n classifier can be preset, and the face images captured in different scenes are labeled with the image categories corresponding to the scenes as training samples to train the n classifiers, and the above-mentioned first model can be obtained.
  • the input of the first model is a face image
  • the output is the probability that the face image belongs to each of the n image categories.
  • the image category with the highest probability value can be considered as the output result of the first model, that is, the face image.
  • the algorithm of the N classifier is not limited in this application, for example, it may be a related deep learning algorithm.
  • the face image set by the user on the face image setting interface 230 can be stored in the image library after the image category is detected by the above-mentioned first model.
  • the UI interface diagram of the unlocking stage is shown in Figure 3B.
  • the user only sets at least one face image of the "normal" image category in the electronic device, if the user and the electronic device are in a dark light scene, that is, the light brightness is low In the scene, because the electronic device is in the dark light scene, the user's face image obtained by the electronic device is likely to be different from the face image set by the user in the normal scene in advance, so the electronic device cannot capture the dark light scene.
  • the comparison between the face image and the preset face image in the electronic device is successful, that is, the electronic device fails to verify the collected face image, and then the screen unlocking fails, so the user may encounter many times that the face unlocking method cannot be used. Unlocking of electronic devices.
  • the electronic device can display prompt information to the user, and the prompt information is used to prompt the user to update the "dark light" image category face image.
  • the electronic device is taken as an example of a face image of which the "dark light” image category is not set in the image library in advance, so that the prompt information can be used to prompt the user to add a face image of the "dark light” image category.
  • Face images of the "dark light” image category have been set in the image library, and the situation shown in Figure 3B may also occur that the user cannot unlock the electronic device using the face unlocking method for many times.
  • the electronic device shows the user.
  • the prompt information may be used to prompt the user to add a face image of the "dark light” image category or replace the existing face image of the "dark light” image category.
  • the UI interface example shown in FIG. 3B can also be extended to scenes corresponding to other image categories. For example, if the dark light scene in FIG. 3B is replaced with a strong light scene, the prompt information in the electronic device may be replaced with prompting the user to update the face image of the strong light category.
  • FIG. 3C it is a schematic flowchart of the unlocking stage, as shown in FIG. 3C, which may include the following steps:
  • Step 301 The electronic device receives the unlock request operation, and obtains a first face image.
  • Electronic devices are generally preset with buttons or designated gestures for users to trigger screen unlocking. Therefore, if the electronic device is in a screen lock state, a pressing operation for a designated key is detected, or a designated gesture operation on the screen of the electronic device is detected, the electronic device receives an unlock request operation. For example, assuming that pressing the power button of the electronic device by default is used to trigger the electronic device to trigger the face recognition of unlocking the screen, then, if the user presses the power button of the electronic device when the screen of the electronic device is locked, the electronic device can start the camera to shoot. For the user image, the first face image of the user is obtained from the captured user image.
  • Step 302 The electronic device compares the first face image with the face images stored in the image library in turn. If the comparison result between the first face image and a certain face image in the image library is consistent, the electronic equipment The screen is unlocked successfully; if the comparison results with all face images in the image library are inconsistent, the electronic device fails to unlock the screen, and step 303 is executed.
  • Step 303 The electronic device determines the first image category to which the first face image belongs.
  • the electronic device may use the above-mentioned first model to determine the first image category to which the face image belongs.
  • the possible values of the first image category should be consistent with the possible image categories of the face images in the image library, that is, if the face images in the image library are divided into normal, dark light, occlusion, strong light, backlight, and other 6 kinds of images. category, the possible values of the first image category may be normal, dark light, occlusion, strong light, backlight, or others.
  • Step 304 The electronic device counts the number of failed unlocking of the first image category.
  • step 203 For the implementation of this step, reference may be made to step 203, which is not repeated here.
  • Step 305 The electronic device determines whether the number of times of unlocking failures of the first image category exceeds the first threshold, and if so, executes Step 306, and if not, the branch flow ends.
  • the electronic device Regardless of whether the number of unlocking failures exceeds the first threshold, the electronic device is still in a screen-locked state and is not unlocked successfully.
  • Step 306 The electronic device receives the unlocking request operation, obtains a second unlocking image, unlocks the screen according to the second unlocking image, and displays the first prompt information.
  • the judging step in step 305 may also be performed after the electronic device unlocks the screen, and when the judging result exceeds the first threshold, the first prompt information is displayed.
  • the second unlocking image may be a fingerprint image, a face image, or an iris image, etc., which is not limited in this embodiment of the present application.
  • the first prompt information is used to prompt the user to update the face image of the first image category.
  • the electronic device can determine whether there is a face image of the first image category; if there is a face image of the first image category, it means that there may be a problem with the face image, and the first prompt
  • the information can be specifically used to remind the user that the face image of the first image category is inaccurate, and the user is requested to reset the face image of the first image category.
  • the user If the user resets the face image of the first image category, it can improve the user's subsequent The possibility of successfully unlocking the screen in this scenario; if there is no face image of the first image category, the first prompt message can be specifically used to prompt the user to add a face image of the first image category, if the user adds the first image category of face images, the next time the user uses face unlocking under the same environmental conditions, the unlocking can be successful, which increases the unlocking success rate and improves the user experience.
  • the number of failures of the user to unlock the screen using the face images of each image category within a certain period of time is recorded, and if the number of failures corresponding to a certain image category exceeds the first threshold, the user is prompted to update the The face image of the image category, so that the next time the user is in the scene corresponding to the image category, the success rate of screen unlocking can be improved, thereby improving the screen unlocking efficiency and improving the user experience.
  • the electronic device determines that there is no face image of the second image category in the face image set by the user, and can use the image
  • the preset face images in the library generate face images of the second image category.
  • the preset face image may be a face image set by a user, or a face image of a certain image category generated according to the face image set by the user. Compared with the new face image regenerated using the generated face image, the new face image generated by using the face image set by the user is relatively more accurate.
  • the face image generates a face image of the above-mentioned second image category.
  • the electronic device When the electronic device generates the face image of the second image category according to the face image set by the user, the face image of a certain image category specified in advance can be used as the basis for generating a new face image. It is easier to add a face image of the "normal" image category to the image library. Based on this, the electronic device generates a face image of the second image category according to the face image set by the user, which may specifically include:
  • a face image of the third image category is obtained from the face image set by the user, and a face image of the second image category is generated according to the face image of the third image category.
  • the third image category may be the "normal" image category in the above example.
  • the second image category may be an image category for which the user has not set a face image.
  • the third image category is a "normal" image category
  • the second image category may be an image category other than the "normal” image category, for example Dark light, strong light, backlight, occlusion, etc.
  • An example of a method for generating a face image of the second image category according to the face image of the third image category is as follows:
  • An image generation model may be pre-trained for generating a face image of the second image category according to the face image of the third image category.
  • the training samples of the image generation model can be: several face image pairs, each face image pair includes: a face image of a third image category and a face image of the second image category generated according to the same face, preset.
  • the initial model can be a neural network model, and the above-mentioned image generation model is obtained by using the training samples to train the initial model.
  • the input of the image generation model can be a face image of the third image category, and the output is a person of the second image category. face image.
  • the above-mentioned neural network model may specifically be a cyclic generative adversarial network (cyclegan), a unit, or a generative adversarial network (stargan), or the like.
  • the first prompt information shown in step 306 shown in FIG. 3B may be specifically used to prompt the user to update the face image of the first image category.
  • the face image of the first image category set by the user in the image library of the electronic device is not accurate enough or is based on the image
  • the face image of the first image category generated by the face image in the library is not accurate enough, that is, the face image of the first image category may be quite different from the face image actually obtained by the electronic device in the scene corresponding to the first image category , by resetting the face image of the first image category by the user, the face image of the first image category in the image library can be made more accurate, thereby improving the efficiency of the user using the face image of the first image category to unlock the screen, improving user experience.
  • the electronic device generates the face image of the second image category according to the face image preset in the image library in the preset stage.
  • the preset face image in the image library generates a new face image, but after step 305, a new face image is generated according to the preset face image in the image library, and the above-mentioned preset face image can be set by the user.
  • the face image can also be the face image generated by the electronic device according to the face image set by a certain user; at this time, referring to Fig. 4, with respect to the embodiment shown in Fig. 3C, step 306 can be replaced with the following Step 401:
  • Step 401 The electronic device receives the unlock request operation, obtains a second unlock image, unlocks the screen according to the second unlock image, and generates a face image of the first image category according to a preset face image in the image library.
  • the judging step in step 305 may also be performed after the electronic device unlocks the screen, and when the judging result exceeds the first threshold, a face image of the first image category is generated according to the preset face image in the image library.
  • the electronic device generates a face image of the first image category according to the preset face image in the image library, which may include:
  • the face image of the first image category is a face image set by the user, generate a face image of the first image category according to the preset face image;
  • the face image of the first image category is a face image generated according to the first preset face image
  • the face image is generated according to the second preset face image.
  • a face image of the first image category is a face image generated according to the first preset face image
  • the first preset face image and the second preset face image are different.
  • the first preset face image and the second preset face image are respectively existing face images in the image library.
  • the face image of the first image category can be generated by using the preset face images in the image library, so that the user can When the user is in the scene corresponding to the first image category subsequently, the screen unlocking efficiency can be improved.
  • the electronic device can generate the face image of the first image category according to the face image of the fourth image category pre-specified in the image library, and at this time, the above-mentioned generation of the unlocked image of the first image category according to the preset unlocked image is performed.
  • the method may include: acquiring a face image of a fourth image category from a preset face image, and generating a face image of the first image category according to the face image of the fourth image category.
  • the new face image generated by using the face image set by the user is relatively more accurate.
  • the face image set by the user in the face image generates a face image of the first image category.
  • the electronic device may generate a face image of the first image category according to the face image of the fourth image category set by the user.
  • the fourth image category in this step may be the "normal" image category in the above example.
  • the face image of the first image category is a face image set by the user
  • the face image of the first image category set by the user may be the same as that of the electronic device in the corresponding scene.
  • the face images of the first image category can be generated by using the preset face images in the image library, so that when the user is in the scene corresponding to the first image category later, the screen unlocking can be improved. Efficiency; compared with the new face image regenerated using the generated face image, the new face image generated by using the face image set by the user is relatively more accurate.
  • the set face image generates a face image of the first image category
  • the face image set by the user may be a face image of the first image category or a face image of other image categories.
  • a face image of a specified image category may also be preferentially selected, or a combination of the two may be preferentially selected to preferentially select a face image of a specified image category and set by the user.
  • the face image of the first image category is a face image generated according to the first preset face image in the image library, at this time, it means that there is already a face image in the image library. There is a deviation between the face image generated according to the first preset face image and the face image collected by the electronic device in the scene corresponding to the first image category. Therefore, the image library other than the first preset face image can be used.
  • the second preset face image generates a face image of the first image category, so that when the electronic device is in the scene corresponding to the first image category later, the screen unlocking efficiency can be improved; compared with using the generated face image to regenerate The new face image generated by using the face image set by the user is relatively more accurate. Therefore, the above-mentioned second preset face image is preferably the face image set by the user in the image library.
  • the second preset face image may be a face image of the first image category, or may be a face image of other image categories.
  • the user only needs to input at least one face image of at least one image category into the electronic device, that is, face images of other image categories can be automatically generated, and the user does not need to be in physical scenes corresponding to different image categories.
  • Adding a face image on the basis of improving the screen unlocking efficiency, further reduces the user's setting operations for the face image, and improves the user experience.
  • Image categories of images may include: dry fingerprints, wet fingerprints, cold fingerprints, bright light fingerprints, dark light fingerprints, cracked fingerprints, and others.
  • the face image in FIG. 3C can be replaced with a fingerprint image.
  • the method can include:
  • Step 501 The electronic device receives the unlock request operation, and acquires a first fingerprint image.
  • Step 502 The electronic device sequentially compares the first fingerprint image with the fingerprint images in the image library. If the comparison result between the first fingerprint image and a fingerprint image in the image library is consistent, the electronic device unlocks the screen successfully; If the comparison results of all fingerprint images in the image library are inconsistent, the electronic device fails to unlock the screen, and step 503 is executed.
  • Step 503 The electronic device determines the first image category to which the first fingerprint image belongs.
  • Step 504 The electronic device counts the number of failed unlocking of the first image category.
  • Step 505 The electronic device determines whether the number of unlocking failures corresponding to the first image category exceeds the first threshold, and if so, executes Step 506, and if not, the branch flow ends.
  • Step 506 The electronic device receives the unlocking request operation, obtains a second unlocking image, unlocks the screen according to the second unlocking image, and displays the first prompt information.
  • the judging step in step 505 may also be performed after the electronic device unlocks the screen, and when the judging result exceeds the first threshold, the first prompt information is displayed.
  • the face image in FIG. 4 can be replaced with a fingerprint image.
  • the method shown in FIG. 6 differs from the method shown in FIG. 5 only in that step 506 is replaced with the following step 601 . specific,
  • Step 601 The electronic device receives the unlock request operation, obtains a second unlock image, unlocks the screen according to the second unlock image, and generates a fingerprint image of the first image category according to a preset fingerprint image in an image library.
  • the above embodiment can also be applied to the screen unlocking mode of iris unlocking, the only difference is that the above-mentioned face is replaced with iris, and the image category for face images is replaced with the image category for iris images, for example
  • the image category of the iris image may be similar to the image category of the face image, including: normal, dark light, strong light, backlight, occlusion, and others.
  • FIG. 7 is a structural diagram of an embodiment of an electronic device of the present application.
  • the electronic device 700 may include: a processor 710, a camera 720, a sensor module 730, and a display screen 740, wherein,
  • the camera 720 is used to collect the user's face image or iris image; the sensor module 730 may be a fingerprint sensor, used to collect the user's fingerprint image; the display screen 740 is used to display the image or video to the user; the processor 710 is used to execute FIG. 2 and the method provided by any of the embodiments of FIGS. 3C to 6 .
  • Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when it runs on a computer, the computer causes the computer to execute any one of the implementations of FIG. 2 and FIG. 3C to FIG. 6 of the present application. method provided by the example.
  • An embodiment of the present application further provides a computer program product, the computer program product includes a computer program, which, when running on a computer, enables the computer to execute the method provided in any of the embodiments of FIG. 2 , FIG. 3C to FIG. 6 of the present application.
  • “at least one” refers to one or more, and “multiple” refers to two or more.
  • “And/or”, which describes the association relationship of the associated objects means that there can be three kinds of relationships, for example, A and/or B, which can indicate the existence of A alone, the existence of A and B at the same time, and the existence of B alone. where A and B can be singular or plural.
  • the character “/” generally indicates that the associated objects are an “or” relationship.
  • “At least one of the following” and similar expressions refer to any combination of these items, including any combination of single or plural items.
  • At least one of a, b, and c may represent: a, b, c, a and b, a and c, b and c or a and b and c, where a, b, c may be single, or Can be multiple.
  • any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution, and the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (Read-Only Memory; hereinafter referred to as: ROM), Random Access Memory (Random Access Memory; hereinafter referred to as: RAM), magnetic disk or optical disk and other various A medium on which program code can be stored.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • magnetic disk or optical disk and other various A medium on which program code can be stored.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Telephone Function (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A screen unlocking method and an electronic device. The method comprises: obtaining a first unlocking image; if unlocking is failed according to the unlocking image, determining a first image category to which the first unlocking image belongs, the first image category being used for describing a scenario where the electronic device is located when obtaining the first unlocking image; counting the number of unlocking failures of the first image category; obtaining a second unlocking image; and unlocking a screen according to the second unlocking image, obtaining the number of unlocking failures of the first image category, and displaying first prompt information when the number of unlocking failures of the first image category exceeds a first threshold, the first prompt information being used for prompting a user to update the unlocking image of the first image category. According to the present application, the screen unlocking efficiency of the electronic device under severe conditions can be improved, and the user experience is improved.

Description

屏幕解锁方法和电子设备Screen unlocking method and electronic device 技术领域technical field
本申请涉及智能终端技术领域,特别涉及屏幕解锁方法和电子设备。The present application relates to the technical field of smart terminals, and in particular, to a screen unlocking method and an electronic device.
背景技术Background technique
很多电子设备具有屏幕锁定功能。屏幕锁定后,如果用户希望再次操作电子设备,需要对屏幕进行解锁。目前主流的屏幕解锁方式有人脸解锁以及指纹解锁等。但是,这些屏幕解锁方式在某些恶劣条件下,容易出现用户连续多次解锁屏幕不成功、甚至完全无法解锁屏幕的情况,屏幕解锁效率低,降低了用户体验。Many electronic devices have a screen lock function. After the screen is locked, if the user wishes to operate the electronic device again, the screen needs to be unlocked. At present, the mainstream screen unlocking methods include face unlocking and fingerprint unlocking. However, under certain harsh conditions, these screen unlocking methods are prone to the situation that the user fails to unlock the screen several times in a row, or even fails to unlock the screen at all, and the screen unlocking efficiency is low, which reduces the user experience.
发明内容SUMMARY OF THE INVENTION
本申请提供了一种屏幕解锁方法和电子设备,能够提高恶劣条件下电子设备的屏幕解锁效率,提升用户体验。The present application provides a screen unlocking method and electronic device, which can improve the screen unlocking efficiency of the electronic device under harsh conditions and improve user experience.
第一方面,本申请实施例提供一种屏幕解锁方法,应用于电子设备,包括:获取第一解锁图像;如果根据解锁图像解锁失败,确定第一解锁图像所属的第一图像类别,第一图像类别用于描述获取第一解锁图像时所述电子设备所处的场景;统计第一图像类别的解锁失败次数;获取第二解锁图像;根据第二解锁图像解锁屏幕,获取第一图像类别的解锁失败次数,当第一图像类别的解锁失败次数超过第一阈值,显示第一提示信息,第一提示信息用于提示用户更新第一图像类别的解锁图像。该方法中,统计第一图像类别的解锁失败次数,如果解锁失败次数超过第一阈值,提示用户更新第一图像类别的解锁图像,从而使得用户下一次处于该图像类别对应的场景时,能够提高屏幕解锁的成功率,从而提高了屏幕解锁效率,提升了用户体验。In a first aspect, an embodiment of the present application provides a screen unlocking method, which is applied to an electronic device, including: acquiring a first unlocking image; if unlocking fails according to the unlocking image, determining a first image category to which the first unlocking image belongs, and the first image The category is used to describe the scene in which the electronic device is located when the first unlocking image is obtained; count the number of failed unlocking of the first image category; obtain the second unlocking image; unlock the screen according to the second unlocking image, and obtain the unlocking of the first image category The number of failures. When the number of failed unlocking of the first image category exceeds the first threshold, first prompt information is displayed, and the first prompt information is used to prompt the user to update the unlocked image of the first image category. In this method, the number of failed unlocking of the first image category is counted, and if the number of failed unlocking times exceeds a first threshold, the user is prompted to update the unlocked image of the first image category, so that the next time the user is in the scene corresponding to the image category, the The success rate of screen unlocking improves the screen unlocking efficiency and user experience.
在一种可能的实现方式中,确定第一解锁图像所属的第一图像类别,包括:使用预设第一模型检测第一解锁图像所属的图像类别,得到第一图像类别;预设第一模型用于检测解锁图像所属的图像类别。In a possible implementation manner, determining the first image category to which the first unlocked image belongs includes: using a preset first model to detect the image category to which the first unlocked image belongs to obtain the first image category; preset the first model Used to detect which image class the unlock image belongs to.
在一种可能的实现方式中,获取第一解锁图像之前,还包括:判断用户设置的解锁图像中不存在第二图像类别的解锁图像,根据用户设置的解锁图像生成第二图像类别的解锁图像。In a possible implementation manner, before acquiring the first unlocking image, the method further includes: judging that there is no unlocking image of the second image category in the unlocking image set by the user, and generating an unlocking image of the second image category according to the unlocking image set by the user .
在一种可能的实现方式中,根据用户设置的解锁图像生成第二图像类别的解锁图像,包括:从用户设置的解锁图像中获取第三图像类别的解锁图像,根据第三图像类别的解锁图像生成第二图像类别的解锁图像。In a possible implementation manner, generating the unlocking image of the second image category according to the unlocking image set by the user includes: obtaining the unlocking image of the third image category from the unlocking image set by the user, and obtaining the unlocking image of the third image category according to the unlocking image of the third image category An unlock image of the second image category is generated.
第二方面,本申请实施例提供一种屏幕解锁方法,应用于电子设备,包括:获取第一解锁图像;若根据第一解锁图像解锁失败,确定第一解锁图像所属的第一图 像类别,第一图像类别用于描述获取第一解锁图像时所述电子设备所处的场景;统计第一图像类别的解锁失败次数;获取第二解锁图像;根据第二解锁图像解锁所述屏幕,获取第一图像类别的解锁失败次数,当第一图像类别的解锁失败次数超过第一阈值时,根据预设解锁图像生成第一图像类别的解锁图像。In a second aspect, an embodiment of the present application provides a screen unlocking method, which is applied to an electronic device, including: acquiring a first unlocking image; if unlocking fails according to the first unlocking image, determining a first image category to which the first unlocking image belongs, An image category is used to describe the scene of the electronic device when the first unlock image is obtained; count the number of failed unlocks of the first image category; obtain a second unlock image; unlock the screen according to the second unlock image, and obtain the first The number of failed unlocking of the image category. When the number of failed unlocking of the first image category exceeds the first threshold, an unlocking image of the first image category is generated according to the preset unlocking image.
在一种可能的实现方式中,确定第一解锁图像所属的第一图像类别,包括:使用预设第一模型检测第一解锁图像所属的图像类别,得到第一图像类别;预设第一模型用于检测解锁图像所属的图像类别。In a possible implementation manner, determining the first image category to which the first unlocked image belongs includes: using a preset first model to detect the image category to which the first unlocked image belongs to obtain the first image category; preset the first model Used to detect which image class the unlock image belongs to.
在一种可能的实现方式中,根据预设解锁图像生成第一图像类别的解锁图像,包括:如果预设解锁图像中不存在第一图像类别的解锁图像,根据预设解锁图像生成第一图像类别的解锁图像;如果预设解锁图像中存在第一图像类别的解锁图像,且第一图像类别的解锁图像是用户设置的解锁图像,根据预设解锁图像生成第一图像类别的解锁图像;如果预设解锁图像中存在第一图像类别的解锁图像,且第一图像类别的解锁图像是根据第一预设解锁图像生成的解锁图像,根据第二预设解锁图像生成第一图像类别的解锁图像。In a possible implementation manner, generating an unlock image of the first image category according to a preset unlock image includes: if there is no unlock image of the first image category in the preset unlock image, generating the first image according to the preset unlock image The unlocking image of the category; if there is an unlocking image of the first image category in the preset unlocking image, and the unlocking image of the first image category is the unlocking image set by the user, the unlocking image of the first image category is generated according to the preset unlocking image; if There is an unlock image of the first image category in the preset unlock image, and the unlock image of the first image category is an unlock image generated according to the first preset unlock image, and the unlock image of the first image category is generated according to the second preset unlock image .
在一种可能的实现方式中,根据预设解锁图像生成第一图像类别的解锁图像,包括:从预设解锁图像中获取第四图像类别的解锁图像,根据第四图像类别的解锁图像生成第一图像类别的解锁图像。In a possible implementation manner, generating the unlocking image of the first image category according to the preset unlocking image includes: acquiring the unlocking image of the fourth image category from the preset unlocking image, and generating the third image according to the unlocking image of the fourth image category. An unlocked image of an image category.
第三方面,本申请实施例提供一种电子设备,包括处理器和存储器,存储器用于存储计算机程序,当处理器执行计算机程序时,使得电子设备执行第一方面任一项的方法。In a third aspect, embodiments of the present application provide an electronic device, including a processor and a memory, where the memory is used to store a computer program, and when the processor executes the computer program, the electronic device is made to perform any one of the methods of the first aspect.
第四方面,本申请实施例提供一种电子设备,包括处理器和存储器,存储器用于存储计算机程序,当处理器执行计算机程序时,使得电子设备执行第二方面任一项的方法In a fourth aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory is used to store a computer program, and when the processor executes the computer program, the electronic device is made to perform any method of the second aspect
第五方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行第一方面任一项的方法。In a fifth aspect, embodiments of the present application provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program runs on a computer, causes the computer to execute the method of any one of the first aspect.
第六方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行第二方面任一项的方法。In a sixth aspect, embodiments of the present application provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program runs on a computer, causes the computer to execute the method of any one of the second aspect.
第七方面,本申请提供一种计算机程序,当计算机程序被计算机执行时,用于执行第一方面的方法。In a seventh aspect, the present application provides a computer program for performing the method of the first aspect when the computer program is executed by a computer.
在一种可能的设计中,第七方面中的程序可以全部或者部分存储在与处理器封装在一起的存储介质上,也可以部分或者全部存储在不与处理器封装在一起的存储器上。In a possible design, the program in the seventh aspect may be stored in whole or in part on a storage medium packaged with the processor, or may be stored in part or in part in a memory not packaged with the processor.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的 一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.
图1A为本申请实施例电子设备的结构示意图;1A is a schematic structural diagram of an electronic device according to an embodiment of the present application;
图1B为本申请实施例电子设备的软件结构示意图;1B is a schematic diagram of a software structure of an electronic device according to an embodiment of the present application;
图2为本申请屏幕解锁方法一个实施例的流程示意图;2 is a schematic flowchart of an embodiment of a screen unlocking method of the application;
图3A为本申请屏幕解锁方法中预先设置阶段的UI界面图;3A is a UI interface diagram of a preset stage in the screen unlocking method of the application;
图3B为本申请屏幕解锁方法中解锁阶段的UI界面图;3B is a UI interface diagram of the unlocking stage in the screen unlocking method of the application;
图3C为本申请屏幕解锁方法另一个实施例的流程示意图;3C is a schematic flowchart of another embodiment of the screen unlocking method of the present application;
图4为本申请屏幕解锁方法又一个实施例的流程示意图;4 is a schematic flowchart of another embodiment of the screen unlocking method of the application;
图5为本申请屏幕解锁方法又一个实施例的流程示意图;5 is a schematic flowchart of another embodiment of the screen unlocking method of the application;
图6为本申请屏幕解锁方法又一个实施例的流程示意图;6 is a schematic flowchart of another embodiment of the screen unlocking method of the application;
图7为本申请电子设备另一个实施例的结构示意图。FIG. 7 is a schematic structural diagram of another embodiment of the electronic device of the present application.
具体实施方式Detailed ways
本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。The terms used in the embodiments of the present application are only used to explain specific embodiments of the present application, and are not intended to limit the present application.
目前,对于人脸解锁的屏幕解锁方式,一般由用户在电子设备中预先设置用户的人脸图像作为屏幕解锁的比对标准;当用户触发屏幕解锁时,电子设备采集用户的人脸图像,将其与电子设备中预设的人脸图像比对,比对结果为一致,则解锁屏幕,否则不解锁屏幕。人脸解锁能否成功与用户和电子设备所处场景相关,上述场景包括用户和电子设备所在环境的客观条件例如光照条件、以及用户面部特征等。如果用户解锁屏幕时的光照条件和人脸图像设置时的光照条件相近,且用户面部未发生大的改变,电子设备在触发屏幕解锁时采集到的人脸图像和用户预先设置的人脸图像相近,则电子设备能够解锁屏幕,用户解锁屏幕成功。但是,如果用户解锁屏幕时的光照条件与用户预先设置人脸图像时的光照条件相差较大,比如光线强度相对较小或者相对较大、人脸逆光等等,或者,用户面部发生改变例如出现遮挡等情况,则电子设备在触发屏幕解锁时采集到的人脸图像可能与用户预先设置的人脸图像存在较大差别,从而电子设备无法解锁屏幕,用户解锁屏幕失败。如果电子设备采集人脸图像的场景不改变,就可能出现用户多次解锁屏幕无法成功的情况,降低屏幕解锁效率,降低用户体验。At present, for the screen unlocking method of face unlocking, the user generally pre-sets the user's face image in the electronic device as the comparison standard for screen unlocking; when the user triggers the screen unlocking, the electronic device collects the user's face image, It is compared with the preset face image in the electronic device, and if the comparison result is consistent, the screen is unlocked, otherwise the screen is not unlocked. Whether the face unlock is successful or not is related to the scene where the user and the electronic device are located. The above-mentioned scene includes the objective conditions of the environment where the user and the electronic device are located, such as lighting conditions, and the user's facial features. If the lighting conditions when the user unlocks the screen is similar to the lighting conditions when the face image is set, and the user's face does not change significantly, the face image collected by the electronic device when the screen is unlocked is similar to the face image preset by the user , the electronic device can unlock the screen, and the user successfully unlocks the screen. However, if the lighting conditions when the user unlocks the screen is quite different from the lighting conditions when the user presets the face image, for example, the light intensity is relatively small or relatively large, the face is backlit, etc., or the user's face changes, such as appearing If the screen is blocked, the face image collected by the electronic device when the screen is triggered to unlock may be quite different from the face image preset by the user, so that the electronic device cannot unlock the screen, and the user fails to unlock the screen. If the scene in which the electronic device collects the face image does not change, it may happen that the user fails to unlock the screen multiple times, which reduces the screen unlocking efficiency and the user experience.
同样的,对于指纹解锁的屏幕解锁方式,一般由用户在电子设备中预存用户的若干个指纹图像作为屏幕解锁的比对标准,当用户触发屏幕解锁时,电子设备采集用户的指纹图像,将其与预存的指纹图像比对,比对结果为一致,则屏幕解锁成功,否则屏幕解锁失败。正常情况下,用户可以通过输入指纹的方式解锁屏幕,但是,用户的手指指纹可能出现干指纹、湿指纹、裂指纹、或者低温下指纹等情况,导致屏幕解锁失败,这些情况与用户场景相关,上述场景包括用户和电子设备所在环境的客观条件例如温度条件、以及用户指纹特征等。干指纹是指用户的手指过干;湿指纹是指用户的手指过湿;低温下指纹是指用户的手指温度过低,这三种情况下电子设备采集到的指纹图像容易出现与实际指纹纹路不匹配的问题,从而与用户预先设置的指纹图像无 法比对一致,造成解锁失败;上述裂指纹是指用户的手指指纹由于皲裂、受伤等情况而出现裂痕,此时,由于用户手指指纹本身出现变化,电子设备采集到的指纹图像与用户预先设置的指纹图像也无法比对一致,造成解锁失败。如果手指指纹出现的上述情况无法缓解,就会导致用户连续多次解锁屏幕失败、甚至完全无法解锁屏幕,降低屏幕解锁效率,降低用户体验。Similarly, for the screen unlocking method of fingerprint unlocking, the user generally pre-stores several fingerprint images of the user in the electronic device as the comparison standard for screen unlocking. When the user triggers the screen unlocking, the electronic device collects the user's fingerprint image and uses it Compare with the pre-stored fingerprint image, if the result is the same, the screen is unlocked successfully, otherwise the screen is not unlocked. Under normal circumstances, the user can unlock the screen by entering a fingerprint. However, the user's fingerprint may have dry, wet, cracked, or low-temperature fingerprints, which may cause the screen to fail to unlock. These situations are related to user scenarios. The above scenarios include objective conditions of the environment where the user and the electronic device are located, such as temperature conditions, and user fingerprint characteristics. Dry fingerprint means that the user's finger is too dry; wet fingerprint means that the user's finger is too wet; fingerprint under low temperature means that the temperature of the user's finger is too low. The problem of mismatch, so that it cannot be compared with the fingerprint image preset by the user, resulting in the unlocking failure; the above cracked fingerprint refers to the cracking of the user's fingerprint due to cracks, injuries, etc. At this time, due to the user's fingerprint itself The fingerprint image collected by the electronic device cannot be compared with the fingerprint image preset by the user, resulting in the unlocking failure. If the above situation of the fingerprint cannot be alleviated, the user will fail to unlock the screen for many times in a row, or even cannot unlock the screen at all, which reduces the screen unlocking efficiency and reduces the user experience.
可见,不管是人脸解锁还是指纹解锁,都会出现由于场景下的条件恶劣导致的屏幕解锁失败的问题,从而使得电子设备的屏幕解锁效率低,用户体验差。It can be seen that whether it is face unlocking or fingerprint unlocking, there will be a problem of screen unlocking failure due to poor conditions in the scene, resulting in low screen unlocking efficiency of electronic devices and poor user experience.
为此,本申请实施例提供一种屏幕解锁方法和电子设备,能够提高恶劣条件下的屏幕解锁效率,提升用户体验。To this end, the embodiments of the present application provide a screen unlocking method and electronic device, which can improve screen unlocking efficiency under severe conditions and improve user experience.
图1A示意了一种电子设备100的结构示意图。FIG. 1A is a schematic structural diagram of an electronic device 100 .
电子设备100可以包括手机、可折叠电子设备、平板电脑、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、人工智能(artificial intelligence,AI)设备、可穿戴式设备、车载设备、智能家居设备、或智慧城市设备中的至少一种。本申请实施例对该电子设备100的具体类型不作特殊限制。Electronic device 100 may include cell phones, foldable electronic devices, tablet computers, desktop computers, laptop computers, handheld computers, notebook computers, ultra-mobile personal computers (UMPCs), netbooks, cell phones, personal computers Digital assistant (personal digital assistant, PDA), augmented reality (augmented reality, AR) device, virtual reality (virtual reality, VR) device, artificial intelligence (artificial intelligence, AI) device, wearable device, vehicle-mounted device, smart home equipment, or at least one of smart city equipment. The specific type of the electronic device 100 is not particularly limited in this embodiment of the present application.
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接头130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像模组193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) connector 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera module 193, display screen 194 , and a subscriber identification module (subscriber identification module, SIM) card interface 195 and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air 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, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structures illustrated in the embodiments of the present application do 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 less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
处理器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The processor can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器可以为高速缓冲存储器。该存储器可以保存处理器110用过或使用频率较高的指令或数据。如果处理器110需要使用该指令或数据,可从该存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 may be a cache memory. The memory may store instructions or data that are used by the processor 110 or are frequently used. If the processor 110 needs to use the instructions or data, it can be called directly from this memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。处理器110可以通过以上至少一种接口连接触摸传感器、音频模块、无线通信模块、显示器、摄像头等模块。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc. The processor 110 may be connected to modules such as a touch sensor, an audio module, a wireless communication module, a display, a camera, and the like through at least one of the above interfaces.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
USB接头130是一种符合USB标准规范的接口,可以用于连接电子设备100和外围设备,具体可以是Mini USB接头,Micro USB接头,USB Type C接头等。USB接头130可以用于连接充电器,实现充电器为该电子设备100充电,也可以用于连接其他电子设备,实现电子设备100与其他电子设备之间传输数据。也可以用于连接耳机,通过耳机输出电子设备中存储的音频。该接头还可以用于连接其他电子设备,例如VR设备等。在一些实施例中,通用串行总线的标准规范可以为USB1.x、USB2.0、USB3.x和USB4。The USB connector 130 is an interface conforming to the USB standard specification, which can be used to connect the electronic device 100 and peripheral devices, and specifically can be a Mini USB connector, a Micro USB connector, a USB Type C connector, and the like. The USB connector 130 can be used to connect to a charger, so that the charger can charge the electronic device 100, and can also be used to connect to other electronic devices, so as to transmit data between the electronic device 100 and other electronic devices. It can also be used to connect headphones to output audio stored in electronic devices through the headphones. This connector can also be used to connect other electronic devices, such as VR devices, etc. In some embodiments, the standard specifications of the Universal Serial Bus may be USB1.x, USB2.0, USB3.x, and USB4.
充电管理模块140用于接收充电器的充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used for receiving charging input from the charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像模组193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera module 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be provided in the processor 110 . In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开 关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Wherein, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and passed to the application processor. The application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),蓝牙低功耗(bluetooth low energy,BLE),超宽带(ultra wide band,UWB),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), bluetooth low power power consumption (bluetooth low energy, BLE), ultra wide band (UWB), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络和其他电子设备通信。该无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。该GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other electronic devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (quasi- zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
电子设备100可以通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU 为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 may implement a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或多个显示屏194。Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light). emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on. In some embodiments, electronic device 100 may include one or more display screens 194 .
电子设备100可以通过摄像模组193,ISP,视频编解码器,GPU,显示屏194以及应用处理器AP、神经网络处理器NPU等实现摄像功能。The electronic device 100 may implement a camera function through a camera module 193, an ISP, a video codec, a GPU, a display screen 194, an application processor AP, a neural network processor NPU, and the like.
摄像模组193可用于采集拍摄对象的彩色图像数据以及深度数据。ISP可用于处理摄像模组193采集的彩色图像数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将该电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像模组193中。The camera module 193 can be used to collect color image data and depth data of the photographed object. The ISP can be used to process the color image data collected by the camera module 193 . For example, when taking a picture, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera module 193 .
在一些实施例中,摄像模组193可以由彩色摄像模组和3D感测模组组成。In some embodiments, the camera module 193 may be composed of a color camera module and a 3D sensing module.
在一些实施例中,彩色摄像模组的摄像头的感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。In some embodiments, the photosensitive element of the camera of the color camera module may 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 convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
在一些实施例中,3D感测模组可以是(time of flight,TOF)3D感测模块或结构光(structured light)3D感测模块。其中,结构光3D感测是一种主动式深度感测技术,结构光3D感测模组的基本零组件可包括红外线(Infrared)发射器、IR相机模等。结构光3D感测模组的工作原理是先对被拍摄物体发射特定图案的光斑(pattern),再接收该物体表面上的光斑图案编码(light coding),进而比对与原始投射光斑的异同,并利用三角原理计算出物体的三维坐标。该三维坐标中就包括电子设备100距离被拍摄物体的距离。其中,TOF 3D感测可以是主动式深度感测技术,TOF 3D感测模组的基本组件可包括红外线(Infrared)发射器、IR相机模等。TOF 3D感测模组的工作原理是通过红外线折返的时间去计算TOF 3D感测模组跟被拍摄物体之间的距离(即深度),以得到3D景深图。In some embodiments, the 3D sensing module may be a time of flight (TOF) 3D sensing module or a structured light (structured light) 3D sensing module. The structured light 3D sensing is an active depth sensing technology, and the basic components of the structured light 3D sensing module may include an infrared (Infrared) emitter, an IR camera module, and the like. The working principle of the structured light 3D sensing module is to first emit a light spot of a specific pattern on the object to be photographed, and then receive the light coding of the light spot pattern on the surface of the object, and then compare the similarities and differences with the original projected light spot. And use the principle of trigonometry to calculate the three-dimensional coordinates of the object. The three-dimensional coordinates include the distance between the electronic device 100 and the object to be photographed. Among them, the TOF 3D sensing can be an active depth sensing technology, and the basic components of the TOF 3D sensing module can include an infrared (Infrared) transmitter, an IR camera module, and the like. The working principle of the TOF 3D sensing module is to calculate the distance (ie depth) between the TOF 3D sensing module and the object to be photographed through the time of infrared reentry to obtain a 3D depth map.
结构光3D感测模组还可应用于人脸识别、体感游戏机、工业用机器视觉检测等领域。TOF 3D感测模组还可应用于游戏机、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)等领域。Structured light 3D sensing modules can also be used in face recognition, somatosensory game consoles, industrial machine vision detection and other fields. TOF 3D sensing modules can also be applied to game consoles, augmented reality (AR)/virtual reality (VR) and other fields.
在另一些实施例中,摄像模组193还可以由两个或更多个摄像头构成。这两个或更多个摄像头可包括彩色摄像头,彩色摄像头可用于采集被拍摄物体的彩色图像数据。 这两个或更多个摄像头可采用立体视觉(stereo vision)技术来采集被拍摄物体的深度数据。立体视觉技术是基于人眼视差的原理,在自然光源下,透过两个或两个以上的摄像头从不同的角度对同一物体拍摄影像,再进行三角测量法等运算来得到电子设备100与被拍摄物之间的距离信息,即深度信息。In other embodiments, the camera module 193 may also be composed of two or more cameras. The two or more cameras may include color cameras, and the color cameras may be used to collect color image data of the photographed object. The two or more cameras may use stereo vision technology to collect depth data of the photographed object. Stereoscopic vision technology is based on the principle of human eye parallax. Under natural light sources, two or more cameras are used to capture images of the same object from different angles, and then operations such as triangulation are performed to obtain the electronic device 100 and the object. The distance information between the objects, that is, the depth information.
在一些实施例中,电子设备100可以包括1个或多个摄像模组193。具体的,电子设备100可以包括1个前置摄像模组193以及1个后置摄像模组193。其中,前置摄像模组193通常可用于采集面对显示屏194的拍摄者自己的彩色图像数据以及深度数据,后置摄像模组可用于采集拍摄者所面对的拍摄对象(如人物、风景等)的彩色图像数据以及深度数据。In some embodiments, the electronic device 100 may include one or more camera modules 193 . Specifically, the electronic device 100 may include a front camera module 193 and a rear camera module 193 . Among them, the front camera module 193 can usually be used to collect the color image data and depth data of the photographer facing the display screen 194, and the rear camera module can be used to collect the shooting objects (such as people, landscapes, etc.) that the photographer faces. etc.) color image data and depth data.
在一些实施例中,处理器110中的CPU或GPU或NPU可以对摄像模组193所采集的彩色图像数据和深度数据进行处理。在一些实施例中,NPU可以通过骨骼点识别技术所基于的神经网络算法,例如卷积神经网络算法(CNN),来识别摄像模组193(具体是彩色摄像模组)所采集的彩色图像数据,以确定被拍摄人物的骨骼点。CPU或GPU也可来运行神经网络算法以实现根据彩色图像数据确定被拍摄人物的骨骼点。在一些实施例中,CPU或GPU或NPU还可用于根据摄像模组193(可以是3D感测模组)所采集的深度数据和已识别出的骨骼点来确认被拍摄人物的身材(如身体比例、骨骼点之间的身体部位的胖瘦情况),并可以进一步确定针对该被拍摄人物的身体美化参数,最终根据该身体美化参数对被拍摄人物的拍摄图像进行处理,以使得该拍摄图像中该被拍摄人物的体型被美化。后续实施例中会详细介绍如何基于摄像模组193所采集的彩色图像数据和深度数据对被拍摄人物的图像进行美体处理,这里先不赘述。In some embodiments, the CPU, GPU or NPU in the processor 110 may process the color image data and depth data collected by the camera module 193 . In some embodiments, the NPU can recognize the color image data collected by the camera module 193 (specifically, the color camera module) through a neural network algorithm based on the skeleton point recognition technology, such as a convolutional neural network algorithm (CNN). , to determine the skeleton point of the person being photographed. The CPU or GPU can also run the neural network algorithm to realize the determination of the skeletal points of the photographed person according to the color image data. In some embodiments, the CPU, GPU or NPU can also be used to confirm the figure (such as the body of the person being photographed) according to the depth data collected by the camera module 193 (which may be a 3D sensing module) and the identified skeletal points. ratio, the fatness and thinness of the body parts between the skeletal points), and can further determine the body beautification parameters for the photographed person, and finally process the photographed image of the photographed person according to the body beautification parameters, so that the photographed image The body shape of the person to be photographed is beautified. Subsequent embodiments will introduce in detail how to perform body beautification processing on the image of the person being photographed based on the color image data and depth data collected by the camera module 193 , which will not be described here.
数字信号处理器用于处理数字信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals and can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process the input information, and can continuously learn by itself. Applications such as intelligent cognition of the electronic device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。或将音乐,视频等文件从电子设备传输至外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 . The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card. Or transfer music, video and other files from electronic devices to external memory cards.
内部存储器121可以用于存储计算机可执行程序代码,该可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。 此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能方法或数据处理。Internal memory 121 may be used to store computer executable program code, which includes instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like. The storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like. In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like. The processor 110 executes various functional methods or data processing of the electronic device 100 by executing the instructions stored in the internal memory 121 and/or the instructions stored in the memory provided in the processor.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或输出免提通话的音频信号。 Speaker 170A, also referred to as a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 may listen to music through the speaker 170A, or output an audio signal for a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also referred to as "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or a voice message, the voice can be answered by placing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone jack 170D is used to connect wired earphones. The earphone interface 170D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180AThe pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be provided on the display screen 194 . Pressure sensor 180A
的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测该触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。There are many types, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器 180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,控制镜头反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100 . In some embodiments, the angular velocity of electronic device 100 about three axes (ie, x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and controls the reverse movement of the lens to offset the shaking of the electronic device 100 to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
气压传感器180C用于测量气压。在一些实施例中,电子设备100根据气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。当电子设备为可折叠电子设备,磁传感器180D可以用于检测电子设备的折叠或展开,或折叠角度。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D. When the electronic device is a foldable electronic device, the magnetic sensor 180D can be used to detect the folding or unfolding of the electronic device, or the folding angle. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。Distance sensor 180F for measuring distance. The electronic device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到的反射光的强度大于阈值时,可以确定电子设备100附近有物体。当检测到的反射光的强度小于阈值时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The electronic device 100 emits infrared light to the outside through the light emitting diode. Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When the intensity of the detected reflected light is greater than the threshold, it may be determined that there is an object near the electronic device 100 . When the intensity of the detected reflected light is less than the threshold, the electronic device 100 may determine that there is no object near the electronic device 100 . The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
环境光传感器180L可以用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否被遮挡,例如电子设备在口袋里。当检测到电子设备被遮挡或在口袋里,可以使部分功能(例如触控功能)处于禁用状态,以防误操作。The ambient light sensor 180L may be used to sense ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is blocked, eg, the electronic device is in a pocket. When it is detected that the electronic device is blocked or in a pocket, some functions (such as touch functions) can be disabled to prevent misuse.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking pictures with fingerprints, answering incoming calls with fingerprints, and the like.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当通过温度传感器180J检测的温度超过阈值,电子设备100执行降低处理器的性能,以便降低电子设备的功耗以实施热保护。在另一些实施例中,当通过温度传感器180J检测的温度低于另一阈值时,电子设备100对电池142加热。在其他一些实施例中,当温度低于又一阈值时,电子设备100可以对电池142的输出电压升压。The temperature sensor 180J is used to detect the temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature detected by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in the performance of the processor in order to reduce the power consumption of the electronic device to implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature detected by the temperature sensor 180J is below another threshold. In other embodiments, the electronic device 100 may boost the output voltage of the battery 142 when the temperature is below yet another threshold.
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194, 由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also called "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also referred to as a "touch screen". The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to touch operations may be provided through display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于该骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于该骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone. The audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibration bone block obtained by the bone conduction sensor 180M, and realize the voice function. The application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
按键190可以包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 may include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。Motor 191 can generate vibrating cues. The motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. The motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 . Different application scenarios (for example: time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或多个SIM卡接口。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be contacted and separated from the electronic device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 . The electronic device 100 may support one or more SIM card interfaces. The SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. Multiple cards can be of the same type or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication. In some embodiments, the electronic device 100 employs an eSIM, ie: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiments of the present application take an Android system with a layered architecture as an example to exemplarily describe the software structure of the electronic device 100 .
图1B是本申请实施例的电子设备100的软件结构框图。FIG. 1B is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为五层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime,ART)和原生C/C++库,硬件抽象层(Hardware Abstract Layer,HAL)以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom, the application layer, the application framework layer, the Android runtime (Android runtime, ART) and the native C/C++ library, and the hardware abstraction layer (Hardware abstraction layer). Abstract Layer, HAL) and kernel layer.
应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.
如图1B所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in Fig. 1B, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图1B所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,资源管理器,通知管理器,活动管理器,输入管理器等。As shown in FIG. 1B , the application framework layer may include window managers, content providers, view systems, resource managers, notification managers, activity managers, input managers, and the like.
窗口管理器提供窗口管理服务(Window Manager Service,WMS),WMS可以用于窗口管理、窗口动画管理、surface管理以及作为输入系统的中转站。The window manager provides window management services (Window Manager Service, WMS), WMS can be used for window management, window animation management, surface management and as a transfer station for the input system.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。该数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make these data accessible to applications. This data can include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications. A display interface can consist of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
活动管理器可以提供活动管理服务(Activity Manager Service,AMS),AMS可以用于系统组件(例如活动、服务、内容提供者、广播接收器)的启动、切换、调度以及应用进程的管理和调度工作。Activity Manager can provide activity management services (Activity Manager Service, AMS), AMS can be used for system components (such as activities, services, content providers, broadcast receivers) startup, switching, scheduling and application process management and scheduling work .
输入管理器可以提供输入管理服务(Input Manager Service,IMS),IMS可以用于管理系统的输入,例如触摸屏输入、按键输入、传感器输入等。IMS从输入设备节点取出事件,通过和WMS的交互,将事件分配至合适的窗口。The input manager can provide an input management service (Input Manager Service, IMS), and the IMS can be used to manage the input of the system, such as touch screen input, key input, sensor input and so on. IMS fetches events from input device nodes, and distributes events to appropriate windows through interaction with WMS.
安卓运行时包括核心库和安卓运行时。安卓运行时负责将源代码转换为机器码。安卓运行时主要包括采用提前(ahead or time,AOT)编译技术和及时(just in time,JIT)编译技术。The Android runtime includes the core library and the Android runtime. The Android runtime is responsible for converting source code to machine code. The Android runtime mainly includes the use of ahead or time (AOT) compilation technology and just in time (JIT) compilation technology.
核心库主要用于提供基本的Java类库的功能,例如基础数据结构、数学、IO、工具、数据库、网络等库。核心库为用户进行安卓应用开发提供了API。The core library is mainly used to provide the functions of basic Java class libraries, such as basic data structures, mathematics, IO, tools, databases, networks and other libraries. The core library provides an API for users to develop Android applications.
原生C/C++库可以包括多个功能模块。例如:表面管理器(surface manager),媒体框架(Media Framework),libc,OpenGL ES、SQLite、Webkit等。A native C/C++ library can include multiple functional modules. For example: surface manager, Media Framework, libc, OpenGL ES, SQLite, Webkit, etc.
其中,表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。媒体框架支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。OpenGL ES提供应用程序中2D图形和3D图形的绘制和操作。SQLite为电子设备100的应用程序提供轻量级关系型数据库。Among them, the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications. The media framework supports playback and recording of many common audio and video formats, as well as still image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. OpenGL ES provides the drawing and manipulation of 2D graphics and 3D graphics in applications. SQLite provides a lightweight relational database for applications of the electronic device 100 .
硬件抽象层运行于用户空间(user space),对内核层驱动进行封装,向上层提供调用接口。The hardware abstraction layer runs in user space, encapsulates the kernel layer driver, and provides a calling interface to the upper layer.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
下面结合捕获拍照场景,示例性说明电子设备100软件以及硬件的工作流程。In the following, the workflow of the software and hardware of the electronic device 100 is exemplarily described in conjunction with the capturing and photographing scene.
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像模组193捕获静态图像或视频。When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes touch operations into raw input events (including touch coordinates, timestamps of touch operations, etc.). Raw input events are stored at the kernel layer. The application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the camera application icon, for example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer. The camera module 193 captures still images or video.
为了便于理解,本申请以下实施例将以具有图1A和图1B所示结构的电子设备为例,结合附图和应用场景,对本申请实施例提供的方法进行具体说明。For ease of understanding, the following embodiments of the present application will take the electronic device having the structure shown in FIG. 1A and FIG. 1B as an example, and combine the drawings and application scenarios to specifically describe the methods provided by the embodiments of the present application.
在进行电子设备的屏幕解锁时,屏幕解锁方式包括人脸解锁、指纹解锁、虹膜解锁等,不同的屏幕解锁方式中使用的解锁图像不同。人脸图像和虹膜图像可以由摄像头拍摄得到,指纹图像可以由指纹传感器采集得到。本申请实施例中主要以人脸解锁和指纹解锁为例。When unlocking the screen of an electronic device, the screen unlocking methods include face unlocking, fingerprint unlocking, iris unlocking, etc., and different unlocking images are used in different screen unlocking methods. The face image and iris image can be captured by the camera, and the fingerprint image can be captured by the fingerprint sensor. In the embodiments of the present application, face unlocking and fingerprint unlocking are mainly used as examples.
图2是本申请屏幕解锁方法一个实施例的流程图,如图2所示,该方法可以包括:FIG. 2 is a flowchart of an embodiment of the screen unlocking method of the present application. As shown in FIG. 2 , the method may include:
步骤201:电子设备获取第一解锁图像。Step 201: The electronic device acquires a first unlock image.
用户通过对电子设备进行指定操作,触发电子设备执行屏幕解锁流程,相应的,电子设备可以根据用户触发的屏幕解锁方式,获取对应的解锁图像,例如,用户触发的屏幕解锁方式是指纹解锁,则第一解锁图像可以是指纹图像,用户触发的屏幕解锁方式是人脸解锁,则第一解锁图像可以是人脸图像。The user performs a specified operation on the electronic device to trigger the electronic device to perform the screen unlocking process. Accordingly, the electronic device can obtain the corresponding unlocking image according to the screen unlocking method triggered by the user. For example, if the screen unlocking method triggered by the user is fingerprint unlocking, then The first unlocking image may be a fingerprint image, and the screen unlocking method triggered by the user is face unlocking, and the first unlocking image may be a face image.
步骤202:若根据第一解锁图像解锁失败,电子设备确定第一解锁图像所属的第一图像类别,第一图像类别用于描述获取第一解锁图像时电子设备所处场景。Step 202: If the unlocking fails according to the first unlocking image, the electronic device determines the first image category to which the first unlocking image belongs, and the first image category is used to describe the scene where the electronic device is located when the first unlocking image is acquired.
本申请实施例中,针对于不同的屏幕解锁方式,可以对该屏幕解锁方式下电子设备可能遇到的场景进行分类,具体分类标准本申请实施例不作限定。例如基于前述描述,可以将人脸解锁时的场景划分为正常、暗光、遮挡、强光、逆光、其他等图像类别,则如果第一解锁图像是人脸图像,第一图像类别可以是上述正常、暗光、遮挡、强光、逆光、其他等图像类别之一,可以将指纹解锁时的场景划分为干指纹、湿指纹、冷指纹、强光指纹、暗光指纹、裂指纹和其他等图像类别,则如果第一解锁图像是指纹图像,第一图像类别可以是上述干指纹、湿指纹、冷指纹、强光指纹、暗光指纹、裂指纹和其他等图像类别之一。In the embodiments of the present application, for different screen unlocking methods, scenarios that may be encountered by the electronic device in the screen unlocking methods may be classified, and specific classification standards are not limited in the embodiments of the present application. For example, based on the foregoing description, the scene when the face is unlocked can be divided into image categories such as normal, dark light, occlusion, strong light, backlight, and others. If the first unlocked image is a face image, the first image category can be the above-mentioned image categories. One of the image categories such as normal, dark light, occlusion, strong light, backlight, and others. The scene when fingerprints are unlocked can be divided into dry fingerprints, wet fingerprints, cold fingerprints, strong light fingerprints, dark light fingerprints, cracked fingerprints, and others. Image category, if the first unlock image is a fingerprint image, the first image category may be one of the above image categories such as dry fingerprint, wet fingerprint, cold fingerprint, bright light fingerprint, dark light fingerprint, crack fingerprint and others.
步骤203:电子设备统计第一图像类别的解锁失败次数。Step 203: The electronic device counts the number of failed unlocking of the first image category.
第一图像类别的解锁失败次数用于记录第一时间段内使用属于第一图像类别的人脸图像解锁屏幕失败的次数,第一时间段可以是以步骤203的执行时间作为结束 时间点的预设时长的时间段,第一时间段的具体时长本申请实施例不作限定。电子设备中可以记录每次解锁失败的发生时间、以及解锁失败所使用的人脸图像所属的图像类别,则电子设备可以方便的统计第一时间段内使用属于第一图像类别的人脸图像解锁屏幕失败的次数。The number of failed unlocking of the first image category is used to record the number of failed times to unlock the screen using the face image belonging to the first image category within the first time period, and the first time period may be a pre-determined end time point with the execution time of step 203. A time period with a duration is set, and the specific duration of the first time period is not limited in this embodiment of the present application. The electronic device can record the occurrence time of each unlocking failure and the image category to which the face image used for the unlocking failure belongs, then the electronic device can conveniently count the unlocking using the face image belonging to the first image category within the first time period. The number of screen failures.
步骤204:电子设备获取第二解锁图像。Step 204: The electronic device acquires the second unlock image.
用户通过对电子设备进行指定操作,触发电子设备执行屏幕解锁流程,相应的,电子设备可以根据用户触发的屏幕解锁方式,获取对应的解锁图像,例如,用户触发的屏幕解锁方式是指纹解锁,则第二解锁图像可以是指纹图像,用户触发的屏幕解锁方式是人脸解锁,则第二解锁图像可以是人脸图像。The user performs a specified operation on the electronic device to trigger the electronic device to perform the screen unlocking process. Accordingly, the electronic device can obtain the corresponding unlocking image according to the screen unlocking method triggered by the user. For example, if the screen unlocking method triggered by the user is fingerprint unlocking, then The second unlocking image may be a fingerprint image, and the screen unlocking method triggered by the user is face unlocking, and the second unlocking image may be a face image.
第一解锁图像和第二解锁图像是用户触发电子设备执行两次屏幕解锁流程时分别获取的解锁图像,因此,第一解锁图像和第二解锁图像可以是相同或者不同屏幕解锁方式下的解锁图像,本申请实施例不作限定。例如,假设用户第一次触发了人脸解锁,相应的,电子设备获取的第一解锁图像是人脸图像,假设用户第二次触发了指纹解锁,相应的,电子设备获取的第二解锁图像是指纹图像;或者,假设用户第一次触发了人脸解锁,相应的,电子设备获取的第一解锁图像是人脸图像,假设用户第二次也触发了人脸解锁,相应的,电子设备获取的第二解锁图像是人脸图像。需要说明的是,用户触发第一次屏幕解锁和第二次屏幕解锁的时间间隔本申请实施例不作限定,两次屏幕解锁之间用户是否触发电子设备进行了屏幕解锁本申请实施例不做限定。The first unlocking image and the second unlocking image are unlocking images obtained when the user triggers the electronic device to perform two screen unlocking processes. Therefore, the first unlocking image and the second unlocking image may be unlocking images in the same or different screen unlocking methods. , the embodiments of the present application are not limited. For example, assuming that the user triggers face unlock for the first time, correspondingly, the first unlock image obtained by the electronic device is a face image, and assuming that the user triggers fingerprint unlock for the second time, correspondingly, the second unlock image obtained by the electronic device is a fingerprint image; or, assuming that the user triggers face unlock for the first time, correspondingly, the first unlock image obtained by the electronic device is a face image, assuming that the user also triggers face unlock for the second time, correspondingly, the electronic device The acquired second unlock image is a face image. It should be noted that the time interval between when the user triggers the first screen unlocking and the second screen unlocking is not limited in this embodiment of the application, and whether the user triggers the electronic device to unlock the screen between the two screen unlocking is not limited in this embodiment .
步骤205:电子设备根据第二解锁图像解锁屏幕,获取第一图像类别的解锁失败次数,当第一图像类别的解锁失败次数超过第一阈值,显示第一提示信息,第一提示信息用于提示用户更新第一图像类别的解锁图像。Step 205 : the electronic device unlocks the screen according to the second unlock image, and obtains the number of failed unlocks of the first image category, and when the number of failed unlocks of the first image category exceeds the first threshold, displays first prompt information, and the first prompt information is used for prompting The user updates the unlocked image of the first image category.
其中,第一阈值的具体取值本申请实施例不作限定。The specific value of the first threshold is not limited in this embodiment of the present application.
该方法中,统计第一图像类别的解锁失败次数,如果解锁失败次数超过第一阈值,提示用户更新第一图像类别的解锁图像,从而使得用户下一次处于该图像类别对应的场景时,能够提高电子设备屏幕解锁的成功率,从而提高了电子设备的屏幕解锁效率,提升了用户体验。In this method, the number of failed unlocking of the first image category is counted, and if the number of failed unlocking times exceeds a first threshold, the user is prompted to update the unlocked image of the first image category, so that the next time the user is in the scene corresponding to the image category, the The success rate of unlocking the screen of the electronic device improves the screen unlocking efficiency of the electronic device and improves the user experience.
以下以解锁图像是人脸图像为例,通过实例对本申请屏幕解锁方法的实现进行更为详细的说明。The implementation of the screen unlocking method of the present application will be described in more detail below by taking the unlocking image being a face image as an example.
本申请实施例提供的屏幕解锁方法可以适用于人脸解锁的屏幕解锁方式。本申请实施例提供的屏幕解锁方法可以包括预先设置阶段、以及解锁阶段两个阶段。The screen unlocking method provided by the embodiment of the present application may be applicable to the screen unlocking method of face unlocking. The screen unlocking method provided by the embodiments of the present application may include two stages: a preset stage and an unlock stage.
在预先设置阶段,电子设备中预设图像库,图像库用于存储各种图像类别的人脸图像。本申请图像库中可以设置至少两种图像类别的人脸图像,每种图像类别可以设置至少一个人脸图像。设置的人脸图像例如可以是电子设备拥有者例如机主的人脸图像。人脸图像的图像类别用于描述电子设备获取人脸图像时所处的场景。例如在图3A中以预设正常、暗光、遮挡、强光、逆光、其他共6种图像类别为例。上述6种图像类别与用户使用人脸解锁方式解锁屏幕时用户和电子设备所处场景相关。 例如上述的“暗光”、“强光”、“逆光”三种图像类别主要与场景中的光线强度和光照方向相关,图像类别“遮挡”是指遮挡用户的面部信息,与场景中用户自身面部遮挡情况相关,图像类别“正常”是用户日常解锁的场景,该场景中光线强度、光照方向以及用户自身面部情况都在某一标准内,图像类别“其他”对应于上述图像类别对应场景之外的场景。除非用户定制电子设备,电子设备未被用户使用时,图像库中每种图像类别下存储的人脸图像可以为空,等待用户使用电子设备后自主设置。In the pre-setting stage, an image library is preset in the electronic device, and the image library is used to store face images of various image categories. Face images of at least two image categories can be set in the image database of the present application, and at least one face image can be set for each image category. The set face image may be, for example, the face image of the owner of the electronic device, such as the owner. The image category of the face image is used to describe the scene in which the electronic device obtains the face image. For example, in FIG. 3A , a total of 6 image categories including normal, dark light, occlusion, strong light, backlight, and others are preset as examples. The above six image categories are related to the scene where the user and the electronic device are located when the user unlocks the screen using the face unlock method. For example, the above-mentioned three image categories of "dark light", "strong light" and "backlight" are mainly related to the light intensity and lighting direction in the scene. Face occlusion is related. The image category "Normal" is the scene that the user unlocks daily. In this scene, the light intensity, light direction, and the user's own face are all within a certain standard. The image category "Other" corresponds to the scene corresponding to the above image category. outside scene. Unless the user customizes the electronic device, when the electronic device is not used by the user, the face images stored under each image category in the image library can be empty, waiting for the user to set it independently after using the electronic device.
参见图3A,为用户设置图像库中人脸图像的用户界面(user interface,UI)示例图,其中,Referring to FIG. 3A, an example diagram of a user interface (user interface, UI) for setting a face image in an image library for a user, wherein,
用户如果需要启动人脸解锁,可以进入电子设备的解锁密码设定界面210,选择“人脸”控件进入人脸设置界面220。在人脸设置界面220中展示图像库中为人脸图像预设的上述6种图像类别,用户可以根据自身意愿以及场景条件(如设置时环境中的光线强度、光照方向、面部是否遮挡等)来选择设置哪些图像类别的人脸图像,或者,电子设备也可以指定用户必须设置某个图像类别(如类别“正常”)的人脸图像;以图3A为例,用户选择图像类别“正常”对应的“设置”控件,进入“正常”这一类别的人脸图像设置界面230。用户可以在人脸图像设置界面230中执行“正常”类别人脸图像的编辑操作,上述编辑操作可以包括但不限于:新增人脸图像、删除人脸图像等操作。新增人脸图像的具体过程图3A中未示出,举例来说,用户选择“添加新人脸”控件,相应的,电子设备检测到人脸图像添加操作,启动摄像头拍摄图像,从拍摄的图像中检测到人脸图像,存储检测到的人脸图像从而完成人脸图像的设置。If the user needs to activate face unlock, he can enter the unlock password setting interface 210 of the electronic device, and select the "face" control to enter the face setting interface 220 . In the face setting interface 220, the above-mentioned six image categories preset for face images in the image library are displayed, and the user can choose according to his own wishes and scene conditions (such as the light intensity in the environment when setting, the direction of the light, whether the face is blocked, etc.). Choose which image categories to set the face images, or, the electronic device can also specify that the user must set the face images of a certain image category (such as the category "normal"); taking Figure 3A as an example, the user selects the image category "normal" corresponding to "Settings" control, enter the face image setting interface 230 of the category "Normal". The user can perform editing operations of “normal” category face images in the face image setting interface 230, and the above editing operations may include, but are not limited to, operations such as adding a face image, deleting a face image, and the like. The specific process of adding a face image is not shown in FIG. 3A. For example, the user selects the “add new face” control, and accordingly, the electronic device detects the operation of adding a face image, starts the camera to capture an image, and starts from the captured image. A face image is detected in the system, and the detected face image is stored to complete the setting of the face image.
需要说明的是,每一种图像类别设置的人脸图像的数量本申请不作限定。如果用户希望启动人脸解锁,用户需要在上述图像类别中的至少一个图像类别设置至少一个人脸图像,举例来说,用户在正常这一图像类别设置人脸图像“人脸1”,之后,电子设备才可以启动人脸解锁。It should be noted that the number of face images set for each image category is not limited in this application. If the user wants to activate face unlock, the user needs to set at least one face image in at least one of the above image categories. For example, the user sets the face image "face 1" in the normal image category, and then, Only electronic devices can activate face unlock.
需要说明的是,用户不仅可以在上述启动人脸解锁的过程中打开人脸设置界面220,进行人脸ID的设置,在启动人脸解锁后也可以随时打开人脸设置界面220对各图像类别的人脸图像进行新增、删除等编辑操作。It should be noted that the user can not only open the face setting interface 220 during the above-mentioned process of starting face unlocking to set the face ID, but also open the face setting interface 220 at any time after starting the face unlocking for each image category. Add, delete and other editing operations on the face image.
需要说明的是,界面220为可选界面。用户如果需要启动人脸解锁,也可以进入电子设备的解锁密码设定界面210,选择“人脸”控件,相应的,电子设备向用户展示人脸图像设置界面230,人脸图像设置界面230中可以展示图像库中的所有人脸图像。在该实现方式下,电子设备在人脸图像设置界面中可以不向用户提示人脸图像所属图像类别,仅列出用户设置的人脸图像,供用户对人脸图像进行编辑操作。It should be noted that the interface 220 is an optional interface. If the user needs to start face unlocking, he can also enter the unlocking password setting interface 210 of the electronic device, and select the "face" control. Correspondingly, the electronic device displays the face image setting interface 230 to the user. In the face image setting interface 230 All face images in the image library can be displayed. In this implementation manner, the electronic device may not prompt the user of the image category to which the face image belongs in the face image setting interface, but only list the face images set by the user for the user to edit the face image.
在预先设置阶段,电子设备中预设第一模型,第一模型用于检测人脸图像所属的图像类别。例如以上述6种图像类别为例,第一模型可以用于检测出人脸图像属于上述6种图像类别中的哪一种图像类别。In the presetting stage, a first model is preset in the electronic device, and the first model is used to detect the image category to which the face image belongs. For example, taking the above six image categories as an example, the first model can be used to detect which image category the face image belongs to among the above six image categories.
第一模型可以是训练好的n分类器,n是图像类别的总数量,延续上述6种图像类别的举例,则n的取值为6。在训练第一模型时,可以预设一n分类器,将不同场 景下拍摄的人脸图像标注场景对应的图像类别后作为训练样本对n分类器进行训练,可以得到上述第一模型。第一模型的输入是人脸图像,输出是人脸图像属于n种图像类别中每一种图像类别的概率,概率值最高的图像类别可以认为是第一模型的输出结果,也即人脸图像所属图像类别。N分类器的算法本申请不作限定,例如可以是相关深度学习算法。The first model may be a trained n-classifier, where n is the total number of image categories. Continuing the example of the above six image categories, the value of n is 6. When training the first model, an n classifier can be preset, and the face images captured in different scenes are labeled with the image categories corresponding to the scenes as training samples to train the n classifiers, and the above-mentioned first model can be obtained. The input of the first model is a face image, and the output is the probability that the face image belongs to each of the n image categories. The image category with the highest probability value can be considered as the output result of the first model, that is, the face image. The image category it belongs to. The algorithm of the N classifier is not limited in this application, for example, it may be a related deep learning algorithm.
如果用户设置时不展示界面220,则用户在人脸图像设置界面230设置的人脸图像,可以由上述第一模型检测出图像类别后,存储至图像库中。If the user does not display the interface 220 when setting, the face image set by the user on the face image setting interface 230 can be stored in the image library after the image category is detected by the above-mentioned first model.
解锁阶段的UI界面图如图3B所示,假设用户仅设置电子设备中“正常”图像类别的至少一个人脸图像,则,如果用户和电子设备处于暗光场景下,也即光线亮度较低的场景下,因为电子设备在暗光场景下,其获取到的用户的人脸图像容易与用户预先在正常场景下设置的人脸图像之间存在差异,从而电子设备无法将暗光场景下采集的人脸图像与电子设备中预设的人脸图像比对成功,也即电子设备对采集的人脸图像验证失败,进而屏幕解锁失败,从而用户可能会碰到多次无法使用人脸解锁方式解锁电子设备的情况。在用户在暗光场景下多次无法使用人脸解锁方式解锁电子设备的情况下,如果电子设备统计的“暗光”图像类别的解锁失败次数满足预设条件,那么,在用户对电子设备的屏幕解锁成功后,例如用户从暗光场景移动到正常场景下通过人脸解锁成功解锁电子设备的屏幕后,电子设备可以向用户展示提示信息,提示信息用于提示用户更新“暗光”图像类别的人脸图像。The UI interface diagram of the unlocking stage is shown in Figure 3B. Assuming that the user only sets at least one face image of the "normal" image category in the electronic device, if the user and the electronic device are in a dark light scene, that is, the light brightness is low In the scene, because the electronic device is in the dark light scene, the user's face image obtained by the electronic device is likely to be different from the face image set by the user in the normal scene in advance, so the electronic device cannot capture the dark light scene. The comparison between the face image and the preset face image in the electronic device is successful, that is, the electronic device fails to verify the collected face image, and then the screen unlocking fails, so the user may encounter many times that the face unlocking method cannot be used. Unlocking of electronic devices. In the case where the user cannot unlock the electronic device by face unlocking for many times in the dark light scene, if the number of unlocking failures of the "dark light" image category according to the statistics of the electronic device meets the preset conditions, then the user's After the screen is successfully unlocked, for example, after the user moves from a dark light scene to a normal scene and successfully unlocks the screen of the electronic device through face unlocking, the electronic device can display prompt information to the user, and the prompt information is used to prompt the user to update the "dark light" image category face image.
需要说明的是,上述提示信息的具体表述方式本申请不作限定。例如图3B中以电子设备中未预先在图像库中设置“暗光”图像类别的人脸图像为例,从而提示信息可以用于提示用户新增“暗光”图像类别的人脸图像,如果图像库中已经设置有“暗光”图像类别的人脸图像,也可能出现图3B中所示的用户多次无法使用人脸解锁方式解锁电子设备的情况,此时,电子设备向用户展示的提示信息可以用于提示用户增加“暗光”图像类别的人脸图像或者替换已有的“暗光”图像类别的人脸图像。It should be noted that the specific expression manner of the above prompt information is not limited in this application. For example, in FIG. 3B , the electronic device is taken as an example of a face image of which the "dark light" image category is not set in the image library in advance, so that the prompt information can be used to prompt the user to add a face image of the "dark light" image category. Face images of the "dark light" image category have been set in the image library, and the situation shown in Figure 3B may also occur that the user cannot unlock the electronic device using the face unlocking method for many times. At this time, the electronic device shows the user. The prompt information may be used to prompt the user to add a face image of the "dark light" image category or replace the existing face image of the "dark light" image category.
图3B所示的UI界面示例图,还可以扩展至其他图像类别对应的场景下。例如将图3B中的暗光场景替换为强光场景,则电子设备中的提示信息可以替换为提示用户对强光类别的人脸图像进行更新。The UI interface example shown in FIG. 3B can also be extended to scenes corresponding to other image categories. For example, if the dark light scene in FIG. 3B is replaced with a strong light scene, the prompt information in the electronic device may be replaced with prompting the user to update the face image of the strong light category.
参见图3C,为解锁阶段的流程示意图,如图3C所示,可以包括以下步骤:Referring to FIG. 3C, it is a schematic flowchart of the unlocking stage, as shown in FIG. 3C, which may include the following steps:
步骤301:电子设备接收到解锁请求操作,获取第一人脸图像。Step 301: The electronic device receives the unlock request operation, and obtains a first face image.
电子设备一般预设有按键或者指定手势,用于用户触发屏幕解锁。因此,如果电子设备处于屏幕锁定状态,检测到针对于指定按键的按压操作、或者检测到电子设备的屏幕上的指定手势操作,则电子设备接收到解锁请求操作。举例来说,假设预设按压电子设备的电源键用于触发电子设备触发屏幕解锁的人脸识别,则,如果用户在电子设备屏幕锁定的情况下按压电子设备电源键,电子设备可以启动摄像头拍摄用户图像,从拍摄到的用户图像中获取用户的第一人脸图像。Electronic devices are generally preset with buttons or designated gestures for users to trigger screen unlocking. Therefore, if the electronic device is in a screen lock state, a pressing operation for a designated key is detected, or a designated gesture operation on the screen of the electronic device is detected, the electronic device receives an unlock request operation. For example, assuming that pressing the power button of the electronic device by default is used to trigger the electronic device to trigger the face recognition of unlocking the screen, then, if the user presses the power button of the electronic device when the screen of the electronic device is locked, the electronic device can start the camera to shoot. For the user image, the first face image of the user is obtained from the captured user image.
步骤302:电子设备将第一人脸图像与图像库中存储的人脸图像依次进行比对,如果第一人脸图像与图像库中的某一人脸图像的比对结果为一致,则电子设备解锁 屏幕成功;如果与图像库中所有人脸图像的比对结果均为不一致,则电子设备解锁屏幕失败,执行步骤303。Step 302: The electronic device compares the first face image with the face images stored in the image library in turn. If the comparison result between the first face image and a certain face image in the image library is consistent, the electronic equipment The screen is unlocked successfully; if the comparison results with all face images in the image library are inconsistent, the electronic device fails to unlock the screen, and step 303 is executed.
电子设备解锁屏幕成功后,用户即可以使用电子设备完成所需操作,后续处理本申请不赘述。After the electronic device unlocks the screen successfully, the user can use the electronic device to complete the required operations, and subsequent processing is not described in detail in this application.
步骤303:电子设备确定第一人脸图像所属的第一图像类别。Step 303: The electronic device determines the first image category to which the first face image belongs.
本步骤中,电子设备可以使用上述的第一模型确定人脸图像所属的第一图像类别。In this step, the electronic device may use the above-mentioned first model to determine the first image category to which the face image belongs.
第一图像类别的可能取值应与图像库中人脸图像的可能图像类别一致,也即如果图像库中人脸图像划分为正常、暗光、遮挡、强光、逆光、其他共6种图像类别,则,第一图像类别的可能取值可以为正常、暗光、遮挡、强光、逆光、或者其他。The possible values of the first image category should be consistent with the possible image categories of the face images in the image library, that is, if the face images in the image library are divided into normal, dark light, occlusion, strong light, backlight, and other 6 kinds of images. category, the possible values of the first image category may be normal, dark light, occlusion, strong light, backlight, or others.
步骤304:电子设备统计第一图像类别的解锁失败次数。Step 304: The electronic device counts the number of failed unlocking of the first image category.
本步骤的实现可以参考步骤203,这里不赘述。For the implementation of this step, reference may be made to step 203, which is not repeated here.
步骤305:电子设备判断第一图像类别的解锁失败次数是否超过第一阈值,如果超过,执行步骤306,如果未超过,本分支流程结束。Step 305: The electronic device determines whether the number of times of unlocking failures of the first image category exceeds the first threshold, and if so, executes Step 306, and if not, the branch flow ends.
不管解锁失败次数是否超过第一阈值,电子设备仍然处于屏幕锁定状态,未解锁成功。Regardless of whether the number of unlocking failures exceeds the first threshold, the electronic device is still in a screen-locked state and is not unlocked successfully.
步骤306:电子设备接收到解锁请求操作,获取第二解锁图像,根据第二解锁图像解锁屏幕,展示第一提示信息。Step 306: The electronic device receives the unlocking request operation, obtains a second unlocking image, unlocks the screen according to the second unlocking image, and displays the first prompt information.
其中,步骤305中的判断步骤也可以在电子设备解锁屏幕后执行,在判断结果为超过第一阈值时,展示第一提示信息。The judging step in step 305 may also be performed after the electronic device unlocks the screen, and when the judging result exceeds the first threshold, the first prompt information is displayed.
本步骤中第二解锁图像可以是指纹图像、或者人脸图像、或者虹膜图像等等,本申请实施例不作限定。In this step, the second unlocking image may be a fingerprint image, a face image, or an iris image, etc., which is not limited in this embodiment of the present application.
第一提示信息用于提示用户更新第一图像类别的人脸图像。可选地,电子设备在展示第一提示信息之前,可以判断是否存在第一图像类别的人脸图像;如果存在第一图像类别的人脸图像,说明该人脸图像可能存在问题,第一提示信息可以具体用于提示用户第一图像类别的人脸图像不准确,请用户重新设置第一图像类别的人脸图像,如果用户重新设置了第一图像类别的人脸图像,可以提高用户后续在该场景下成功解锁屏幕的可能性;如果不存在第一图像类别的人脸图像,第一提示信息可以具体用于提示用户新增第一图像类别的人脸图像,如果用户新增第一图像类别的人脸图像,则下一次在相同的环境条件下,用户使用人脸解锁时可以解锁成功,提高了解锁成功率,提升用户体验。The first prompt information is used to prompt the user to update the face image of the first image category. Optionally, before displaying the first prompt information, the electronic device can determine whether there is a face image of the first image category; if there is a face image of the first image category, it means that there may be a problem with the face image, and the first prompt The information can be specifically used to remind the user that the face image of the first image category is inaccurate, and the user is requested to reset the face image of the first image category. If the user resets the face image of the first image category, it can improve the user's subsequent The possibility of successfully unlocking the screen in this scenario; if there is no face image of the first image category, the first prompt message can be specifically used to prompt the user to add a face image of the first image category, if the user adds the first image category of face images, the next time the user uses face unlocking under the same environmental conditions, the unlocking can be successful, which increases the unlocking success rate and improves the user experience.
在图3B所示的方法中,对用户在一定时间内使用各个图像类别的人脸图像进行屏幕解锁的失败次数进行记录,如果某一图像类别对应的失败次数超过第一阈值,提示用户更新该图像类别的人脸图像,从而使得用户下一次处于该图像类别对应的场景时,能够提高屏幕解锁的成功率,从而提高了屏幕解锁效率,提升了用户体验。In the method shown in FIG. 3B , the number of failures of the user to unlock the screen using the face images of each image category within a certain period of time is recorded, and if the number of failures corresponding to a certain image category exceeds the first threshold, the user is prompted to update the The face image of the image category, so that the next time the user is in the scene corresponding to the image category, the success rate of screen unlocking can be improved, thereby improving the screen unlocking efficiency and improving the user experience.
在另一个实施例中,在预先设置阶段中用户设置至少一个图像类别的至少一个人脸图像后,电子设备判断用户设置的人脸图像中不存在第二图像类别的人脸图像, 可以根据图像库中预设人脸图像生成第二图像类别的人脸图像。上述预设人脸图像可以是用户设置的人脸图像,也可以是根据用户设置的人脸图像生成的某个图像类别的人脸图像。相较于使用生成的人脸图像再生成的新的人脸图像,使用用户设置的人脸图像生成的新的人脸图像相对更为准确,因此,电子设备可以根据图像库中用户设置的人脸图像生成上述第二图像类别的人脸图像。通过依次对图像库中每个预设的图像类别执行上述处理,可以使得图像库中存储有每个预设的图像类别的人脸图像,从而提高用户在不同场景下的屏幕解锁效率。In another embodiment, after the user sets at least one face image of at least one image category in the preset stage, the electronic device determines that there is no face image of the second image category in the face image set by the user, and can use the image The preset face images in the library generate face images of the second image category. The preset face image may be a face image set by a user, or a face image of a certain image category generated according to the face image set by the user. Compared with the new face image regenerated using the generated face image, the new face image generated by using the face image set by the user is relatively more accurate. The face image generates a face image of the above-mentioned second image category. By sequentially performing the above processing on each preset image category in the image library, the image library can store face images of each preset image category, thereby improving the user's screen unlocking efficiency in different scenarios.
电子设备根据用户设置的人脸图像生成第二图像类别的人脸图像时,可以使用预先指定的某个图像类别的人脸图像作为生成新的人脸图像的依据,例如,正常情况下,用户更容易在图像库中添加“正常”图像类别的人脸图像,基于此,电子设备根据用户设置的人脸图像生成第二图像类别的人脸图像具体可以包括:When the electronic device generates the face image of the second image category according to the face image set by the user, the face image of a certain image category specified in advance can be used as the basis for generating a new face image. It is easier to add a face image of the "normal" image category to the image library. Based on this, the electronic device generates a face image of the second image category according to the face image set by the user, which may specifically include:
从用户设置的人脸图像中获取第三图像类别的人脸图像,根据第三图像类别的人脸图像生成第二图像类别的人脸图像。A face image of the third image category is obtained from the face image set by the user, and a face image of the second image category is generated according to the face image of the third image category.
例如第三图像类别可以是上述举例中的“正常”图像类别。For example, the third image category may be the "normal" image category in the above example.
第二图像类别可以是用户未设置人脸图像的图像类别,延续前述举例,如果第三图像类别是“正常”图像类别,第二图像类别可以是“正常”图像类别之外的图像类别,例如暗光、强光、逆光、遮挡等。The second image category may be an image category for which the user has not set a face image. Continuing the above example, if the third image category is a "normal" image category, the second image category may be an image category other than the "normal" image category, for example Dark light, strong light, backlight, occlusion, etc.
根据第三图像类别的人脸图像生成第二图像类别的人脸图像的方法举例如下:An example of a method for generating a face image of the second image category according to the face image of the third image category is as follows:
可以预先训练一图像生成模型,用于根据第三图像类别的人脸图像生成第二图像类别的人脸图像。图像生成模型的训练样本可以是:若干个人脸图像对,每一个人脸图像对中包括:根据同一人脸生成的第三图像类别的人脸图像以及第二图像类别的人脸图像,预设的初始模型可以是神经网络模型,通过使用训练样本对初始模型进行训练,得到上述图像生成模型,该图像生成模型的输入可以是第三图像类别的人脸图像,输出是第二图像类别的人脸图像。上述的神经网络模型具体可以是循环生成对抗网络(cyclegan)、unit、或者生成对抗网络(stargan)等。An image generation model may be pre-trained for generating a face image of the second image category according to the face image of the third image category. The training samples of the image generation model can be: several face image pairs, each face image pair includes: a face image of a third image category and a face image of the second image category generated according to the same face, preset. The initial model can be a neural network model, and the above-mentioned image generation model is obtained by using the training samples to train the initial model. The input of the image generation model can be a face image of the third image category, and the output is a person of the second image category. face image. The above-mentioned neural network model may specifically be a cyclic generative adversarial network (cyclegan), a unit, or a generative adversarial network (stargan), or the like.
此时图3B所示的步骤306中展示的第一提示信息可以具体用于提示用户更新第一图像类别的人脸图像。At this time, the first prompt information shown in step 306 shown in FIG. 3B may be specifically used to prompt the user to update the face image of the first image category.
由于用户在一定时间内使用第一图像类别的人脸图像进行屏幕解锁的失败次数超过第一阈值,说明电子设备的图像库中用户设置的第一图像类别的人脸图像不够准确或者是根据图像库中人脸图像生成的第一图像类别的人脸图像不够准确,也即第一图像类别的人脸图像可能与第一图像类别对应场景下电子设备实际获取到的人脸图像存在较大差异,通过用户重新设置第一图像类别的人脸图像,可以使得图像库中第一图像类别的人脸图像更为准确,从而提升用户使用第一图像类别的人脸图像进行屏幕解锁的效率,提升用户体验。Since the number of failures of the user to unlock the screen by using the face image of the first image category within a certain period of time exceeds the first threshold, it means that the face image of the first image category set by the user in the image library of the electronic device is not accurate enough or is based on the image The face image of the first image category generated by the face image in the library is not accurate enough, that is, the face image of the first image category may be quite different from the face image actually obtained by the electronic device in the scene corresponding to the first image category , by resetting the face image of the first image category by the user, the face image of the first image category in the image library can be made more accurate, thereby improving the efficiency of the user using the face image of the first image category to unlock the screen, improving user experience.
上述实施例中在预设阶段由电子设备根据图像库中预设的人脸图像来生成第二图像类别的人脸图像,与上述实施例不同的是,本实施例中不是在预设阶段根据图像库中预设的人脸图像生成新的人脸图像,而是在步骤305之后根据图像库中预设 的人脸图像生成新的人脸图像,上述预设的人脸图像可以是用户设置的人脸图像,也可以是电子设备根据某一用户设置的人脸图像生成的人脸图像;此时,参见图4所示,相对于图3C所示实施例,可以将步骤306替换为以下的步骤401:In the above embodiment, the electronic device generates the face image of the second image category according to the face image preset in the image library in the preset stage. The preset face image in the image library generates a new face image, but after step 305, a new face image is generated according to the preset face image in the image library, and the above-mentioned preset face image can be set by the user. The face image can also be the face image generated by the electronic device according to the face image set by a certain user; at this time, referring to Fig. 4, with respect to the embodiment shown in Fig. 3C, step 306 can be replaced with the following Step 401:
步骤401:电子设备接收到解锁请求操作,获取第二解锁图像,根据第二解锁图像解锁屏幕,根据图像库中预设人脸图像生成第一图像类别的人脸图像。Step 401: The electronic device receives the unlock request operation, obtains a second unlock image, unlocks the screen according to the second unlock image, and generates a face image of the first image category according to a preset face image in the image library.
其中,步骤305中的判断步骤也可以在电子设备解锁屏幕后执行,在判断结果为超过第一阈值时,根据图像库中预设人脸图像生成第一图像类别的人脸图像。The judging step in step 305 may also be performed after the electronic device unlocks the screen, and when the judging result exceeds the first threshold, a face image of the first image category is generated according to the preset face image in the image library.
可选地,本步骤中电子设备根据图像库中预设人脸图像生成第一图像类别的人脸图像,可以包括:Optionally, in this step, the electronic device generates a face image of the first image category according to the preset face image in the image library, which may include:
如果预设人脸图像中不存在第一图像类别的人脸图像,根据预设人脸图像生成第一图像类别的人脸图像;If there is no face image of the first image category in the preset face image, generate a face image of the first image category according to the preset face image;
如果预设人脸图像中存在第一图像类别的人脸图像,且第一图像类别的人脸图像是用户设置的人脸图像,根据预设人脸图像生成第一图像类别的人脸图像;If there is a face image of the first image category in the preset face image, and the face image of the first image category is a face image set by the user, generate a face image of the first image category according to the preset face image;
如果预设人脸图像中存在第一图像类别的人脸图像,且第一图像类别的人脸图像是根据第一预设人脸图像生成的人脸图像,根据第二预设人脸图像生成第一图像类别的人脸图像。If there is a face image of the first image category in the preset face image, and the face image of the first image category is a face image generated according to the first preset face image, the face image is generated according to the second preset face image. A face image of the first image category.
可选地,第一预设人脸图像和第二预设人脸图像不同。第一预设人脸图像和第二预设人脸图像分别是图像库中已有的人脸图像。Optionally, the first preset face image and the second preset face image are different. The first preset face image and the second preset face image are respectively existing face images in the image library.
如果电子设备的图像库中预设的人脸图像中不存在第一图像类别的人脸图像,则可以使用图像库中预设的人脸图像生成第一图像类别的人脸图像,以便于用户后续再处于第一图像类别对应的场景时,能够提高屏幕解锁效率。If there is no face image of the first image category in the preset face images in the image library of the electronic device, the face image of the first image category can be generated by using the preset face images in the image library, so that the user can When the user is in the scene corresponding to the first image category subsequently, the screen unlocking efficiency can be improved.
可选地,电子设备可以根据图像库中预先指定的第四图像类别的人脸图像来生成第一图像类别的人脸图像,此时,上述根据预设解锁图像生成第一图像类别的解锁图像可以包括:从预设人脸图像中获取第四图像类别的人脸图像,根据第四图像类别的人脸图像生成第一图像类别的人脸图像。Optionally, the electronic device can generate the face image of the first image category according to the face image of the fourth image category pre-specified in the image library, and at this time, the above-mentioned generation of the unlocked image of the first image category according to the preset unlocked image is performed. The method may include: acquiring a face image of a fourth image category from a preset face image, and generating a face image of the first image category according to the face image of the fourth image category.
可选地,相较于使用生成的人脸图像再生成的新的人脸图像,使用用户设置的人脸图像生成的新的人脸图像相对更为准确,因此,电子设备可以优先根据预设人脸图像中用户设置的人脸图像生成第一图像类别的人脸图像。进而,结合前述实现,电子设备可以根据用户设置的第四图像类别的人脸图像生成第一图像类别的人脸图像。Optionally, compared with the new face image regenerated using the generated face image, the new face image generated by using the face image set by the user is relatively more accurate. The face image set by the user in the face image generates a face image of the first image category. Furthermore, in combination with the foregoing implementation, the electronic device may generate a face image of the first image category according to the face image of the fourth image category set by the user.
正常情况下,用户更容易在图像库中添加正常场景下的人脸图像,基于此,本步骤中的第四图像类别可以是上述举例中的“正常”图像类别。Under normal circumstances, it is easier for a user to add a face image in a normal scene to the image library. Based on this, the fourth image category in this step may be the "normal" image category in the above example.
如果图像库中存在第一图像类别的人脸图像,而且第一图像类别的人脸图像是用户设置的人脸图像,说明用户设置的第一图像类别的人脸图像可能与对应场景下电子设备采集的人脸图像存在偏差,因此,可以使用图像库中预设的人脸图像生成第一图像类别的人脸图像,以便于用户后续再处于第一图像类别对应的场景时,能够提高屏幕解锁效率;相较于使用生成的人脸图像再生成的新的人脸图像,使用用户设置的人脸图像生成的新的人脸图像相对更为准确,因此,电子设备可以优先根 据图像库中用户设置的人脸图像生成第一图像类别的人脸图像,该用户设置的人脸图像可以是第一图像类别的人脸图像,也可以是其他图像类别的人脸图像。可选地,除了优先选择用户设置的人脸图像,还可以优先选择某一指定图像类别的人脸图像,或者两者结合,优先选择某一指定图像类别且用户设置的人脸图像。If there is a face image of the first image category in the image library, and the face image of the first image category is a face image set by the user, it means that the face image of the first image category set by the user may be the same as that of the electronic device in the corresponding scene. There is a deviation in the collected face images. Therefore, the face images of the first image category can be generated by using the preset face images in the image library, so that when the user is in the scene corresponding to the first image category later, the screen unlocking can be improved. Efficiency; compared with the new face image regenerated using the generated face image, the new face image generated by using the face image set by the user is relatively more accurate. The set face image generates a face image of the first image category, and the face image set by the user may be a face image of the first image category or a face image of other image categories. Optionally, in addition to preferentially selecting a face image set by the user, a face image of a specified image category may also be preferentially selected, or a combination of the two may be preferentially selected to preferentially select a face image of a specified image category and set by the user.
如果图像库中存在第一图像类别的人脸图像,而且第一图像类别的人脸图像是根据图像库中第一预设人脸图像生成的人脸图像,此时,说明图像库中已有的根据第一预设人脸图像生成的人脸图像与第一图像类别对应场景下电子设备采集的人脸图像存在偏差,因此,可以使用图像库中上述第一预设人脸图像之外的第二预设人脸图像生成第一图像类别的人脸图像,以便于电子设备后续再处于第一图像类别对应的场景时,能够提高屏幕解锁效率;相较于使用生成的人脸图像再生成的新的人脸图像,使用用户设置的人脸图像生成的新的人脸图像相对更为准确,因此,上述第二预设人脸图像优选为图像库中用户设置的人脸图像,上述第二预设人脸图像可以是第一图像类别的人脸图像,也可以是其他图像类别的人脸图像。If there is a face image of the first image category in the image library, and the face image of the first image category is a face image generated according to the first preset face image in the image library, at this time, it means that there is already a face image in the image library. There is a deviation between the face image generated according to the first preset face image and the face image collected by the electronic device in the scene corresponding to the first image category. Therefore, the image library other than the first preset face image can be used. The second preset face image generates a face image of the first image category, so that when the electronic device is in the scene corresponding to the first image category later, the screen unlocking efficiency can be improved; compared with using the generated face image to regenerate The new face image generated by using the face image set by the user is relatively more accurate. Therefore, the above-mentioned second preset face image is preferably the face image set by the user in the image library. The second preset face image may be a face image of the first image category, or may be a face image of other image categories.
图4所示的方法中,仅需要用户向电子设备中输入至少一个图像类别的至少一个人脸图像,即可以自动生成其他图像类别的人脸图像,无需用户在不同图像类别对应的物理场景下添加人脸图像,在提高屏幕解锁效率的基础上,进一步减少了用户对于人脸图像的设置操作,提升了用户体验。In the method shown in FIG. 4 , the user only needs to input at least one face image of at least one image category into the electronic device, that is, face images of other image categories can be automatically generated, and the user does not need to be in physical scenes corresponding to different image categories. Adding a face image, on the basis of improving the screen unlocking efficiency, further reduces the user's setting operations for the face image, and improves the user experience.
需要说明的是,上述实施例也可以适用于指纹解锁的屏幕解锁方式下,区别仅在于,将上述实施例中的人脸替换为指纹,将针对于人脸图像的图像类别替换为针对于指纹图像的图像类别,例如针对于指纹图像的图像类别可以包括:干指纹、湿指纹、冷指纹、强光指纹、暗光指纹、裂指纹和其他。It should be noted that the above embodiments can also be applied to the screen unlocking mode of fingerprint unlocking, the difference is only that the face in the above embodiment is replaced with a fingerprint, and the image category for the face image is replaced with a fingerprint for the fingerprint. Image categories of images, eg, for fingerprint images, may include: dry fingerprints, wet fingerprints, cold fingerprints, bright light fingerprints, dark light fingerprints, cracked fingerprints, and others.
例如,参见图5所示,可以将图3C中的人脸图像替换为指纹图像,此时,该方法可以包括:For example, referring to FIG. 5 , the face image in FIG. 3C can be replaced with a fingerprint image. In this case, the method can include:
步骤501:电子设备接收到解锁请求操作,获取第一指纹图像。Step 501: The electronic device receives the unlock request operation, and acquires a first fingerprint image.
步骤502:电子设备将第一指纹图像与图像库中的指纹图像依次进行比对,如果第一指纹图像与图像库中一指纹图像的比对结果为一致,则电子设备解锁屏幕成功;如果与图像库中所有指纹图像的比对结果均为不一致,则电子设备解锁屏幕失败,执行步骤503。Step 502: The electronic device sequentially compares the first fingerprint image with the fingerprint images in the image library. If the comparison result between the first fingerprint image and a fingerprint image in the image library is consistent, the electronic device unlocks the screen successfully; If the comparison results of all fingerprint images in the image library are inconsistent, the electronic device fails to unlock the screen, and step 503 is executed.
步骤503:电子设备确定第一指纹图像所属的第一图像类别。Step 503: The electronic device determines the first image category to which the first fingerprint image belongs.
步骤504:电子设备统计第一图像类别的解锁失败次数。Step 504: The electronic device counts the number of failed unlocking of the first image category.
步骤505:电子设备判断第一图像类别对应的解锁失败次数是否超过第一阈值,如果超过,执行步骤506,如果未超过,本分支流程结束。Step 505: The electronic device determines whether the number of unlocking failures corresponding to the first image category exceeds the first threshold, and if so, executes Step 506, and if not, the branch flow ends.
步骤506:电子设备接收到解锁请求操作,获取第二解锁图像,根据第二解锁图像解锁屏幕,展示第一提示信息。Step 506: The electronic device receives the unlocking request operation, obtains a second unlocking image, unlocks the screen according to the second unlocking image, and displays the first prompt information.
其中,步骤505中的判断步骤也可以在电子设备解锁屏幕后执行,在判断结果为超过第一阈值时,展示第一提示信息。The judging step in step 505 may also be performed after the electronic device unlocks the screen, and when the judging result exceeds the first threshold, the first prompt information is displayed.
图5所示方法的实现请参见图3C中的对应描述,这里不赘述。For the implementation of the method shown in FIG. 5 , please refer to the corresponding description in FIG. 3C , which is not repeated here.
参见图6所示,可以将图4中的人脸图像替换为指纹图像,此时,图6所示的方法与图5所示方法的区别仅在于:将步骤506替换为以下的步骤601。具体的,Referring to FIG. 6 , the face image in FIG. 4 can be replaced with a fingerprint image. In this case, the method shown in FIG. 6 differs from the method shown in FIG. 5 only in that step 506 is replaced with the following step 601 . specific,
步骤601:电子设备接收到解锁请求操作,获取第二解锁图像,根据第二解锁图像解锁屏幕,根据图像库中预设指纹图像生成第一图像类别的指纹图像。Step 601: The electronic device receives the unlock request operation, obtains a second unlock image, unlocks the screen according to the second unlock image, and generates a fingerprint image of the first image category according to a preset fingerprint image in an image library.
图6所示方法的实现可以参见图4中的对应描述,这里不赘述。For the implementation of the method shown in FIG. 6 , reference may be made to the corresponding description in FIG. 4 , which is not repeated here.
同样的,上述实施例也可以适用于虹膜解锁的屏幕解锁方式下,区别仅在于,将上述人脸替换为虹膜,将针对于人脸图像的图像类别替换为针对于虹膜图像的图像类别,例如虹膜图像的图像类别可以与人脸图像的图像类别相似,包括:正常、暗光、强光、逆光、遮挡以及其他。Similarly, the above embodiment can also be applied to the screen unlocking mode of iris unlocking, the only difference is that the above-mentioned face is replaced with iris, and the image category for face images is replaced with the image category for iris images, for example The image category of the iris image may be similar to the image category of the face image, including: normal, dark light, strong light, backlight, occlusion, and others.
可以理解的是,上述实施例中的部分或全部步骤或操作仅是示例,本申请实施例还可以执行其它操作或者各种操作的变形。此外,各个步骤可以按照上述实施例呈现的不同的顺序来执行,并且有可能并非要执行上述实施例中的全部操作。It can be understood that, some or all of the steps or operations in the foregoing embodiments are only examples, and other operations or variations of various operations may also be performed in the embodiments of the present application. Furthermore, the various steps may be performed in a different order presented in the above-described embodiments, and may not perform all operations in the above-described embodiments.
图7为本申请电子设备一个实施例的结构图,如图7所示,该电子设备700可以包括:处理器710、摄像头720、传感器模块730、显示屏740,其中,FIG. 7 is a structural diagram of an embodiment of an electronic device of the present application. As shown in FIG. 7 , the electronic device 700 may include: a processor 710, a camera 720, a sensor module 730, and a display screen 740, wherein,
摄像头720用于采集用户的人脸图像或者虹膜图像;传感器模块730可以是指纹传感器,用于采集用户的指纹图像;显示屏740用于向用户展示图像或者视频;处理器710用于执行图2、图3C~图6任一实施例提供的方法。The camera 720 is used to collect the user's face image or iris image; the sensor module 730 may be a fingerprint sensor, used to collect the user's fingerprint image; the display screen 740 is used to display the image or video to the user; the processor 710 is used to execute FIG. 2 and the method provided by any of the embodiments of FIGS. 3C to 6 .
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行本申请图2、图3C~图6任一实施例提供的方法。Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when it runs on a computer, the computer causes the computer to execute any one of the implementations of FIG. 2 and FIG. 3C to FIG. 6 of the present application. method provided by the example.
本申请实施例还提供一种计算机程序产品,该计算机程序产品包括计算机程序,当其在计算机上运行时,使得计算机执行本申请图2、图3C~图6任一实施例提供的方法。An embodiment of the present application further provides a computer program product, the computer program product includes a computer program, which, when running on a computer, enables the computer to execute the method provided in any of the embodiments of FIG. 2 , FIG. 3C to FIG. 6 of the present application.
本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示单独存在A、同时存在A和B、单独存在B的情况。其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”及其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b和c中的至少一项可以表示:a,b,c,a和b,a和c,b和c或a和b和c,其中a,b,c可以是单个,也可以是多个。In the embodiments of the present application, "at least one" refers to one or more, and "multiple" refers to two or more. "And/or", which describes the association relationship of the associated objects, means that there can be three kinds of relationships, for example, A and/or B, which can indicate the existence of A alone, the existence of A and B at the same time, and the existence of B alone. where A and B can be singular or plural. The character "/" generally indicates that the associated objects are an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c may represent: a, b, c, a and b, a and c, b and c or a and b and c, where a, b, c may be single, or Can be multiple.
本领域普通技术人员可以意识到,本文中公开的实施例中描述的各单元及算法步骤,能够以电子硬件、计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps described in the embodiments disclosed herein can be implemented by a combination of electronic hardware, computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,任一功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory;以下简称:ROM)、随机存取存储器(Random Access Memory;以下简称:RAM)、磁碟或者光盘等各种可以存储程序代码的介质。In the several embodiments provided in this application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution, and the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (Read-Only Memory; hereinafter referred to as: ROM), Random Access Memory (Random Access Memory; hereinafter referred to as: RAM), magnetic disk or optical disk and other various A medium on which program code can be stored.
以上所述,仅为本申请的具体实施方式,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application. The protection scope of the present application shall be subject to the protection scope of the claims.

Claims (12)

  1. 一种屏幕解锁方法,应用于电子设备,其特征在于,包括:A screen unlocking method, applied to an electronic device, is characterized in that, comprising:
    获取第一解锁图像;Get the first unlock image;
    如果根据所述解锁图像解锁失败,确定所述第一解锁图像所属的第一图像类别,所述第一图像类别用于描述获取所述第一解锁图像时所述电子设备所处的场景;If the unlocking fails according to the unlocking image, determine a first image category to which the first unlocking image belongs, where the first image category is used to describe the scene in which the electronic device is located when the first unlocking image is acquired;
    统计所述第一图像类别的解锁失败次数;Count the number of times of unlocking failures of the first image category;
    获取第二解锁图像;get the second unlock image;
    根据所述第二解锁图像解锁所述屏幕,获取所述第一图像类别的解锁失败次数,当所述第一图像类别的解锁失败次数超过第一阈值,显示第一提示信息,所述第一提示信息用于提示用户更新所述第一图像类别的解锁图像。The screen is unlocked according to the second unlocking image, and the number of failed unlocking of the first image category is obtained. When the number of failed unlocking of the first image category exceeds a first threshold, a first prompt message is displayed, and the first The prompt information is used to prompt the user to update the unlock image of the first image category.
  2. 根据权利要求1所述的方法,其特征在于,所述确定所述第一解锁图像所属的第一图像类别,包括:The method according to claim 1, wherein the determining the first image category to which the first unlocking image belongs comprises:
    使用预设第一模型检测所述第一解锁图像所属的图像类别,得到所述第一图像类别;所述预设第一模型用于检测解锁图像所属的图像类别。Using a preset first model to detect the image category to which the first unlocking image belongs, the first image category is obtained; the preset first model is used to detect the image category to which the unlocking image belongs.
  3. 根据权利要求1或2所述的方法,其特征在于,所述获取第一解锁图像之前,还包括:The method according to claim 1 or 2, wherein before acquiring the first unlocking image, the method further comprises:
    判断用户设置的解锁图像中不存在第二图像类别的解锁图像,根据用户设置的解锁图像生成所述第二图像类别的解锁图像。It is determined that the unlocked images of the second image category do not exist in the unlocked images set by the user, and the unlocked images of the second image category are generated according to the unlocked images set by the user.
  4. 根据权利要求3所述的方法,其特征在于,所述根据用户设置的解锁图像生成所述第二图像类别的解锁图像,包括:The method according to claim 3, wherein the generating the unlocking image of the second image category according to the unlocking image set by the user comprises:
    从所述用户设置的解锁图像中获取第三图像类别的解锁图像,根据所述第三图像类别的解锁图像生成所述第二图像类别的解锁图像。The unlocking image of the third image category is obtained from the unlocking image set by the user, and the unlocking image of the second image category is generated according to the unlocking image of the third image category.
  5. 一种屏幕解锁方法,应用于电子设备,其特征在于,包括:A screen unlocking method, applied to an electronic device, is characterized in that, comprising:
    获取第一解锁图像;Get the first unlock image;
    若根据所述第一解锁图像解锁失败,确定所述第一解锁图像所属的第一图像类别,所述第一图像类别用于描述获取所述第一解锁图像时所述电子设备所处的场景;If the unlocking fails according to the first unlocking image, determine a first image category to which the first unlocking image belongs, where the first image category is used to describe the scene in which the electronic device is located when the first unlocking image is acquired ;
    统计所述第一图像类别的解锁失败次数;Count the number of times of unlocking failures of the first image category;
    获取第二解锁图像;get the second unlock image;
    根据所述第二解锁图像解锁所述屏幕,获取所述第一图像类别的解锁失败次数,当所述第一图像类别的解锁失败次数超过第一阈值时,根据预设解锁图像生成所述第一图像类别的解锁图像。The screen is unlocked according to the second unlocking image, and the number of failed unlocking times of the first image category is obtained, and when the number of failed unlocking times of the first image category exceeds a first threshold, the first unlocking image is generated according to the preset unlocking image. An unlocked image of an image category.
  6. 根据权利要求5所述的方法,其特征在于,所述确定所述第一解锁图像所属的第一图像类别,包括:The method according to claim 5, wherein the determining the first image category to which the first unlocking image belongs comprises:
    使用预设第一模型检测所述第一解锁图像所属的图像类别,得到所述第一图像类别;所述预设第一模型用于检测解锁图像所属的图像类别。Using a preset first model to detect the image category to which the first unlocking image belongs, the first image category is obtained; the preset first model is used to detect the image category to which the unlocking image belongs.
  7. 根据权利要求5或6所述的方法,其特征在于,所述根据预设解锁图像生成 所述第一图像类别的解锁图像,包括:The method according to claim 5 or 6, wherein the generating an unlocking image of the first image category according to a preset unlocking image comprises:
    如果预设解锁图像中不存在所述第一图像类别的解锁图像,根据预设解锁图像生成所述第一图像类别的解锁图像;If there is no unlocking image of the first image category in the preset unlocking image, generating an unlocking image of the first image category according to the preset unlocking image;
    如果预设解锁图像中存在所述第一图像类别的解锁图像,且所述第一图像类别的解锁图像是用户设置的解锁图像,根据预设解锁图像生成所述第一图像类别的解锁图像;If there is an unlocking image of the first image category in the preset unlocking image, and the unlocking image of the first image category is an unlocking image set by the user, generating an unlocking image of the first image category according to the preset unlocking image;
    如果预设解锁图像中存在所述第一图像类别的解锁图像,且所述第一图像类别的解锁图像是根据第一预设解锁图像生成的解锁图像,根据第二预设解锁图像生成所述第一图像类别的解锁图像。If there is an unlocking image of the first image category in the preset unlocking image, and the unlocking image of the first image category is an unlocking image generated according to the first preset unlocking image, the unlocking image of the first image category is generated according to the second preset unlocking image. Unlock images of the first image category.
  8. 根据权利要求7所述的方法,其特征在于,所述根据预设解锁图像生成所述第一图像类别的解锁图像,包括:The method according to claim 7, wherein the generating the unlocking image of the first image category according to the preset unlocking image comprises:
    从所述预设解锁图像中获取第四图像类别的解锁图像,根据所述第四图像类别的解锁图像生成所述第一图像类别的解锁图像。An unlocking image of a fourth image category is acquired from the preset unlocking image, and an unlocking image of the first image category is generated according to the unlocking image of the fourth image category.
  9. 一种电子设备,其特征在于,包括处理器和存储器,An electronic device, characterized in that it includes a processor and a memory,
    所述存储器用于存储计算机程序,当所述处理器执行所述计算机程序时,使得电子设备执行权利要求1至4任一项所述的方法。The memory is used to store a computer program, and when the processor executes the computer program, the electronic device executes the method of any one of claims 1 to 4.
  10. 一种电子设备,其特征在于,包括处理器和存储器,An electronic device, characterized in that it includes a processor and a memory,
    所述存储器用于存储计算机程序,当所述处理器执行所述计算机程序时,使得电子设备执行权利要求5至8任一项所述的方法。The memory is used for storing a computer program, and when the processor executes the computer program, the electronic device causes the electronic device to perform the method of any one of claims 5 to 8.
  11. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行权利要求1至4任一项所述的方法。A computer-readable storage medium, characterized in that, a computer program is stored in the computer-readable storage medium, and when it runs on a computer, the computer executes the method of any one of claims 1 to 4.
  12. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行权利要求5至8任一项所述的方法。A computer-readable storage medium, characterized in that, a computer program is stored in the computer-readable storage medium, and when it is executed on a computer, it causes the computer to execute the method of any one of claims 5 to 8.
PCT/CN2022/083580 2021-04-23 2022-03-29 Screen unlocking method and electronic device WO2022222702A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110444268.4A CN115329299A (en) 2021-04-23 2021-04-23 Screen unlocking method and electronic equipment
CN202110444268.4 2021-04-23

Publications (1)

Publication Number Publication Date
WO2022222702A1 true WO2022222702A1 (en) 2022-10-27

Family

ID=83723616

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/083580 WO2022222702A1 (en) 2021-04-23 2022-03-29 Screen unlocking method and electronic device

Country Status (2)

Country Link
CN (1) CN115329299A (en)
WO (1) WO2022222702A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160350548A1 (en) * 2015-06-01 2016-12-01 Light Cone Corp. Unlocking a portable electronic device by performing multiple actions on an unlock interface
CN107633169A (en) * 2017-09-13 2018-01-26 深圳市金立通信设备有限公司 A kind of terminal unlock method, terminal and computer-readable recording medium
CN109829279A (en) * 2019-01-11 2019-05-31 Oppo广东移动通信有限公司 Unlock event-handling method and relevant device
CN109919866A (en) * 2019-02-26 2019-06-21 Oppo广东移动通信有限公司 Image processing method, device, medium and electronic equipment
CN110334496A (en) * 2019-06-27 2019-10-15 Oppo广东移动通信有限公司 A kind of solution lock control method, terminal and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160350548A1 (en) * 2015-06-01 2016-12-01 Light Cone Corp. Unlocking a portable electronic device by performing multiple actions on an unlock interface
CN107633169A (en) * 2017-09-13 2018-01-26 深圳市金立通信设备有限公司 A kind of terminal unlock method, terminal and computer-readable recording medium
CN109829279A (en) * 2019-01-11 2019-05-31 Oppo广东移动通信有限公司 Unlock event-handling method and relevant device
CN109919866A (en) * 2019-02-26 2019-06-21 Oppo广东移动通信有限公司 Image processing method, device, medium and electronic equipment
CN110334496A (en) * 2019-06-27 2019-10-15 Oppo广东移动通信有限公司 A kind of solution lock control method, terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN115329299A (en) 2022-11-11

Similar Documents

Publication Publication Date Title
WO2020259452A1 (en) Full-screen display method for mobile terminal, and apparatus
CN113645351B (en) Application interface interaction method, electronic device and computer-readable storage medium
WO2019072178A1 (en) Method for processing notification, and electronic device
WO2020029306A1 (en) Image capture method and electronic device
WO2021052139A1 (en) Gesture input method and electronic device
WO2021008589A1 (en) Application running mehod and electronic device
WO2021057571A1 (en) Biometric recognition method and electronic device
CN112087649B (en) Equipment searching method and electronic equipment
WO2022007707A1 (en) Home device control method, terminal device, and computer-readable storage medium
WO2022206494A1 (en) Target tracking method and device
CN114995715B (en) Control method of floating ball and related device
WO2021238740A1 (en) Screen capture method and electronic device
CN114222020B (en) Position relation identification method and device and readable storage medium
WO2022152174A1 (en) Screen projection method and electronic device
WO2022078116A1 (en) Brush effect picture generation method, image editing method and device, and storage medium
WO2022007757A1 (en) Cross-device voiceprint registration method, electronic device and storage medium
WO2021129453A1 (en) Screenshot method and related device
WO2021147483A1 (en) Data sharing method and apparatus
WO2022222702A1 (en) Screen unlocking method and electronic device
CN113970965A (en) Message display method and electronic equipment
WO2022222705A1 (en) Device control method and electronic device
WO2022206709A1 (en) Component loading method for application and related apparatus
CN116048236B (en) Communication method and related device
WO2024067328A1 (en) Message processing method
CN115291780A (en) Auxiliary input method, electronic equipment and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22790811

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22790811

Country of ref document: EP

Kind code of ref document: A1