WO2023130927A1 - Always on display control method, electronic device, and storage medium - Google Patents

Always on display control method, electronic device, and storage medium Download PDF

Info

Publication number
WO2023130927A1
WO2023130927A1 PCT/CN2022/138948 CN2022138948W WO2023130927A1 WO 2023130927 A1 WO2023130927 A1 WO 2023130927A1 CN 2022138948 W CN2022138948 W CN 2022138948W WO 2023130927 A1 WO2023130927 A1 WO 2023130927A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
screen
display
aon
time
Prior art date
Application number
PCT/CN2022/138948
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 WO2023130927A1 publication Critical patent/WO2023130927A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present application relates to the field of display technology, and in particular to a control method for screen-off display, electronic equipment, and a computer-readable storage medium.
  • the screen-off display is a display function when the screen of the electronic device is off. Compared with the conventional display, its power consumption is lower, and it can also meet the user's requirements for information such as date, time, and reminders.
  • FIG. 1a provides an off-screen display interface of an electronic device, through which a user can know the date and time.
  • the startup method of the screen-off display provided by the electronic device is: the electronic device is in the screen-off state, the user touches the display screen, and the electronic device displays the screen-off display interface. However, if it is inconvenient for the user to touch the display screen, the electronic device cannot display the screen-off display interface.
  • the present application provides a control method for an off-screen display, an electronic device, and a computer-readable storage medium, with the purpose of realizing conveniently triggering an electronic device to display an off-screen display interface.
  • the present application provides a control method applicable to the screen-off display of an electronic device, including: when the display screen of the electronic device is in the screen-off state, the electronic device activates the face detection function, and obtains the face detection function through the front camera.
  • Image data the electronic device recognizes that the image data includes all or part of the face image; the time when the electronic device determines that the image data includes all or part of the face image this time is different from the time when the image data that was recognized last time includes all or part of the face image
  • the display screen of the electronic device displays an off-screen display interface.
  • the display screen is off, and the electronic device activates the face detection function.
  • the electronic device can obtain image data through the front camera, and when it is determined that the image data includes part or all of the face image, and when it is determined that the image data includes all or part of the face image,
  • the time difference from the time when the image data including all or part of the facial image was recognized last time is not less than the threshold value, when the display screen of the electronic device displays an off-screen display interface, the display screen of the electronic device is turned off in this way, and the face approaches
  • the display screen triggers an electronic device to display a screen-off display interface, which is a convenient trigger method.
  • the display screen will display the off In this way, the off-screen display interface can also be prevented from being repeatedly displayed, and the electronic device enters the process of "detecting a face -> displaying the off-screen display interface -> after a certain period of time, the off-screen display interface disappears -> detecting a face" In an endless loop.
  • the electronic device determines that the difference between the time when the image data includes all or part of the face image this time and the time when the image data includes all or part of the face image the previous time is not less than a threshold , the display screen of the electronic device displays an off-screen display interface, including: the electronic device determines the reporting time of the face detection event, and when the difference between the reporting time of the previous face detection event and the previous face detection event is not less than the threshold value, the display screen of the electronic device displays the off-screen display interface.
  • the screen display interface, the face detection event is generated by the electronic device recognizing that the image data includes all or part of the face image.
  • it also includes: when the electronic device determines that the image data includes all or part of the face image this time, and the difference between the time when the image data includes all or part of the face image in the previous time is less than a threshold , the display screen of the electronic device remains in an off-screen state.
  • the method before the display screen of the electronic device maintains the screen-off state, the method further includes: the electronic device determines that the electronic device remains in a static state.
  • the method further includes: the electronic device determines that the electronic device is not continuously in a static state, and the display screen of the electronic device displays an off-screen display interface.
  • the electronic device determines that the difference between the time when it recognizes that the image data includes all or part of the face image this time and the time when it recognized that the image data includes all or part of the face image this time is less than the threshold, but If the electronic device is not continuously in a static state, that is, the attitude of the electronic device changes, the display screen is triggered to display an off-screen display interface.
  • the electronic device determines that the electronic device is in a static state continuously, including: the electronic device determines that the electronic device is in the same posture within a predetermined time period, and the predetermined time period refers to: the moment when the face detection function is turned on, until this time A time period in which the difference between the time when it is recognized that the image data includes all or part of the face image and the time when the previous time when it was recognized that the image data includes all or part of the face image is not less than a threshold value.
  • the electronic device determining that the electronic device is in the same posture within the predetermined time period includes: the electronic device determines that the electronic device is in the same posture within the predetermined time period by using the three-axis detection data of the acceleration sensor.
  • the method further includes: the electronic device determines that the light of the environment where the electronic device is located remains stable.
  • the method further includes: the electronic device determines that the light of the environment where the electronic device is located is not stable, and the display screen of the electronic device displays a screen-off display interface.
  • the electronic device determines that the difference between the time when it recognizes that the image data includes all or part of the face image this time and the time when it recognized that the image data includes all or part of the face image this time is less than the threshold, but
  • the brightness of the environment where the electronic device is located is not stable, so that even if the user continues to be in front of the display screen, as long as the brightness of the environment where the electronic device is located changes, the display screen can be triggered to display an off-screen display interface.
  • the electronic device determines that the brightness of the environment where the electronic device is located remains stable, including: the electronic device detects the ambient light brightness through the ambient light sensor; the electronic device determines that the ambient light brightness detected by the ambient light sensor is within a predetermined period of time
  • the predetermined time period refers to: the moment when the face detection function is turned on, the time until the current recognition of image data including all or part of the face image, and the time when the previous recognition of image data including all or part of the face image The time period for which the difference is not less than the threshold.
  • the method further includes: the electronic device determines that the electronic device does not detect a change of an object approaching or moving away.
  • the method further includes: the electronic device determines that the electronic device detects a change in the approach and distance of the object, and the display screen of the electronic device displays an off-screen display interface.
  • the electronic device determines that the difference between the time when it recognizes that the image data includes all or part of the face image this time and the time when it recognized that the image data includes all or part of the face image this time is less than the threshold, but
  • the electronic device detects the change of the object approaching and moving away, and the display screen of the electronic device displays the screen-off display interface, which can realize that even if the user continues to be in front of the display screen, as long as an object approaches or moves away from the electronic device, the display screen can be triggered to display the screen-off display interface.
  • the electronic device determines that the electronic device does not detect the change of the approach and distance of the object, including: the electronic device detects the object through the proximity light sensor, and obtains a report event; the electronic device determines that the report event lasts for a predetermined period of time Far away from the event, or continue to be an approaching event within a predetermined period of time, the predetermined period of time refers to: the moment when the face detection function is turned on, to the time when the image data is recognized this time including all or part of the face image, and the time when the image is recognized last time
  • the data includes a time period in which the difference in time of all or part of the facial images is not less than a threshold.
  • the processor of the electronic device includes an intelligent sensor hub sensor hub, and the sensor hub includes: an AON module; when the display screen of the electronic device is in an off-screen state, the electronic device starts the face detection function, including: electronic When the display screen of the device is in the off-screen state, the electronic device starts the AON module to perform the face detection function.
  • the processor of the electronic device includes: a virtual camera unit Virtual AON Camera; based on this, when the display screen of the electronic device is in an off-screen state, the electronic device starts the face detection function, including: the Virtual AON Camera determines When the display screen is off, the face detection function is activated.
  • the Virtual AON Camera when the Virtual AON Camera determines that the display screen is off, before starting the face detection function, it further includes: the Virtual AON Camera receives the display state of the display screen, and records the display state of the display screen.
  • the Virtual AON Camera since the Virtual AON Camera takes over the on/off of the face detection function, it is necessary to know the display status of the display screen. Considering that the display screen is off, the AP will go to sleep, so before the AP goes to sleep, the Virtual AON Camera receives the screen off status of the display screen and records the screen off status of the display screen.
  • the Virtual AON Camera determines that the display screen is off, after starting the face detection function, it also includes: when the Virtual AON Camera determines that the image data includes part or all of the image data, wake up the application processing of the electronic device controller, and send the display status of the display to the application processor.
  • the Virtual AON Camera needs to wake up the AP first when determining that the image data includes part or all of the image data. Because the display status of the display screen is recorded by the Virtual AON Camera during the AP sleep process, after the AP is woken up, the Virtual AON Camera sends the display status of the display screen recorded by itself to the AP to ensure the normal operation of the AP.
  • the electronic device determines that the difference between the time when the image data includes all or part of the face image this time and the time when the image data includes all or part of the face image the previous time is not less than a threshold After the display screen of the electronic device displays the screen-off display interface, it also includes: when the electronic device judges that the display screen is in a non-screen-off state, turning off the face detection function.
  • the electronic device before the electronic device starts the face detection function, it further includes: the electronic device determines that the electronic device meets a preset condition; wherein the preset condition includes that the display screen of the electronic device is not in a downward posture, and the electronic device The brightness of the environment is not less than the first threshold, and the electronic device does not detect that an object is approaching.
  • the electronic device determines that the display screen of the electronic device is not in a downward posture, determines that the ambient light brightness is not less than a first threshold, and further determines that a away event is received, indicating that the display screen of the electronic device is in an upward posture,
  • the face detection function can be activated to avoid the waste of power consumption caused by the activation of the face detection function caused by the electronic device not being in an upward posture, or the environment where the brightness is not enough, or being blocked by an object.
  • the present application provides an electronic device, including: one or more processors, memory, display screen and front camera; memory and display screen, and front camera coupled with one or more processors, memory It is used to store computer program codes, the computer program codes include computer instructions, and when one or more processors execute the computer instructions, the electronic device executes the screen-off display control method according to any one of the first aspect.
  • the present application provides a computer storage medium for storing a computer program.
  • the computer program When executed, it is specifically used to implement the method for controlling the screen-off display according to any one of the first aspect.
  • the present application provides a computer program product.
  • the computer program product When the computer program product is run on a computer, it enables the computer to execute the method for controlling screen-off display according to any one of the first aspect.
  • Fig. 1a is a display diagram of an off-screen display interface
  • Figure 1b is a diagram of an application scenario provided by this application.
  • Fig. 2a is the hardware structural diagram of the electronic device provided by the present application.
  • Figure 2b is a software architecture diagram of the electronic device provided by the present application.
  • FIG. 3 is a display diagram of an interface of an electronic device provided by the present application.
  • FIG. 4 is a display diagram of another interface of the electronic device provided by the present application.
  • FIG. 5 is a signaling diagram of a control method for screen-off display provided in Embodiment 1 of the present application.
  • FIG. 6 is a signaling diagram of a control method for screen-off display provided in Embodiment 2 of the present application.
  • FIG. 7 is a signaling diagram of a control method for screen-off display provided in Embodiment 3 of the present application.
  • FIG. 8 is a signaling diagram of a control method for screen-off display provided in Embodiment 4 of the present application.
  • one or more refers to one, two or more than two; "and/or” describes the association relationship of associated objects, indicating that there may be three types of relationships; for example, A and/or B may mean: A exists alone, A and B exist simultaneously, and B exists alone, wherein A and B may be singular or plural.
  • the character "/" generally indicates that the contextual objects are an "or" relationship.
  • references to "one embodiment” or “some embodiments” or the like in this specification means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically stated otherwise.
  • the terms “including”, “comprising”, “having” and variations thereof mean “including but not limited to”, unless specifically stated otherwise.
  • a plurality referred to in the embodiment of the present application means greater than or equal to two. It should be noted that in the description of the embodiments of the present application, words such as “first” and “second” are only used to distinguish the purpose of description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or imply order.
  • AOD (Always On Display) display interface also known as off-screen display interface, is a display interface with low power consumption. This interface generally displays some messages to remind users, such as time, date, mobile phone power, etc. . In addition, the interface can also display animation effects, which are displayed synchronously with messages prompting users.
  • Frame rate (Frames Per Second) refers to: the speed at which the camera captures images.
  • the screen-off display is a display function when the screen of the electronic device is off. Compared with the conventional display, its power consumption is lower, and it can also meet the user's requirements for information such as date, time, and reminders.
  • the method provided by the electronic device to start the off-screen display is: the electronic device is in the off-screen state, the user touches the display screen, and the electronic device displays the off-screen display interface.
  • the embodiment of the present application proposes a control method for screen-off display, as shown in FIG. 1b , which can realize an AOD display interface triggered by a human face when the display screen is in an off-screen state.
  • the control method for screen-off display provided in the embodiment of the present application can be applied to mobile phones, tablet computers, desktops, laptops, notebook computers, ultra-mobile personal computers (Ultra-mobile Personal Computer, UMPC), handheld computers, netbooks, Personal digital assistant (Personal Digital Assistant, PDA), wearable electronic devices, smart watches and other electronic devices.
  • Ultra-mobile Personal Computer Ultra-mobile Personal Computer
  • PDA Personal Digital Assistant
  • FIG. 2a is a composition example of an electronic device provided in an embodiment of the present application.
  • the electronic device 100 may include a processor 110 , an internal memory 120 , a camera 130 , a display 140 , an antenna 1 , an antenna 2 , a mobile communication module 150 , a wireless communication module 160 and a sensor module 170 .
  • the sensor module 170 may include an acceleration sensor 170A, a proximity light sensor 170B, an ambient light sensor 170C and the like.
  • the structure shown in this embodiment does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized 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 processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, intelligent sensor hub (sensor hub) and/or neural network processor (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 processing unit
  • graphics processing unit graphics processing unit
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • DSP digital signal processor
  • baseband processor intelligent sensor hub
  • neural- network processing unit neural- network processing unit
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory. This memory may hold instructions or data that processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • the intelligent sensor hub (sensor hub) in the processor 110 can provide a solution based on the combination of software and hardware on the low-power MCU and the lightweight RTOS operating system, and its main function is to connect and Process data from various sensor devices.
  • the sensor hub can include: AON (Always on) module, signal processor and memory (On-chip SRAM).
  • the AON module is an independent low-power module, including: AON_ISP and Face Detect (FD) module.
  • AON_ISP can be understood as a Mini-ISP for processing the data fed back by the camera 130 .
  • AON_ISP converts the electrical signal converted by the photosensitive element of the camera into image data.
  • the FD module is used to perform face detection on the image data output by AON_ISP to obtain face detection events.
  • the signal processor can be understood as a sensor chip, such as SSC (Snapdragon Sensing Core), which is used to transmit the face detection events obtained by the FD module.
  • SSC Session Sensing Core
  • On-chip SRAM is used to save the image data obtained by AON_ISP.
  • the internal memory 120 may be used to store computer-executable program code, which includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 120 .
  • the internal memory 120 may include an area for storing programs and an area for storing data.
  • the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like.
  • the storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like.
  • the internal memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 120 and/or instructions stored in a memory provided in the processor.
  • the electronic device realizes the display function through the GPU, the display screen 230 , and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 230 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 210 may include one or more GPUs that execute program instructions to generate or alter display information.
  • the display screen 230 is used to display images, videos and the like.
  • the display screen 230 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 diodes (quantum dot light emitting diodes, QLED), etc.
  • the electronic device may include 1 or N display screens 230, where N is a positive integer greater than 1.
  • the electronic device 100 can realize the shooting function through the ISP, the camera 130 , the video codec, the GPU, the display screen 140 and the application processor.
  • the ISP is used to process data fed back by the camera 130 .
  • the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera 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 color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be located in the camera 130 .
  • Camera 130 is used to capture still images or video.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the light 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 image signals.
  • the electronic device 100 may include 1 or N cameras 130 , where N is a positive integer greater than 1.
  • the camera 130 can be set as a front camera of the electronic device, and is used to capture a face image located in front of the display screen of the electronic device.
  • the front camera can be understood as a camera capable of capturing images in front of the display screen during operation, and its installation location is not limited.
  • the camera 130 can have three working modes, ambient light detection (Ambient Light Sensor, ALS) mode, ultra low power consumption (Ultra Low Power, ULP) mode and Normal mode.
  • ambient light detection Ambient Light Sensor, ALS
  • Ultra Low Power Ultra Low Power
  • the display screen is off, and the camera 130 can operate in ALS mode to generate ultra-low resolution images at configurable time intervals.
  • the camera 130 in the ALS mode uses the image data of the ultra-low resolution image to detect the change of light and shadow, and obtain the detection result of the change of light and shadow.
  • the camera 130 utilizes the image data of the ultra-low resolution image to detect light and shadow changes, and is used to determine whether there is a light and shadow change in front of the camera.
  • the camera can operate in ULP mode to generate a lower resolution image.
  • Lower resolution images are used for face detection.
  • the camera When the camera is called to shoot or video, the camera runs in Normal mode.
  • the wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a 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 single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves and radiate them through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
  • the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100.
  • System global navigation satellite system, GNSS
  • frequency modulation frequency modulation, FM
  • near field communication technology near field communication, NFC
  • infrared technology infrared, IR
  • 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 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the acceleration sensor 170A can detect 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. In some embodiments, the acceleration sensor 170A can also be used to identify the posture of the electronic device, and it can be applied to applications such as horizontal and vertical screen switching, pedometer, and screen-off display.
  • Proximity light sensor 170B may include, for example, a light emitting diode (LED), which may be an infrared light emitting diode, and a photodetector.
  • the electronic device 100 emits infrared light through the light emitting diode.
  • Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 .
  • the detection result of the proximity light sensor 170B can be provided to the electronic device to determine whether to activate the face detection function.
  • the ambient light sensor 170C is used for sensing ambient light brightness.
  • the electronic device can adaptively adjust the brightness of the display screen 140 according to the perceived ambient light brightness.
  • the ambient light sensor 170C can also be used to automatically adjust the white balance when taking pictures.
  • the detection result of the ambient light sensor 170C can be used to provide the electronic device to determine whether to activate the face detection function.
  • the acceleration sensor 170A, the proximity light sensor 170B and the ambient light sensor 170C in the sensor module 170 can be in the running state after the electronic device is turned on, or can be triggered by the application program of the electronic device to start and run.
  • an operating system runs on top of the above components.
  • An application program can be installed and run on the operating system.
  • Fig. 2b is a block diagram of the software structure of the electronic device 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 through software interfaces.
  • the Android system is divided into four layers, which are respectively the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer from top to bottom.
  • the application layer can consist of a series of application packages.
  • the application package may include applications such as camera, gallery, calendar, call, map, setting, AOD application, gaze detection, and face detection.
  • setting is mainly responsible for product isolation and product information management.
  • the setting may confirm whether the electronic device has a face detection capability according to the attribute information of the electronic device.
  • Setting an electronic device that is determined to have face detection capabilities will expose the menu where the face detection function is enabled.
  • the "Smart Perception" shown in Figure 3(a) and the “Screen-off display when a face is recognized" shown in Figure 3(b) are examples of menus enabled by the face detection function.
  • the AOD application is used to control displaying an off-screen display interface on the display screen.
  • Gaze detection is used to realize the detection of controlling whether the human eye is gazing at the display screen.
  • Face detection is used to trigger the function of detecting whether a face appears in front of the display screen.
  • the AOD application can have the function of displaying a face in front of the display screen and controlling the display screen to display an off-screen display interface.
  • the AOD application can also control the display screen to display an off-screen display interface when it is determined that a human face appears in front of the display screen.
  • applications such as the AOD application can initiate a registration process to the processor of the electronic device to activate the proximity light sensor, ambient light sensor and acceleration sensor, and the proximity light sensor detects whether there is an approaching object, and the ambient light sensor Detect the brightness of the environment, and the acceleration sensor detects the acceleration of the electronic device.
  • Proximate objects can be understood as adults or general objects, and objects can also be used instead.
  • 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. As shown in Figure 2b, the application framework layer can include window manager, content provider, phone manager, resource manager, notification manager, view system, AON JNI Interface, etc.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • Content providers are used to store and retrieve data and make it accessible to applications.
  • Said data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.
  • the phone manager is used to provide communication functions of electronic devices. For example, the management of call status (including connected, hung up, etc.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify the download completion, message reminder, etc.
  • the notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
  • prompting text information in the status bar issuing a prompt sound, vibrating the electronic device, and flashing the indicator light, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on.
  • the view system can be used to build applications.
  • a display interface can consist of one or more views.
  • a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
  • AON JNI Interface is used to complete the upload and release of messages.
  • the AON JNI Interface transparently transmits the request to the AON HIDL Interface of the AON Service.
  • AON JNI Interface passes the face detection event to the AOD application.
  • AON JNI Interface is also used to realize the coordination and scheduling among multiple intelligent sensing functions.
  • the electronic device is equipped with two intelligent perception functions of face detection and gaze detection. When the gaze detection is working, AON JNI Interface suspends the face detection; when the gaze detection is completed, it executes the face detection function.
  • the electronic equipment relies on the upper system to do some function switch control, it is also placed in the AON JNI Interface.
  • an electronic device has a sleep detection function, and the face detection function is turned off when the user is sleeping. The trigger and exit of the sleep event are passed through the AON JNI Interface.
  • AON JNI Interface is also used to provide function switch control for some upper layer services.
  • the electronic device has a sleep detection service, and the sleep detection process of the electronic device can realize the sleep detection function.
  • AON JNI Interface can pass the sleep event to turn off the face detection function.
  • the Android Runtime includes core library and virtual machine.
  • the Android runtime is responsible for the scheduling and management of the Android system.
  • the cold start of the application will run in the Android runtime, and the Android runtime obtains the optimized file status parameters of the application, and then the Android runtime can judge whether the optimized file is outdated due to system upgrades through the optimized file status parameters , and return the judgment result to the application control module.
  • the core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application program layer and the application program framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • a system library can include multiple function modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), 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 library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG2, H.262, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to realize 3D graphics drawing, image rendering, compositing and layer processing, etc.
  • the 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer includes at least display driver, camera driver, audio driver, sensor driver, AON service, virtual camera unit Virtual AON Camera and AON Driver, etc.
  • the camera driver can be used to drive the camera 130 to run.
  • the camera driver controls the camera 130 to operate in the Normal mode.
  • Sensor drivers may be used to drive the acceleration sensor 170A, the proximity light sensor 170B, and the ambient light sensor 170C to operate.
  • AON service includes: AON HIDL Interface, AON HIDL Implement and AON Camera HAL. These three parts together constitute the control logic of the camera 130 .
  • the electronic device includes multiple cameras 130, and the AON camera HAL is used to complete the scheduling of the multiple cameras 130. In addition, the switching control of the three working modes of the camera 130 is also realized by AON Camera HAL.
  • the Virtual AON Camera is used to take over the on/off of the face detection function after the AP sleeps.
  • the face detection function can be dynamically turned on/off according to the display state of the display screen, the attitude of the electronic device, the detection result of the proximity light sensor, and the brightness of the ambient light.
  • the Virtual AON Camera is also used to receive face detection events, wake up the AP and report the face detection event; when the face detection event is not received, it does not process or wake up the AP.
  • AON service is used to drive the AON module to run.
  • the electronic device can be set with a face recognition model.
  • the face recognition model can be invoked by the sensor hub.
  • the FD module in the sensor hub calls the face recognition model to perform face detection on the image data, and obtains face detection events.
  • the face recognition model has the function of predicting whether the image data input to the face recognition model contains a human face.
  • the face recognition model can obtain a confidence level indicating whether the image data contains a human face, and the electronic device can determine whether the image data contains a human face using the confidence level.
  • the face recognition model can use basic network models such as convolutional neural network (Convolutional Neural Network, CNN), long-short-term memory artificial neural network (Long-Short Term Memory, LSTM).
  • CNN convolutional Neural Network
  • LSTM Long-Short Term Memory
  • Convolutional neural networks usually include: input layer, convolution layer (Convolution Layer), pooling layer (Pooling layer), fully connected layer (Fully Connected Layer, FC) and output layer.
  • Convolution Layer convolution layer
  • Pooling layer Purooling layer
  • FC Fully Connected Layer
  • the first layer of a convolutional neural network is the input layer
  • the last layer is the output layer.
  • Convolution Layer refers to the neuron layer that performs convolution processing on the input signal in the convolutional neural network.
  • a neuron can only be connected to some adjacent neurons.
  • a convolutional layer usually contains several feature planes, and each feature plane can be composed of some rectangularly arranged neural units. Neural units of the same feature plane share weights, and the shared weights here are convolution kernels.
  • Pooling layer usually after the convolutional layer will get a feature with a large dimension, cut the feature into several regions, take its maximum value or average value, and obtain a new feature with a smaller dimension.
  • Fully-Connected layer which combines all local features into global features, is used to calculate the final score of each category.
  • a long-short-term memory artificial neural network usually includes an input layer, a hidden layer, and an output layer.
  • the input layer is composed of at least one input node; when the LSTM network is a unidirectional network, the hidden layer only includes the forward hidden layer; when the LSTM network is a bidirectional network, the hidden layer includes the forward hidden layer and the backward hidden layer to the hidden layer.
  • the hidden nodes are respectively connected to the output nodes, and are used to output their own calculation results to the output nodes, and the output nodes perform calculations according to the output nodes of the hidden layer, and output data.
  • the face recognition model can be trained in the following ways:
  • the original model of face recognition can choose basic network models such as CNN and LSTM.
  • a large number of training samples are obtained, and the training samples include: image samples containing human faces and image samples not containing human faces, and the training samples are marked to indicate whether the image samples contain human faces.
  • a human face may refer to key information of a human face, and the key information of a human face may include at least one of image information indicating contours of eyes, nose, and mouth. Therefore, the image samples containing human faces may include image samples containing all human faces, and image samples containing partial human faces, such as image samples containing side faces of human faces, and image samples containing occluded human faces.
  • the training samples are input into the original face recognition model, and the original face recognition model detects whether the training samples contain a human face, and obtains the detection result.
  • loss function uses the loss function to calculate the loss value of the detection result and the labeling result of each training sample to obtain the loss value of the model.
  • loss functions such as cross-entropy loss function and weighted loss function can be used to calculate the loss value, or a combination of multiple loss functions can be used to calculate multiple loss values.
  • the model convergence condition may be that the loss value of the model is less than or equal to a preset loss threshold. That is to say, the loss value of the model can be compared with the loss threshold. If the loss value of the model is greater than the loss threshold, it can be judged that the loss value of the model does not meet the model convergence conditions. Conversely, if the loss value of the model is less than or equal to the loss threshold, it can be judged that the model loss value meets the model convergence condition.
  • the loss value of the corresponding model can be calculated for each training sample. In this case, only when the model loss value of each training sample meets the model convergence condition will the Execute, on the contrary, as long as there is a model loss value of a training sample that does not meet the model convergence conditions, then execute the subsequent steps.
  • the trained model can be used in the screen-off display control method proposed in the embodiment of this application to detect whether the image data input to the model contains a human face.
  • the parameter update value of the model is calculated according to the loss value of the model, and the original face recognition model is updated with the parameter update value of the model. And use the updated model to continue to process the training samples, get the detection results, and continue to execute the subsequent process until the loss value of the model meets the convergence conditions of the model.
  • the electronic device can provide a display interface, and the "face detection" application related to the software framework of the electronic device in FIG. 2b can be set.
  • Figure 3 shows an example of the presentation interface.
  • the display interface of the auxiliary function includes the "smart perception” application smart perception.
  • the user can click the control of the "Smart Perception” application, and the display interface of the "Smart Perception” application can be displayed on the display screen, as shown in Figure 3(b).
  • the "Smart Perception” application shown in Figure 3(b) includes three functional applications, namely: keep the screen on while watching the screen, reduce the volume of incoming calls while watching the screen, and turn off the screen when the face is recognized.
  • the display of the screen being turned off when a human face is recognized can be understood as the "face detection” function proposed in the embodiment of this application.
  • the function of "recognizing a face and turning off the screen display” is activated.
  • the display interface of the screen-off display application of the electronic device will be adjusted.
  • Fig. 3(c) shows an example of a display interface of an off-screen display application.
  • the user can click "display mode" to view the display mode of the off-screen display.
  • the display mode of the off-screen display will be adjusted to the display mode of the smart display, as shown in Figure 3(d).
  • the display mode of screen-off display will change, see the interface example shown in Figure 4.
  • the user controls the display screen to display the display interface of the "Smart Perception” application by clicking the control of the "Smart Perception” application shown in FIG. 4(a).
  • the display mode of the screen-off display application will be adjusted to tap display.
  • FIG. 5 shows a control method for screen-off display provided by this embodiment.
  • the control method for screen-off display provided in this embodiment includes steps:
  • the AOD application acquires the display status of the display screen.
  • the display state of the display screen includes: screen on state, screen off state, and low power consumption state (doze).
  • the display screen of an electronic device displays the state of the AOD display interface, which can be understood as a low power consumption state.
  • the AOD application can obtain the display status of the display screen by monitoring the events broadcast by the display driver.
  • the processor of the electronic device includes a power management module.
  • the power management module can be understood as a logic unit, which is used to monitor the on-off screen request sent by the application program or triggered by the user, and use the on-off screen logic to control the display driver to realize the control of the working state of the display screen.
  • the screen off trigger methods include: 1. The user manually presses the power button to turn off the screen; 2.
  • the system's automatic screen off management that is, the electronic device automatically turns off the screen if the user does not input an operation for a period of time; 3.
  • the system actively Initiated off-screen such as blocking off the screen when making a call, off-screen issued by the system when it is automatically restarted, etc.
  • the power management module judges that any one of the above-mentioned off-screen triggering methods is executed, and then sends an off-screen command to the display driver.
  • the display driver powers off the display after receiving the screen-off command issued by the power management module.
  • the screen-off event is broadcast, and the AOD application can monitor the screen-off event to determine that the display state of the display screen is the screen-off state.
  • the AOD application can obtain the bright screen state and low power consumption state in the same way.
  • the AOD application sends the display status of the display screen to the AON JNI Interface.
  • AON JNI Interface belongs to the application framework layer and is used to complete the upload and release of messages. passed down.
  • the AON JNI Interface receives the display status of the display screen, and sends the display status of the display screen to the AON service.
  • AON service belongs to the kernel layer, including AON HIDL Interface, AON HIDL Implement and AON Camera HAL.
  • AON JNI Interface sending the display status of the display to AON service includes: AON JNI Interface sending the display status of the display to AON HIDL Interface.
  • AON HIDL Interface receives the display status of the display and sends it to AON HIDL Implement.
  • AON HIDL Implement receives the display status of the display and sends it to AON Camera HAL.
  • the AON service receives the display status of the display screen, and sends the display status of the display screen to the Virtual AON Camera.
  • AON Camera HAL receives the display status of the display screen, and AON Camera HAL sends the display status of the display screen to Virtual AON Camera.
  • AON Service depends on the AP being in the wake-up state. If the AP is dormant, AON Service cannot control the enabling/disabling of the face detection function. Based on this, the Sensor hub includes the logic unit Virtual AON Camera, which is used to take over the opening/closing of the face detection function when the AP is sleeping.
  • the Virtual AON Camera takes over the opening/closing of the face detection function, it needs to know the display status of the display screen, so the AON service receives the display status of the display screen. If the status of the display screen is off, considering that the screen is off, the AP It will go to sleep, so before the AP goes to sleep, the AON service sends the display status of the display to the Virtual AON Camera.
  • the display screen is in an off state, and the AP enters a dormant state.
  • the display screen is off, and the AP sleeps.
  • the AP may determine to turn off the display screen by learning the off-screen instruction issued by the power management module.
  • Virtual AON Camera records the display status of the display screen.
  • the Virtual AON Camera Before the AP sleeps, the Virtual AON Camera will record the display status of the display screen, and after the AP wakes up, the Virtual AON Camera can send the display status of the display screen to the AP.
  • the AOD application can initiate a registration request to request to start the face detection function and to request to receive face detection events.
  • the AOD application can initiate a deregistration request to request deregistration, that is, turn off the face detection function and not receive face detection events.
  • step S501 to step S503 what the AOD application sends to the lower layer is an AOD registration message. What Virtual AON Camera records is the registration message of AOD.
  • the Virtual AON Camera sends an instruction to start the face detection function to the AON Driver.
  • the electronic device can start the face detection function, so that after the face is detected, the electronic device displays the AOD display interface.
  • the Virtual AON Camera uses the display status of the display screen to determine that the display screen of the electronic device is off, and sends an instruction to the AON Driver to start the face detection function.
  • AON Driver like the content of the software framework of the aforementioned electronic equipment, belongs to the kernel layer and is used to drive the operation of the AON module.
  • the AON Driver sends an instruction to start the face detection function to the AON module.
  • the AON Driver can send instructions to the AON module to control the AON module to start the face detection function.
  • the AON module includes an AON_ISP and an FD module, and the FD module is used for face detection on the image data output by the AON_ISP.
  • the AON Driver sends an instruction to the AON module to start the face detection function, which can refer to controlling the AON_ISP to output image data, and controlling the operation of the FD module for face detection.
  • the electronic device After the user manually activates the function of "recognizing a face and turning off the screen display" of the electronic device, the electronic device will not immediately determine whether the face appears in front of the display screen, so as to Trigger the detection of the output of the screen-off display interface.
  • the electronic device determines that the display screen of the electronic device is in the off-screen state by performing steps S501 to S507, it executes step S508 to activate the face detection function to detect that a face appears in front of the display screen and trigger the display of the screen-off display interface.
  • the electronic device for the function of triggering the display of the screen-off display interface when the face appears in front of the display screen, the electronic device is equipped with two activation switches, and one activation switch is provided for the user to manually trigger, as shown in 3(b)
  • the electronic device can detect that a human face appears in front of the display screen, and trigger the display of an off-screen display interface.
  • the camera captures image data.
  • the display screen enters the off-screen state, and the AON Camera HAL drives the camera to run.
  • the camera includes three working modes.
  • the camera operates in ALS mode to obtain the detection result of light and shadow changes.
  • AON Camera HAL uses the detection results of light and shadow changes to determine whether there is light and shadow change in front of the camera.
  • AON Camera HAL switches The camera operates in ULP mode.
  • the camera operates in ULP mode, capturing images at a set frame rate, such as 5fps. After the camera captures a certain number of images, such as 3 frames of images, it can exit ULP mode, and AON Camera HAL switches the camera to run in ALS mode.
  • the AON Camera HAL is configured with control logic to switch the camera to operate in ALS mode or ULP mode.
  • AON Camera HAL can control the camera to operate in ALS mode or ULP mode according to the control logic.
  • the camera can be activated by the camera driver to capture image data after the display screen enters the off-screen state.
  • the AON module acquires image data captured by the camera.
  • the image data obtained by taking images with the camera is in the form of electrical signals.
  • AON_ISP obtains the electrical signal, converts it into image data and provides it to the FD module.
  • the AON module detects whether the image data includes a human face.
  • the FD module detects whether the image data includes a human face.
  • the FD module invokes the face recognition model proposed above to process the image data to obtain a confidence level indicating whether the image data includes a face.
  • the detection by the FD module of whether the image data includes a human face can be understood as: the FD module detects whether the image data includes all or part of the human face, such as whether it contains all or part of the key information of the human face.
  • the AON module detects that the image data includes a human face, execute S512 to generate a human face detection event. If the AON module detects that the image data does not include a face, the display screen remains off.
  • the FD module determines that the confidence is greater than the threshold, it means that the image data includes a face, and a face detection event is generated.
  • the face detection event is used to indicate that the image captured by the camera includes a face, indicating that there is someone in front of the display screen of the electronic device. Face.
  • the face detection event can be a high or low level.
  • the camera captures multiple frames of images
  • the FD module calls the face recognition model to process the image data of each frame of images to obtain the confidence of each frame of images.
  • a face detection event is generated.
  • the FD module can also generate a face detection event after determining that the confidence of each frame of image is greater than the threshold.
  • the camera shoots multiple frames of images, and the FD module determines that the confidence of each frame of the image is greater than the threshold, and generates a face detection event. It can be seen that: the FD module determines that the image data within a certain period of time includes all or part of the face, and generates Face detection event.
  • the image data detected by the AON module includes a face
  • the image data detected by the AON module may further include: the image data detected by the AON module includes a set feature, and the set feature is a pre-configured image feature.
  • the electronic device can take pictures of the legal user of the electronic device, such as the owner of the electronic device, through the camera, and extract key features of the image, such as at least one of the image information of the contours of the eyes, nose, and mouth.
  • the key features of the extracted image can be To set the characteristics.
  • the AON module detects that the image data includes a human face, and then recognizes whether the image data includes pre-configured image features. If the AON module recognizes that the image data includes pre-configured image features, a face detection event is generated. In this way, it can be ensured that the electronic device can be triggered to display the off-screen display interface through the display screen only when the legitimate user of the electronic device appears in front of the display screen of the electronic device.
  • the AON module sends the face detection event to the signal processor.
  • the FD module sends a face detection event to the signal processor.
  • the signal processor sends a face detection event to the AON Driver.
  • the signal processor receives the face detection event and sends the face detection event to the AON Driver.
  • the AON Driver sends a face detection event to the Virtual AON Camera.
  • the FD module gets the face detection event, indicating that a face appears in front of the display screen of the electronic device, which can trigger the display screen to output the AOD display interface. Therefore, AON Driver receives the face detection event and sends the face detection event to the Virtual AON Camera.
  • the Virtual AON Camera wakes up the AP, and sends the recorded display status of the display screen to the AP.
  • the Virtual AON Camera needs to wake up the AP before uploading face detection events.
  • the Virtual AON Camera Because the display status of the display screen is recorded by the Virtual AON Camera during the AP sleep process, therefore, after the AP is woken up, the Virtual AON Camera sends the display status of the display screen recorded by itself to the AP.
  • the Virtual AON Camera sends a face detection event to the AON service.
  • the Virtual AON Camera and AON service can communicate, and the Virtual AON Camera can send face detection events to the AON service.
  • the AON service includes AON HIDL Interface, AON HIDL Implement and AON Camera HAL.
  • Virtual AON Camera sends face detection events to AON Camera HAL
  • AON Camera HAL sends face detection events to AON HIDL Implement
  • AON HIDL Implement sends face detection events to AON HIDL Interface.
  • the AON service sends a face detection event to the AON JNI Interface.
  • AON HIDL Interface receives the face detection event and sends the face detection event to AON JNI Interface.
  • the AON JNI Interface sends a face detection event to the AOD application.
  • AON JNI Interface receives the face detection event and sends the face detection event to the AOD application.
  • the AOD application control display screen displays an AOD display interface.
  • the AOD application receives a face detection event, determines that a face appears in front of the display screen of the electronic device, and then controls the display screen to display the AOD display interface, so that the user can trigger the display screen of the electronic device by placing the face in front of the display screen Display the AOD display interface.
  • the display screen may exit from displaying the AOD display interface and enter the off-screen state.
  • the control method for screen-off display provided in Embodiment 1 can realize the function of displaying an AOD display interface on the display screen when a human face appears in front of the display screen when the display screen of the electronic device is off.
  • the face detection function of the electronic device is turned on.
  • the face detection function of the electronic device can be turned off.
  • the screen-off display control method provided in this embodiment can realize the closing of the face detection function.
  • FIG. 6 shows a control method for screen-off display provided by the embodiment of the present application.
  • the control method for screen-off display provided in this embodiment includes steps:
  • the AOD application acquires the display state of the display screen.
  • the AOD application sends the display state of the display screen to the AON JNI Interface.
  • the AON JNI Interface receives the display status of the display screen, and sends the display status of the display screen to the AON service.
  • the AON service receives the display status of the display screen, and sends the display status of the display screen to the AP.
  • steps S601 to S604 please refer to the contents of steps S501 to S504 in Embodiment 1, which will not be repeated here.
  • the AP determines that the display screen is in a bright screen state or a doze state.
  • the AP can determine whether the display screen is in a bright screen state or a doze state according to the received display state.
  • the Virtual AON Camera sends instruction information to the AP to instruct the face detection function of the electronic device to start.
  • the face detection function of the electronic device When the display screen is in the bright screen or doze state, if the face detection function of the electronic device is activated, it will affect the normal use of the electronic device. Therefore, the face detection function should be turned off. In order to disable the face detection function, the AP needs to know whether the face detection function of the electronic device is enabled.
  • the Virtual AON Camera can detect whether the face detection function of the electronic device is activated. When the Virtual AON Camera determines that the face detection function of the electronic device is activated, it sends an instruction message to the AP, which is used to represent the activation of the face detection function of the electronic device.
  • the AP can also send an instruction to the Virtual AON Camera, so that after the Virtual AON Camera receives the instruction, it determines whether the face detection function of the electronic device is activated, and sends an instruction message to the AP.
  • FIG. 6 shows an example of the execution order of step S606, but step S606 is not limited to this execution order, and the Virtual AON Camera may execute step S606 at any time before step S605.
  • the AP sends an instruction to disable the face detection function to the AON Driver.
  • the AP determines that the display screen is in the bright screen state or doze state, and receives the instruction information sent by the Virtual AON Camera to determine that the face detection function of the electronic device is activated, and then sends an instruction to turn off the face detection function to the AON Driver to indicate the shutdown Face detection function.
  • both the on-screen state and the doze state belong to the non-off-screen state of the display screen, but the non-off-screen state of the display screen is not limited to the on-screen state and the doze state.
  • the AP receives an instruction message from the Virtual AON Camera to instruct the face detection function of the electronic device to start, and the AP sends an instruction to turn off the face detection function to the AON Driver to instruct to turn off the face detection function. Face detection function.
  • the AON Driver sends an instruction to disable the face detection function to the AON module.
  • the AON Driver receives an instruction from the AON Driver to turn off the face detection function, and sends an instruction to turn off the face detection function to the AON module.
  • the AO module receives this command and turns off the face detection function.
  • the AON Driver sends an instruction to the AON module to turn off the face detection function, which may refer to controlling the FD module to turn off the face detection.
  • the FD module turns off face detection, it will not perform face detection on the image data captured by the camera, and will not report face detection events. Based on this, the AOD application will not be triggered by face detection events and will not be controlled.
  • the display screen displays the AOD display interface, so that the AOD display interface is not displayed when the display screen of the electronic device is in a non-screen off state.
  • step S507 of the control method for screen-off display provided in Embodiment 1 the Virtual AON Camera sends an instruction to start the face detection function to the AON Driver, which may be when the Virtual AON Camera determines that the electronic device meets certain conditions, and then sends the start face detection function to the AON Driver. Indication of the face detection function.
  • the method for controlling the screen-off display provided in this embodiment will be introduced here.
  • the Virtual AON Camera may include: a display state processing module, an acceleration monitoring module, an approach light monitoring module, an ambient light monitoring module, an attitude detection module, a face detection startup condition judgment module, a face
  • the detection stop condition judgment module, the face event reporting module, and the abnormal management module are several logic modules.
  • the display status processing module which is responsible for receiving the display status instructions issued by the upper layer, parsing the messages and recording the current display status. And according to the display status and the start and stop of the face detection module, the sensor information of the electronic device is integrated to make a decision to start or stop the face detection function.
  • the acceleration monitoring module is responsible for receiving the acceleration change data sent by the acceleration sensor, and forwarding the acceleration change data to the attitude monitoring module.
  • the proximity light monitoring module is responsible for receiving the proximity light change event sent by the proximity light sensor, and recording the proximity light (approaching or departing) event.
  • the ambient light monitoring module is used for receiving the ambient light brightness sent by the ambient light sensor and recording the ambient light brightness.
  • the attitude detection module is responsible for receiving the data transmitted by the acceleration monitoring module, identifying and recording the attitude of the electronic device.
  • the face detection start condition judging module is used to start the face detection function according to the face detection start condition.
  • the face detection stop condition judging module is used to stop the face detection function according to the face detection stop condition.
  • the face event reporting module is responsible for receiving face detection events. If a face is detected, the AP will wake up and report the face detection event; if a non-face is detected, it will not be processed and continue to return to the face detection mode .
  • the abnormal management module is responsible for identifying process and functional abnormalities, recording and reporting abnormalities.
  • FIG. 7 shows a control method for screen-off display provided by the embodiment of the present application.
  • the control method for screen-off display provided in this embodiment includes steps:
  • the proximity light sensor detects the proximity of an approaching object, and obtains an approach event or a distance event.
  • the proximity light sensor detects that an approaching object is approaching, and generates an approach event; the proximity light sensor does not detect that an approaching object is approaching, and generates a moving away event.
  • the proximity event and the distance event can be high and low levels. In one example, the high level refers to the proximity event, and the low level refers to the distance event.
  • the ambient light sensor detects and obtains ambient light brightness.
  • the ambient light sensor is used to detect the ambient light of the environment where the electronic device is located to obtain the brightness of the ambient light.
  • the acceleration sensor detects and obtains three-axis detection data.
  • the acceleration sensor detects the acceleration of the electronic device in the three axes of x, y and z, and obtains the detection data of the three axes of x, y and z.
  • the proximity light sensor sends a proximity event or a distance event to the Virtual AON Camera.
  • the proximity light monitoring module receives the proximity event or the distance event sent by the proximity light sensor.
  • the ambient light sensor sends ambient light brightness to the Virtual AON Camera.
  • the ambient light monitoring module receives the ambient light brightness sent by the ambient light sensor.
  • the acceleration sensor sends three-axis detection data to the Virtual AON Camera.
  • the acceleration monitoring module receives the three-axis detection data sent by the acceleration sensor.
  • the Virtual AON Camera can execute step S704, step S705, step S706 and step S707 in parallel.
  • Virtual AON Camera receives and records the display status of the display screen.
  • the Virtual AON Camera receives the display status of the display screen sent by the AON service.
  • the display status of the display screen sent by the AON service can be as the content of step S504 in the first embodiment, and will not be repeated here.
  • the display state processing module receives and records the display state of the display screen.
  • step S707 can be understood as step S506 in the first embodiment.
  • the electronic device needs to execute steps S501 to S505 of the first embodiment, which will not be described in detail in this embodiment, and can be referred to the content of the first embodiment.
  • the display state processing module utilizes the display state of the display screen to determine whether the display screen is in an off state.
  • step S709 executes step S711 to step S711.
  • step S712 and step S713 are executed.
  • the display state processing module judges whether the face detection function is activated.
  • Step S707, step S708 and step S709 are not limited to the order of execution.
  • the Virtual AON Camera may execute step S707 and step S709 in parallel, or execute step S709 first, and then execute step S707 and step S708.
  • step S709 may also be an optional step.
  • the Virtual AON Camera determines that the display state is the off-screen state, and may directly execute step S710.
  • S710 and Virtual AON Camera use the three-axis detection data to judge whether the electronic device is not in the first posture, judge whether the ambient light brightness is not less than the first threshold, and judge whether to receive a far away event.
  • the first posture can be understood as a downward posture of the display screen of the electronic device, including a posture in which the display screen is completely downward and a posture in which the display screen is tilted downward at a certain angle.
  • Virtual AON Camera can process three-axis detection data to obtain the attitude of electronic equipment. In some embodiments, the Virtual AON Camera can use the following formulas 1 to 3 to process the three-axis detection data to obtain the pitch angle g_pitch.
  • Virtual AON Camera judges whether the calculated pitch angle meets the threshold range, such as [110°-350°]. If the calculated pitch angle is within the threshold range, it means that the electronic device is in the first attitude. If the calculated pitch angle is not within the threshold range, it means that the electronic device is not in the first attitude.
  • ps_gesture_acc_data.x is the detection data of the x-axis of the acceleration sensor.
  • ps_gesture_acc_data.y is the detection data of the y-axis of the acceleration sensor.
  • ps_gesture_acc_data.z is the detection data of the z-axis of the acceleration sensor.
  • the first threshold is the evaluation value of whether the ambient light brightness of the environment where the electronic device is located is sufficient to support the camera to capture a clear image. If the ambient light brightness is not less than the first threshold, it means that the ambient light brightness of the electronic device is sufficient to support the camera to capture Clear image. In one example, the first threshold may be 6lux.
  • the Virtual AON Camera can determine whether an ambient light brightness reported by the ambient light sensor is not less than the first threshold.
  • the ambient light sensor can continuously detect the ambient light brightness, obtain multiple ambient light brightness, and report each ambient light brightness to the Virtual AON Camera.
  • Virtual AON Camera continues to judge whether the brightness of each ambient light is not less than the first threshold. In an example, the Virtual AON Camera judges whether five consecutive ambient light brightnesses are not less than the first threshold.
  • the face detection activation condition judgment module in the Virtual AON Camera can use the three-axis detection data to judge whether the electronic device is in the first posture, judge whether the ambient light brightness is not less than the first threshold, and Steps to determine whether to receive far away events.
  • Virtual AON Camera uses three-axis detection data to judge that the electronic device is not in the first posture, judges that the ambient light brightness is not less than the first threshold, and judges that it receives a far away event, then executes S711, and Virtual AON Camera starts the face detection function.
  • the Virtual AON Camera uses the three-axis detection data to judge that the pitch angle of the electronic device is not within the threshold range, such as [110°-350°]; it judges that the brightness of multiple consecutive environments (such as 5) is not less than the first Threshold, such as 6lux; if it judges that a far away event is received, the face detection function will be activated.
  • the threshold range such as [110°-350°]
  • the brightness of multiple consecutive environments such as 5
  • the first Threshold such as 6lux
  • the face detection starting condition judging module starts the face detection function.
  • the Virtual AON Camera sends an instruction to start the face detection function to the AON Driver.
  • step S711 can be understood as step S507 in the first embodiment.
  • the electronic device needs to execute steps S508 to S520 of the first embodiment, which will not be described in detail in this embodiment, and can be referred to the content of the first embodiment.
  • the AON Driver After the AON Driver receives the instruction to start the face detection function, it can execute step S508 provided in the first embodiment.
  • the face detection function of the electronic device is activated, and the AON module can obtain the image data captured by the camera, detect whether the image data includes a face, and generate a face detection event according to the face detection result.
  • the Virtual AON Camera also receives the face detection event sent by the AON Driver, and executes steps S516 and S517. Wherein, step S516 and step S517 may be performed by the face event reporting module.
  • the Virtual AON Camera uses the three-axis detection data of the acceleration sensor to determine that the electronic device is not in the first posture, and that the ambient light brightness is not less than the first threshold. Upward posture, the environment with sufficient brightness, and no close objects approaching, the face detection function can be activated.
  • the three conditions include: condition 1, using the three-axis detection data to determine that the electronic device is in the first attitude; condition 2, determining that the ambient light brightness is less than the first threshold, and condition 3, determining that an approach event is received.
  • condition 1 it means that the electronic device is in a posture with the display screen facing downwards, which is a posture in which the user cannot see the display screen, such as the display screen buckled down posture. In this posture, the electronic device activates the face detection function, and the display screen displays the AOD display interface, which cannot be seen by the user. Therefore, the face detection function may not be activated to avoid wasting power consumption.
  • condition 2 it means that the brightness of the environment where the electronic device is located is too low, the electronic device activates the face detection function, and the image data captured by the camera is not enough to identify whether the face is included, so the face detection function can also be disabled to avoid Wasted power.
  • condition 3 it means that there is an object close to the electronic device.
  • the face detection function may not be enabled to avoid wasting power consumption.
  • the ambient light brightness is less than the first threshold may refer to a plurality of consecutive ambient light brightnesses including at least one ambient light brightness being smaller than the first threshold. In one example, five consecutive ambient light brightnesses are less than 6lux.
  • condition 2 may also be judging that the ambient light brightness is smaller than other values smaller than the first threshold, such as 3lux.
  • the display state processing module judges whether the face detection function is activated.
  • step S712 and step S708 is not limited to that shown in FIG. 7 .
  • step S712 may be performed first, and then step S708 may be performed.
  • the Virtual AON Camera judges that the face detection function is started, and then executes S713, and the Virtual AON Camera sends an instruction message to the AP to instruct the face detection function of the electronic device to start.
  • step S713 can be understood as step S606 in the second embodiment.
  • the AP after the AP receives the instruction information, it can execute step S607 provided in the second embodiment, and the AON Driver executes the step S608 provided in the second embodiment.
  • the face detection stop condition judging module of the Virtual AON Camera can execute step S713.
  • the Virtual AON Camera can also use the detection data of the acceleration sensor, the proximity light sensor and the ambient light sensor to judge whether to turn off the face detection function.
  • the Virtual AON Camera can use the three-axis detection data of the acceleration sensor to judge whether the electronic device is in the first attitude, use the ambient light sensor to detect whether the ambient light brightness is less than the first threshold, or use the method to judge whether it receives the approach reported by the proximity light sensor. event.
  • the Virtual AON Camera uses the three-axis detection data to determine that the electronic device is in the first posture, the ambient light brightness is less than the first threshold, or receives an approach event, and then executes steps S712 and S713.
  • the Virtual AON Camera uses the three-axis detection data to calculate the pitch angle according to the formula provided in the aforementioned step S710. If it is judged that the calculated pitch angle is within the threshold range, such as [110°-350°], it is determined that the electronic device is in the first attitude.
  • the threshold range such as [110°-350°
  • the ambient light brightness is less than the first threshold, which may mean that one ambient light brightness reported by the ambient light sensor is smaller than the first threshold, or may refer to multiple ambient light brightness reported by the ambient light sensor, all of which are smaller than the first threshold.
  • the first threshold may be the same as or different from the first threshold in step S710. In one example, five consecutive ambient light brightnesses are less than 3 lux.
  • the electronic device When the face detection function of the electronic device is activated, the electronic device is in the first posture, which means that the display screen of the electronic device is facing downwards, which is a posture in which the user cannot see the display screen. In this posture, the electronic device activates the face detection function, and the display screen displays the AOD display interface, which cannot be seen by the user. Therefore, the face detection function can be turned off to avoid wasting power consumption.
  • the electronic device If the brightness of the ambient light is less than the first threshold, it means that the brightness of the environment where the electronic device is located is too low, the electronic device starts the face detection function, and the image data captured by the camera is not enough to identify whether the face is included, so the face detection function can be turned off , also avoiding waste of power consumption.
  • the Virtual AON Camera When the Virtual AON Camera receives an approach event, it means that something close to the electronic device is close to it. For example, when the electronic device is placed in a bag, the face detection function can also be turned off to avoid wasting power consumption.
  • the electronic device can use the screen-off display control method provided in Embodiment 1 to realize face detection when the display screen is in the off-screen state, and after the face is detected, the display screen displays an AOD display interface.
  • the method for controlling the screen-off display provided in Embodiment 1 there are the following application scenarios.
  • the user is always in front of the display screen of the electronic device.
  • the electronic device continues to determine that the face detection conditions are met, causing the electronic device to be in an endless loop of "face detected -> AOD displayed -> AOD disappears after a certain period of time -> face detected".
  • the present embodiment provides a control method for turning off the screen display, so as to prevent the electronic device from falling into the endless loop.
  • the Virtual AON Camera may include a face continuous detection escape module.
  • the face continuous detection escape module is used to: determine that the difference between the reporting time of this face detection event and the reporting time of the last face detection event is less than the second threshold, and not report the face detection event.
  • the second threshold is 30 seconds, 1 minute. It should be noted that the second threshold is generally greater than the display duration of the AOD display interface.
  • FIG. 8 shows a control method for screen-off display provided by the embodiment of the present application.
  • the control method for screen-off display provided in this embodiment includes steps:
  • the proximity light sensor detects the proximity of an approaching object, and obtains an approach event or a distance event.
  • the ambient light sensor detects and obtains ambient light brightness.
  • the acceleration sensor detects and obtains three-axis detection data.
  • the proximity light sensor sends a proximity event or a distance event to the Virtual AON Camera.
  • the ambient light sensor sends ambient light brightness to the Virtual AON Camera.
  • the acceleration sensor sends three-axis detection data to the Virtual AON Camera.
  • step S801 to step S806 may be the same as the content of step S701 to step S706 provided in the third embodiment, which will not be repeated here.
  • the Virtual AON Camera can execute step S804, step S805, step S806 and step S807 in parallel.
  • the Virtual AON Camera receives the face detection event sent by the AON Driver.
  • Step S807 can be understood as step S515 in the first embodiment.
  • the AON module generates a face detection event when the detection image data includes a face, and passes the signal processor, AON Driver, upload face detection events to Virtual AON Camera.
  • the Virtual AON Camera after the Virtual AON Camera receives the face detection event sent by the AON Driver, it can record the reporting time of the face detection event.
  • the Virtual AON Camera judges whether the difference between the reporting time of the face detection event and the reporting time of the last face detection event is smaller than the second threshold.
  • the Virtual AON Camera determines that the difference between the reporting time of the face detection event and the reporting time of the last face detection event is not less than the second threshold, and executes steps S809 and S810.
  • the Virtual AON Camera judges that the difference between the reporting time of the face detection event and the reporting time of the last face detection event is less than the second threshold, and executes steps S811 and S820.
  • the face continuous detection escape module judges whether the difference between the reporting time of the face detection event and the reporting time of the last face detection event is smaller than the second threshold.
  • step S512 in the first embodiment if the AON module detects that the image data includes a face, it can generate a face detection event and report the face detection event to the signal processor. In some embodiments, the AON module can also obtain the reporting time of the face detection event, and report it to the signal processor synchronously, and send it to the Virtual AON Camera through the AON Driver, so that the Virtual AON Camera can obtain the reporting time of the face detection event .
  • the receiving time is used as the reporting time of the face detection event.
  • the Virtual AON Camera wakes up the AP and sends the recorded display status to the AP.
  • Virtual AON Camera sends face detection event to AON service.
  • step S809 and step S810 may be the same as the content of step S516 and step S517 in the first embodiment, which will not be repeated here.
  • the electronic device may continue to execute step S518 to step S520 as proposed in the first embodiment, which will not be described here, and may refer to the content of the first embodiment.
  • the Virtual AON Camera receives the face detection event, and judges that the difference between the reporting time of the face detection event and the reporting time of the last face detection event is not less than the second threshold, and then executes steps S809 and S810 , AON service can receive face detection events.
  • the AON service can also send the face detection event to the upper layer, so that the AOD application can receive the face detection event and control the display to display the AOD display interface. In this way, the electronic device can be prevented from entering into an infinite loop of "face detected -> display AOD -> AOD disappears after a certain period of time -> face detected".
  • Virtual AON Camera uses three-axis detection data to judge whether the electronic equipment is still in a static state.
  • the electronic device remains in a static state, which can be understood as: from the moment when the face detection function of the electronic device is turned on, until the Virtual AON Camera judges the reporting time of the face detection event and the reporting time of the last face detection event through step S808 During the period when the difference is smaller than the second threshold, whether the electronic device is in the same attitude.
  • the pitch angle of the electronic device can be calculated through the three-axis detection data, and it can be judged whether the calculated pitch angle maintains a stable value. Maintaining a stable value can be understood as: from the moment when the face detection function of the electronic device is turned on, until the Virtual AON Camera determines that the difference between the reporting time of the face detection event and the reporting time of the last face detection event is less than the first time through step S808 During the period of the second threshold, the acceleration sensor continuously reports the three-axis detection data, and the Virtual AON Camera uses the three-axis detection data reported each time to calculate the difference of the pitch angle within a certain range, such as within a range of 5° .
  • the Virtual AON Camera uses the three-axis detection data to determine that the electronic device is not in a static state, and then executes steps S812 and S813.
  • the Virtual AON Camera uses the three-axis detection data to determine that the electronic device is still in the static state, and then executes step S820.
  • the Virtual AON Camera wakes up the AP and sends the recorded display status to the AP.
  • the Virtual AON Camera sends a face detection event to the AON service.
  • step S812 and step S813 may be the same as the content of step S516 and step S517 in the first embodiment, which will not be repeated here.
  • the electronic device may continue to execute step S518 to step S520 as proposed in the first embodiment, which will not be described here, and may refer to the content of the first embodiment.
  • the Virtual AON Camera uses the three-axis detection data to determine that the electronic device is not in a static state, and then executes steps S812 and S813, and the AON service can receive face detection events.
  • the AON service can also send the face detection event to the upper layer, so that the AOD application can receive the face detection event and control the display to display the AOD display interface. In this way, it can be realized that even if the difference between the reporting time of the two face detection events before and after is small, it can be inferred that the user continues to be in front of the display screen, but as long as the posture of the electronic device changes, the display screen will be triggered to display the AOD display interface.
  • the Virtual AON Camera determines that there is a large fluctuation in the ambient light brightness, and then executes steps S815 and S816.
  • the Virtual AON Camera judges that the ambient light brightness does not fluctuate greatly, and then executes step S820.
  • Step S814 and step S811 can be understood as being executed in parallel.
  • the ambient light brightness There is a large fluctuation in the ambient light brightness, which can be understood as: from the moment when the face detection function of the electronic device is turned on, until the Virtual AON Camera judges the reporting time of the face detection event and the reporting time of the last face detection event through step S808 During the period when the difference is smaller than the second threshold, whether there is a big change in the ambient light brightness reported by the ambient light sensor. In some embodiments, if the ambient light brightness reported by the ambient light sensor changes by at least several times, it can be determined that there is a large fluctuation in the ambient light brightness. In some other embodiments, if the difference of the ambient light brightness reported by the ambient light sensor is not maintained within a certain range, it can be determined that the ambient light brightness fluctuates greatly.
  • the Virtual AON Camera wakes up the AP and sends the recorded display status to the AP.
  • the Virtual AON Camera sends a face detection event to the AON service.
  • step S815 and step S816 may be the same as the content of step S516 and step S517 in the first embodiment, which will not be repeated here.
  • the electronic device may continue to execute step S518 to step S520 as proposed in the first embodiment, which will not be described here, and may refer to the content of the first embodiment.
  • the Virtual AON Camera judges that there is a large fluctuation in the ambient light brightness, and then executes steps S815 and S816, and the AON service can receive face detection events.
  • the AON service can also send the face detection event to the upper layer, so that the AOD application can receive the face detection event and control the display to display the AOD display interface.
  • the display screen can be triggered to display AOD UI.
  • the Virtual AON Camera judges whether there is a receiving change of an approach event and a far event.
  • the Virtual AON Camera determines that there is a change in the reception of the approach event and the far event, and then executes steps S818 and S819.
  • the Virtual AON Camera judges that there is no change in the reception of the approach event and the far event, and then executes step S820.
  • Step S817, step S814 and step S811 can be understood as being executed in parallel.
  • the reception change of approaching event and far away event can be understood as: from the moment when the face detection function of the electronic device is turned on, until the Virtual AON Camera judges the reporting time of the face detection event and the report of the last face detection event through step S808 During the period when the time difference is smaller than the second threshold, the proximity light sensor reports a proximity event and also reports a distance event.
  • the Virtual AON Camera wakes up the AP and sends the recorded display status to the AP.
  • the Virtual AON Camera sends a face detection event to the AON service.
  • step S818 and step S819 may be the same as the content of step S516 and step S517 in the first embodiment, and will not be repeated here.
  • the electronic device may continue to execute step S518 to step S520 as proposed in the first embodiment, which will not be described here, and may refer to the content of the first embodiment.
  • the Virtual AON Camera determines that there is a change in the reception of the approach event and the far event, and then executes steps S818 and S819, and the AON service can receive the face detection event.
  • the AON service can also send the face detection event to the upper layer, so that the AOD application can receive the face detection event and control the display to display the AOD display interface. In this way, it can be realized that even if the difference between the reporting time of the two face detection events before and after is small, it can be inferred that the user continues to be in front of the display screen, but as long as the electronic device has a close object approaching or moving away, the display screen can be triggered to display the AOD display interface .
  • the face continuous detection escape module performs the step of controlling not to report the face detection event.
  • steps S811 to S819 may be optional steps.
  • the Virtual AON Camera executes step S808 to determine that the difference between the reporting time of the face detection event and the reporting time of the last face detection event is less than the second threshold, and directly executes step S820.
  • the difference between the reporting time of this face detection event and the reporting time of the last face detection event is determined to be less than the second threshold and the face detection event is not reported, if a human hand is detected touching the display
  • the operation of the screen can make the display screen of the electronic device display the AOD display interface.
  • Another embodiment of the present application also provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer or a processor, the computer or the processor executes any one of the above-mentioned methods. one or more steps.
  • the computer-readable storage medium may be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, among others.
  • the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, among others.
  • Another embodiment of the present application also provides a computer program product including instructions.
  • the computer program product is run on the computer or the processor, the computer or the processor is made to perform one or more steps in any one of the above methods.

Abstract

Embodiments of the present application provide an always on display control method, an electronic device, and a computer-readable storage medium. The always on display control method comprises: if a display screen is in a screen-off state, an electronic device starts a face detection function, and acquires image data by means of a front camera; and if the electronic device recognizes that the image data comprises all or part of a facial image and determines that a difference between a time of the present recognition that the image data comprises all or part of a facial image and a time of a previous recognition that the image data comprises all or part of a facial image is not smaller than a threshold value, the display screen displays an always on display interface. It can be seen that the display screen displays an always on display interface only if the electronic device determines that a difference between a time of the present recognition that the image data comprises all or part of a facial image and a time of a previous recognition that the image data comprises all or part of a facial image is not smaller than a threshold value, so that the electronic device can be prevented from repeatedly displaying the always on display interface.

Description

熄屏显示的控制方法、电子设备及存储介质Screen off display control method, electronic device and storage medium
本申请要求于2022年01月10日提交中国国家知识产权局、申请号为202210021719.8、发明名称为“熄屏显示的控制方法、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the State Intellectual Property Office of China on January 10, 2022, with the application number 202210021719.8, and the title of the invention is "control method for screen-off display, electronic equipment, and storage medium", the entire content of which Incorporated in this application by reference.
技术领域technical field
本申请涉及显示技术领域,尤其涉及一种熄屏显示的控制方法、电子设备及计算机可读存储介质。The present application relates to the field of display technology, and in particular to a control method for screen-off display, electronic equipment, and a computer-readable storage medium.
背景技术Background technique
熄屏显示是一种在电子设备的熄屏状态下的显示功能,相较于常规显示,其功耗较低,同时也能满足用户获知日期、时间、备忘提醒等消息的要求。图1a提供了电子设备的一种熄屏显示界面,用户可通过熄屏显示界面获知日期和时间。The screen-off display is a display function when the screen of the electronic device is off. Compared with the conventional display, its power consumption is lower, and it can also meet the user's requirements for information such as date, time, and reminders. FIG. 1a provides an off-screen display interface of an electronic device, through which a user can know the date and time.
电子设备提供的熄屏显示的启动方式为:电子设备处于灭屏状态,用户触摸显示屏,电子设备展示熄屏显示界面。但若用户不方便触摸显示屏,则无法让电子设备展示熄屏显示界面。The startup method of the screen-off display provided by the electronic device is: the electronic device is in the screen-off state, the user touches the display screen, and the electronic device displays the screen-off display interface. However, if it is inconvenient for the user to touch the display screen, the electronic device cannot display the screen-off display interface.
发明内容Contents of the invention
本申请提供了一种熄屏显示的控制方法、电子设备及计算机可读存储介质,目的在于实现方便的触发电子设备展示熄屏显示界面。The present application provides a control method for an off-screen display, an electronic device, and a computer-readable storage medium, with the purpose of realizing conveniently triggering an electronic device to display an off-screen display interface.
为了实现上述目的,本申请提供了以下技术方案:In order to achieve the above object, the application provides the following technical solutions:
第一方面,本申请提供了一种可应用于电子设备的熄屏显示的控制方法,包括:电子设备的显示屏处于灭屏状态时,电子设备启动人脸检测功能,并通过前置摄像头获取图像数据;电子设备识别图像数据包括全部或部分脸部图像;电子设备确定本次识别到图像数据包括全部或部分脸部图像的时间,与前一次识别到图像数据包括全部或部分脸部图像的时间的差值不小于阈值时,电子设备的显示屏显示熄屏显示界面。In the first aspect, the present application provides a control method applicable to the screen-off display of an electronic device, including: when the display screen of the electronic device is in the screen-off state, the electronic device activates the face detection function, and obtains the face detection function through the front camera. Image data; the electronic device recognizes that the image data includes all or part of the face image; the time when the electronic device determines that the image data includes all or part of the face image this time is different from the time when the image data that was recognized last time includes all or part of the face image When the time difference is not less than the threshold, the display screen of the electronic device displays an off-screen display interface.
由上述内容可以看出:显示屏灭屏,电子设备启动人脸检测功能。人脸检测功能被启动之后,电子设备可通过前置摄像头获取图像数据,并在确定图像数据包括部分或全部脸部图像,以及确定本次识别到图像数据包括全部或部分脸部图像的时间,与前一次识别到图像数据包括全部或部分脸部图像的时间的差值不小于阈值时,电子设备的显示屏显示熄屏显示界面时,如此实现了电子设备的显示屏灭屏,人脸靠近显示屏触发电子设备展示熄屏显示界面这种方便的触发方式。It can be seen from the above content that: the display screen is off, and the electronic device activates the face detection function. After the face detection function is activated, the electronic device can obtain image data through the front camera, and when it is determined that the image data includes part or all of the face image, and when it is determined that the image data includes all or part of the face image, When the time difference from the time when the image data including all or part of the facial image was recognized last time is not less than the threshold value, when the display screen of the electronic device displays an off-screen display interface, the display screen of the electronic device is turned off in this way, and the face approaches The display screen triggers an electronic device to display a screen-off display interface, which is a convenient trigger method.
并且,电子设备确定本次识别到图像数据包括全部或部分脸部图像的时间,与前一次识别到图像数据包括全部或部分脸部图像的时间的差值不小于阈值时,显示屏才显示熄屏显示界面,如此,还可避免熄屏显示界面被反复显示,电子设备进入“检测到人脸->展示熄屏显示界面->一定时长后熄屏显示界面消失->检测到人脸”的死循环中。And, when the electronic device determines that the difference between the time when the image data includes all or part of the face image this time and the time when the image data includes all or part of the face image is not less than the threshold, the display screen will display the off In this way, the off-screen display interface can also be prevented from being repeatedly displayed, and the electronic device enters the process of "detecting a face -> displaying the off-screen display interface -> after a certain period of time, the off-screen display interface disappears -> detecting a face" In an endless loop.
在一个可能的实施方式中,电子设备确定本次识别到图像数据包括全部或部分脸部图像的时间,与前一次识别到图像数据包括全部或部分脸部图像的时间的差值不小于阈值时, 电子设备的显示屏显示熄屏显示界面,包括:电子设备确定人脸检测事件的上报时间,与前一次人脸检测事件的上报时间的差值不小于阈值时,电子设备的显示屏显示熄屏显示界面,人脸检测事件由电子设备识别图像数据包括全部或部分脸部图像而生成。In a possible implementation, the electronic device determines that the difference between the time when the image data includes all or part of the face image this time and the time when the image data includes all or part of the face image the previous time is not less than a threshold , the display screen of the electronic device displays an off-screen display interface, including: the electronic device determines the reporting time of the face detection event, and when the difference between the reporting time of the previous face detection event and the previous face detection event is not less than the threshold value, the display screen of the electronic device displays the off-screen display interface. The screen display interface, the face detection event is generated by the electronic device recognizing that the image data includes all or part of the face image.
在一个可能的实施方式中,还包括:电子设备确定本次识别到图像数据包括全部或部分脸部图像,与前一次识别到图像数据包括全部或部分脸部图像的时间的差值小于阈值时,电子设备的显示屏维持灭屏状态。In a possible implementation, it also includes: when the electronic device determines that the image data includes all or part of the face image this time, and the difference between the time when the image data includes all or part of the face image in the previous time is less than a threshold , the display screen of the electronic device remains in an off-screen state.
在一个可能的实施方式中,电子设备的显示屏维持灭屏状态之前,还包括:电子设备确定电子设备持续处于静止状态。In a possible implementation manner, before the display screen of the electronic device maintains the screen-off state, the method further includes: the electronic device determines that the electronic device remains in a static state.
在一个可能的实施方式中,还包括:电子设备确定电子设备未持续处于静止状态,电子设备的显示屏显示熄屏显示界面。In a possible implementation manner, the method further includes: the electronic device determines that the electronic device is not continuously in a static state, and the display screen of the electronic device displays an off-screen display interface.
在本可能的实施方式中,电子设备确定本次识别到图像数据包括全部或部分脸部图像的时间,与前一次识别到图像数据包括全部或部分脸部图像的时间的差值小于阈值,但电子设备未持续处于静止状态,即电子设备的姿态产生变化,则触发显示屏显示熄屏显示界面。In this possible implementation manner, the electronic device determines that the difference between the time when it recognizes that the image data includes all or part of the face image this time and the time when it recognized that the image data includes all or part of the face image this time is less than the threshold, but If the electronic device is not continuously in a static state, that is, the attitude of the electronic device changes, the display screen is triggered to display an off-screen display interface.
在一个可能的实施方式中,电子设备确定电子设备持续处于静止状态,包括:电子设备确定电子设备在预定时间段内为同一姿态,预定时间段指代:人脸检测功能开启时刻,到本次识别到图像数据包括全部或部分脸部图像的时间,与前一次识别到图像数据包括全部或部分脸部图像的时间的差值不小于阈值的时间段。In a possible implementation manner, the electronic device determines that the electronic device is in a static state continuously, including: the electronic device determines that the electronic device is in the same posture within a predetermined time period, and the predetermined time period refers to: the moment when the face detection function is turned on, until this time A time period in which the difference between the time when it is recognized that the image data includes all or part of the face image and the time when the previous time when it was recognized that the image data includes all or part of the face image is not less than a threshold value.
在一个可能的实施方式中,电子设备确定电子设备在预定时间段内为同一姿态,包括:电子设备利用加速度传感器的三轴检测数据,确定电子设备在预定时间段内为同一姿态。In a possible implementation manner, the electronic device determining that the electronic device is in the same posture within the predetermined time period includes: the electronic device determines that the electronic device is in the same posture within the predetermined time period by using the three-axis detection data of the acceleration sensor.
在一个可能的实施方式中,电子设备的显示屏维持灭屏状态之前,还包括:电子设备确定电子设备所处环境的光亮维持稳定。In a possible implementation manner, before the display screen of the electronic device maintains the screen-off state, the method further includes: the electronic device determines that the light of the environment where the electronic device is located remains stable.
在一个可能的实施方式中,还包括:电子设备确定电子设备所处环境的光亮没有维持稳定,电子设备的显示屏显示熄屏显示界面。In a possible implementation manner, the method further includes: the electronic device determines that the light of the environment where the electronic device is located is not stable, and the display screen of the electronic device displays a screen-off display interface.
在本可能的实施方式中,电子设备确定本次识别到图像数据包括全部或部分脸部图像的时间,与前一次识别到图像数据包括全部或部分脸部图像的时间的差值小于阈值,但电子设备所处环境的光亮没有维持稳定,可以实现即便用户持续位于显示屏前,但只要电子设备的所处环境的亮度产生变化,则可触发显示屏显示熄屏显示界面。In this possible implementation manner, the electronic device determines that the difference between the time when it recognizes that the image data includes all or part of the face image this time and the time when it recognized that the image data includes all or part of the face image this time is less than the threshold, but The brightness of the environment where the electronic device is located is not stable, so that even if the user continues to be in front of the display screen, as long as the brightness of the environment where the electronic device is located changes, the display screen can be triggered to display an off-screen display interface.
在一个可能的实施方式中,电子设备确定电子设备所处环境的光亮维持稳定,包括:电子设备通过环境光传感器检测环境光亮度;电子设备确定环境光传感器检测的环境光亮度在预定时间段内的维持稳定,预定时间段指代:人脸检测功能开启时刻,到本次识别到图像数据包括全部或部分脸部图像的时间,与前一次识别到图像数据包括全部或部分脸部图像的时间的差值不小于阈值的时间段。In a possible implementation manner, the electronic device determines that the brightness of the environment where the electronic device is located remains stable, including: the electronic device detects the ambient light brightness through the ambient light sensor; the electronic device determines that the ambient light brightness detected by the ambient light sensor is within a predetermined period of time The predetermined time period refers to: the moment when the face detection function is turned on, the time until the current recognition of image data including all or part of the face image, and the time when the previous recognition of image data including all or part of the face image The time period for which the difference is not less than the threshold.
在一个可能的实施方式中,电子设备的显示屏维持灭屏状态之前,还包括:电子设备确定电子设备未检测到物体靠近和远离的变化。In a possible implementation manner, before the display screen of the electronic device maintains the off-screen state, the method further includes: the electronic device determines that the electronic device does not detect a change of an object approaching or moving away.
在一个可能的实施方式中,还包括:电子设备确定电子设备检测到物体靠近和远离的变化,电子设备的显示屏显示熄屏显示界面。In a possible implementation manner, the method further includes: the electronic device determines that the electronic device detects a change in the approach and distance of the object, and the display screen of the electronic device displays an off-screen display interface.
在本可能的实施方式中,电子设备确定本次识别到图像数据包括全部或部分脸部图像的时间,与前一次识别到图像数据包括全部或部分脸部图像的时间的差值小于阈值,但电子设备检测到物体靠近和远离的变化,电子设备的显示屏显示熄屏显示界面,可以实现即便用户持续位于显示屏前,只要电子设备有物体靠近或远离,则可触发显示屏显示熄屏显示界面。In this possible implementation manner, the electronic device determines that the difference between the time when it recognizes that the image data includes all or part of the face image this time and the time when it recognized that the image data includes all or part of the face image this time is less than the threshold, but The electronic device detects the change of the object approaching and moving away, and the display screen of the electronic device displays the screen-off display interface, which can realize that even if the user continues to be in front of the display screen, as long as an object approaches or moves away from the electronic device, the display screen can be triggered to display the screen-off display interface.
在一个可能的实施方式中,电子设备确定电子设备未检测到物体靠近和远离的变化,包括:电子设备通过接近光传感器检测物体,得到上报事件;电子设备确定上报事件在预定时间段内持续为远离事件,或在预定时间段内持续为接近事件,预定时间段指代:人脸检测功能开启时刻,到本次识别到图像数据包括全部或部分脸部图像的时间,与前一次识别到图像数据包括全部或部分脸部图像的时间的差值不小于阈值的时间段。In a possible implementation manner, the electronic device determines that the electronic device does not detect the change of the approach and distance of the object, including: the electronic device detects the object through the proximity light sensor, and obtains a report event; the electronic device determines that the report event lasts for a predetermined period of time Far away from the event, or continue to be an approaching event within a predetermined period of time, the predetermined period of time refers to: the moment when the face detection function is turned on, to the time when the image data is recognized this time including all or part of the face image, and the time when the image is recognized last time The data includes a time period in which the difference in time of all or part of the facial images is not less than a threshold.
在一个可能的实施方式中,电子设备的处理器包括智能传感集线器sensor hub,sensor hub包括:AON模块;电子设备的显示屏处于灭屏状态时,电子设备启动人脸检测功能,包括:电子设备的显示屏处于灭屏状态时,电子设备启动AON模块执行人脸检测功能。In a possible implementation manner, the processor of the electronic device includes an intelligent sensor hub sensor hub, and the sensor hub includes: an AON module; when the display screen of the electronic device is in an off-screen state, the electronic device starts the face detection function, including: electronic When the display screen of the device is in the off-screen state, the electronic device starts the AON module to perform the face detection function.
在一个可能的实施方式中,电子设备的处理器包括:虚拟摄像头单元Virtual AON Camera;基于此,电子设备的显示屏处于灭屏状态时,电子设备启动人脸检测功能,包括:Virtual AON Camera确定显示屏处于灭屏状态时,启动人脸检测功能。In a possible implementation, the processor of the electronic device includes: a virtual camera unit Virtual AON Camera; based on this, when the display screen of the electronic device is in an off-screen state, the electronic device starts the face detection function, including: the Virtual AON Camera determines When the display screen is off, the face detection function is activated.
在一个可能的实施方式中,Virtual AON Camera确定显示屏处于灭屏状态时,启动人脸检测功能之前,还包括:Virtual AON Camera接收显示屏的显示状态,并记录显示屏的显示状态。In a possible implementation, when the Virtual AON Camera determines that the display screen is off, before starting the face detection function, it further includes: the Virtual AON Camera receives the display state of the display screen, and records the display state of the display screen.
在本可能的实施方式中,因Virtual AON Camera接管人脸检测功能的开启/关闭,需要获知显示屏的显示状态。考虑到显示屏灭屏,AP会进入休眠,因此,在AP进入休眠前,Virtual AON Camera接收显示屏的灭屏状态,并记录显示屏的灭屏状态。In this possible implementation, since the Virtual AON Camera takes over the on/off of the face detection function, it is necessary to know the display status of the display screen. Considering that the display screen is off, the AP will go to sleep, so before the AP goes to sleep, the Virtual AON Camera receives the screen off status of the display screen and records the screen off status of the display screen.
在一个可能的实施方式中,Virtual AON Camera确定显示屏处于灭屏状态时,启动人脸检测功能之后,还包括:Virtual AON Camera确定图像数据包括部分或全部图像数据时,唤醒电子设备的应用处理器,并向应用处理器发送显示屏的显示状态。In a possible implementation, when the Virtual AON Camera determines that the display screen is off, after starting the face detection function, it also includes: when the Virtual AON Camera determines that the image data includes part or all of the image data, wake up the application processing of the electronic device controller, and send the display status of the display to the application processor.
在本可能的实施方式中,因电子设备的显示屏显示熄屏显示界面需要依赖应用处理器AP处于唤醒状态,因此,Virtual AON Camera确定图像数据包括部分或全部图像数据时需要先唤醒AP。因AP休眠过程中,显示屏的显示状态由Virtual AON Camera记录,因此,在AP被唤醒后,Virtual AON Camera将自己记录的显示屏的显示状态向AP发送,保证AP的正常运行。In this possible implementation, since the display screen of the electronic device needs to rely on the application processor AP to be in the wake-up state for displaying the off-screen display interface, the Virtual AON Camera needs to wake up the AP first when determining that the image data includes part or all of the image data. Because the display status of the display screen is recorded by the Virtual AON Camera during the AP sleep process, after the AP is woken up, the Virtual AON Camera sends the display status of the display screen recorded by itself to the AP to ensure the normal operation of the AP.
在一个可能的实施方式中,电子设备确定本次识别到图像数据包括全部或部分脸部图像的时间,与前一次识别到图像数据包括全部或部分脸部图像的时间的差值不小于阈值时,电子设备的显示屏显示熄屏显示界面之后,还包括:电子设备判断显示屏处于非灭屏状态时,关闭人脸检测功能。In a possible implementation, the electronic device determines that the difference between the time when the image data includes all or part of the face image this time and the time when the image data includes all or part of the face image the previous time is not less than a threshold After the display screen of the electronic device displays the screen-off display interface, it also includes: when the electronic device judges that the display screen is in a non-screen-off state, turning off the face detection function.
在一个可能的实施方式中,电子设备启动人脸检测功能之前,还包括:电子设备确定电子设备满足预设条件;其中,预设条件包括电子设备的显示屏不处于向下的姿态,电子设备所处环境的亮度不小于第一阈值,以及电子设备未检测到物体靠近。In a possible implementation, before the electronic device starts the face detection function, it further includes: the electronic device determines that the electronic device meets a preset condition; wherein the preset condition includes that the display screen of the electronic device is not in a downward posture, and the electronic device The brightness of the environment is not less than the first threshold, and the electronic device does not detect that an object is approaching.
在一个可能的实施方式中,电子设备确定电子设备的显示屏不处于向下的姿态,确定环境光亮度不小于第一阈值,还确定接收到远离事件,说明电子设备的显示屏处于向上姿态,亮度足够的环境,没有物体靠近,可启动人脸检测功能,避免电子设备没有处于向上姿态,或者所处环境亮度不够,或者有物体遮挡导致的启动人脸检测功能造成的功耗浪费。In a possible implementation manner, the electronic device determines that the display screen of the electronic device is not in a downward posture, determines that the ambient light brightness is not less than a first threshold, and further determines that a away event is received, indicating that the display screen of the electronic device is in an upward posture, In an environment with sufficient brightness and no objects approaching, the face detection function can be activated to avoid the waste of power consumption caused by the activation of the face detection function caused by the electronic device not being in an upward posture, or the environment where the brightness is not enough, or being blocked by an object.
第二方面,本申请提供了一种电子设备,包括:一个或多个处理器、存储器、显示屏和前置摄像头;存储器和显示屏、以及前置摄像头与一个或多个处理器耦合,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,电子设备执行如第一方面任意一项的熄屏显示的控制方法。In a second aspect, the present application provides an electronic device, including: one or more processors, memory, display screen and front camera; memory and display screen, and front camera coupled with one or more processors, memory It is used to store computer program codes, the computer program codes include computer instructions, and when one or more processors execute the computer instructions, the electronic device executes the screen-off display control method according to any one of the first aspect.
第三方面,本申请提供了一种计算机存储介质,用于存储计算机程序,计算机程序被执行时,具体用于实现如第一方面任意一项的熄屏显示的控制方法。In a third aspect, the present application provides a computer storage medium for storing a computer program. When the computer program is executed, it is specifically used to implement the method for controlling the screen-off display according to any one of the first aspect.
第四方面,本申请提供了一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如第一方面任意一项的熄屏显示的控制方法。In a fourth aspect, the present application provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the method for controlling screen-off display according to any one of the first aspect.
附图说明Description of drawings
图1a为熄屏显示界面的展示图;Fig. 1a is a display diagram of an off-screen display interface;
图1b为本申请提供的一种应用场景图;Figure 1b is a diagram of an application scenario provided by this application;
图2a为本申请提供的电子设备的硬件结构图;Fig. 2a is the hardware structural diagram of the electronic device provided by the present application;
图2b为本申请提供的电子设备的软件架构图;Figure 2b is a software architecture diagram of the electronic device provided by the present application;
图3为本申请提供的电子设备的一种界面的展示图;FIG. 3 is a display diagram of an interface of an electronic device provided by the present application;
图4为本申请提供的电子设备的另一种界面的展示图;FIG. 4 is a display diagram of another interface of the electronic device provided by the present application;
图5为本申请实施例一提供的一种熄屏显示的控制方法的信令图;FIG. 5 is a signaling diagram of a control method for screen-off display provided in Embodiment 1 of the present application;
图6为本申请实施例二提供的一种熄屏显示的控制方法的信令图;FIG. 6 is a signaling diagram of a control method for screen-off display provided in Embodiment 2 of the present application;
图7为本申请实施例三提供的一种熄屏显示的控制方法的信令图;FIG. 7 is a signaling diagram of a control method for screen-off display provided in Embodiment 3 of the present application;
图8为本申请实施例四提供的一种熄屏显示的控制方法的信令图。FIG. 8 is a signaling diagram of a control method for screen-off display provided in Embodiment 4 of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请实施例中,“一个或多个”是指一个、两个或两个以上;“和/或”,描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. The terms used in the following examples are for the purpose of describing particular examples only, and are not intended to limit the application. As used in the specification and appended claims of this application, the singular expressions "a", "an", "said", "above", "the" and "this" are intended to also Expressions such as "one or more" are included unless the context clearly dictates otherwise. It should also be understood that in the embodiments of the present application, "one or more" refers to one, two or more than two; "and/or" describes the association relationship of associated objects, indicating that there may be three types of relationships; for example, A and/or B may mean: A exists alone, A and B exist simultaneously, and B exists alone, wherein A and B may be singular or plural. The character "/" generally indicates that the contextual objects are an "or" relationship.
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不 是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。Reference to "one embodiment" or "some embodiments" or the like in this specification means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically stated otherwise. The terms "including", "comprising", "having" and variations thereof mean "including but not limited to", unless specifically stated otherwise.
本申请实施例涉及的多个,是指大于或等于两个。需要说明的是,在本申请实施例的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。A plurality referred to in the embodiment of the present application means greater than or equal to two. It should be noted that in the description of the embodiments of the present application, words such as "first" and "second" are only used to distinguish the purpose of description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or imply order.
为了更清楚地阐明本申请技术方案,下面对本申请涉及的相关概念进行解释。In order to clarify the technical solution of the present application, the related concepts involved in the present application are explained below.
1)AOD(Always On Display,常亮显示)显示界面,也称熄屏显示界面,属于一种低功耗的展示界面,该界面一般展示一些提示用户的消息,如时间,日期,手机电量等。另外,该界面还可展示动画效果,与提示用户的消息进行同步显示。1) AOD (Always On Display) display interface, also known as off-screen display interface, is a display interface with low power consumption. This interface generally displays some messages to remind users, such as time, date, mobile phone power, etc. . In addition, the interface can also display animation effects, which are displayed synchronously with messages prompting users.
2)帧率(Frames Per Second)是指:摄像头采集图像的速度。2) Frame rate (Frames Per Second) refers to: the speed at which the camera captures images.
目前,熄屏显示是一种在电子设备的熄屏状态下的显示功能,相较于常规显示,其功耗较低,同时也能满足用户获知日期、时间、备忘提醒等消息的要求。电子设备提供的启动熄屏显示的方式为:电子设备处于灭屏状态,用户触摸显示屏,电子设备展示熄屏显示界面。At present, the screen-off display is a display function when the screen of the electronic device is off. Compared with the conventional display, its power consumption is lower, and it can also meet the user's requirements for information such as date, time, and reminders. The method provided by the electronic device to start the off-screen display is: the electronic device is in the off-screen state, the user touches the display screen, and the electronic device displays the off-screen display interface.
但若用户不方便触摸显示屏,则无法让电子设备展示AOD显示界面。针对该问题,本申请实施例提出一种熄屏显示的控制方法,可以实现如图1b所示,在显示屏处于灭屏状态,由人脸触发电子设备展示AOD显示界面。However, if the user is inconvenient to touch the display screen, the electronic device cannot display the AOD display interface. In view of this problem, the embodiment of the present application proposes a control method for screen-off display, as shown in FIG. 1b , which can realize an AOD display interface triggered by a human face when the display screen is in an off-screen state.
本申请实施例提供的熄屏显示的控制方法,可以适用于手机,平板电脑,桌面型、膝上型、笔记本电脑,超级移动个人计算机(Ultra-mobile Personal Computer,UMPC),手持计算机,上网本,个人数字助理(Personal Digital Assistant,PDA),可穿戴电子设备,智能手表等电子设备。The control method for screen-off display provided in the embodiment of the present application can be applied to mobile phones, tablet computers, desktops, laptops, notebook computers, ultra-mobile personal computers (Ultra-mobile Personal Computer, UMPC), handheld computers, netbooks, Personal digital assistant (Personal Digital Assistant, PDA), wearable electronic devices, smart watches and other electronic devices.
以手机为例,图2a为本申请实施例提供的一种电子设备的组成示例。如图2a所示,电子设备100可以包括处理器110,内部存储器120,摄像头130,显示屏140,天线1,天线2,移动通信模块150,无线通信模块160以及传感器模块170等。其中传感器模块170可以包括加速度传感器170A,接近光传感器170B和环境光传感器170C等。Taking a mobile phone as an example, FIG. 2a is a composition example of an electronic device provided in an embodiment of the present application. As shown in FIG. 2 a , the electronic device 100 may include a processor 110 , an internal memory 120 , a camera 130 , a display 140 , an antenna 1 , an antenna 2 , a mobile communication module 150 , a wireless communication module 160 and a sensor module 170 . The sensor module 170 may include an acceleration sensor 170A, a proximity light sensor 170B, an ambient light sensor 170C and the like.
可以理解的是,本实施例示意的结构并不构成对电子设备100的具体限定。在另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure shown in this embodiment does not constitute a specific limitation on the electronic device 100 . In other embodiments, the electronic device 100 may include more or fewer components than shown, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized 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),基带处理器,智能传感集线器(sensor hub)和/或神经网络处理器(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 processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, intelligent sensor hub (sensor hub) and/or neural network processor (neural- network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
处理器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 processor 110 is a cache memory. This memory may hold instructions or data that processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
一些实施例中,处理器110中的智能传感集线器(sensor hub)能够提供一种基于低功耗MCU和轻量级RTOS操作系统之上的软硬件结合的解决方案,其主要功能是连接并处理来自各种传感器设备的数据。In some embodiments, the intelligent sensor hub (sensor hub) in the processor 110 can provide a solution based on the combination of software and hardware on the low-power MCU and the lightweight RTOS operating system, and its main function is to connect and Process data from various sensor devices.
sensor hub可包括:AON(Always on)模块,信号处理器和存储器(On-chip SRAM)。AON模块属于独立低功耗模块,包括:AON_ISP和人脸检测(Face Detect,FD)模块。AON_ISP可以理解成是一个Mini-ISP,用于处理摄像头130反馈的数据。一些实施例中,AON_ISP将摄像头感光元件转换的电信号,转化为图像数据。FD模块用于对AON_ISP输出的图像数据进行人脸检测,得到人脸检测事件。The sensor hub can include: AON (Always on) module, signal processor and memory (On-chip SRAM). The AON module is an independent low-power module, including: AON_ISP and Face Detect (FD) module. AON_ISP can be understood as a Mini-ISP for processing the data fed back by the camera 130 . In some embodiments, AON_ISP converts the electrical signal converted by the photosensitive element of the camera into image data. The FD module is used to perform face detection on the image data output by AON_ISP to obtain face detection events.
信号处理器,可以理解成是传感芯片,如SSC(Snapdragon Sensing Core),用于传输FD模块得到的人脸检测事件。The signal processor can be understood as a sensor chip, such as SSC (Snapdragon Sensing Core), which is used to transmit the face detection events obtained by the FD module.
On-chip SRAM用于保存AON_ISP得到的图像数据。On-chip SRAM is used to save the image data obtained by AON_ISP.
内部存储器120可以用于存储计算机可执行程序代码,可执行程序代码包括指令。处理器110通过运行存储在内部存储器120的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器120可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器120的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。The internal memory 120 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 120 . The internal memory 120 may include an area for storing programs and an area for storing data. Wherein, the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like. The storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like. In addition, the internal memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 120 and/or instructions stored in a memory provided in the processor.
电子设备通过GPU,显示屏230,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏230和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器210可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device realizes the display function through the GPU, the display screen 230 , and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 230 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏230用于显示图像,视频等。显示屏230包括显示面板。显示面板可以采用液晶显示屏(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)等。在一些实施例中,电子设备可以包括1个或N个显示屏230,N为大于1的正整数。The display screen 230 is used to display images, videos and the like. The display screen 230 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 diodes (quantum dot light emitting diodes, QLED), etc. In some embodiments, the electronic device may include 1 or N display screens 230, where N is a positive integer greater than 1.
电子设备100可以通过ISP,摄像头130,视频编解码器,GPU,显示屏140以及应用处理器等实现拍摄功能。The electronic device 100 can realize the shooting function through the ISP, the camera 130 , the video codec, the GPU, the display screen 140 and the application processor.
ISP用于处理摄像头130反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头130中。The ISP is used to process data fed back by the camera 130 . For example, when taking a picture, open the shutter, the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera 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 color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be located in the camera 130 .
摄像头130用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头130,N为大于1的正整数。Camera 130 is used to capture still images or video. The object generates an optical image through the lens and projects it to the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light 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 image signals. In some embodiments, the electronic device 100 may include 1 or N cameras 130 , where N is a positive integer greater than 1.
一些实施例中,摄像头130可被设置为电子设备的前置摄像头,用于拍摄位于电子设备的显示屏前方的人脸图像。还需要说明的是,前置摄像头可以理解成运行时能够拍摄显示屏前方的图像的摄像头,其装设位置可不限制。In some embodiments, the camera 130 can be set as a front camera of the electronic device, and is used to capture a face image located in front of the display screen of the electronic device. It should also be noted that the front camera can be understood as a camera capable of capturing images in front of the display screen during operation, and its installation location is not limited.
一些实施例中,摄像头130可具有三种工作模式,环境光检测(Ambient Light Sensor,ALS)模式,超低功耗(Ultra Low Power,ULP)模式和Normal模式。In some embodiments, the camera 130 can have three working modes, ambient light detection (Ambient Light Sensor, ALS) mode, ultra low power consumption (Ultra Low Power, ULP) mode and Normal mode.
显示屏处于灭屏状态,摄像头130可以ALS模式运行,以配置的时间间隔,生成超低分辨率图像。处于ALS模式的摄像头130利用超低分辨率图像的图像数据,进行光影变化的检测,得到光影变化的检测结果。其中,摄像头130利用超低分辨率图像的图像数据,进行光影变化的检测,用于确定摄像头前是否有光影变化。The display screen is off, and the camera 130 can operate in ALS mode to generate ultra-low resolution images at configurable time intervals. The camera 130 in the ALS mode uses the image data of the ultra-low resolution image to detect the change of light and shadow, and obtain the detection result of the change of light and shadow. Wherein, the camera 130 utilizes the image data of the ultra-low resolution image to detect light and shadow changes, and is used to determine whether there is a light and shadow change in front of the camera.
摄像头前有光影变化,摄像头可以ULP模式运行,生成较低分辨率的图像。较低分辨率的图像用于提供进行人脸检测。There are light and shadow changes in front of the camera, and the camera can operate in ULP mode to generate a lower resolution image. Lower resolution images are used for face detection.
摄像头被调用拍摄或摄像时,摄像头则以Normal模式运行。When the camera is called to shoot or video, the camera runs in Normal mode.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a 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 single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: Antenna 1 can be multiplexed as a diversity antenna of a 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 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves and radiate them through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(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 wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100. 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 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
传感器模块170中,加速度传感器170A可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。一些实施例中,加速度传感器170A还可以用于识别电子设备姿态,应用于横竖屏切换,计步器,熄屏显示等应用。In the sensor module 170 , the acceleration sensor 170A can detect 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. In some embodiments, the acceleration sensor 170A can also be used to identify the posture of the electronic device, and it can be applied to applications such as horizontal and vertical screen switching, pedometer, and screen-off display.
接近光传感器170B可以包括例如发光二极管(LED)和光检测器,例如发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。一些实施例中,接近光传感器170B的检测结果可用于提供给电子设备,以确定是否启动人脸检测功能。Proximity light sensor 170B may include, for example, a light emitting diode (LED), which may be an infrared light emitting diode, and a photodetector. The electronic device 100 emits infrared light through the light emitting diode. Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 . In some embodiments, the detection result of the proximity light sensor 170B can be provided to the electronic device to determine whether to activate the face detection function.
环境光传感器170C用于感知环境光亮度。电子设备可以根据感知的环境光亮度自适应调节显示屏140亮度。环境光传感器170C也可用于拍照时自动调节白平衡。一些实施例中,环境光传感器170C的检测结果可用于提供给电子设备,以确定是否启动人脸检测功能。The ambient light sensor 170C is used for sensing ambient light brightness. The electronic device can adaptively adjust the brightness of the display screen 140 according to the perceived ambient light brightness. The ambient light sensor 170C can also be used to automatically adjust the white balance when taking pictures. In some embodiments, the detection result of the ambient light sensor 170C can be used to provide the electronic device to determine whether to activate the face detection function.
在一些实施例中,传感器模块170中的加速度传感器170A、接近光传感器170B和环境光传感器170C可在电子设备开机后处于运行状态,也可受电子设备的应用程序的触发而启动并运行。In some embodiments, the acceleration sensor 170A, the proximity light sensor 170B and the ambient light sensor 170C in the sensor module 170 can be in the running state after the electronic device is turned on, or can be triggered by the application program of the electronic device to start and run.
另外,在上述部件之上,运行有操作系统。例如iOS操作系统,Android操作系统,Windows操作系统等。在操作系统上可以安装运行应用程序。In addition, an operating system runs on top of the above components. Such as iOS operating system, Android operating system, Windows operating system, etc. An application program can be installed and run on the operating system.
图2b是本申请实施例的电子设备的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。Fig. 2b is a block diagram of the software structure of the electronic device 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 through software interfaces. In some embodiments, the Android system is divided into four layers, which are respectively the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer from top to bottom.
应用程序层可以包括一系列应用程序包。如图2b所示,应用程序包可以包括相机,图库,日历,通话,地图,设置(setting),AOD应用,注视检测以及人脸检测等应用程序。The application layer can consist of a series of application packages. As shown in FIG. 2b, the application package may include applications such as camera, gallery, calendar, call, map, setting, AOD application, gaze detection, and face detection.
其中,设置主要负责产品隔离及产品化信息管理。设置存储电子设备的属性信息。设置可根据电子设备的属性信息来确认电子设备是否具备人脸检测能力。设置确定具备人脸检测能力的电子设备,会暴露人脸检测功能开启的菜单。图3(a)展示的“智慧感知”和图3(b)展示的“识别到人脸出现熄屏显示”为人脸检测功能开启的菜单的一种示例。Among them, setting is mainly responsible for product isolation and product information management. Set and store attribute information of the electronic device. The setting may confirm whether the electronic device has a face detection capability according to the attribute information of the electronic device. Setting an electronic device that is determined to have face detection capabilities will expose the menu where the face detection function is enabled. The "Smart Perception" shown in Figure 3(a) and the "Screen-off display when a face is recognized" shown in Figure 3(b) are examples of menus enabled by the face detection function.
AOD应用用于控制在显示屏展示熄屏显示界面。The AOD application is used to control displaying an off-screen display interface on the display screen.
注视检测用于实现控制人眼是否注视显示屏的检测。Gaze detection is used to realize the detection of controlling whether the human eye is gazing at the display screen.
人脸检测用于实现触发检测显示屏前是否出现人脸的功能。Face detection is used to trigger the function of detecting whether a face appears in front of the display screen.
并且,人脸检测开启,可使得AOD应用具备在显示屏前出现人脸,控制显示屏显示熄屏显示界面的功能。并且,AOD应用还能够在确定显示屏前出现人脸时,控制显示屏显示熄屏显示界面。In addition, when the face detection is turned on, the AOD application can have the function of displaying a face in front of the display screen and controlling the display screen to display an off-screen display interface. Moreover, the AOD application can also control the display screen to display an off-screen display interface when it is determined that a human face appears in front of the display screen.
一些实施例中,AOD应用等应用程序可向电子设备的处理器发起注册流程,以启动接近光传感器、环境光传感器和加速度传感器,由接近光传感器进行是否有接近物靠近的检 测,环境光传感器检测环境光亮度,加速度传感器进行电子设备加速度的检测。接近物可以理解成人或一般物体,也可以用物体来替代。In some embodiments, applications such as the AOD application can initiate a registration process to the processor of the electronic device to activate the proximity light sensor, ambient light sensor and acceleration sensor, and the proximity light sensor detects whether there is an approaching object, and the ambient light sensor Detect the brightness of the environment, and the acceleration sensor detects the acceleration of the electronic device. Proximate objects can be understood as adults or general objects, and objects can also be used instead.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。如图2b所示,应用程序框架层可以包括窗口管理器,内容提供器,电话管理器,资源管理器,通知管理器,视图系统,AON JNI Interface等。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. As shown in Figure 2b, the application framework layer can include window manager, content provider, phone manager, resource manager, notification manager, view system, AON JNI Interface, etc.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make it accessible to applications. Said data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.
电话管理器用于提供电子设备的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide communication functions of electronic devices. For example, the management of call status (including connected, hung up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the download completion, message reminder, etc. The notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, issuing a prompt sound, vibrating the electronic device, and flashing the indicator light, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. The view system can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
AON JNI Interface用于完成消息的上传下达。当AOD应用有开启/关闭熄屏显示功能的请求时,AON JNI Interface将该请求透传至AON Service的AON HIDL Interface。当AON HIDL Interface上报人脸检测事件时,AON JNI Interface把人脸检测事件传递至AOD应用。AON JNI Interface is used to complete the upload and release of messages. When the AOD application has a request to enable/disable the off-screen display function, the AON JNI Interface transparently transmits the request to the AON HIDL Interface of the AON Service. When AON HIDL Interface reports a face detection event, AON JNI Interface passes the face detection event to the AOD application.
并且,若电子设备存在多个智慧感知的功能时,AON JNI Interface还用于实现多个智慧感知的功能间的配合调度。在一个示例中,电子设备配置有人脸检测和注视检测两个智慧感知的功能,当注视检测工作时,AON JNI Interface将人脸检测挂起;当注视检测执行完成,再执行人脸检测功能。Moreover, if the electronic device has multiple intelligent sensing functions, AON JNI Interface is also used to realize the coordination and scheduling among multiple intelligent sensing functions. In one example, the electronic device is equipped with two intelligent perception functions of face detection and gaze detection. When the gaze detection is working, AON JNI Interface suspends the face detection; when the gaze detection is completed, it executes the face detection function.
另外,若电子设备依赖上层系统做一些功能开关控制时,也放在AON JNI Interface里面。例如,电子设备有睡眠检测功能,当用户睡觉的时候就关闭人脸检测功能。睡眠事件的触发与退出就是通过AON JNI Interface传递的。In addition, if the electronic equipment relies on the upper system to do some function switch control, it is also placed in the AON JNI Interface. For example, an electronic device has a sleep detection function, and the face detection function is turned off when the user is sleeping. The trigger and exit of the sleep event are passed through the AON JNI Interface.
AON JNI Interface还用于为一些上层服务提供功能开关的控制。在一个示例中,电子设备有睡眠检测服务,电子设备的睡眠检测进程运行可实现睡眠检测功能。在电子设备的睡眠检测进程运行得到睡眠事件时,AON JNI Interface可传递睡眠事件,以关闭人脸检测功能。AON JNI Interface is also used to provide function switch control for some upper layer services. In an example, the electronic device has a sleep detection service, and the sleep detection process of the electronic device can realize the sleep detection function. When the sleep detection process of the electronic device gets a sleep event, AON JNI Interface can pass the sleep event to turn off the face detection function.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。在本申请一些实施例中,应用冷启动会在Android runtime中运行,Android runtime由此获 取到应用的优化文件状态参数,进而Android runtime可以通过优化文件状态参数判断优化文件是否因系统升级而导致过时,并将判断结果返回给应用管控模块。Android Runtime includes core library and virtual machine. The Android runtime is responsible for the scheduling and management of the Android system. In some embodiments of the present application, the cold start of the application will run in the Android runtime, and the Android runtime obtains the optimized file status parameters of the application, and then the Android runtime can judge whether the optimized file is outdated due to system upgrades through the optimized file status parameters , and return the judgment result to the application control module.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application program layer and the application program framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),二维图形引擎(例如:SGL)等。A system library can include multiple function modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG2,H.262,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG2, H.262, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染、合成和图层处理等。The 3D graphics processing library is used to realize 3D graphics drawing, image rendering, compositing and layer processing, etc.
二维图形引擎是2D绘图的绘图引擎。The 2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动,AON service,虚拟摄像头单元Virtual AON Camera和AON Driver等。The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, sensor driver, AON service, virtual camera unit Virtual AON Camera and AON Driver, etc.
其中:摄像头驱动可用于驱动摄像头130运行。一些实施例中,摄像头驱动控制摄像头130以Normal模式运行。Wherein: the camera driver can be used to drive the camera 130 to run. In some embodiments, the camera driver controls the camera 130 to operate in the Normal mode.
传感器驱动可用于驱动加速度传感器170A、接近光传感器170B、以及环境光传感器170C运行。Sensor drivers may be used to drive the acceleration sensor 170A, the proximity light sensor 170B, and the ambient light sensor 170C to operate.
AON service包括:AON HIDL Interface、AON HIDL Implement和AON Camera HAL。这三个部分共同组成了摄像头130的控制逻辑。电子设备包括多个摄像头130,AON camera HAL用于完成多个摄像头130的调度。另外,摄像头130的三种工作模式的切换控制也由AON Camera HAL实现。AON service includes: AON HIDL Interface, AON HIDL Implement and AON Camera HAL. These three parts together constitute the control logic of the camera 130 . The electronic device includes multiple cameras 130, and the AON camera HAL is used to complete the scheduling of the multiple cameras 130. In addition, the switching control of the three working modes of the camera 130 is also realized by AON Camera HAL.
Virtual AON Camera用于在AP休眠后,接管人脸检测功能的开启/关闭。具体可根据显示屏的显示状态、电子设备姿态、接近光传感器的检测结果及环境光亮度动态开启/关闭人脸检测功能。Virtual AON Camera还用于接收人脸检测事件,唤醒AP并上报人脸检测事件;未收到人脸检测事件时不处理也不唤醒AP。The Virtual AON Camera is used to take over the on/off of the face detection function after the AP sleeps. Specifically, the face detection function can be dynamically turned on/off according to the display state of the display screen, the attitude of the electronic device, the detection result of the proximity light sensor, and the brightness of the ambient light. The Virtual AON Camera is also used to receive face detection events, wake up the AP and report the face detection event; when the face detection event is not received, it does not process or wake up the AP.
AON service用于驱动AON模块运行。AON service is used to drive the AON module to run.
需要说明的是,本申请实施例虽然以Android系统为例进行说明,但是其基本原理同样适用于基于iOS、Windows等操作系统的电子设备。It should be noted that although the embodiment of the present application uses the Android system as an example for illustration, its basic principles are also applicable to electronic devices based on operating systems such as iOS and Windows.
首先需要说明的是,本申请实施例中,电子设备可设置人脸识别模型。一些实施例中,人脸识别模型可由sensor hub调用。通常情况下,sensor hub中的FD模块调用人脸识别模型对图像数据进行人脸检测,得到人脸检测事件。人脸识别模型具有预测输入到人脸识别模型的图像数据是否包含人脸的功能。人脸识别模型可得到用于指示图像数据是否包括人脸的置信度,电子设备利用该置信度可确定图像数据是否包含人脸。First of all, it needs to be explained that in the embodiment of the present application, the electronic device can be set with a face recognition model. In some embodiments, the face recognition model can be invoked by the sensor hub. Usually, the FD module in the sensor hub calls the face recognition model to perform face detection on the image data, and obtains face detection events. The face recognition model has the function of predicting whether the image data input to the face recognition model contains a human face. The face recognition model can obtain a confidence level indicating whether the image data contains a human face, and the electronic device can determine whether the image data contains a human face using the confidence level.
一些实施例中,人脸识别模型可采用卷积神经网络(Convolutional Neural Network,CNN)、长短期记忆人工神经网络(Long-Short Term Memory,LSTM)等基础网络模型。In some embodiments, the face recognition model can use basic network models such as convolutional neural network (Convolutional Neural Network, CNN), long-short-term memory artificial neural network (Long-Short Term Memory, LSTM).
卷积神经网络通常包括:输入层、卷积层(Convolution Layer)、池化层(Pooling layer)、全连接层(Fully Connected Layer,FC)和输出层。一般来说,卷积神经网络的第一层是输入层,最后一层是输出层。Convolutional neural networks usually include: input layer, convolution layer (Convolution Layer), pooling layer (Pooling layer), fully connected layer (Fully Connected Layer, FC) and output layer. In general, the first layer of a convolutional neural network is the input layer, and the last layer is the output layer.
卷积层(Convolution Layer)是指卷积神经网络中对输入信号进行卷积处理的神经元层。在卷积神经网络的卷积层中,一个神经元可以只与部分邻层神经元连接。一个卷积层中,通常包含若干个特征平面,每个特征平面可以由一些矩形排列的神经单元组成。同一特征平面的神经单元共享权重,这里共享的权重就是卷积核。Convolution Layer refers to the neuron layer that performs convolution processing on the input signal in the convolutional neural network. In the convolutional layer of a convolutional neural network, a neuron can only be connected to some adjacent neurons. A convolutional layer usually contains several feature planes, and each feature plane can be composed of some rectangularly arranged neural units. Neural units of the same feature plane share weights, and the shared weights here are convolution kernels.
池化层(Pooling layer),通常在卷积层之后会得到维度很大的特征,将特征切成几个区域,取其最大值或平均值,得到新的、维度较小的特征。Pooling layer (Pooling layer), usually after the convolutional layer will get a feature with a large dimension, cut the feature into several regions, take its maximum value or average value, and obtain a new feature with a smaller dimension.
全连接层(Fully-Connected layer),把所有局部特征结合变成全局特征,用来计算最后每一类的得分。Fully-Connected layer, which combines all local features into global features, is used to calculate the final score of each category.
长短期记忆人工神经网络(Long-Short Term Memory,LSTM)通常包括输入层、隐含层以及输出层。其中,输入层由至少一个输入节点组成;当LSTM网络为单向网络时,隐含层仅包括前向隐含层,当LSTM网络为双向网络时,隐含层包括前向隐含层以及后向隐含层。对于每个输入节点分别与前向隐含层节点以及后向隐含层节点连接,用于分别向前向隐含层节点以及后向隐含层节点输出输入数据,每个隐含层中的隐含节点分别与输出节点连接,用于向输出节点输出自己的计算结果,输出节点根据隐含层的输出节点进行计算,并输出数据。A long-short-term memory artificial neural network (Long-Short Term Memory, LSTM) usually includes an input layer, a hidden layer, and an output layer. Among them, the input layer is composed of at least one input node; when the LSTM network is a unidirectional network, the hidden layer only includes the forward hidden layer; when the LSTM network is a bidirectional network, the hidden layer includes the forward hidden layer and the backward hidden layer to the hidden layer. For each input node is connected to the forward hidden layer node and the backward hidden layer node respectively, and is used to output the input data to the forward hidden layer node and the backward hidden layer node respectively. The hidden nodes are respectively connected to the output nodes, and are used to output their own calculation results to the output nodes, and the output nodes perform calculations according to the output nodes of the hidden layer, and output data.
人脸识别模型可采用下述方式进行训练:The face recognition model can be trained in the following ways:
构建人脸识别原始模型。其中,人脸识别原始模型可选择CNN、LSTM等基础网络模型。Build the original face recognition model. Among them, the original model of face recognition can choose basic network models such as CNN and LSTM.
获取大量的训练样本,训练样本包括:包含人脸的图像样本以及不包含人脸的图像样本,并且,训练样本被标记出图像样本中是否包含人脸。一些实施例中,人脸可指代人脸关键信息,人脸关键信息可包括指示眼睛、鼻子、嘴的轮廓的图像信息中的至少一个。因此,包含人脸的图像样本可包括包含全部人脸的图像样本,以及包含部分人脸的图像样本,如包含人脸侧脸的图像样本,包含有遮挡的人脸的图像样本。A large number of training samples are obtained, and the training samples include: image samples containing human faces and image samples not containing human faces, and the training samples are marked to indicate whether the image samples contain human faces. In some embodiments, a human face may refer to key information of a human face, and the key information of a human face may include at least one of image information indicating contours of eyes, nose, and mouth. Therefore, the image samples containing human faces may include image samples containing all human faces, and image samples containing partial human faces, such as image samples containing side faces of human faces, and image samples containing occluded human faces.
将训练样本输入到人脸识别原始模型,由人脸识别原始模型对训练样本是否包含人脸进行检测,得到检测结果。The training samples are input into the original face recognition model, and the original face recognition model detects whether the training samples contain a human face, and obtains the detection result.
利用损失函数对检测结果和每个训练样本的标记结果进行损失值的计算,得到模型的损失值。一些实施例中,可采用交叉熵损失函数、加权损失函数等损失函数进行损失值计算,或者采用多种损失函数组合的方式,计算多种损失值。Use the loss function to calculate the loss value of the detection result and the labeling result of each training sample to obtain the loss value of the model. In some embodiments, loss functions such as cross-entropy loss function and weighted loss function can be used to calculate the loss value, or a combination of multiple loss functions can be used to calculate multiple loss values.
判断模型的损失值是否符合模型的收敛条件。Determine whether the loss value of the model meets the convergence condition of the model.
一些实施例中,模型收敛条件可以是,模型的损失值小于或等于预先设定的损失阈值。也就是说,可以将模型的损失值和损失阈值进行比较,若模型的损失值大于损失阈值,则可以判断出模型的损失值不符合模型收敛条件,反之,若模型的损失值小于或等于损失阈值,则可以判断出模型损失值符合模型收敛条件。In some embodiments, the model convergence condition may be that the loss value of the model is less than or equal to a preset loss threshold. That is to say, the loss value of the model can be compared with the loss threshold. If the loss value of the model is greater than the loss threshold, it can be judged that the loss value of the model does not meet the model convergence conditions. Conversely, if the loss value of the model is less than or equal to the loss threshold, it can be judged that the model loss value meets the model convergence condition.
需要说明的是,多个训练样本,可以针对每一个训练样本计算得到对应的模型的损失值,这种情况下,只有在每一个训练样本的模型损失值均符合模型收敛条件的情况下才会执行,反之,只要有一个训练样本的模型损失值不符合模型收敛条件,则执行后续步骤。It should be noted that for multiple training samples, the loss value of the corresponding model can be calculated for each training sample. In this case, only when the model loss value of each training sample meets the model convergence condition will the Execute, on the contrary, as long as there is a model loss value of a training sample that does not meet the model convergence conditions, then execute the subsequent steps.
若模型的损失值符合模型的收敛条件,则说明模型训练结束。训练结束的模型则可用于本申请实施例提出的熄屏显示的控制方法,对输入到模型的图像数据是否包含人脸的检测。If the loss value of the model meets the convergence condition of the model, it means that the model training is over. The trained model can be used in the screen-off display control method proposed in the embodiment of this application to detect whether the image data input to the model contains a human face.
若模型的损失值不符合模型的收敛条件,则根据模型的损失值计算得到模型的参数更新值,并以模型的参数更新值,更新人脸识别原始模型。并利用更新后的模型,继续对训练样本进行处理,得到检测结果,继续执行后续过程,直至模型的损失值符合模型的收敛条件。If the loss value of the model does not meet the convergence conditions of the model, the parameter update value of the model is calculated according to the loss value of the model, and the original face recognition model is updated with the parameter update value of the model. And use the updated model to continue to process the training samples, get the detection results, and continue to execute the subsequent process until the loss value of the model meets the convergence conditions of the model.
还需要说明的是,本申请实施例中,电子设备可提供一展示界面,可设置前述图2b中电子设备软件框架涉及的“人脸检测”应用。图3展示了该展示界面的一种示例。图3(a)中,辅助功能的展示界面包括“智慧感知”应用智慧感知。用户可点击“智慧感知”应用的控件,“智慧感知”应用的展示界面可显示于显示屏,具体如图3(b)所示。图3(b)展示的“智慧感知”应用包括三个功能应用,分别为:注视屏幕不熄屏,注视屏幕减弱来电音量,识别到人脸出现熄屏显示。其中,识别到人脸出现熄屏显示可理解成本申请实施例提出的“人脸检测”功能。图3(b)展示的“智慧感知”应用的展示界面中,“识别到人脸出现熄屏显示”该功能处于启动状态。对应的,电子设备的熄屏显示应用的展示界面会有所调整。It should also be noted that, in the embodiment of the present application, the electronic device can provide a display interface, and the "face detection" application related to the software framework of the electronic device in FIG. 2b can be set. Figure 3 shows an example of the presentation interface. In Fig. 3(a), the display interface of the auxiliary function includes the "smart perception" application smart perception. The user can click the control of the "Smart Perception" application, and the display interface of the "Smart Perception" application can be displayed on the display screen, as shown in Figure 3(b). The "Smart Perception" application shown in Figure 3(b) includes three functional applications, namely: keep the screen on while watching the screen, reduce the volume of incoming calls while watching the screen, and turn off the screen when the face is recognized. Among them, the display of the screen being turned off when a human face is recognized can be understood as the "face detection" function proposed in the embodiment of this application. In the display interface of the "Smart Perception" application shown in Figure 3(b), the function of "recognizing a face and turning off the screen display" is activated. Correspondingly, the display interface of the screen-off display application of the electronic device will be adjusted.
图3(c)展示了熄屏显示应用的展示界面的一种示例。图3(c)展示的熄屏显示应用的展示界面中,用户可通过点击“显示方式”查看熄屏显示的显示方式。“识别到人脸出现熄屏显示”这个功能被启动,熄屏显示的显示方式,会调整成智能显示的显示方式,如图3(d)展示。Fig. 3(c) shows an example of a display interface of an off-screen display application. In the display interface of the off-screen display application shown in FIG. 3( c ), the user can click "display mode" to view the display mode of the off-screen display. When the function of "recognizing the face and turning off the screen display" is activated, the display mode of the off-screen display will be adjusted to the display mode of the smart display, as shown in Figure 3(d).
若“识别到人脸出现熄屏显示”这个功能被关闭,熄屏显示的显示方式会有所变化,参见图4展示的界面示例。同样的,用户通过点击图4(a)展示的“智慧感知”应用的控件,控制显示屏显示“智慧感知”应用的展示界面。用户在图4(b)展示的“智慧感知”应用的展示界面,点击“识别到人脸出现熄屏显示”的控件,关闭该功能。对应的,熄屏显示应用的显示方式会调整为轻触显示。如图4(c)所示,用户点击熄屏显示应用的展示界面的“显示方式”,可图4(d)所示,熄屏显示应用的显示方式被调整为轻触显示。If the function of "display on screen when face is recognized" is turned off, the display mode of screen-off display will change, see the interface example shown in Figure 4. Similarly, the user controls the display screen to display the display interface of the "Smart Perception" application by clicking the control of the "Smart Perception" application shown in FIG. 4(a). On the display interface of the "Smart Perception" application shown in Figure 4(b), the user clicks the control of "Screen-off display when a face is recognized" to close this function. Correspondingly, the display mode of the screen-off display application will be adjusted to tap display. As shown in FIG. 4(c), the user clicks the “display mode” of the display interface of the screen-off display application, and as shown in FIG. 4(d), the display mode of the screen-off display application is adjusted to touch display.
实施例一Embodiment one
如图3(b)所示,电子设备的“识别到人脸出现熄屏显示”功能被启动,电子设备可实现显示屏灭屏时,人脸出现在显示屏前触发熄屏显示界面的输出。为实现该功能,图5示出了本实施例提供的一种熄屏显示的控制方法。本实施例提供的熄屏显示的控制方法,包括步骤:As shown in Figure 3(b), the electronic device’s function of “recognizing a human face and turning off the screen display” is activated, and the electronic device can realize that when the display screen is off, the face appears in front of the display screen to trigger the output of the screen off display interface . In order to realize this function, FIG. 5 shows a control method for screen-off display provided by this embodiment. The control method for screen-off display provided in this embodiment includes steps:
S501、AOD应用获取显示屏的显示状态。S501. The AOD application acquires the display status of the display screen.
通常情况下,显示屏的显示状态包括:亮屏状态、灭屏状态和低功耗状态(doze),电子设备的显示屏展示AOD显示界面的状态,可以理解成是一种低功耗状态。AOD应用可通过监听显示驱动广播的事件,来获取显示屏的显示状态。Usually, the display state of the display screen includes: screen on state, screen off state, and low power consumption state (doze). The display screen of an electronic device displays the state of the AOD display interface, which can be understood as a low power consumption state. The AOD application can obtain the display status of the display screen by monitoring the events broadcast by the display driver.
一些实施例中,电子设备的处理器包括电源管理模块。电源管理模块可理解成一个逻辑单元,用于监测应用程序发送或用户触发生成的亮灭屏请求,并利用亮灭屏逻辑来控制显示驱动来实现控制显示屏的工作状态。In some embodiments, the processor of the electronic device includes a power management module. The power management module can be understood as a logic unit, which is used to monitor the on-off screen request sent by the application program or triggered by the user, and use the on-off screen logic to control the display driver to realize the control of the working state of the display screen.
以灭屏为例,灭屏触发方式包括:1、用户手动按电源键灭屏;2、系统的自动息屏管理,即用户一段时间内不输入操作,电子设备自动灭屏;3、系统主动发起的息屏,如打电话时遮挡灭屏、自动重启时系统下发的灭屏等。Taking the screen off as an example, the screen off trigger methods include: 1. The user manually presses the power button to turn off the screen; 2. The system's automatic screen off management, that is, the electronic device automatically turns off the screen if the user does not input an operation for a period of time; 3. The system actively Initiated off-screen, such as blocking off the screen when making a call, off-screen issued by the system when it is automatically restarted, etc.
电源管理模块判断上述任意一个灭屏触发方式被执行,则下发灭屏指令给显示驱动。显示驱动接收到电源管理模块下发的灭屏指令后给显示屏下电。同时,广播灭屏事件,AOD应用可监听该灭屏事件,确定显示屏的显示状态为灭屏状态。The power management module judges that any one of the above-mentioned off-screen triggering methods is executed, and then sends an off-screen command to the display driver. The display driver powers off the display after receiving the screen-off command issued by the power management module. At the same time, the screen-off event is broadcast, and the AOD application can monitor the screen-off event to determine that the display state of the display screen is the screen-off state.
同理,亮屏状态和低功耗状态,AOD应用可采用同样的方式获取。Similarly, the AOD application can obtain the bright screen state and low power consumption state in the same way.
S502、AOD应用向AON JNI Interface发送显示屏的显示状态。S502. The AOD application sends the display status of the display screen to the AON JNI Interface.
如前述电子设备软件框架的内容,AON JNI Interface属于应用程序框架层,用于完成消息的上传下达,AOD应用向AON JNI Interface发送显示屏的显示状态,以使得AON JNI Interface将显示屏的显示状态向下层传递。As mentioned above in the electronic device software framework, AON JNI Interface belongs to the application framework layer and is used to complete the upload and release of messages. passed down.
S503、AON JNI Interface接收显示屏的显示状态,向AON service发送显示屏的显示状态。S503. The AON JNI Interface receives the display status of the display screen, and sends the display status of the display screen to the AON service.
如前述电子设备软件框架的内容,AON service属于内核层,包括AON HIDL Interface、AON HIDL Implement和AON Camera HAL。AON JNI Interface向AON service发送显示屏的显示状态包括:AON JNI Interface向AON HIDL Interface发送显示屏的显示状态。As mentioned above in the electronic equipment software framework, AON service belongs to the kernel layer, including AON HIDL Interface, AON HIDL Implement and AON Camera HAL. AON JNI Interface sending the display status of the display to AON service includes: AON JNI Interface sending the display status of the display to AON HIDL Interface.
AON HIDL Interface接收到显示屏的显示状态,向AON HIDL Implement发送。AON HIDL Implement接收到显示屏的显示状态,向AON Camera HAL发送。AON HIDL Interface receives the display status of the display and sends it to AON HIDL Implement. AON HIDL Implement receives the display status of the display and sends it to AON Camera HAL.
S504、AON service接收显示屏的显示状态,向Virtual AON Camera发送显示屏的显示状态。S504. The AON service receives the display status of the display screen, and sends the display status of the display screen to the Virtual AON Camera.
AON Camera HAL接收到显示屏的显示状态,AON Camera HAL向Virtual AON Camera发送显示屏的显示状态。AON Camera HAL receives the display status of the display screen, and AON Camera HAL sends the display status of the display screen to Virtual AON Camera.
需要说明的是,AON Service的运行依赖AP处于唤醒状态。若AP休眠,AON Service无法管控人脸检测功能的开启/关闭。基于此,Sensor hub包括Virtual AON Camera这个逻辑单元,用于在AP休眠是接管人脸检测功能的开启/关闭。It should be noted that the operation of AON Service depends on the AP being in the wake-up state. If the AP is dormant, AON Service cannot control the enabling/disabling of the face detection function. Based on this, the Sensor hub includes the logic unit Virtual AON Camera, which is used to take over the opening/closing of the face detection function when the AP is sleeping.
因Virtual AON Camera接管人脸检测功能的开启/关闭,需要获知显示屏的显示状态,因此AON service接收显示屏的显示状态,若显示屏的状态为灭屏状态,考虑到显示屏灭屏,AP会进入休眠,因此,在AP进入休眠前,AON service向Virtual AON Camera发送显示屏的显示状态。Because the Virtual AON Camera takes over the opening/closing of the face detection function, it needs to know the display status of the display screen, so the AON service receives the display status of the display screen. If the status of the display screen is off, considering that the screen is off, the AP It will go to sleep, so before the AP goes to sleep, the AON service sends the display status of the display to the Virtual AON Camera.
S505、显示屏处于灭屏状态,AP进入休眠状态。S505. The display screen is in an off state, and the AP enters a dormant state.
其中,显示屏灭屏,AP休眠。一些实施例中,AP可通过获知电源管理模块下发的灭屏指令,来确定显示屏灭屏。Among them, the display screen is off, and the AP sleeps. In some embodiments, the AP may determine to turn off the display screen by learning the off-screen instruction issued by the power management module.
S506、Virtual AON Camera记录显示屏的显示状态。S506, Virtual AON Camera records the display status of the display screen.
在AP休眠前,Virtual AON Camera会记录显示屏的显示状态,在AP被唤醒后,Virtual AON Camera可将显示屏的显示状态发送到AP。Before the AP sleeps, the Virtual AON Camera will record the display status of the display screen, and after the AP wakes up, the Virtual AON Camera can send the display status of the display screen to the AP.
还需要说明的是,在显示屏处于灭屏状态,AOD应用可发起注册请求,以请求启动人脸检测功能,以及请求接收人脸检测事件。在显示屏处于非灭屏状态,AOD应用可发起解注册请求,以请求解除注册,即关闭人脸检测功能,不接收人脸检测事件。It should also be noted that when the display screen is off, the AOD application can initiate a registration request to request to start the face detection function and to request to receive face detection events. When the display screen is not off, the AOD application can initiate a deregistration request to request deregistration, that is, turn off the face detection function and not receive face detection events.
基于此,前述步骤S501至步骤S503中,AOD应用向下层发送的是AOD的注册消息。Virtual AON Camera记录的是AOD的注册消息。Based on this, in the foregoing step S501 to step S503, what the AOD application sends to the lower layer is an AOD registration message. What Virtual AON Camera records is the registration message of AOD.
S507、Virtual AON Camera向AON Driver发送启动人脸检测功能的指示。S507. The Virtual AON Camera sends an instruction to start the face detection function to the AON Driver.
显示屏灭屏,电子设备可启动人脸检测功能,以便实现在检测到人脸后,电子设备展示AOD显示界面。其中,Virtual AON Camera利用显示屏的显示状态,确定电子设备的显示屏灭屏,向AON Driver发送启动人脸检测功能的指示。When the display screen is off, the electronic device can start the face detection function, so that after the face is detected, the electronic device displays the AOD display interface. Among them, the Virtual AON Camera uses the display status of the display screen to determine that the display screen of the electronic device is off, and sends an instruction to the AON Driver to start the face detection function.
AON Driver如前述电子设备的软件框架的内容,属于内核层,用于驱动AON模块运行。AON Driver, like the content of the software framework of the aforementioned electronic equipment, belongs to the kernel layer and is used to drive the operation of the AON module.
S508、AON Driver向AON模块发送启动人脸检测功能的指令。S508. The AON Driver sends an instruction to start the face detection function to the AON module.
AON Driver接收到启动人脸检测功能的指示后,可向AON模块发指令,控制AON模块启动人脸检测功能。After receiving the instruction to start the face detection function, the AON Driver can send instructions to the AON module to control the AON module to start the face detection function.
如前述电子设备的硬件结构内容,AON模块包括AON_ISP和FD模块,FD模块用于对AON_ISP输出的图像数据进行人脸检测。AON Driver向AON模块发送启动人脸检测功能的指令,可指代控制AON_ISP输出图像数据,并控制FD模块运行进行人脸检测。As mentioned above in the hardware structure of the electronic device, the AON module includes an AON_ISP and an FD module, and the FD module is used for face detection on the image data output by the AON_ISP. The AON Driver sends an instruction to the AON module to start the face detection function, which can refer to controlling the AON_ISP to output image data, and controlling the operation of the FD module for face detection.
需要说明的是,如图3(b)所示,用户手动启动电子设备的“识别到人脸出现熄屏显示”功能之后,电子设备并不会立即进行人脸是否出现在显示屏前,以触发熄屏显示界面的输出的检测。电子设备通过执行步骤S501至步骤S507,确定电子设备的显示屏处于灭屏状态时,通过执行步骤S508以启动人脸检测功能,实现检测人脸出现在显示屏前,触发显示熄屏显示界面。It should be noted that, as shown in Figure 3(b), after the user manually activates the function of "recognizing a face and turning off the screen display" of the electronic device, the electronic device will not immediately determine whether the face appears in front of the display screen, so as to Trigger the detection of the output of the screen-off display interface. When the electronic device determines that the display screen of the electronic device is in the off-screen state by performing steps S501 to S507, it executes step S508 to activate the face detection function to detect that a face appears in front of the display screen and trigger the display of the screen-off display interface.
如此可以看出:针对人脸出现在显示屏前,触发显示熄屏显示界面的功能,电子设备配置有两个启动开关,一个启动开关提供于用户进行手动触发,为如3(b)所示“识别到人脸出现熄屏显示”功能开关;另一个启动开关属于条件触发的自动启动开关,如步骤S508提及的电子设备的显示屏灭屏,人脸检测功能的启动指令。在电子设备配置的两个启动开关均被启动后,电子设备才可实现检测人脸出现在显示屏前,触发显示熄屏显示界面。It can be seen from this that: for the function of triggering the display of the screen-off display interface when the face appears in front of the display screen, the electronic device is equipped with two activation switches, and one activation switch is provided for the user to manually trigger, as shown in 3(b) The function switch of "turning off the screen display when the face is recognized"; the other start switch belongs to the automatic start switch triggered by the condition, such as the start command of the display screen of the electronic device mentioned in step S508 and the face detection function. After the two start switches configured on the electronic device are both activated, the electronic device can detect that a human face appears in front of the display screen, and trigger the display of an off-screen display interface.
S509、摄像头拍摄图像数据。S509. The camera captures image data.
一些实施例中,显示屏进入灭屏状态,AON Camera HAL驱动摄像头运行。In some embodiments, the display screen enters the off-screen state, and the AON Camera HAL drives the camera to run.
如前述电子设备的硬件结构内容,摄像头包括三个工作模式,摄像头以ALS模式运行,得到光影变化的检测结果,AON Camera HAL利用光影变化的检测结果确定摄像头前是否有光影变化,AON Camera HAL切换摄像头以ULP模式运行。摄像头以ULP模式运行,以设定的帧率,如5fps拍摄图像。摄像头拍摄一定数量的图像后,如3帧图像,可退出ULP模式,由AON Camera HAL切换摄像头以ALS模式运行。As in the hardware structure of the aforementioned electronic equipment, the camera includes three working modes. The camera operates in ALS mode to obtain the detection result of light and shadow changes. AON Camera HAL uses the detection results of light and shadow changes to determine whether there is light and shadow change in front of the camera. AON Camera HAL switches The camera operates in ULP mode. The camera operates in ULP mode, capturing images at a set frame rate, such as 5fps. After the camera captures a certain number of images, such as 3 frames of images, it can exit ULP mode, and AON Camera HAL switches the camera to run in ALS mode.
一些实施例中,AON Camera HAL被配置有切换摄像头以ALS模式或ULP模式运行的控制逻辑。AON Camera HAL可以依据控制逻辑来控制摄像头以ALS模式运行或者以ULP模式运行。In some embodiments, the AON Camera HAL is configured with control logic to switch the camera to operate in ALS mode or ULP mode. AON Camera HAL can control the camera to operate in ALS mode or ULP mode according to the control logic.
需要说明的是,图5展示的是摄像头拍摄图像数据的执行顺序的一种示例,并不构成对步骤S509的执行顺序的限制。一些实施例中,摄像头可在显示屏进入灭屏状态后则被摄像头驱动启动来拍摄图像数据。It should be noted that what is shown in FIG. 5 is an example of the execution order of the image data captured by the camera, and does not constitute a limitation on the execution order of step S509. In some embodiments, the camera can be activated by the camera driver to capture image data after the display screen enters the off-screen state.
S510、AON模块获取摄像头拍摄的图像数据。S510. The AON module acquires image data captured by the camera.
摄像头拍摄图像得到的图像数据是电信号形式。AON_ISP获取电信号,并将其转化为图像数据后提供于FD模块。The image data obtained by taking images with the camera is in the form of electrical signals. AON_ISP obtains the electrical signal, converts it into image data and provides it to the FD module.
S511、AON模块检测图像数据是否包括人脸。S511. The AON module detects whether the image data includes a human face.
其中,FD模块检测图像数据是否包括人脸。一些实施例中,FD模块调用前述内容提出的人脸识别模型处理图像数据,得到用于指示图像数据是否包括人脸的置信度。Wherein, the FD module detects whether the image data includes a human face. In some embodiments, the FD module invokes the face recognition model proposed above to process the image data to obtain a confidence level indicating whether the image data includes a face.
需要说明的是,FD模块检测图像数据是否包括人脸可以理解成:FD模块检测图像数据是否包括全部或部分人脸,如是否包含全部或部分的人脸关键信息。It should be noted that the detection by the FD module of whether the image data includes a human face can be understood as: the FD module detects whether the image data includes all or part of the human face, such as whether it contains all or part of the key information of the human face.
若AON模块检测图像数据包括人脸,则执行S512、生成人脸检测事件。若AON模块检测图像数据不包括人脸,则显示屏维持灭屏状态。If the AON module detects that the image data includes a human face, execute S512 to generate a human face detection event. If the AON module detects that the image data does not include a face, the display screen remains off.
其中,若FD模块确定置信度大于阈值,则说明图像数据包括人脸,则生成人脸检测事件,人脸检测事件用于指示摄像头拍摄的图像中包括人脸,说明电子设备的显示屏前有人脸。一些实施例中,人脸检测事件可为高低电平。Among them, if the FD module determines that the confidence is greater than the threshold, it means that the image data includes a face, and a face detection event is generated. The face detection event is used to indicate that the image captured by the camera includes a face, indicating that there is someone in front of the display screen of the electronic device. Face. In some embodiments, the face detection event can be a high or low level.
还需要说明的是,摄像头拍摄得到多帧图像,FD模块调用人脸识别模型处理每一帧图像的图像数据,得到每一帧图像的置信度。在一帧图像的置信度大于阈值,则生成人脸检测事件。当然,FD模块也可以在确定每一帧图像的置信度均大于阈值,生成人脸检测事件。It should also be noted that the camera captures multiple frames of images, and the FD module calls the face recognition model to process the image data of each frame of images to obtain the confidence of each frame of images. When the confidence of a frame image is greater than the threshold, a face detection event is generated. Of course, the FD module can also generate a face detection event after determining that the confidence of each frame of image is greater than the threshold.
摄像头拍摄多帧图像,且FD模块确定每一帧图像的置信度均大于阈值,生成人脸检测事件,可以看出:FD模块确定一定时长内的图像数据均包括全部或部分人脸,则生成人脸检测事件。The camera shoots multiple frames of images, and the FD module determines that the confidence of each frame of the image is greater than the threshold, and generates a face detection event. It can be seen that: the FD module determines that the image data within a certain period of time includes all or part of the face, and generates Face detection event.
还需要说明的是,AON模块检测图像数据包括人脸,AON模块生成人脸检测事件之前,还可以包括:AON模块检测图像数据包括设定特征,该设定特征为预先配置的图像特征。电子设备可通过摄像头拍摄电子设备的合法使用者,如电子设备的主人的图像,提取图像的关键特征,如眼睛、鼻子和嘴的轮廓的图像信息中的至少一个,提取的图像的关键特征可为设定特征。It should also be noted that the image data detected by the AON module includes a face, and before the AON module generates a face detection event, it may further include: the image data detected by the AON module includes a set feature, and the set feature is a pre-configured image feature. The electronic device can take pictures of the legal user of the electronic device, such as the owner of the electronic device, through the camera, and extract key features of the image, such as at least one of the image information of the contours of the eyes, nose, and mouth. The key features of the extracted image can be To set the characteristics.
基于此,AON模块检测图像数据包括人脸,再识别图像数据是否包括预先配置的图像特征。若AON模块识别到图像数据包括预先配置的图像特征,则生成人脸检测事件。如此,可以保证在电子设备的合法使用者出现在电子设备的显示屏前,才可触发电子设备通过显示屏展示熄屏显示界面。Based on this, the AON module detects that the image data includes a human face, and then recognizes whether the image data includes pre-configured image features. If the AON module recognizes that the image data includes pre-configured image features, a face detection event is generated. In this way, it can be ensured that the electronic device can be triggered to display the off-screen display interface through the display screen only when the legitimate user of the electronic device appears in front of the display screen of the electronic device.
S513、AON模块向信号处理器发送人脸检测事件。S513. The AON module sends the face detection event to the signal processor.
其中,FD模块向信号处理器发送人脸检测事件。Among them, the FD module sends a face detection event to the signal processor.
S514、信号处理器向AON Driver发送人脸检测事件。S514. The signal processor sends a face detection event to the AON Driver.
其中,信号处理器接收到人脸检测事件,向AON Driver发送人脸检测事件。Among them, the signal processor receives the face detection event and sends the face detection event to the AON Driver.
S515、AON Driver向Virtual AON Camera发送人脸检测事件。S515. The AON Driver sends a face detection event to the Virtual AON Camera.
FD模块得到人脸检测事件,说明电子设备的显示屏前出现人脸,可触发显示屏输出AOD显示界面,因此,AON Driver接收到人脸检测事件,向Virtual AON Camera发送人脸检测事件。The FD module gets the face detection event, indicating that a face appears in front of the display screen of the electronic device, which can trigger the display screen to output the AOD display interface. Therefore, AON Driver receives the face detection event and sends the face detection event to the Virtual AON Camera.
S516、Virtual AON Camera唤醒AP,并向AP发送记录的显示屏的显示状态。S516. The Virtual AON Camera wakes up the AP, and sends the recorded display status of the display screen to the AP.
因AON service的运行需要依赖AP处于唤醒状态,因此,Virtual AON Camera向上传人脸检测事件之前需要先唤醒AP。Because the operation of the AON service depends on the AP being in the wake-up state, the Virtual AON Camera needs to wake up the AP before uploading face detection events.
因AP休眠过程中,显示屏的显示状态由Virtual AON Camera记录,因此,在AP被唤醒后,Virtual AON Camera将自己记录的显示屏的显示状态向AP发送。Because the display status of the display screen is recorded by the Virtual AON Camera during the AP sleep process, therefore, after the AP is woken up, the Virtual AON Camera sends the display status of the display screen recorded by itself to the AP.
S517、Virtual AON Camera向AON service发送人脸检测事件。S517. The Virtual AON Camera sends a face detection event to the AON service.
AP被唤醒,Virtual AON Camera和AON service可通信,Virtual AON Camera则可将人脸检测事件发送给AON service。When the AP is awakened, the Virtual AON Camera and AON service can communicate, and the Virtual AON Camera can send face detection events to the AON service.
一些实施例中,如前述电子设备的软件框架的内容,AON service包括AON HIDL Interface、AON HIDL Implement和AON Camera HAL。Virtual AON Camera向AON Camera HAL发送人脸检测事件,AON Camera HAL向AON HIDL Implement发送人脸检测事件,AON HIDL Implement向AON HIDL Interface发送人脸检测事件。In some embodiments, as described above in the software framework of the electronic device, the AON service includes AON HIDL Interface, AON HIDL Implement and AON Camera HAL. Virtual AON Camera sends face detection events to AON Camera HAL, AON Camera HAL sends face detection events to AON HIDL Implement, and AON HIDL Implement sends face detection events to AON HIDL Interface.
S518、AON service向AON JNI Interface发送人脸检测事件。S518. The AON service sends a face detection event to the AON JNI Interface.
其中,AON HIDL Interface接收到人脸检测事件,向AON JNI Interface发送人脸检测事件。Among them, AON HIDL Interface receives the face detection event and sends the face detection event to AON JNI Interface.
S519、AON JNI Interface向AOD应用发送人脸检测事件。S519. The AON JNI Interface sends a face detection event to the AOD application.
其中,AON JNI Interface接收到人脸检测事件,向AOD应用发送人脸检测事件。Among them, AON JNI Interface receives the face detection event and sends the face detection event to the AOD application.
S520、AOD应用控制显示屏显示AOD显示界面。S520. The AOD application control display screen displays an AOD display interface.
其中,AOD应用接收到人脸检测事件,确定电子设备的显示屏前出现人脸,则控制显示屏显示AOD显示界面,如此实现了用户通过人脸位于显示屏前,可触发电子设备的显示屏显示AOD显示界面。Among them, the AOD application receives a face detection event, determines that a face appears in front of the display screen of the electronic device, and then controls the display screen to display the AOD display interface, so that the user can trigger the display screen of the electronic device by placing the face in front of the display screen Display the AOD display interface.
一些实施例中,AOD应用控制显示屏显示AOD显示界面一定时长如5S后,显示屏可退出显示AOD显示界面,进行灭屏状态。In some embodiments, after the AOD application controls the display screen to display the AOD display interface for a certain period of time, such as 5 seconds, the display screen may exit from displaying the AOD display interface and enter the off-screen state.
实施例二Embodiment two
实施例一提供的熄屏显示的控制方法,可实现在电子设备的显示屏灭屏时,人脸出现在显示屏前,显示屏显示AOD显示界面的功能。在实现该功能时,电子设备的人脸检测功能属于开启状态。在电子设备不需要开启人脸检测功能时,电子设备的人脸检测功能可被关闭。本实施例提供的熄屏显示的控制方法,可实现对人脸检测功能的关闭。The control method for screen-off display provided in Embodiment 1 can realize the function of displaying an AOD display interface on the display screen when a human face appears in front of the display screen when the display screen of the electronic device is off. When this function is implemented, the face detection function of the electronic device is turned on. When the electronic device does not need to enable the face detection function, the face detection function of the electronic device can be turned off. The screen-off display control method provided in this embodiment can realize the closing of the face detection function.
图6展示了本申请实施例提供的一种熄屏显示的控制方法,本实施例提供的熄屏显示的控制方法,包括步骤:Figure 6 shows a control method for screen-off display provided by the embodiment of the present application. The control method for screen-off display provided in this embodiment includes steps:
S601、AOD应用获取显示屏的显示状态。S601. The AOD application acquires the display state of the display screen.
S602、AOD应用向AON JNI Interface发送显示屏的显示状态。S602. The AOD application sends the display state of the display screen to the AON JNI Interface.
S603、AON JNI Interface接收显示屏的显示状态,向AON service发送显示屏的显示状态。S603. The AON JNI Interface receives the display status of the display screen, and sends the display status of the display screen to the AON service.
S604、AON service接收显示屏的显示状态,向AP发送显示屏的显示状态。S604. The AON service receives the display status of the display screen, and sends the display status of the display screen to the AP.
其中,步骤S601至步骤S604的具体实现方式,可参见实施例一步骤S501至步骤S504的内容,此处不再赘述。Wherein, for the specific implementation manners of steps S601 to S604, please refer to the contents of steps S501 to S504 in Embodiment 1, which will not be repeated here.
S605、AP确定显示屏处于亮屏状态或doze状态。S605. The AP determines that the display screen is in a bright screen state or a doze state.
其中,AP可根据接收的显示状态,确定显示屏是否处于亮屏状态或doze状态。Wherein, the AP can determine whether the display screen is in a bright screen state or a doze state according to the received display state.
S606、Virtual AON Camera向AP发送指示信息,以指示电子设备的人脸检测功能启动。S606. The Virtual AON Camera sends instruction information to the AP to instruct the face detection function of the electronic device to start.
在显示屏处于亮屏或doze状态时,若电子设备的人脸检测功能被启动,会影响电子设备的正常使用,因此,应该需要将人脸检测功能关闭。为了能将人脸检测功能关闭,AP需要获知电子设备的人脸检测功能是否被开启。When the display screen is in the bright screen or doze state, if the face detection function of the electronic device is activated, it will affect the normal use of the electronic device. Therefore, the face detection function should be turned off. In order to disable the face detection function, the AP needs to know whether the face detection function of the electronic device is enabled.
一些实施例中,Virtual AON Camera可检测电子设备的人脸检测功能是否被启动。Virtual AON Camera确定电子设备的人脸检测功能被启动,则向AP发送指示信息,该指示信息用于表征电子设备的人脸检测功能启动。In some embodiments, the Virtual AON Camera can detect whether the face detection function of the electronic device is activated. When the Virtual AON Camera determines that the face detection function of the electronic device is activated, it sends an instruction message to the AP, which is used to represent the activation of the face detection function of the electronic device.
另一些实施例中,AP也可向Virtual AON Camera发送指令,以使得Virtual AON Camera接收到指令后,确定电子设备的人脸检测功能是否被启动,并向AP发送指示信息。In some other embodiments, the AP can also send an instruction to the Virtual AON Camera, so that after the Virtual AON Camera receives the instruction, it determines whether the face detection function of the electronic device is activated, and sends an instruction message to the AP.
还需要说明的是,图6展示的是步骤S606执行顺序的一种示例,但步骤S606并不限于该执行顺序,Virtual AON Camera可在步骤S605之前的任意时刻执行步骤S606。It should also be noted that FIG. 6 shows an example of the execution order of step S606, but step S606 is not limited to this execution order, and the Virtual AON Camera may execute step S606 at any time before step S605.
S607、AP向AON Driver发送关闭人脸检测功能的指示。S607. The AP sends an instruction to disable the face detection function to the AON Driver.
AP确定显示屏处于亮屏状态或doze状态,且接收到Virtual AON Camera发送的指示信息,以确定电子设备的人脸检测功能启动,则向AON Driver发送关闭人脸检测功能的指示,以指示关闭人脸检测功能。The AP determines that the display screen is in the bright screen state or doze state, and receives the instruction information sent by the Virtual AON Camera to determine that the face detection function of the electronic device is activated, and then sends an instruction to turn off the face detection function to the AON Driver to indicate the shutdown Face detection function.
还需要说明的是,亮屏状态和doze状态均属于显示屏的非灭屏状态,但是显示屏的非灭屏状态可不限于亮屏状态和doze状态两种。在显示屏处于非灭屏状态时,AP收到Virtual AON Camera发的指示信息,以指示电子设备的人脸检测功能启动,AP则向AON Driver发送关闭人脸检测功能的指示,以指示关闭人脸检测功能。It should also be noted that both the on-screen state and the doze state belong to the non-off-screen state of the display screen, but the non-off-screen state of the display screen is not limited to the on-screen state and the doze state. When the display screen is not off, the AP receives an instruction message from the Virtual AON Camera to instruct the face detection function of the electronic device to start, and the AP sends an instruction to turn off the face detection function to the AON Driver to instruct to turn off the face detection function. Face detection function.
S608、AON Driver向AON模块发送关闭人脸检测功能的指令。S608. The AON Driver sends an instruction to disable the face detection function to the AON module.
其中,AON Driver收到AON Driver发送关闭人脸检测功能的指示,向AON模块发送关闭人脸检测功能的指令。Among them, the AON Driver receives an instruction from the AON Driver to turn off the face detection function, and sends an instruction to turn off the face detection function to the AON module.
AO模块收到该指令,关闭人脸检测功能。一些实施例中,AON Driver向AON模块发送关闭人脸检测功能的指令,可指代控制FD模块关闭人脸检测。The AO module receives this command and turns off the face detection function. In some embodiments, the AON Driver sends an instruction to the AON module to turn off the face detection function, which may refer to controlling the FD module to turn off the face detection.
FD模块关闭人脸检测,则不会执行对摄像头拍摄的图像数据进行是否包括人脸的检测,也不会上报人脸检测事件,基于此,AOD应用也不受人脸检测事件的触发,控制显示屏显示AOD显示界面,实现了在电子设备的显示屏处于非灭屏状态时,不显示AOD显示界面。If the FD module turns off face detection, it will not perform face detection on the image data captured by the camera, and will not report face detection events. Based on this, the AOD application will not be triggered by face detection events and will not be controlled. The display screen displays the AOD display interface, so that the AOD display interface is not displayed when the display screen of the electronic device is in a non-screen off state.
实施例三Embodiment three
实施例一提供的熄屏显示的控制方法的步骤S507中,Virtual AON Camera向AON Driver发送启动人脸检测功能的指示,可以是Virtual AON Camera确定电子设备满足一定的条件时,向AON Driver发送启动人脸检测功能的指示。本实施例提供的熄屏显示的控制方法,对此进行介绍。In step S507 of the control method for screen-off display provided in Embodiment 1, the Virtual AON Camera sends an instruction to start the face detection function to the AON Driver, which may be when the Virtual AON Camera determines that the electronic device meets certain conditions, and then sends the start face detection function to the AON Driver. Indication of the face detection function. The method for controlling the screen-off display provided in this embodiment will be introduced here.
本实施例中,Virtual AON Camera按照实现功能来看,可包括:显示状态处理模块、加速度监测模块、接近光监测模块、环境光监测模块、姿态检测模块、人脸检测启动条件 判断模块、人脸检测停止条件判断模块、人脸事件上报模块、以及异常打点模块几个逻辑模块。In this embodiment, the Virtual AON Camera may include: a display state processing module, an acceleration monitoring module, an approach light monitoring module, an ambient light monitoring module, an attitude detection module, a face detection startup condition judgment module, a face The detection stop condition judgment module, the face event reporting module, and the abnormal management module are several logic modules.
其中:显示状态处理模块,用于负责接收上层下发的显示状态指令,解析消息并记录当前显示状态。并根据显示状态及人脸检测模块的启停情况,综合电子设备的传感器信息,决策启动或停止人脸检测功能。Among them: the display status processing module, which is responsible for receiving the display status instructions issued by the upper layer, parsing the messages and recording the current display status. And according to the display status and the start and stop of the face detection module, the sensor information of the electronic device is integrated to make a decision to start or stop the face detection function.
加速度监测模块,用于负责接收加速度传感器发送的加速度变化数据,并把加速度变化数据转发至姿态监测模块。The acceleration monitoring module is responsible for receiving the acceleration change data sent by the acceleration sensor, and forwarding the acceleration change data to the attitude monitoring module.
接近光监测模块,用于负责接收接近光传感器发送的接近光变化事件,并记录接近光(接近或远离)事件。The proximity light monitoring module is responsible for receiving the proximity light change event sent by the proximity light sensor, and recording the proximity light (approaching or departing) event.
环境光监测模块,用于负责接收环境光传感器发送的环境光亮度,并记录环境光亮度。The ambient light monitoring module is used for receiving the ambient light brightness sent by the ambient light sensor and recording the ambient light brightness.
姿态检测模块,用于负责接收加速度监测模块传递的数据,识别并记录电子设备的姿态。The attitude detection module is responsible for receiving the data transmitted by the acceleration monitoring module, identifying and recording the attitude of the electronic device.
人脸检测启动条件判断模块,用于负责根据人脸检测启动条件,启动人脸检测功能。The face detection start condition judging module is used to start the face detection function according to the face detection start condition.
人脸检测停止条件判断模块,用于负责根据人脸检测停止条件,停止人脸检测功能。The face detection stop condition judging module is used to stop the face detection function according to the face detection stop condition.
人脸事件上报模块,用于负责接收人脸检测事件,如检测到人脸,则唤醒AP并上报人脸检测事件;如检测到非人脸,则不做处理,继续回到人脸检测模式。The face event reporting module is responsible for receiving face detection events. If a face is detected, the AP will wake up and report the face detection event; if a non-face is detected, it will not be processed and continue to return to the face detection mode .
异常打点模块,用于负责识别流程及功能异常,对异常进行打点记录并上报。The abnormal management module is responsible for identifying process and functional abnormalities, recording and reporting abnormalities.
图7展示了本申请实施例提供的一种熄屏显示的控制方法,本实施例提供的熄屏显示的控制方法,包括步骤:Figure 7 shows a control method for screen-off display provided by the embodiment of the present application. The control method for screen-off display provided in this embodiment includes steps:
S701、接近光传感器进行接近物靠近检测,得到接近事件或远离事件。S701. The proximity light sensor detects the proximity of an approaching object, and obtains an approach event or a distance event.
其中,接近光传感器检测到有接近物靠近,生成接近事件;接近光传感器没有检测到接近物靠近,生成远离事件。一些实施例中,接近事件和远离事件可为高低电平,一个示例中,高电平指代接近事件,低电平指代远离事件。Wherein, the proximity light sensor detects that an approaching object is approaching, and generates an approach event; the proximity light sensor does not detect that an approaching object is approaching, and generates a moving away event. In some embodiments, the proximity event and the distance event can be high and low levels. In one example, the high level refers to the proximity event, and the low level refers to the distance event.
S702、环境光传感器检测得到环境光亮度。S702. The ambient light sensor detects and obtains ambient light brightness.
其中,环境光传感器用于检测电子设备所处环境的环境光,得到环境光亮度。Wherein, the ambient light sensor is used to detect the ambient light of the environment where the electronic device is located to obtain the brightness of the ambient light.
S703、加速度传感器检测得到三轴检测数据。S703. The acceleration sensor detects and obtains three-axis detection data.
其中,加速度传感器检测电子设备在x、y和z三个轴的加速度大小,得到x、y和z三个轴的检测数据。Wherein, the acceleration sensor detects the acceleration of the electronic device in the three axes of x, y and z, and obtains the detection data of the three axes of x, y and z.
S704、接近光传感器向Virtual AON Camera发送接近事件或远离事件。S704. The proximity light sensor sends a proximity event or a distance event to the Virtual AON Camera.
其中,接近光监测模块接收接近光传感器发送的接近事件或远离事件。Wherein, the proximity light monitoring module receives the proximity event or the distance event sent by the proximity light sensor.
S705、环境光传感器向Virtual AON Camera发送环境光亮度。S705. The ambient light sensor sends ambient light brightness to the Virtual AON Camera.
其中,环境光监测模块接收环境光传感器发送的环境光亮度。Wherein, the ambient light monitoring module receives the ambient light brightness sent by the ambient light sensor.
S706、加速度传感器向Virtual AON Camera发送三轴检测数据。S706. The acceleration sensor sends three-axis detection data to the Virtual AON Camera.
其中,加速度监测模块接收加速度传感器发送的三轴检测数据。Wherein, the acceleration monitoring module receives the three-axis detection data sent by the acceleration sensor.
还需要说明的是,图7展示的是步骤S701至步骤S706执行顺序的一种示例,但步骤S701至步骤S706并不限于该执行顺序。一些实施例中,Virtual AON Camera可并行执行步骤S704、步骤S705、步骤S706以及步骤S707。It should also be noted that what is shown in FIG. 7 is an example of the execution sequence of steps S701 to S706, but the steps S701 to S706 are not limited to this execution sequence. In some embodiments, the Virtual AON Camera can execute step S704, step S705, step S706 and step S707 in parallel.
S707、Virtual AON Camera接收并记录显示屏的显示状态。S707, Virtual AON Camera receives and records the display status of the display screen.
其中,Virtual AON Camera接收AON service发送显示屏的显示状态。其中,AON service发送显示屏的显示状态可如实施例一的步骤S504内容,此处不再赘述。Among them, the Virtual AON Camera receives the display status of the display screen sent by the AON service. Wherein, the display status of the display screen sent by the AON service can be as the content of step S504 in the first embodiment, and will not be repeated here.
具体的,显示状态处理模块接收并记录显示屏的显示状态。Specifically, the display state processing module receives and records the display state of the display screen.
还需要说明的是,步骤S707可以理解成是实施例一中的步骤S506。当然,步骤S707执行之前,电子设备需执行实施例一的步骤S501至步骤S505,本实施例对此不进行详细说明,可参见实施例一的内容。It should also be noted that step S707 can be understood as step S506 in the first embodiment. Of course, before step S707 is executed, the electronic device needs to execute steps S501 to S505 of the first embodiment, which will not be described in detail in this embodiment, and can be referred to the content of the first embodiment.
S708、Virtual AON Camera判断显示状态是否为灭屏状态。S708, Virtual AON Camera judges whether the display state is off screen state.
其中,显示状态处理模块利用显示屏的显示状态,确定显示屏是否为灭屏状态。Wherein, the display state processing module utilizes the display state of the display screen to determine whether the display screen is in an off state.
Virtual AON Camera判断显示状态为灭屏状态,则执行步骤S709至步骤S711。Virtual AON Camera判断显示状态不是灭屏状态,则执行步骤S712和步骤S713。If the Virtual AON Camera judges that the display state is off-screen state, then execute step S709 to step S711. When the Virtual AON Camera judges that the display state is not the off-screen state, step S712 and step S713 are executed.
S709、Virtual AON Camera判断人脸检测功能是否启动。S709, Virtual AON Camera judges whether the face detection function is activated.
其中,显示状态处理模块判断人脸检测功能是否启动。Wherein, the display state processing module judges whether the face detection function is activated.
需要说明的是,图7展示的是步骤S707、步骤S708和步骤S709的执行顺序的一种示例。步骤S707、步骤S708和步骤S709并不限于该执行顺序。一些实施例中,Virtual AON Camera可并行执行步骤S707和步骤S709,或先执行步骤S709,再执行步骤S707、步骤S708。It should be noted that what is shown in FIG. 7 is an example of the execution sequence of step S707 , step S708 and step S709 . Step S707, step S708, and step S709 are not limited to the order of execution. In some embodiments, the Virtual AON Camera may execute step S707 and step S709 in parallel, or execute step S709 first, and then execute step S707 and step S708.
并且,步骤S709也可以是可选择性执行的步骤。一些实施例中,Virtual AON Camera判断显示状态为灭屏状态,可直接执行步骤S710。Moreover, step S709 may also be an optional step. In some embodiments, the Virtual AON Camera determines that the display state is the off-screen state, and may directly execute step S710.
S710、Virtual AON Camera利用三轴检测数据判断电子设备是否不为第一姿态,判断环境光亮度是否不小于第一阈值,以及判断是否接收远离事件。S710 and Virtual AON Camera use the three-axis detection data to judge whether the electronic device is not in the first posture, judge whether the ambient light brightness is not less than the first threshold, and judge whether to receive a far away event.
其中,第一姿态可以理解成电子设备的显示屏向下的姿态,包括显示屏完全向下的姿态以及以一定角度倾斜向下的姿态。Virtual AON Camera可处理三轴检测数据,得到电子设备的姿态。一些实施例中,Virtual AON Camera可利用下述公式一至公式三,处理三轴检测数据,得到俯仰角g_pitch。Virtual AON Camera判断计算得到的俯仰角是否满足门限范围,如[110°-350°]。若计算得到的俯仰角在门限范围内,则说明电子设备处于第一姿态。若计算得到的俯仰角不在门限范围内,则说明电子设备不处于第一姿态。Wherein, the first posture can be understood as a downward posture of the display screen of the electronic device, including a posture in which the display screen is completely downward and a posture in which the display screen is tilted downward at a certain angle. Virtual AON Camera can process three-axis detection data to obtain the attitude of electronic equipment. In some embodiments, the Virtual AON Camera can use the following formulas 1 to 3 to process the three-axis detection data to obtain the pitch angle g_pitch. Virtual AON Camera judges whether the calculated pitch angle meets the threshold range, such as [110°-350°]. If the calculated pitch angle is within the threshold range, it means that the electronic device is in the first attitude. If the calculated pitch angle is not within the threshold range, it means that the electronic device is not in the first attitude.
                                                                公式一 Formula 1
acc_data[PS_DATA_X]=ps_gesture_acc_data.x×SENSOR_DATA_FACTORacc_data[PS_DATA_X]=ps_gesture_acc_data.x×SENSOR_DATA_FACTOR
                                                                公式二Formula 2
acc_data[PS_DATA_Y]=ps_gesture_acc_data.y×SENSOR_DATA_FACTORacc_data[PS_DATA_Y]=ps_gesture_acc_data.y×SENSOR_DATA_FACTOR
                                                                公式三Formula 3
acc_data[PS_DATA_Z]=ps_gesture_acc_data.z×SENSOR_DATA_FACTORacc_data[PS_DATA_Z]=ps_gesture_acc_data.z×SENSOR_DATA_FACTOR
Figure PCTCN2022138948-appb-000001
Figure PCTCN2022138948-appb-000001
公式一中,ps_gesture_acc_data.x为加速度传感器x轴的检测数据。In Formula 1, ps_gesture_acc_data.x is the detection data of the x-axis of the acceleration sensor.
公式二中,ps_gesture_acc_data.y为加速度传感器y轴的检测数据。In Formula 2, ps_gesture_acc_data.y is the detection data of the y-axis of the acceleration sensor.
公式三中,ps_gesture_acc_data.z为加速度传感器z轴的检测数据。In Formula 3, ps_gesture_acc_data.z is the detection data of the z-axis of the acceleration sensor.
公式一到公式三中,SENSOR_DATA_FACTOR=100。In Formula 1 to Formula 3, SENSOR_DATA_FACTOR=100.
公式四中,FLAT_ANGLE=180;PEI=3.1415926。In Formula 4, FLAT_ANGLE=180; PEI=3.1415926.
第一阈值是电子设备所处环境的环境光亮度是否足以支持摄像头拍摄得到清楚图像的评判数值,环境光亮度不小于第一阈值,则说明电子设备所处的环境光亮度,足以支持摄像头拍摄到清楚图像。一个示例中,第一阈值可为6lux。The first threshold is the evaluation value of whether the ambient light brightness of the environment where the electronic device is located is sufficient to support the camera to capture a clear image. If the ambient light brightness is not less than the first threshold, it means that the ambient light brightness of the electronic device is sufficient to support the camera to capture Clear image. In one example, the first threshold may be 6lux.
一些实施例中,Virtual AON Camera可判断环境光传感器上报的一个环境光亮度是否不小于第一阈值。In some embodiments, the Virtual AON Camera can determine whether an ambient light brightness reported by the ambient light sensor is not less than the first threshold.
另一些实施例中,环境光传感器可持续检测环境光亮度,得到多个环境光亮度,并将每个环境光亮度上报给Virtual AON Camera。Virtual AON Camera持续判断每个环境光亮度是否不小于第一阈值。一个示例中,Virtual AON Camera判断连续5个环境光亮度是否不小于第一阈值。In some other embodiments, the ambient light sensor can continuously detect the ambient light brightness, obtain multiple ambient light brightness, and report each ambient light brightness to the Virtual AON Camera. Virtual AON Camera continues to judge whether the brightness of each ambient light is not less than the first threshold. In an example, the Virtual AON Camera judges whether five consecutive ambient light brightnesses are not less than the first threshold.
需要说明的是,本步骤中,可由Virtual AON Camera中的人脸检测启动条件判断模块,执行利用三轴检测数据判断电子设备是否为第一姿态,判断环境光亮度是否不小于第一阈值,以及判断是否接收远离事件的步骤。It should be noted that, in this step, the face detection activation condition judgment module in the Virtual AON Camera can use the three-axis detection data to judge whether the electronic device is in the first posture, judge whether the ambient light brightness is not less than the first threshold, and Steps to determine whether to receive far away events.
Virtual AON Camera利用三轴检测数据判断电子设备不为第一姿态,判断环境光亮度不小于第一阈值,以及判断接收到远离事件,则执行S711、Virtual AON Camera启动人脸检测功能。Virtual AON Camera uses three-axis detection data to judge that the electronic device is not in the first posture, judges that the ambient light brightness is not less than the first threshold, and judges that it receives a far away event, then executes S711, and Virtual AON Camera starts the face detection function.
一些实施例中,Virtual AON Camera利用三轴检测数据判断电子设备的俯仰角不处于门限范围内,如[110°-350°];判断连续多个环境光亮度(如5个)不小于第一阈值,如6lux;判断接收到远离事件,则启动人脸检测功能。In some embodiments, the Virtual AON Camera uses the three-axis detection data to judge that the pitch angle of the electronic device is not within the threshold range, such as [110°-350°]; it judges that the brightness of multiple consecutive environments (such as 5) is not less than the first Threshold, such as 6lux; if it judges that a far away event is received, the face detection function will be activated.
具体的,人脸检测启动条件判断模块启动人脸检测功能。一些实施例中,Virtual AON Camera向AON Driver发送启动人脸检测功能的指示。Specifically, the face detection starting condition judging module starts the face detection function. In some embodiments, the Virtual AON Camera sends an instruction to start the face detection function to the AON Driver.
需要说明的是,步骤S711可以理解成是实施例一中的步骤S507。当然,步骤S711执行之后,电子设备需执行实施例一的步骤S508至步骤S520,本实施例对此不进行详细说明,可参见实施例一的内容。It should be noted that step S711 can be understood as step S507 in the first embodiment. Of course, after step S711 is executed, the electronic device needs to execute steps S508 to S520 of the first embodiment, which will not be described in detail in this embodiment, and can be referred to the content of the first embodiment.
AON Driver接收启动人脸检测功能的指示之后,可执行实施例一提供的步骤S508。如此,电子设备的人脸检测功能则被启动,AON模块可获取摄像头拍摄的图像数据,并检测图像数据是否包括人脸,并根据人脸检测结果,生成人脸检测事件。After the AON Driver receives the instruction to start the face detection function, it can execute step S508 provided in the first embodiment. In this way, the face detection function of the electronic device is activated, and the AON module can obtain the image data captured by the camera, detect whether the image data includes a face, and generate a face detection event according to the face detection result.
如实施例一所述,Virtual AON Camera也接收AON Driver发送的人脸检测事件,并执行步骤S516和步骤S517。其中,可由人脸事件上报模块执行步骤S516和步骤S517。As described in Embodiment 1, the Virtual AON Camera also receives the face detection event sent by the AON Driver, and executes steps S516 and S517. Wherein, step S516 and step S517 may be performed by the face event reporting module.
需要说明的是,Virtual AON Camera利用加速度传感器的三轴检测数据,确定电子设备不处于第一姿态,确定环境光亮度不小于第一阈值,还确定接收到远离事件,说明电子设备的显示屏处于向上姿态,亮度足够的环境,没有接近物靠近,可启动人脸检测功能。It should be noted that the Virtual AON Camera uses the three-axis detection data of the acceleration sensor to determine that the electronic device is not in the first posture, and that the ambient light brightness is not less than the first threshold. Upward posture, the environment with sufficient brightness, and no close objects approaching, the face detection function can be activated.
还需要说明的是,Virtual AON Camera判断下述三个条件中至少一个条件满足,则不启动人脸检测功能。三个条件包括:条件1、利用三轴检测数据判断电子设备为第一姿态;条件2、判断环境光亮度小于第一阈值,条件3、判断接收到接近事件。It should also be noted that if the Virtual AON Camera judges that at least one of the following three conditions is met, the face detection function will not be activated. The three conditions include: condition 1, using the three-axis detection data to determine that the electronic device is in the first attitude; condition 2, determining that the ambient light brightness is less than the first threshold, and condition 3, determining that an approach event is received.
条件1满足,说明电子设备是显示屏向下姿态,属于用户不能看到显示屏的姿态,如显示屏扣放姿态。在该姿态下,电子设备启动人脸检测功能,显示屏显示AOD显示界面,也不能被用户看到,因此可不启动人脸检测功能,以避免功耗浪费。If condition 1 is satisfied, it means that the electronic device is in a posture with the display screen facing downwards, which is a posture in which the user cannot see the display screen, such as the display screen buckled down posture. In this posture, the electronic device activates the face detection function, and the display screen displays the AOD display interface, which cannot be seen by the user. Therefore, the face detection function may not be activated to avoid wasting power consumption.
条件2满足,说明电子设备所处环境的亮度太低,电子设备启动人脸检测功能,摄像头拍摄的图像数据,也不足以识别出是否包括人脸,因此也可不启动人脸检测功能,同样避免功耗浪费。If condition 2 is satisfied, it means that the brightness of the environment where the electronic device is located is too low, the electronic device activates the face detection function, and the image data captured by the camera is not enough to identify whether the face is included, so the face detection function can also be disabled to avoid Wasted power.
条件3满足,说明有接近物靠近电子设备,如电子设备被放置到包里的使用场景,也可不启动人脸检测功能,避免功耗浪费。If condition 3 is satisfied, it means that there is an object close to the electronic device. For example, in a scenario where the electronic device is placed in a bag, the face detection function may not be enabled to avoid wasting power consumption.
需要指出的是,条件2中,环境光亮度小于第一阈值,可以指代连续多个环境光亮度包括至少一个环境光亮度小于第一阈值。一个示例中,连续5个环境光亮度小于6lux。当然条件2也可为判断环境光亮度小于其他小于第一阈值的数值,如3lux。It should be noted that in condition 2, the ambient light brightness is less than the first threshold may refer to a plurality of consecutive ambient light brightnesses including at least one ambient light brightness being smaller than the first threshold. In one example, five consecutive ambient light brightnesses are less than 6lux. Of course, condition 2 may also be judging that the ambient light brightness is smaller than other values smaller than the first threshold, such as 3lux.
S712、Virtual AON Camera判断人脸检测功能是否启动。S712, Virtual AON Camera judges whether the face detection function is activated.
其中,显示状态处理模块判断人脸检测功能是否启动。Wherein, the display state processing module judges whether the face detection function is activated.
需要说明的是,步骤S712和步骤S708也可不限于图7展示的执行顺序。一些实施例中,可先执行步骤S712,再执行步骤S708。It should be noted that, the execution sequence of step S712 and step S708 is not limited to that shown in FIG. 7 . In some embodiments, step S712 may be performed first, and then step S708 may be performed.
Virtual AON Camera判断人脸检测功能启动,则执行S713、Virtual AON Camera向AP发送指示信息,以指示电子设备的人脸检测功能启动。The Virtual AON Camera judges that the face detection function is started, and then executes S713, and the Virtual AON Camera sends an instruction message to the AP to instruct the face detection function of the electronic device to start.
其中,Virtual AON Camera判断人脸检测功能启动,显示屏不处于灭屏状态,则向AP发送指示信息,以指示电子设备的人脸检测功能启动。需要说明的是,步骤S713可以理解成是实施例二中的步骤S606。其中,AP接收到指示信息后,可执行实施例二提供的步骤S607,并且,AON Driver执行实施例二提供的步骤S608。Among them, the Virtual AON Camera judges that the face detection function is activated, and the display screen is not in the off-screen state, and then sends an instruction message to the AP to instruct the face detection function of the electronic device to start. It should be noted that step S713 can be understood as step S606 in the second embodiment. Wherein, after the AP receives the instruction information, it can execute step S607 provided in the second embodiment, and the AON Driver executes the step S608 provided in the second embodiment.
还需要说明的是,Virtual AON Camera的人脸检测停止条件判断模块可执行步骤S713。It should also be noted that the face detection stop condition judging module of the Virtual AON Camera can execute step S713.
还需要说明的是,在电子设备的人脸检测功能被启动过程中,Virtual AON Camera也可利用加速度传感器、接近光传感器以及环境光传感器的检测数据,来评判是否要关闭人脸检测功能。It should also be noted that when the face detection function of the electronic device is activated, the Virtual AON Camera can also use the detection data of the acceleration sensor, the proximity light sensor and the ambient light sensor to judge whether to turn off the face detection function.
其中,Virtual AON Camera可利用加速度传感器的三轴检测数据判断电子设备是否为第一姿态,利用环境光传感器检测到的环境光亮度是否小于第一阈值,或者利用判断是否接收接近光传感器上报的接近事件。Among them, the Virtual AON Camera can use the three-axis detection data of the acceleration sensor to judge whether the electronic device is in the first attitude, use the ambient light sensor to detect whether the ambient light brightness is less than the first threshold, or use the method to judge whether it receives the approach reported by the proximity light sensor. event.
Virtual AON Camera利用三轴检测数据判断电子设备为第一姿态,环境光亮度小于第一阈值,或者接收接近事件,则执行步骤S712和步骤S713。The Virtual AON Camera uses the three-axis detection data to determine that the electronic device is in the first posture, the ambient light brightness is less than the first threshold, or receives an approach event, and then executes steps S712 and S713.
一些实施例中,Virtual AON Camera利用三轴检测数据,按照前述步骤S710提供的公式,计算出俯仰角。判断计算出的俯仰角在门限范围,如[110°-350°],则认定电子设备处于第一姿态。In some embodiments, the Virtual AON Camera uses the three-axis detection data to calculate the pitch angle according to the formula provided in the aforementioned step S710. If it is judged that the calculated pitch angle is within the threshold range, such as [110°-350°], it is determined that the electronic device is in the first attitude.
环境光亮度小于第一阈值,可以指代环境光传感器上报的一个环境光亮度小于第一阈值,也可以指代环境光传感器上报的多个环境光亮度,均小于第一阈值。第一阈值可以与步骤S710中的第一阈值相同,也可以不同。一个示例中,连续5个环境光亮度小于3lux。The ambient light brightness is less than the first threshold, which may mean that one ambient light brightness reported by the ambient light sensor is smaller than the first threshold, or may refer to multiple ambient light brightness reported by the ambient light sensor, all of which are smaller than the first threshold. The first threshold may be the same as or different from the first threshold in step S710. In one example, five consecutive ambient light brightnesses are less than 3 lux.
电子设备的人脸检测功能处于启动状态下,电子设备处于第一姿态,说明电子设备的显示屏向下,属于用户不能看到显示屏的姿态。在该姿态下,电子设备启动人脸检测功能,显示屏显示AOD显示界面,也不能被用户看到,因此可关闭人脸检测功能,以避免功耗浪费。When the face detection function of the electronic device is activated, the electronic device is in the first posture, which means that the display screen of the electronic device is facing downwards, which is a posture in which the user cannot see the display screen. In this posture, the electronic device activates the face detection function, and the display screen displays the AOD display interface, which cannot be seen by the user. Therefore, the face detection function can be turned off to avoid wasting power consumption.
环境光亮度小于第一阈值,说明电子设备所处环境的亮度太低,电子设备启动人脸检测功能,摄像头拍摄的图像数据,也不足以识别出是否包括人脸,因此可关闭人脸检测功能,同样避免功耗浪费。If the brightness of the ambient light is less than the first threshold, it means that the brightness of the environment where the electronic device is located is too low, the electronic device starts the face detection function, and the image data captured by the camera is not enough to identify whether the face is included, so the face detection function can be turned off , also avoiding waste of power consumption.
Virtual AON Camera接收到接近事件,说明有接近物靠近电子设备,如电子设备被放置到包里的使用场景,也可关闭人脸检测功能,避免功耗浪费。When the Virtual AON Camera receives an approach event, it means that something close to the electronic device is close to it. For example, when the electronic device is placed in a bag, the face detection function can also be turned off to avoid wasting power consumption.
实施例四Embodiment four
电子设备利用实施例一提供的熄屏显示的控制方法,可实现在显示屏处于灭屏状态进行人脸检测,并在检测到人脸后,显示屏展示AOD显示界面。然而,在实施例一提供的熄屏显示的控制方法的执行过程中,存在下述应用场景。The electronic device can use the screen-off display control method provided in Embodiment 1 to realize face detection when the display screen is in the off-screen state, and after the face is detected, the display screen displays an AOD display interface. However, during the execution of the method for controlling the screen-off display provided in Embodiment 1, there are the following application scenarios.
本应用场景下,用户持续位于电子设备的显示屏前。电子设备持续确定人脸检测条件满足,导致电子设备处于“检测到人脸->展示AOD->一定时长后AOD消失->检测到人脸”的死循环中。基于此,本实施例提供一种熄屏显示的控制方法,以避免电子设备陷入该死循环中。In this application scenario, the user is always in front of the display screen of the electronic device. The electronic device continues to determine that the face detection conditions are met, causing the electronic device to be in an endless loop of "face detected -> AOD displayed -> AOD disappears after a certain period of time -> face detected". Based on this, the present embodiment provides a control method for turning off the screen display, so as to prevent the electronic device from falling into the endless loop.
本实施例中,Virtual AON Camera可包括人脸持续检测逃生模块。人脸持续检测逃生模块用于:确定本次人脸检测事件的上报时间和上次人脸检测事件的上报时间之差小于第二阈值,不上报人脸检测事件,第二阈值如30秒,1分钟。需要说明的是,第二阈值一般会大于AOD显示界面的展示时长。In this embodiment, the Virtual AON Camera may include a face continuous detection escape module. The face continuous detection escape module is used to: determine that the difference between the reporting time of this face detection event and the reporting time of the last face detection event is less than the second threshold, and not report the face detection event. The second threshold is 30 seconds, 1 minute. It should be noted that the second threshold is generally greater than the display duration of the AOD display interface.
图8展示了本申请实施例提供的一种熄屏显示的控制方法,本实施例提供的熄屏显示的控制方法,包括步骤:Figure 8 shows a control method for screen-off display provided by the embodiment of the present application. The control method for screen-off display provided in this embodiment includes steps:
S801、接近光传感器进行接近物靠近检测,得到接近事件或远离事件。S801. The proximity light sensor detects the proximity of an approaching object, and obtains an approach event or a distance event.
S802、环境光传感器检测得到环境光亮度。S802. The ambient light sensor detects and obtains ambient light brightness.
S803、加速度传感器检测得到三轴检测数据。S803. The acceleration sensor detects and obtains three-axis detection data.
S804、接近光传感器向Virtual AON Camera发送接近事件或远离事件。S804. The proximity light sensor sends a proximity event or a distance event to the Virtual AON Camera.
S805、环境光传感器向Virtual AON Camera发送环境光亮度。S805. The ambient light sensor sends ambient light brightness to the Virtual AON Camera.
S806、加速度传感器向Virtual AON Camera发送三轴检测数据。S806. The acceleration sensor sends three-axis detection data to the Virtual AON Camera.
需要说明的是,步骤S801至步骤S806的具体实现过程,可如实施例三提供的步骤S701至步骤S706的内容,此处不再赘述。It should be noted that the specific implementation process of step S801 to step S806 may be the same as the content of step S701 to step S706 provided in the third embodiment, which will not be repeated here.
还需要说明的是,图8展示的是步骤S801至步骤S806执行顺序的一种示例,但步骤S801至步骤S806并不限于该执行顺序。一些实施例中,Virtual AON Camera可并行执行步骤S804、步骤S805、步骤S806以及步骤S807。It should also be noted that what is shown in FIG. 8 is an example of the execution sequence of steps S801 to S806, but the execution sequence of steps S801 to S806 is not limited to this execution sequence. In some embodiments, the Virtual AON Camera can execute step S804, step S805, step S806 and step S807 in parallel.
S807、Virtual AON Camera接收AON Driver发送的人脸检测事件。S807. The Virtual AON Camera receives the face detection event sent by the AON Driver.
步骤S807可以理解成是实施例一中的步骤S515。其中,如实施例一的步骤S501至步骤S514的内容,电子设备的人脸检测功能被启动之后,AON模块在检测图像数据包括人脸,则生成人脸检测事件,并通过信号处理器、AON Driver,将人脸检测事件上传到Virtual AON Camera。Step S807 can be understood as step S515 in the first embodiment. Wherein, as in the content of step S501 to step S514 of the first embodiment, after the face detection function of the electronic device is started, the AON module generates a face detection event when the detection image data includes a face, and passes the signal processor, AON Driver, upload face detection events to Virtual AON Camera.
一些实施例中,Virtual AON Camera接收AON Driver发送的人脸检测事件之后,可记录人脸检测事件的上报时间。In some embodiments, after the Virtual AON Camera receives the face detection event sent by the AON Driver, it can record the reporting time of the face detection event.
S808、Virtual AON Camera判断人脸检测事件的上报时间和上一次人脸检测事件的上报时间的差值是否小于第二阈值。S808. The Virtual AON Camera judges whether the difference between the reporting time of the face detection event and the reporting time of the last face detection event is smaller than the second threshold.
其中,Virtual AON Camera判断人脸检测事件的上报时间和上一次人脸检测事件的上报时间的差值不小于第二阈值,执行步骤S809和步骤S810。Virtual AON Camera判断人脸检测事件的上报时间和上一次人脸检测事件的上报时间的差值小于第二阈值,执行步骤S811和步骤S820。Wherein, the Virtual AON Camera determines that the difference between the reporting time of the face detection event and the reporting time of the last face detection event is not less than the second threshold, and executes steps S809 and S810. The Virtual AON Camera judges that the difference between the reporting time of the face detection event and the reporting time of the last face detection event is less than the second threshold, and executes steps S811 and S820.
具体的,由人脸持续检测逃生模块判断人脸检测事件的上报时间和上一次人脸检测事件的上报时间的差值是否小于第二阈值。Specifically, the face continuous detection escape module judges whether the difference between the reporting time of the face detection event and the reporting time of the last face detection event is smaller than the second threshold.
还需要说明的是,如实施例一中步骤S512的内容,AON模块检测图像数据包括人脸,则可生成人脸检测事件,并向信号处理器上报人脸检测事件。一些实施例中,AON模块还可得到人脸检测事件的上报时间,并同步上报到信号处理器,并经AON Driver发送到Virtual AON Camera,如此,Virtual AON Camera可得到人脸检测事件的上报时间。It should also be noted that, as in step S512 in the first embodiment, if the AON module detects that the image data includes a face, it can generate a face detection event and report the face detection event to the signal processor. In some embodiments, the AON module can also obtain the reporting time of the face detection event, and report it to the signal processor synchronously, and send it to the Virtual AON Camera through the AON Driver, so that the Virtual AON Camera can obtain the reporting time of the face detection event .
另一些实施例中,Virtual AON Camera也可在接收到AON Driver发送人脸检测事件时,以接收时刻作为人脸检测事件的上报时间。In some other embodiments, when the Virtual AON Camera receives the face detection event sent by the AON Driver, the receiving time is used as the reporting time of the face detection event.
S809、Virtual AON Camera唤醒AP,并向AP发送记录的显示状态。S809. The Virtual AON Camera wakes up the AP and sends the recorded display status to the AP.
S810、Virtual AON Camera向AON service发送人脸检测事件。S810, Virtual AON Camera sends face detection event to AON service.
其中,步骤S809和步骤S810的具体实现过程,可如实施例一的步骤S516和步骤S517的内容,此处不再赘述。并且,步骤S809和步骤S810执行完毕之后,电子设备可继续执行如实施例一提出的步骤S518至步骤S520,此处不展开说明,可参见实施例一的内容。Wherein, the specific implementation process of step S809 and step S810 may be the same as the content of step S516 and step S517 in the first embodiment, which will not be repeated here. Moreover, after step S809 and step S810 are executed, the electronic device may continue to execute step S518 to step S520 as proposed in the first embodiment, which will not be described here, and may refer to the content of the first embodiment.
需要说明的是,Virtual AON Camera接收到人脸检测事件,且判断人脸检测事件的上报时间和上一次人脸检测事件的上报时间的差值不小于第二阈值,再执行步骤S809和步骤S810,AON service可接收人脸检测事件。AON service还可将人脸检测事件向上层发送,以使得AOD应用可接收到人脸检测事件,并控制显示屏显示AOD显示界面。如此,可避免电子设备进入“检测到人脸->展示AOD->一定时长后AOD消失->检测到人脸”的死循环中。It should be noted that the Virtual AON Camera receives the face detection event, and judges that the difference between the reporting time of the face detection event and the reporting time of the last face detection event is not less than the second threshold, and then executes steps S809 and S810 , AON service can receive face detection events. The AON service can also send the face detection event to the upper layer, so that the AOD application can receive the face detection event and control the display to display the AOD display interface. In this way, the electronic device can be prevented from entering into an infinite loop of "face detected -> display AOD -> AOD disappears after a certain period of time -> face detected".
S811、Virtual AON Camera利用三轴检测数据判断电子设备是否持续处于静止状态。S811, Virtual AON Camera uses three-axis detection data to judge whether the electronic equipment is still in a static state.
电子设备持续处于静止状态,可以理解成:从电子设备的人脸检测功能开启时刻开始,直到Virtual AON Camera通过步骤S808判断出人脸检测事件的上报时间和上一次人脸检测事件的上报时间的差值小于第二阈值的这段时间内,电子设备是否处于同一个姿态。The electronic device remains in a static state, which can be understood as: from the moment when the face detection function of the electronic device is turned on, until the Virtual AON Camera judges the reporting time of the face detection event and the reporting time of the last face detection event through step S808 During the period when the difference is smaller than the second threshold, whether the electronic device is in the same attitude.
一些实施例中,可通过三轴检测数据,计算电子设备的俯仰角,判断计算出的俯仰角是否维持稳定数值。维持稳定数值可以理解成:从电子设备的人脸检测功能开启时刻开始,直到Virtual AON Camera通过步骤S808判断出人脸检测事件的上报时间和上一次人脸检测 事件的上报时间的差值小于第二阈值的这段时间内,加速度传感器连续性上报三轴检测数据,Virtual AON Camera利用每次上报的三轴检测数据,计算出的俯仰角的差值均在一定范围内,如5°范围内。In some embodiments, the pitch angle of the electronic device can be calculated through the three-axis detection data, and it can be judged whether the calculated pitch angle maintains a stable value. Maintaining a stable value can be understood as: from the moment when the face detection function of the electronic device is turned on, until the Virtual AON Camera determines that the difference between the reporting time of the face detection event and the reporting time of the last face detection event is less than the first time through step S808 During the period of the second threshold, the acceleration sensor continuously reports the three-axis detection data, and the Virtual AON Camera uses the three-axis detection data reported each time to calculate the difference of the pitch angle within a certain range, such as within a range of 5° .
其中,Virtual AON Camera利用三轴检测数据判断电子设备没有持续处于静止状态,则执行步骤S812和步骤S813。Virtual AON Camera利用三轴检测数据判断电子设备持续处于静止状态,则执行步骤S820。Among them, the Virtual AON Camera uses the three-axis detection data to determine that the electronic device is not in a static state, and then executes steps S812 and S813. The Virtual AON Camera uses the three-axis detection data to determine that the electronic device is still in the static state, and then executes step S820.
S812、Virtual AON Camera唤醒AP,并向AP发送记录的显示状态。S812. The Virtual AON Camera wakes up the AP and sends the recorded display status to the AP.
S813、Virtual AON Camera向AON service发送人脸检测事件。S813. The Virtual AON Camera sends a face detection event to the AON service.
其中,步骤S812和步骤S813的具体实现过程,可如实施例一的步骤S516和步骤S517的内容,此处不再赘述。并且,步骤S812和步骤S813执行完毕之后,电子设备可继续执行如实施例一提出的步骤S518至步骤S520,此处不展开说明,可参见实施例一的内容。Wherein, the specific implementation process of step S812 and step S813 may be the same as the content of step S516 and step S517 in the first embodiment, which will not be repeated here. Moreover, after step S812 and step S813 are executed, the electronic device may continue to execute step S518 to step S520 as proposed in the first embodiment, which will not be described here, and may refer to the content of the first embodiment.
需要说明的是,Virtual AON Camera利用三轴检测数据判断电子设备没有持续处于静止状态,再执行步骤S812和步骤S813,AON service可接收人脸检测事件。AON service还可将人脸检测事件向上层发送,以使得AOD应用可接收到人脸检测事件,并控制显示屏显示AOD显示界面。如此,可以实现即便利用前后两次人脸检测事件的上报时间之差较小,推断出用户持续位于显示屏前,但只要电子设备的姿态产生变化,则触发显示屏显示AOD显示界面。It should be noted that the Virtual AON Camera uses the three-axis detection data to determine that the electronic device is not in a static state, and then executes steps S812 and S813, and the AON service can receive face detection events. The AON service can also send the face detection event to the upper layer, so that the AOD application can receive the face detection event and control the display to display the AOD display interface. In this way, it can be realized that even if the difference between the reporting time of the two face detection events before and after is small, it can be inferred that the user continues to be in front of the display screen, but as long as the posture of the electronic device changes, the display screen will be triggered to display the AOD display interface.
S814、Virtual AON Camera判断环境光亮度是否有大波动。S814, Virtual AON Camera judges whether the ambient light brightness fluctuates greatly.
其中,Virtual AON Camera判断环境光亮度有大波动,则执行步骤S815和步骤S816。Virtual AON Camera判断环境光亮度没有大波动,则执行步骤S820。Wherein, the Virtual AON Camera determines that there is a large fluctuation in the ambient light brightness, and then executes steps S815 and S816. The Virtual AON Camera judges that the ambient light brightness does not fluctuate greatly, and then executes step S820.
步骤S814和步骤S811可以理解成是并行执行。Step S814 and step S811 can be understood as being executed in parallel.
环境光亮度有大波动,可以理解成:从电子设备的人脸检测功能开启时刻开始,直到Virtual AON Camera通过步骤S808判断出人脸检测事件的上报时间和上一次人脸检测事件的上报时间的差值小于第二阈值的这段时间内,环境光传感器上报的环境光亮度是否有大变化。一些实施例中,环境光传感器上报的环境光亮度存在至少几倍数的变化,则可认定环境光亮度有大波动。另一些实施例中,环境光传感器上报的环境光亮度的差值没有维持在一定范围内,则可认定环境光亮度有大波动。There is a large fluctuation in the ambient light brightness, which can be understood as: from the moment when the face detection function of the electronic device is turned on, until the Virtual AON Camera judges the reporting time of the face detection event and the reporting time of the last face detection event through step S808 During the period when the difference is smaller than the second threshold, whether there is a big change in the ambient light brightness reported by the ambient light sensor. In some embodiments, if the ambient light brightness reported by the ambient light sensor changes by at least several times, it can be determined that there is a large fluctuation in the ambient light brightness. In some other embodiments, if the difference of the ambient light brightness reported by the ambient light sensor is not maintained within a certain range, it can be determined that the ambient light brightness fluctuates greatly.
S815、Virtual AON Camera唤醒AP,并向AP发送记录的显示状态。S815. The Virtual AON Camera wakes up the AP and sends the recorded display status to the AP.
S816、Virtual AON Camera向AON service发送人脸检测事件。S816. The Virtual AON Camera sends a face detection event to the AON service.
其中,步骤S815和步骤S816的具体实现过程,可如实施例一的步骤S516和步骤S517的内容,此处不再赘述。并且,步骤S815和步骤S816执行完毕之后,电子设备可继续执行如实施例一提出的步骤S518至步骤S520,此处不展开说明,可参见实施例一的内容。Wherein, the specific implementation process of step S815 and step S816 may be the same as the content of step S516 and step S517 in the first embodiment, which will not be repeated here. Moreover, after step S815 and step S816 are executed, the electronic device may continue to execute step S518 to step S520 as proposed in the first embodiment, which will not be described here, and may refer to the content of the first embodiment.
需要说明的是,Virtual AON Camera判断环境光亮度有大波动,再执行步骤S815和步骤S816,AON service可接收人脸检测事件。AON service还可将人脸检测事件向上层发送,以使得AOD应用可接收到人脸检测事件,并控制显示屏显示AOD显示界面。如此,可以实现即便利用前后两次人脸检测事件的上报时间之差较小,推断出用户持续位于显示屏前,但只要电子设备的所处环境的亮度产生变化,则可触发显示屏显示AOD显示界面。It should be noted that the Virtual AON Camera judges that there is a large fluctuation in the ambient light brightness, and then executes steps S815 and S816, and the AON service can receive face detection events. The AON service can also send the face detection event to the upper layer, so that the AOD application can receive the face detection event and control the display to display the AOD display interface. In this way, it can be realized that even if the difference between the reporting time of the two face detection events before and after is small, it can be inferred that the user continues to be in front of the display screen, but as long as the brightness of the environment where the electronic device is located changes, the display screen can be triggered to display AOD UI.
S817、Virtual AON Camera判断是否存在接近事件和远离事件的接收变化。S817. The Virtual AON Camera judges whether there is a receiving change of an approach event and a far event.
其中,Virtual AON Camera判断存在接近事件和远离事件的接收变化,则执行步骤S818和步骤S819。Virtual AON Camera判断没有存在接近事件和远离事件的接收变化,则执行步骤S820。Wherein, the Virtual AON Camera determines that there is a change in the reception of the approach event and the far event, and then executes steps S818 and S819. The Virtual AON Camera judges that there is no change in the reception of the approach event and the far event, and then executes step S820.
步骤S817、步骤S814和步骤S811可以理解成是并行执行。Step S817, step S814 and step S811 can be understood as being executed in parallel.
接近事件和远离事件的接收变化,可以理解成:从电子设备的人脸检测功能开启时刻开始,直到Virtual AON Camera通过步骤S808判断出人脸检测事件的上报时间和上一次人脸检测事件的上报时间的差值小于第二阈值的这段时间内,接近光传感器上报有接近事件,也上报有远离事件。The reception change of approaching event and far away event can be understood as: from the moment when the face detection function of the electronic device is turned on, until the Virtual AON Camera judges the reporting time of the face detection event and the report of the last face detection event through step S808 During the period when the time difference is smaller than the second threshold, the proximity light sensor reports a proximity event and also reports a distance event.
S818、Virtual AON Camera唤醒AP,并向AP发送记录的显示状态。S818. The Virtual AON Camera wakes up the AP and sends the recorded display status to the AP.
S819、Virtual AON Camera向AON service发送人脸检测事件。S819. The Virtual AON Camera sends a face detection event to the AON service.
其中,步骤S818和步骤S819的具体实现过程,可如实施例一的步骤S516和步骤S517的内容,此处不再赘述。并且,步骤S818和步骤S819执行完毕之后,电子设备可继续执行如实施例一提出的步骤S518至步骤S520,此处不展开说明,可参见实施例一的内容。Wherein, the specific implementation process of step S818 and step S819 may be the same as the content of step S516 and step S517 in the first embodiment, and will not be repeated here. Moreover, after step S818 and step S819 are executed, the electronic device may continue to execute step S518 to step S520 as proposed in the first embodiment, which will not be described here, and may refer to the content of the first embodiment.
需要说明的是,Virtual AON Camera判断存在接近事件和远离事件的接收变化,再执行步骤S818和步骤S819,AON service可接收人脸检测事件。AON service还可将人脸检测事件向上层发送,以使得AOD应用可接收到人脸检测事件,并控制显示屏显示AOD显示界面。如此,可以实现即便利用前后两次人脸检测事件的上报时间之差较小,推断出用户持续位于显示屏前,但只要电子设备有接近物靠近和远离,则可触发显示屏显示AOD显示界面。It should be noted that the Virtual AON Camera determines that there is a change in the reception of the approach event and the far event, and then executes steps S818 and S819, and the AON service can receive the face detection event. The AON service can also send the face detection event to the upper layer, so that the AOD application can receive the face detection event and control the display to display the AOD display interface. In this way, it can be realized that even if the difference between the reporting time of the two face detection events before and after is small, it can be inferred that the user continues to be in front of the display screen, but as long as the electronic device has a close object approaching or moving away, the display screen can be triggered to display the AOD display interface .
S820、Virtual AON Camera控制不上报人脸检测事件。S820, Virtual AON Camera control does not report face detection events.
其中,由人脸持续检测逃生模块来执行控制不上报人脸检测事件的步骤。Wherein, the face continuous detection escape module performs the step of controlling not to report the face detection event.
还需要说明的是,步骤S811至步骤S819可以为可选性执行的步骤。一些实施例中,Virtual AON Camera执行步骤S808,判断人脸检测事件的上报时间和上一次人脸检测事件的上报时间的差值小于第二阈值,可直接执行步骤S820。It should also be noted that steps S811 to S819 may be optional steps. In some embodiments, the Virtual AON Camera executes step S808 to determine that the difference between the reporting time of the face detection event and the reporting time of the last face detection event is less than the second threshold, and directly executes step S820.
还需要说明的是,在确定本次人脸检测事件的上报时间和上次人脸检测事件的上报时间之差小于第二阈值,不上报人脸检测事件的过程中,若检测到人手触摸显示屏的操作,可让电子设备的显示屏展示AOD显示界面。It should also be noted that, when the difference between the reporting time of this face detection event and the reporting time of the last face detection event is determined to be less than the second threshold and the face detection event is not reported, if a human hand is detected touching the display The operation of the screen can make the display screen of the electronic device display the AOD display interface.
本申请另一实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机或处理器上运行时,使得计算机或处理器执行上述任一个方法中的一个或多个步骤。Another embodiment of the present application also provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer or a processor, the computer or the processor executes any one of the above-mentioned methods. one or more steps.
计算机可读存储介质可以是非临时性计算机可读存储介质,例如,非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。The computer-readable storage medium may be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, among others.
本申请另一实施例还提供了一种包含指令的计算机程序产品。当该计算机程序产品在计算机或处理器上运行时,使得计算机或处理器执行上述任一个方法中的一个或多个步骤。Another embodiment of the present application also provides a computer program product including instructions. When the computer program product is run on the computer or the processor, the computer or the processor is made to perform one or more steps in any one of the above methods.

Claims (21)

  1. 一种熄屏显示的控制方法,其特征在于,包括:A control method for screen-off display, characterized in that it comprises:
    电子设备的显示屏处于灭屏状态时,所述电子设备启动人脸检测功能,并通过前置摄像头获取图像数据;When the display screen of the electronic device is in the off-screen state, the electronic device starts the face detection function and obtains image data through the front camera;
    所述电子设备识别图像数据包括全部或部分脸部图像;The electronic device identification image data includes all or part of the face image;
    所述电子设备确定本次识别到图像数据包括全部或部分脸部图像的时间,与前一次识别到图像数据包括全部或部分脸部图像的时间的差值不小于阈值时,所述电子设备的显示屏显示熄屏显示界面。When the electronic device determines that the time when the image data includes all or part of the face image is recognized this time, and the difference between the time when the image data is recognized that the image data includes all or part of the face image is not less than a threshold value, the electronic device's The display shows the screen-off display interface.
  2. 根据权利要求1所述的熄屏显示的控制方法,其特征在于,所述电子设备确定本次识别到图像数据包括全部或部分脸部图像的时间,与前一次识别到图像数据包括全部或部分脸部图像的时间的差值不小于阈值时,所述电子设备的显示屏显示熄屏显示界面,包括:The control method for screen-off display according to claim 1, wherein the electronic device determines the time when it recognizes that the image data includes all or part of the face image this time, which is different from the previous recognition that the image data includes all or part of the face image. When the time difference of the facial images is not less than the threshold, the display screen of the electronic device displays an off-screen display interface, including:
    所述电子设备确定人脸检测事件的上报时间,与前一次人脸检测事件的上报时间的差值不小于阈值时,所述电子设备的显示屏显示熄屏显示界面,所述人脸检测事件由所述电子设备识别图像数据包括全部或部分脸部图像而生成。The electronic device determines the reporting time of the face detection event, and when the difference between the reporting time of the previous face detection event and the reporting time of the previous face detection event is not less than the threshold, the display screen of the electronic device displays an off-screen display interface, and the face detection event The electronic device recognizes that the image data includes all or part of the face image and is generated.
  3. 根据权利要求1或2所述的熄屏显示的控制方法,其特征在于,还包括:The control method for screen-off display according to claim 1 or 2, further comprising:
    所述电子设备确定本次识别到图像数据包括全部或部分脸部图像,与前一次识别到图像数据包括全部或部分脸部图像的时间的差值小于阈值时,所述电子设备的显示屏维持灭屏状态。The electronic device determines that the image data includes all or part of the face image this time, and when the difference with the time when the image data was recognized last time includes all or part of the face image is less than a threshold, the display screen of the electronic device maintains Screen off status.
  4. 根据权利要求3所述的熄屏显示的控制方法,其特征在于,所述电子设备的显示屏维持灭屏状态之前,还包括:The control method for screen-off display according to claim 3, wherein before the display screen of the electronic device maintains the screen-off state, further comprising:
    所述电子设备确定所述电子设备持续处于静止状态。The electronic device determines that the electronic device is continuously in a static state.
  5. 根据权利要求4所述的熄屏显示的控制方法,其特征在于,还包括:The control method for screen-off display according to claim 4, further comprising:
    所述电子设备确定所述电子设备未持续处于静止状态,所述电子设备的显示屏显示熄屏显示界面。The electronic device determines that the electronic device is not continuously in a static state, and the display screen of the electronic device displays an off-screen display interface.
  6. 根据权利要求3或4所述的熄屏显示的控制方法,其特征在于,所述电子设备确定所述电子设备持续处于静止状态,包括:The control method for screen-off display according to claim 3 or 4, wherein the electronic device determines that the electronic device is continuously in a static state, comprising:
    所述电子设备确定所述电子设备在预定时间段内为同一姿态,所述预定时间段指代:所述人脸检测功能开启时刻,到本次识别到图像数据包括全部或部分脸部图像的时间,与前一次识别到图像数据包括全部或部分脸部图像的时间的差值不小于阈值的时间段。The electronic device determines that the electronic device is in the same posture within a predetermined period of time, and the predetermined period of time refers to: the moment when the face detection function is turned on, until the time when the image data includes all or part of the face image is recognized. Time, the time period in which the difference from the previous time when the image data includes all or part of the face image is not less than the threshold.
  7. 根据权利要求6所述的熄屏显示的控制方法,其特征在于,所述电子设备确定所述电子设备在预定时间段内为同一姿态,包括:The control method for screen-off display according to claim 6, wherein the electronic device determines that the electronic device is in the same posture within a predetermined period of time, comprising:
    所述电子设备利用加速度传感器的三轴检测数据,确定所述电子设备在预定时间段内为同一姿态。The electronic device determines that the electronic device is in the same posture within a predetermined period of time by using the three-axis detection data of the acceleration sensor.
  8. 根据权利要求3至7中任一项所述的熄屏显示的控制方法,其特征在于,所述电子设备的显示屏维持灭屏状态之前,还包括:The control method for screen-off display according to any one of claims 3 to 7, characterized in that before the display screen of the electronic device maintains the screen-off state, it further includes:
    所述电子设备确定所述电子设备所处环境的光亮维持稳定。The electronic device determines that the brightness of the environment where the electronic device is located remains stable.
  9. 根据权利要求8所述的熄屏显示的控制方法,其特征在于,还包括:The control method for screen-off display according to claim 8, further comprising:
    所述电子设备确定所述电子设备所处环境的光亮没有维持稳定,所述电子设备的显示屏显示熄屏显示界面。The electronic device determines that the light of the environment where the electronic device is located is not stable, and the display screen of the electronic device displays an off-screen display interface.
  10. 根据权利要求8或9所述的熄屏显示的控制方法,其特征在于,所述电子设备确定所述电子设备所处环境的光亮维持稳定,包括:The control method for screen-off display according to claim 8 or 9, wherein the electronic device determines that the light of the environment where the electronic device is located remains stable, comprising:
    所述电子设备通过环境光传感器检测环境光亮度;The electronic device detects ambient light brightness through an ambient light sensor;
    所述电子设备确定所述环境光传感器检测的环境光亮度在预定时间段内的维持稳定,所述预定时间段指代:所述人脸检测功能开启时刻,到本次识别到图像数据包括全部或部分脸部图像的时间,与前一次识别到图像数据包括全部或部分脸部图像的时间的差值不小于阈值的时间段。The electronic device determines that the brightness of the ambient light detected by the ambient light sensor remains stable within a predetermined period of time, and the predetermined period of time refers to: the moment when the face detection function is turned on, until this recognition image data includes all or the time of a partial face image, and the time period when the difference between the time when the image data includes all or part of the face image is not less than the threshold value.
  11. 根据权利要求3至10中任一项所述的熄屏显示的控制方法,其特征在于,所述电子设备的显示屏维持灭屏状态之前,还包括:The control method for screen-off display according to any one of claims 3 to 10, characterized in that before the display screen of the electronic device maintains the screen-off state, it further includes:
    所述电子设备确定所述电子设备未检测到物体靠近和远离的变化。The electronic device determines that the electronic device does not detect changes in object approach and distance.
  12. 根据权利要求11所述的熄屏显示的控制方法,其特征在于,还包括:The control method for screen-off display according to claim 11, further comprising:
    所述电子设备确定所述电子设备检测到物体靠近和远离的变化,所述电子设备的显示屏显示熄屏显示界面。The electronic device determines that the electronic device detects the change of the object approaching and moving away, and the display screen of the electronic device displays a screen-off display interface.
  13. 根据权利要求11或12所述的熄屏显示的控制方法,其特征在于,所述电子设备确定所述电子设备未检测到物体靠近和远离的变化,包括:The control method for screen-off display according to claim 11 or 12, wherein the electronic device determines that the electronic device does not detect changes in the approach and distance of objects, including:
    所述电子设备通过接近光传感器检测物体,得到上报事件;The electronic device detects an object through a proximity light sensor, and obtains a reported event;
    所述电子设备确定所述上报事件在预定时间段内持续为远离事件,或在预定时间段内持续为接近事件,所述预定时间段指代:所述人脸检测功能开启时刻,到本次识别到图像数据包括全部或部分脸部图像的时间,与前一次识别到图像数据包括全部或部分脸部图像的时间的差值不小于阈值的时间段。The electronic device determines that the reported event continues to be a far away event within a predetermined time period, or continues to be an approach event within a predetermined time period, and the predetermined time period refers to: the moment when the face detection function is turned on, until this time A time period in which the difference between the time when it is recognized that the image data includes all or part of the face image and the time when the previous time when it was recognized that the image data includes all or part of the face image is not less than a threshold value.
  14. 根据权利要求1至13中任一项所述的熄屏显示的控制方法,其特征在于,所述电子设备的处理器包括智能传感集线器sensor hub,所述sensor hub包括:AON模块;所述电子设备的显示屏处于灭屏状态时,所述电子设备启动人脸检测功能,包括:The control method for screen-off display according to any one of claims 1 to 13, wherein the processor of the electronic device includes an intelligent sensor hub sensor hub, and the sensor hub includes: an AON module; When the display screen of the electronic device is in the off-screen state, the electronic device starts the face detection function, including:
    所述电子设备的显示屏处于灭屏状态时,所述电子设备启动AON模块执行人脸检测功能。When the display screen of the electronic device is in the off-screen state, the electronic device starts the AON module to perform the face detection function.
  15. 根据权利要求1至14中任一项所述的熄屏显示的控制方法,其特征在于,所述电子设备的处理器包括:虚拟摄像头单元Virtual AON Camera;所述电子设备的显示屏处于灭屏状态时,所述电子设备启动人脸检测功能,包括:The control method for screen-off display according to any one of claims 1 to 14, wherein the processor of the electronic device comprises: a virtual camera unit Virtual AON Camera; the display screen of the electronic device is in the screen-off state state, the electronic device starts the face detection function, including:
    所述Virtual AON Camera确定所述显示屏处于灭屏状态时,启动人脸检测功能。When the Virtual AON Camera determines that the display screen is in an off-screen state, it starts the face detection function.
  16. 根据权利要求15所述的熄屏显示的控制方法,其特征在于,所述Virtual AON Camera确定所述显示屏处于灭屏状态时,启动人脸检测功能之前,还包括:The control method for screen-off display according to claim 15, wherein the Virtual AON Camera further comprises:
    所述Virtual AON Camera接收所述显示屏的显示状态,并记录所述显示屏的显示状态。The Virtual AON Camera receives the display state of the display screen and records the display state of the display screen.
  17. 根据权利要求15所述的熄屏显示的控制方法,其特征在于,所述Virtual AON Camera确定所述显示屏处于灭屏状态时,启动人脸检测功能之后,还包括:The control method for screen-off display according to claim 15, wherein when the Virtual AON Camera determines that the display screen is in the screen-off state, after starting the face detection function, it also includes:
    所述Virtual AON Camera确定所述图像数据包括部分或全部图像数据时,唤醒所述电子设备的应用处理器,并向所述应用处理器发送所述显示屏的显示状态。When the Virtual AON Camera determines that the image data includes part or all of the image data, it wakes up the application processor of the electronic device, and sends the display status of the display screen to the application processor.
  18. 根据权利要求1至17中任一项所述的熄屏显示的控制方法,其特征在于,所述电子设备确定本次识别到图像数据包括全部或部分脸部图像的时间,与前一次识别到图像数据包括全部或部分脸部图像的时间的差值不小于阈值时,所述电子设备的显示屏显示熄屏显示界面之后,还包括:The control method for screen-off display according to any one of claims 1 to 17, wherein the electronic device determines that the time when the image data is recognized this time includes all or part of the face image is different from the time when it was recognized that the image data included all or part of the face image in the previous time. When the time difference between the image data including all or part of the facial images is not less than the threshold, after the display screen of the electronic device displays the screen-off display interface, it also includes:
    所述电子设备判断所述显示屏处于非灭屏状态时,关闭人脸检测功能。When the electronic device judges that the display screen is in a non-off state, the face detection function is turned off.
  19. 根据权利要求1至17中任一项所述的熄屏显示的控制方法,其特征在于,所述电子设备启动人脸检测功能之前,还包括:The control method for screen-off display according to any one of claims 1 to 17, characterized in that, before the electronic device starts the face detection function, it also includes:
    所述电子设备确定所述电子设备满足预设条件;其中,所述预设条件包括所述电子设备的显示屏不处于向下的姿态,所述电子设备所处环境的亮度不小于第一阈值,以及所述电子设备未检测到物体靠近。The electronic device determines that the electronic device satisfies a preset condition; wherein the preset condition includes that the display screen of the electronic device is not in a downward posture, and the brightness of the environment where the electronic device is located is not less than a first threshold , and the electronic device does not detect an object approaching.
  20. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    一个或多个处理器、存储器、显示屏和前置摄像头;one or more processors, memory, displays and front-facing cameras;
    所述存储器和所述显示屏、以及所述前置摄像头与所述一个或多个所述处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述一个或多个处理器执行所述计算机指令时,所述电子设备执行如权利要求1至19任意一项所述的熄屏显示的控制方法。The memory, the display screen, and the front camera are coupled to the one or more processors, the memory is used to store computer program codes, and the computer program codes include computer instructions, when the When one or more processors execute the computer instructions, the electronic device executes the screen-off display control method according to any one of claims 1-19.
  21. 一种计算机存储介质,其特征在于,用于存储计算机程序,所述计算机程序被执行时,具体用于实现如权利要求1至19任意一项所述的熄屏显示的控制方法。A computer storage medium, which is characterized in that it is used to store a computer program, and when the computer program is executed, it is specifically used to implement the control method for screen-off display according to any one of claims 1 to 19.
PCT/CN2022/138948 2022-01-10 2022-12-14 Always on display control method, electronic device, and storage medium WO2023130927A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210021719.8 2022-01-10
CN202210021719.8A CN116450068A (en) 2022-01-10 2022-01-10 Control method for screen-off display, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2023130927A1 true WO2023130927A1 (en) 2023-07-13

Family

ID=87073071

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/138948 WO2023130927A1 (en) 2022-01-10 2022-12-14 Always on display control method, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN116450068A (en)
WO (1) WO2023130927A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106557292A (en) * 2016-11-11 2017-04-05 珠海市魅族科技有限公司 Method for information display and device
CN108509037A (en) * 2018-03-26 2018-09-07 维沃移动通信有限公司 A kind of method for information display and mobile terminal
CN110658906A (en) * 2019-08-30 2020-01-07 华为技术有限公司 Display method and electronic equipment
CN112671976A (en) * 2019-09-30 2021-04-16 华为技术有限公司 Control method of electronic equipment and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106557292A (en) * 2016-11-11 2017-04-05 珠海市魅族科技有限公司 Method for information display and device
CN108509037A (en) * 2018-03-26 2018-09-07 维沃移动通信有限公司 A kind of method for information display and mobile terminal
CN110658906A (en) * 2019-08-30 2020-01-07 华为技术有限公司 Display method and electronic equipment
CN112671976A (en) * 2019-09-30 2021-04-16 华为技术有限公司 Control method of electronic equipment and electronic equipment

Also Published As

Publication number Publication date
CN116450068A (en) 2023-07-18

Similar Documents

Publication Publication Date Title
EP3872807B1 (en) Voice control method and electronic device
CN110708086B (en) Split-screen display method and electronic equipment
WO2021052263A1 (en) Voice assistant display method and device
US20220350450A1 (en) Processing Method for Waiting Scenario in Application and Apparatus
WO2021000881A1 (en) Screen splitting method and electronic device
US20220044043A1 (en) Integrated circuit and sensor data processing method
CN111316199B (en) Information processing method and electronic equipment
WO2021147396A1 (en) Icon management method and smart terminal
CN110839096A (en) Touch method of equipment with folding screen and folding screen equipment
WO2023000772A1 (en) Mode switching method and apparatus, electronic device and chip system
US20230195309A1 (en) Method and apparatus for adjusting memory configuration parameter
WO2024016564A1 (en) Two-dimensional code recognition method, electronic device, and storage medium
WO2022053006A1 (en) Proximity light sensor control method and related device
CN113220176B (en) Display method and device based on widget, electronic equipment and readable storage medium
WO2021249281A1 (en) Interaction method for electronic device, and electronic device
WO2023130927A1 (en) Always on display control method, electronic device, and storage medium
WO2023130929A1 (en) Always-on display control method, electronic device and storage medium
WO2023130928A1 (en) Always-on display control method, electronic device and medium
WO2023020048A1 (en) Outer screen display method and electronic device
WO2022089216A1 (en) Interface display method and electronic device
CN115206308A (en) Man-machine interaction method and electronic equipment
CN116700585B (en) Screen-off control method, electronic equipment and storage medium
EP4287605A1 (en) Working mode switching control method, electronic device, and readable storage medium
WO2024032014A1 (en) Method for reducing device power consumption, electronic device and medium thereof
WO2022188511A1 (en) Voice assistant wake-up method and apparatus

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: 22918375

Country of ref document: EP

Kind code of ref document: A1