Message processing method, electronic device, and readable storage medium
By identifying the user's eye movement data, electronic devices realize contactless interactive operations, solving the inconvenience of traditional interaction methods when they cannot be touched, and improving operational convenience and user experience.
Patent Information
- Application Number
- PCT/CN2023/134729
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-27
- Filing Date
- 2023-11-28
- Publication Date
- 2024-09-06
AI Technical Summary
In electronic devices, when the user cannot touch, the traditional touch control interaction method becomes inconvenient, especially when sliding or clicking operations are required, especially when operating with one hand, it is difficult to achieve effective interaction.
By identifying the user's eye movements, the user's gaze point coordinates and gaze duration are determined, and the target image sensor is used to collect eye image data to implement eye movement-based interactive operations, such as expanding or folding notification messages, or even on the lock screen interface. Unlocked.
It achieves contactless and convenient human-computer interaction, improving the operational convenience and user experience of electronic devices, especially when the device cannot be touched.
Smart Images

Figure CN2023134729_06092024_PF_FP
Abstract
Description
Message processing method, electronic device, and readable storage medium
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on February 27, 2023, with application number 202310212372X and invention name “A message processing method, electronic device and readable storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of intelligent interaction technology, and in particular to a message processing method, an electronic device, and a readable storage medium. Background Art
[0003] When an electronic device receives a notification message, the electronic device will display it in an area designated for displaying notification messages, such as the lock screen interface or the pull-down notification bar on the main interface of the mobile phone.
[0004] When the content of the notification message is too much, the electronic device will display the beginning part of the notification message in the designated area. After that, the electronic device detects that the user clicks on the notification message and displays the complete message content. Alternatively, when the user is watching a short video or reading a news page, they need to slide the electronic device to turn the page. The above process of user interaction with the electronic device needs to be implemented through touch control. In the case where some users cannot touch the electronic device, the touch-controlled interactive operation brings inconvenience to people.
[0005] Summary of the Invention
[0006] In view of this, the present application provides a message processing method, an electronic device and a readable storage medium, which can determine the user's gaze point coordinates and gaze duration by identifying the user's eye movements, and determine the notification messages that the user is interested in based on the gaze point coordinates and gaze duration, and perform interactions on the notification messages corresponding to the eye movement recognition data, so that the user can interact with the electronic device without contact, thereby improving the convenience of human-computer interaction.
[0007] In the first aspect, the message processing method provided by the present application is applied to an electronic device. A first interface is displayed in the electronic device, and the first interface includes a notification message. Afterwards, the electronic device collects first image data through a target image sensor, and the first image data includes an eye image of the user. The electronic device can determine the user's first eye movement data based on the user's first image data, and the first eye movement data includes first gaze point coordinates and first gaze duration. When the user gazes at the notification message in the first interface, the first gaze point coordinates determined by the electronic device are located in the display area of the notification message, and the first gaze duration is greater than the first preset duration threshold. At this time, it indicates that the user is interested in viewing the notification message, so the electronic device can display a second interface, which is the display interface of the application corresponding to the notification message.
[0008] In the above message processing method, the electronic device can determine the coordinates of the user's gaze point on the display screen and the duration of the gaze by collecting and recognizing the user's eye images. The electronic device can then determine whether the user intends to act on the notification message on the display based on the user's gaze point and gaze duration, thereby enabling interactive actions on the notification message based on the user's eye movements. In this way, users can more conveniently and contactlessly interact with electronic devices through eye movements.
[0009] In one possible implementation of the first aspect, the electronic device displays a first interface as follows: First, the third interface is displayed. The third interface includes a folded long notification message, where the number of characters in the long notification message exceeds a preset character threshold. Next, second image data is captured using a target image sensor, where the second image data includes an image of the user's eyes. Second eye movement data of the user is then determined based on the second image data; the second eye movement data includes second gaze point coordinates and a second gaze duration. Finally, in response to the second gaze point coordinates being within the display area of the long notification message and the second gaze duration exceeding a second preset duration threshold, the first interface is displayed, where the first interface includes the expanded long notification message.
[0010] In the above-mentioned message processing method, the long notification message is folded and displayed in the third interface to ensure effective information display in a limited interface, avoid the lengthy content in the long notification message from being displayed in the third interface, and thus improve the display effect. By collecting the second image data, the electronic device can determine the user's intention to view the long notification message. If the user stares at the folded long notification message for a long time, it can be determined that the user wants to view the long notification message. Therefore, the electronic device can display the first interface when the coordinates of the second gaze point are located in the display area of the long notification message and the second gaze time is greater than the second preset time threshold. The first interface includes the long notification message in the expanded state.
[0011] In one possible implementation of the first aspect, after the electronic device displays the first interface, it may capture third image data using a target image sensor, the third image data including an image of the user's eyes. The electronic device then determines third eye movement data of the user based on the third image data, the third eye movement data including third gaze point coordinates and third gaze duration. Finally, in response to the third gaze point coordinates being outside the display area of the long notification message on the first interface, the electronic device displays a fourth interface, the fourth interface including the long notification message in a collapsed state, or the fourth interface excluding the long notification message.
[0012] In the above-described message processing method, after displaying the first interface, the electronic device can determine the user's interest in reading the notification message based on the third gaze point coordinates and the third gaze duration determined by the third image data. If the third gaze point coordinates are outside the display area of the long notification message on the first interface, it can indicate that the user is no longer interested in reading the notification message. The electronic device can then continue to display the long notification message in a collapsed state on the fourth interface. Alternatively, the electronic device can remove the long notification message from the displayed fourth interface.
[0013] In a possible implementation of the first aspect, in response to the first gaze point coordinates being outside the display area of the notification message, the electronic device may further display a fifth interface after a first preset time period, and the fifth interface does not include the notification message.
[0014] If the coordinates of the first gaze point are detected to be outside the display area of the notification message, the electronic device can determine that the user no longer intends to read the notification message in the first display interface. In this case, the electronic device can display the fifth interface that does not include the notification message, so as to avoid repeatedly displaying the message that has been read.
[0015] In one possible implementation of the first aspect, an electronic device includes a time-of-flight (TOF) image sensor and an RGB image sensor. Accordingly, the electronic device may first obtain the current ambient light brightness, and in response to the current ambient light brightness being greater than a first preset brightness threshold, control the RGB image sensor to capture first RGB image data; and in response to the current ambient light brightness being less than or equal to the first preset brightness threshold, control the TOF image sensor to capture the first TOF image data. Image data captured by a TOF image sensor is more accurate in dim light, while image data captured by an RGB image sensor is more accurate in bright light. Therefore, the electronic device can select an appropriate target image sensor based on the current ambient light brightness, thereby accurately capturing the first image data using the target image sensor.
[0016] In a possible implementation of the first aspect, in response to the current ambient light brightness being greater than a first preset brightness threshold, after controlling the RGB image sensor to capture first RGB image data, the electronic device may further determine whether the user's eyes are covered by a reflective object, and switch the operating states of the RGB image data and the TOF image sensor based on the determination result. If it is determined based on the first RGB image data that the user's eyes are not covered by a reflective object, the RGB image sensor is controlled to be turned off, and the TOF image sensor is controlled to be turned on to capture the first image data, thereby ensuring the accuracy of the image data captured by the image sensor.
[0017] In one possible implementation of the first aspect, the electronic device includes a time-of-flight (TOF) image sensor and an RGB image sensor. The electronic device may first control the RGB image sensor to capture first RGB image data and the TOF image sensor to capture first TOF image data. If, based on the first RGB image data and / or the first TOF image data, it is determined that the user's eyes are covered by a reflective object, the electronic device may obtain the current ambient light brightness. Subsequently, in response to the current ambient light brightness being greater than a first preset brightness threshold, the electronic device may control the TOF image sensor to shut down, thereby enabling the target image sensor to accurately capture the first image data.
[0018] In one possible implementation of the first aspect, the electronic device may further determine an eye movement calibration result to ensure accurate eye movement recognition based on the eye movement calibration result. Specifically, the electronic device displays a sixth interface, which includes at least one calibration location. The electronic device captures fourth image data via a target image sensor and determines the coordinates of a fourth gaze point of the user based on the fourth image data. The electronic device may then determine the eye movement calibration result based on the error between the coordinates of the calibration location and the coordinates of the fourth gaze point.
[0019] In one possible implementation of the first aspect, the electronic device includes a time-of-flight (TOF) image sensor and an RGB image sensor. During the process of obtaining eye movement calibration results, the electronic device may control the TOF image sensor to collect second TOF image data, and control the RGB image sensor to collect second RGB image data. By jointly collecting image data using the two image sensors, the accuracy of the eye movement calibration results can be ensured, and errors can be avoided.
[0020] In one possible implementation of the first aspect, during the process of obtaining eye movement calibration results, the electronic device may connect the TOF image sensor and the RGB image sensor via a connecting cable to ensure that the TOF image sensor and the RGB image sensor can synchronously collect data and improve the accuracy of the eye movement calibration results. The connecting cable is configured to transmit a synchronization signal, so that the TOF image sensor and the RGB image sensor synchronously collect image data based on the synchronization signal.
[0021] In one possible implementation of the first aspect, an electronic device includes a hardware abstraction layer (HAL) and a hardware layer; the HAL layer includes a smart perception control module and a smart perception management (TA); the hardware layer includes secure memory for storing image data captured by a target image sensor; and the smart perception management (TA) runs in a trusted execution environment. The electronic device determines a user's first gaze movement data based on first image data of the user, including: the smart perception control module obtaining a file descriptor describing the storage location of the first image data in the electronic device; the smart perception management (TA) obtaining the first image data from the secure memory based on the file descriptor; the smart perception management (TA) encrypting the first image data and sending the encrypted first image data to the smart perception control module; and the smart perception control module decrypting the encrypted first image data and determining the first gaze movement data based on the first image data. To ensure the security of image data during transmission, the smart perception management (TA) encrypts the image data before sending it to the smart perception control module. Alternatively, the smart perception management (TA) determines the first gaze movement data based on the first image data and sends the first gaze movement data to the smart perception control module. Having the smart perception management (TA) running in a trusted execution environment determine the gaze movement data can also prevent image data from being corrupted during transmission.
[0022] In another possible implementation of the first aspect, the electronic device further includes a kernel layer; the HAL layer further includes a camera hardware abstraction layer HAL, the camera HAL includes a sensor node, the kernel layer further includes a camera driver, and the hardware layer further includes at least one image sensor and corresponding registers, wherein the at least one image sensor is provided in one or more cameras. When the electronic device collects first image data through a target image sensor, the following process may be used: first, the sensor node obtains an identifier and configuration parameters of the target image sensor to be controlled; the sensor node sends the identifier and configuration parameters of the target image sensor to the camera driver; the camera driver configures the configuration data of the target image sensor in the register of the target image sensor based on the identifier of the target image sensor; the camera driver sends a message indicating that data configuration is complete to the sensor node; the sensor node sends a first startup command to the camera driver based on the message indicating that data configuration is complete; the camera driver sends a second startup command to the target image sensor; the target image sensor obtains the configuration parameters of the target image sensor from the register based on the second startup command, and collects image data based on the configuration parameters.
[0023] In the above method, the sensor node can obtain the target image sensor's identification and configuration parameters based on the request sent by the intelligent perception control module. The electronic device can then configure and activate the target image sensor based on the identification and configuration parameters, thereby ensuring that the target image sensor can collect image data.
[0024] In a possible implementation of the first aspect, the electronic device further includes an application layer and a framework layer; the application layer includes a system user interface UI, and the framework layer includes the smart perception service. After displaying the first interface, the electronic device can create a path to the image sensor by the following method: first, the system UI sends a smart perception registration request to the smart perception service; the smart perception registration request is used to start the eye movement recognition or eye movement calibration process. Afterwards, the smart perception service sends a smart perception process call request to the smart perception control module based on the smart perception registration request; the smart perception process call request includes the identifier and configuration parameters of the target image sensor. Finally, the smart perception control module creates a path to the target image sensor based on the identifier and configuration parameters of the target image sensor.
[0025] In a possible implementation of the first aspect, the framework layer also includes a camera service. The electronic device creates a path for the target image sensor by first controlling the camera service to receive a path creation request for the target image sensor sent by the smart perception control module; the path creation request includes the identifier and configuration parameters of the target image sensor; the camera service sends the identifier and configuration parameters of the target image sensor to the camera HAL; the camera HAL creates a path for the target image sensor based on the identifier of the target image sensor; the camera HAL returns a result of successful path creation for the target image sensor to the camera service; the camera service returns a path creation result for the target image sensor to the smart perception control module based on the received result of successful path creation for the target image sensor. The smart perception control module first sends a path creation request to the camera service so that the camera service can send the identifier and configuration parameters of the target image sensor included in the path creation request to the camera HAL to achieve path creation for the target image sensor.
[0026] In a possible implementation of the first aspect, the intelligent perception control module obtains a file descriptor, including: the intelligent perception control module sends a data request to the camera service, where the data request is used to obtain a file descriptor; the camera service calls the camera HAL to obtain the file descriptor according to the data request; and the camera service sends the file descriptor to the intelligent perception control module.
[0027] In a second aspect, the present application provides an electronic device, which includes a display screen, a camera, a memory, and one or more processors; the display screen, the camera, the memory, and the processor are coupled; the camera includes a time-of-flight TOF image sensor and an RGB image sensor; the display screen is used to display images generated by the processor, the camera is used to capture images, and the memory is used to store computer program code, and the computer program code includes computer instructions; when the processor executes the computer instructions, the electronic device executes the method as in the first aspect and any possible design method thereof.
[0028] In a third aspect, the present application provides a readable storage medium comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method of the first aspect and any possible design thereof.
[0029] In a fourth aspect, the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the method of the first aspect and any possible design thereof.
[0030] It can be understood that the method of the first aspect, the electronic device of the second aspect, the readable storage medium of the third aspect, and the computer program product of the fourth aspect provided above are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] FIG1 is a schematic diagram of a one-handed operation provided by an embodiment of the present application;
[0032] FIG2 is a schematic diagram of an electronic device provided in an embodiment of the present application;
[0033] FIG3 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0034] FIG4 is a software structure block diagram of an electronic device provided in an embodiment of the present application;
[0035] FIG5 is a schematic diagram of interaction between software modules provided in an embodiment of the present application;
[0036] FIG6 is a display diagram provided in an embodiment of the present application;
[0037] FIG7 is another display diagram provided in an embodiment of the present application;
[0038] FIG8 is a schematic diagram of an eye movement interaction setting interface provided in an embodiment of the present application;
[0039] FIG9 is a signal interaction diagram of an eye movement calibration provided by an embodiment of the present application;
[0040] FIG10 is a schematic diagram of an eye movement interaction provided by an embodiment of the present application;
[0041] FIG11 is a schematic diagram of another eye movement interaction provided in an embodiment of the present application;
[0042] FIG12 is a schematic diagram of another eye movement interaction provided in an embodiment of the present application;
[0043] FIG13 is a signal interaction diagram of eye movement recognition provided by an embodiment of the present application;
[0044] FIG14 is a schematic diagram of another eye movement interaction provided in an embodiment of the present application;
[0045] FIG15 is another display diagram provided in an embodiment of the present application;
[0046] FIG16 is a schematic diagram of a lock screen interface provided in an embodiment of the present application;
[0047] FIG17 is a flow chart of a message processing method provided in an embodiment of the present application;
[0048] FIG18 is a schematic diagram of an eye movement interaction provided by an embodiment of the present application;
[0049] FIG19 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
[0051] To make the following embodiments clear and concise, a brief introduction to related concepts or technologies is first given:
[0052] Rich execution environment (REE), also known as rich execution environment, common execution environment or untrusted execution environment, refers to the system running environment of the mobile terminal, in which can run, for example, REE has good openness and scalability.
[0053] A trusted execution environment (TEE), also known as a secure side or security zone, is an area that requires authorization to access. A TEE is an independent, secure area established within the processor through hardware resource isolation. The TEE and REE coexist in the operating environment of electronic devices, but the TEE and REE are completely isolated in hardware. The TEE has its own operating space and strict protection measures, resulting in a higher level of security than the REE. The REE cannot access TEE-related resources, enabling the TEE to protect the code and information within the TEE and resist attacks from the REE side, thereby resisting security threats.
[0054] The REE+TEE architecture combines TEE and REE to provide services for applications. In other words, the TEE and REE coexist in electronic devices. For example, the TEE, supported by hardware, can operate in isolation from the REE. The TEE has its own operating space, offering a higher level of security than the REE, protecting assets within the TEE (such as data and software) from software attacks. Only authorized security software can execute within the TEE, which also protects the confidentiality of the security software's resources and data. Compared to the REE, the TEE can better protect the security of data and resources due to its protection mechanisms such as isolation and permission control.
[0055] A trusted application (TA) is an application running in the TEE that can provide security services to the client application (CA) running in the REE, such as key generation and key management, secure authentication, intelligent perception, and other security tasks.
[0056] CA usually refers to an application running in REE, which can call TA through the client application programming interface (API) and instruct TA to perform corresponding security operations.
[0057] When users use electronic devices such as mobile phones, tablet computers, and televisions, they often need to interact with the electronic devices to control them. Users can interact with electronic devices through physical buttons, such as pressing physical buttons on a mobile phone or pressing a keyboard connected to a computer. Users can also interact with electronic devices through touch, such as using a mobile phone to touch, click, or slide the touch screen of the mobile phone. However, these interaction methods all require the user to touch the electronic device in order to interact. If the user cannot touch the electronic device, the user cannot interact with the electronic device. In addition, when a user operates an electronic device with one hand, for example, as shown in FIG1 , after holding a mobile phone of a certain size in one hand, the user can only touch area a on the touch screen with his thumb or finger, and cannot click, slide, or perform other operations on area b.
[0058] To this end, the present application provides a message processing method. By collecting and identifying images of the user's eyes, the electronic device can determine the coordinates of the user's gaze point on the display screen and the duration of the gaze. Afterwards, the electronic device can determine whether the user wants to operate the notification message on the display interface based on the user's gaze point and gaze duration, thereby realizing interactive operations on the notification message based on the user's eye movements. In this way, the user can perform a more convenient contactless human-computer interaction process on the electronic device through eye movements.
[0059] The message processing method provided in the embodiment of the present application can be applied to the electronic device 100. For example, as shown in FIG2 , the electronic device 100 can be a mobile phone 21, a tablet computer 22, a smart screen 23, a laptop computer 24, a vehicle-mounted device, a wearable device (such as a smart watch), an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), an artificial intelligence device, or other terminal device with a display function. The operating system installed on the electronic device 100 includes but is not limited to This application does not limit the specific type of the electronic device 100 or the installed operating system.
[0060] 3 shows a schematic structural diagram of the electronic device 100. The electronic device 100 may include a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, an antenna 1, an antenna 2, a mobile communication module 350, a wireless communication module 360, an audio module 370, a speaker 370A, a receiver 370B, a microphone 370C, an earphone interface 370D, a sensor module 380, a button 390, a motor 391, an indicator 392, a camera 393, a display 394, and a subscriber identification module (SIM) card interface 395.
[0061] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0062] The processor 310 may include one or more processing units. For example, the processor 310 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0063] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0064] Processor 310 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 310 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 310. If processor 310 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 310 latency, and thus improves system efficiency.
[0065] In some embodiments, the processor 310 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0066] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 310 may include multiple I2C bus lines. The processor 310 may be coupled to the touch sensor 380K, the charger, the flash, the camera 393, and the like via different I2C bus interfaces. For example, the processor 310 may be coupled to the touch sensor 380K via the I2C interface, enabling communication between the processor 310 and the touch sensor 380K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.
[0067] The MIPI interface can be used to connect the processor 310 to peripheral devices such as the display screen 394 and the camera 393. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 310 and the camera 393 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 310 and the display screen 394 communicate via the DSI interface to implement the display function of the electronic device 100.
[0068] The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 310 to the camera 393, the display 394, the wireless communication module 360, the audio module 370, the sensor module 380, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0069] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0070] The charging management module 340 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 340 can receive charging input from the wired charger via the USB interface 330. In some wireless charging embodiments, the charging management module 340 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 342, the charging management module 340 can also provide power to the electronic device via the power management module 341.
[0071] The power management module 341 is used to connect the battery 342, the charging management module 340, and the processor 310. The power management module 341 receives input from the battery 342 and / or the charging management module 340 and provides power to the processor 310, the internal memory 321, the external memory, the display 394, the camera 393, and the wireless communication module 360. The power management module 341 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 341 can also be set in the processor 310. In other embodiments, the power management module 341 and the charging management module 340 can also be set in the same device.
[0072] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 350, the wireless communication module 360, the modem processor and the baseband processor.
[0073] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0074] The mobile communication module 350 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for the electronic device 100. The mobile communication module 350 may include at least one filter, a switch, a power amplifier, a low-noise amplifier (LNA), and the like. The mobile communication module 350 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module 350 can also amplify the signals modulated by the modem processor and convert them into electromagnetic waves for radiation via the antenna 1.
[0075] The wireless communication module 360 can provide wireless communication solutions for application on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.
[0076] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 350 , and antenna 2 is coupled to wireless communication module 360 , so that electronic device 100 can communicate with the network and other devices through wireless communication technology.
[0077] Electronic device 100 implements display functionality through a GPU, display screen 394, and an application processor. A GPU is a microprocessor for image processing that connects display screen 394 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 310 may include one or more GPUs that execute program instructions to generate or modify display information.
[0078] Display screen 394 is used to display images, videos, etc. Display screen 394 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 (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 394, where N is a positive integer greater than one.
[0079] The electronic device 100 can implement a shooting function through an ISP, a camera 393, a video codec, a GPU, a display screen 394, and an application processor. The ISP is used to process data fed back by the camera 393. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing and converting it into an image visible to the naked eye. The ISP can also perform algorithmic optimization on image noise, brightness, and skin color. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 393.
[0080] The camera 393 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 393, where N is a positive integer greater than 1.
[0081] The camera 393 may include a time of flight (TOF) camera, an RGB camera, and the like.
[0082] Among them, the TOF camera uses near-infrared light that is invisible to the human eye and receives light reflected by objects. The time difference or phase difference between the emission and reflection of the light is used to convert the distance of the photographed scene to form distance depth data. The RGB camera, that is, a red (R), green (G), and blue (B) three-color camera, can obtain an image including multiple colors by changing the three color channels of red (R), green (G), and blue (B) and superimposing them on each other. In an embodiment of the present application, the TOF camera and the RGB camera are used to collect the user's eye image. For example, when the electronic device realizes the eye movement interaction function, the TOF camera and / or the RGB camera can be controlled to collect images, and then eye movement recognition or calibration and other operations are performed based on the collected images to realize the eye movement interaction function.
[0083] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0084] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 3, MPEG2, MPEG3, and MPEG4.
[0085] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, intelligent perception, speech recognition, and text comprehension.
[0086] The external memory interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 310 via the external memory interface 320 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0087] The internal memory 321 can be used to store computer executable program codes, which include instructions. The processor 310 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 321. The internal memory 321 can include a program storage area and a data storage area.
[0088] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 370, the speaker 370A, the microphone 370C, the headphone jack 370D, and the application processor.
[0089] The sensor module 380 in the electronic device may include a pressure sensor 380A, a gyroscope sensor 380B, an acceleration sensor 380E, a distance sensor 380F, a fingerprint sensor 380H, a touch sensor 380K, an ambient light sensor 380L, and the like.
[0090] Pressure sensor 380A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 380A can be located on display screen 394. There are many types of pressure sensors 380A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force is applied to pressure sensor 380A, the capacitance between the electrodes changes. Electronic device 100 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 394, electronic device 100 detects the intensity of the touch operation based on pressure sensor 380A. Electronic device 100 can also calculate the location of the touch based on the detection signal from pressure sensor 380A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, a command to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, a command to create a new short message is executed.
[0091] The gyroscope sensor 380B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 380B. The gyroscope sensor 380B can be used for shooting anti-shake. For example, when the shutter is pressed, the gyroscope sensor 380B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 380B can also be used for navigation and somatosensory game scenes.
[0092] Accelerometer 380E can detect the magnitude of acceleration of electronic device 100 in all directions (generally three axes). When electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.
[0093] The distance sensor 380F is used to measure distance. The electronic device 100 can measure distance using infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 380F to measure distance to achieve fast focusing.
[0094] Ambient light sensor 380L is used to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 394 based on the perceived ambient light brightness. Ambient light sensor 380L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 380L can also work with proximity light sensor 380G to detect whether electronic device 100 is in a pocket to prevent accidental touches.
[0095] The fingerprint sensor 380H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0096] The touch sensor 380K is also called a "touch panel." The touch sensor 380K can be set on the display screen 394. The touch sensor 380K and the display screen 394 form a touch screen, also called a "touch screen." The touch sensor 380K is used to detect touch operations acting on or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 394. In other embodiments, the touch sensor 380K can also be set on the surface of the electronic device 100, at a different location from the display screen 394.
[0097] The buttons 390 include a power button, a volume button, and the like. The buttons 390 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.
[0098] Motor 391 can generate vibration prompts. Motor 391 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 394, motor 391 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0099] Indicator 392 can be an indicator light, which can be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0100] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.
[0101] FIG4 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present invention.
[0102] The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system may include, for example, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, a hardware abstraction layer (HAL) and a kernel layer. It should be noted that the embodiments of the present application are illustrated by taking the Android system as an example. In other operating systems (such as Hongmeng system, IOS system, etc.), as long as the functions implemented by each functional module are similar to those of the embodiments of the present application, the solutions of the present application can also be implemented.
[0103] The application layer can include a series of application packages.
[0104] As shown in FIG4 , the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, settings, system user interface (UI), music, and short message.
[0105] Among them, the settings application can turn on or off the smart perception function. In response to the user's operation of turning on the smart perception function in the settings application, the electronic device can collect images and identify the user's eye movement data from the collected images, so as to achieve eye movement interaction based on the user's eye movement data. Optionally, in response to the user's operation of turning on the smart perception function in the settings application, the electronic device can display a guidance interface for eye movement calibration. The guidance interface may include guidance text information and guidance images or symbols for guiding the user to complete the eye movement calibration process, so as to guide the user to complete the specified eye movement according to the guidance text information and the guidance image or symbol guidance interface. After that, the electronic device can complete the eye movement calibration process according to the specified eye movement completed by the user.
[0106] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0107] As shown in Figure 4, the application framework layer may include a window manager, a content provider, a view system, a resource manager, a notification manager, an intelligent perception service, a camera service, etc.
[0108] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.
[0109] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0110] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0111] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0112] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.
[0113] The Intelligent Perception Service is used to process eye movement recognition and tracking requests sent by applications and return processing results to the applications to implement eye movement recognition and tracking functions.
[0114] The camera service is used to manage the camera. For example, it can control the camera to be turned on and off, and control the camera shooting parameters such as resolution and frame rate.
[0115] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
[0116] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0117] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0118] The system library can include multiple functional modules, such as a surface manager, media libraries, a 3D graphics processing library (e.g., OpenGL ES), and a 2D graphics engine (e.g., SGL).
[0119] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
[0120] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0121] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0122] A 2D graphics engine is a drawing engine for 2D drawings.
[0123] The Hardware Abstraction Layer (HAL) encapsulates the Linux kernel driver, providing an interface to the upper layer and shielding the implementation details of the underlying hardware. The HAL layer can include the Camera HAL and the Intelligent Perception Control Module.
[0124] The Camera HAL is the core software framework of the Camera. It includes sensor nodes and image front-end (IFE) nodes. These nodes are components (nodes) in the image data and control command transmission path (also known as the transmission pipeline) created by the Camera HAL.
[0125] The intelligent perception control module is the core software application of intelligent perception. It includes the intelligent perception client application (CA), which runs in the REE environment.
[0126] A trusted application (TA) for intelligent perception is an application that runs in a TEE environment and is used for intelligent perception.
[0127] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.
[0128] Among them, the camera driver is the driver layer of the Camera device, which is mainly responsible for interacting with the camera hardware.
[0129] The hardware layer includes display, TOF camera, RGB camera, IFE module, IPE module, IFE-Lite module, secure buffer, etc.
[0130] Among them, the image front end (IFE) module can perform image processing such as AE and AWB on image data.
[0131] The lightweight image pre-processing (IFE-Lite) module is a simplified version of the IFE module and can be used to forward image data without processing the image data during the forwarding process.
[0132] The image processing engine (IPE) module, primarily composed of the NPS and PPS, performs hardware-based noise reduction, cropping, noise reduction, color processing, and detail enhancement. Hardware noise reduction includes, for example, multi-frame noise reduction (MFNR) and multi-frame super resolution (MFSR).
[0133] Secure memory refers to memory with security protection features that can be used to store image data captured by the TOF camera and the RGB camera. In some embodiments, images captured by the TOF camera are forwarded by the IFE-Lite module and stored in the secure memory. Images captured by the RGB camera can then undergo image pre-processing by the IFE module, after which the IPE module sends the processed images to the secure memory.
[0134] The following describes the interaction between software modules involved in the method provided in the embodiment of the present application in conjunction with FIG5 .
[0135] As shown in Figure 5, the applications, system UI, smart perception service, smart perception control module, camera service, camera HAL, camera driver, TOF camera, RGB camera, IFE-Lite, IFE module, IPE module and secure memory in the electronic device are located on the REE side, and the smart perception TA in the electronic device is located on the TEE side.
[0136] The system UI in the application layer can interact with the smart perception service in the framework layer by calling a preset application programming interface (API) interface.
[0137] The intelligent perception service in the framework layer interacts with the intelligent perception control module in the HAL layer.
[0138] The intelligent perception control module in the HAL layer interacts with the camera service in the framework layer. The intelligent perception control module can interact with the camera service by calling the interface (vendor native development kit, VNDK).
[0139] The camera service in the framework layer interacts with the camera HAL in the HAL layer. The camera HAL can include sensor nodes and IFE nodes. The sensor nodes interact with the camera driver in the kernel layer, and the IFE nodes can also interact with the camera driver in the kernel layer. The camera driver can be used to drive the TOF camera or RGB camera in the hardware layer to collect image data in a preset operating mode (for example, eye tracking acquisition mode).
[0140] The IFE-Lite module can forward image data collected by the TOF camera to secure memory for storage. The IPE module can forward image data collected by the RGB camera to secure memory for storage.
[0141] The camera driver can also be used to obtain the file descriptor (FD) of the image data captured by the TOF camera from the IFE-Lite module and / or the FD of the image data captured by the RGB camera from the IPE module. The FD is used to indicate the storage location of the image data captured by the TOF camera or RGB camera in the secure memory.
[0142] Afterwards, the camera driver sends the FD to the IFE node of the camera HAL. The IFE node can send the FD to the camera service, and the camera service can send the FD to the smart perception control module. The smart perception control module sends the FD to the smart perception TA on the TEE side. The smart perception TA can read the image data from the secure memory based on the FD. After the encryption module in the smart perception TA encrypts the image data, the smart perception TA sends the encrypted image data to the smart perception control module on the REE side. Among them, the encryption key can also be transmitted between the smart perception TA and the smart perception control module. The smart perception control module can decrypt the encrypted image data using the key, and perform eye movement recognition and tracking based on the decrypted image data to obtain the user's eye movement data. The smart perception control module sends the eye movement data to the smart perception service, and the smart perception service then sends the eye movement data to the system UI. The system UI determines the user's gaze point and gaze action based on the eye movement data, and performs operations on the interactive object corresponding to the gaze point based on the user's gaze action.
[0143] The solid arrows in the figure may be used to represent control flow, and the dotted arrows may be used to represent data flow.
[0144] Optionally, after reading image data from secure memory based on the FD, the Smart Perception TA on the REE side can also perform eye movement recognition and tracking on the read image data to obtain the user's eye movement data. The Smart Perception TA then sends the eye movement data to the Smart Perception Control Module, which in turn sends the eye movement data to the Smart Perception Service. The Smart Perception Service ultimately sends the eye movement data to the system UI, allowing the system UI to determine the user's gaze point and gaze action based on the eye movement data and perform operations on the interactive object corresponding to the gaze point based on the user's gaze action, thus ensuring the security of eye movement recognition.
[0145] The present invention provides a message processing method applicable to electronic devices including a front-facing camera, wherein the front-facing camera refers to a camera located on the same side as the display screen of the electronic device, so that the front-facing camera can capture an image of the user's eyes when the user is looking at the display screen.
[0146] Optionally, the method can also be applied to an electronic device connected to an eye movement detection device. The electronic device can obtain the user's eye movement information through the eye movement detection device. The eye movement detection device can include, for example, smart glasses, an eye movement detector, or a non-wearable image acquisition device.
[0147] First, the electronic device enables the eye movement interaction function. There are many ways for the electronic device to activate this function, for example, the eye movement recognition function can be activated in response to a user trigger operation (such as a touch operation, voice operation or gesture operation, etc.).
[0148] In some embodiments, as shown in (a) in FIG6 , the interface displayed by the electronic device includes a variety of application icons. In response to a user clicking on the setting application icon, the electronic device displays a setting interface as shown in (b) in FIG6 , and the setting options displayed in the setting display interface include eye interaction. The enabled state of the eye interaction function can be displayed in the operation bar corresponding to eye interaction in the setting interface. As shown in (b) in FIG6 , the operation bar corresponding to eye interaction displays "off", indicating that the eye interaction function is not enabled in the electronic device. After the electronic device detects a user clicking on the setting option for eye interaction, it displays an eye interaction setting interface as shown in (c) in FIG6 . The eye interaction setting interface includes a switch button for enabling the eye interaction function. The switch button shown in (c) in FIG6 indicates that the eye interaction function is not enabled. After detecting a user clicking on the switch button as shown in (c) in FIG6 , the electronic device can enable the eye interaction function.
[0149] After the eye interaction function is enabled, the electronic device performs eye movement calibration. In some embodiments, the electronic device performs eye movement calibration each time the eye interaction function is enabled; in other embodiments, the electronic device performs eye movement calibration periodically (e.g., once a month, once a week, etc.); in still other embodiments, the electronic device performs eye movement calibration after the eye interaction function is enabled for the first time. This application does not limit the specific implementation and calibration frequency of eye movement calibration for the electronic device.
[0150] In some embodiments, the electronic device may store a user's eye movement calibration data. After identifying the user's current eye movement data based on the captured images, the electronic device may determine the user's gaze point location based on the eye movement calibration data and the current eye movement data. The eye movement calibration data is obtained based on the user gazing at a known location on the electronic device's display screen and is used to indicate the relationship between the user's eye movement data and the location of the user's gaze point on the display screen.
[0151] In some examples, the electronic device may determine whether eye movement calibration data is stored in the electronic device after detecting that a user turns on a switch button for activating an eye movement interaction function.
[0152] In response to the eye movement calibration data stored in the electronic device, the electronic device can obtain image data, identify the user's eye movement data from the image data, and then determine the user's current gaze coordinate point based on the eye movement calibration data and the eye movement data. Specifically, the electronic device can identify the direction of the user's eyes from the image data, and then determine the location of the user's gaze point on the display screen based on the relationship between the user's eye movement data indicated by the eye movement calibration data and the physical location on the display screen. For example, the electronic device can identify the direction of the user's eyes from the image data, and then determine the location of the user's gaze point on the display screen based on the relationship between the user's eye movement data indicated by the eye movement calibration data and the physical location on the display screen.
[0153] In response to the electronic device not storing eye movement calibration data, the electronic device may display an eye movement calibration interface to guide the user to complete the eye movement calibration process, thereby obtaining the user's eye movement calibration data. Specifically, the electronic device may display an eye movement calibration guidance interface, which may include guiding text information and guiding images or symbols for guiding the user to complete the eye movement calibration process, so as to guide the user to complete a specified eye movement according to the guiding text information and the guiding images or symbols. Afterwards, the electronic device may complete the eye movement calibration process according to the specified eye movement completed by the user.
[0154] For example, a first guidance interface displayed by the electronic device may display guidance text information, and then a second guidance interface displayed by the electronic device may display calibration circles corresponding to the guidance text and guidance images or symbols. For example, the first guidance interface may display guidance text information: Look at the calibration circles displayed in sequence on the screen until the interface displays that the eye movement calibration is completed. Afterwards, the second guidance interface displayed by the electronic device may display calibration circles 1, calibration circle 2, calibration circle 3, calibration circle 4, and calibration circle 5 as shown in (a) of Figure 7 in a preset order. In response to the user staring at the calibration circle displayed on the screen for more than the first calibration time, the electronic device cancels the display of the calibration circle and continues to display the calibration circle that has not been displayed among the five calibration circles until all calibration circles have been displayed on the screen. For another example, the first guidance interface may display guidance text information: All calibration circles are displayed on the screen. Please keep your eyes on the white circle until all calibration circles turn green. Afterwards, the second guidance interface displayed by the electronic device may display calibration circle 1, calibration circle 2, calibration circle 3, calibration circle 4, calibration circle 5, calibration circle 6, calibration circle 7, calibration circle 8 and calibration circle 9 without color filling as shown in (b) of Figure 7. The electronic device may change the color of each calibration circle to white in a preset order. In response to the user's gaze action on the white calibration circle, the electronic device changes the color of the white calibration circle to green. In response to all calibration circles turning green, the electronic device may display a third guidance interface indicating the completion result of eye movement calibration.
[0155] In some examples, after detecting that a user has turned off a switch for activating an eye-movement interaction function, the electronic device may retain the eye-movement calibration data stored in the electronic device. Subsequently, if the electronic device detects that the user has again turned on the switch for activating an eye-movement interaction function, the eye-movement interaction function may be enabled based on the stored eye-movement calibration data.
[0156] Optionally, after the electronic device detects that the user has turned off the switch button for activating the eye movement interaction function, the electronic device may delete the eye movement calibration data stored in the electronic device. Subsequently, after the electronic device detects that the user has turned on the switch button for activating the eye movement interaction function again, the electronic device may acquire the eye movement calibration data again.
[0157] In some examples, after detecting a user clicking a switch button as shown in (c) in Figure 6 , the electronic device may display an eye interaction setting interface as shown in Figure 8 . The eye interaction setting interface includes options such as eye interaction, manual eye calibration, and automatic eye calibration. The eye interaction setting interface also includes a switch button corresponding to the eye interaction option and in the turned-on state, a start button corresponding to the manual eye calibration option, and a switch button corresponding to the automatic eye calibration option.
[0158] The start button corresponding to the manual eye movement calibration option is used to initiate the eye movement calibration process. In response to the user clicking the start button, the electronic device can begin the eye movement calibration process to obtain the user's eye movement calibration data. The specific eye movement calibration process can be found in the above embodiment and is not described here in detail.
[0159] Among them, after the electronic device detects that the user clicks the switch button as shown in (c) in Figure 6, the switch button corresponding to the eye movement automatic calibration option in the eye movement interaction setting interface as shown in Figure 8 can be in the default off state.
[0160] In response to a user clicking the switch button corresponding to the automatic eye movement calibration option shown in FIG8 , the electronic device may change the state of the switch button corresponding to the automatic eye movement calibration option from off to on and automatically calibrate according to preset rules. For example, the electronic device may obtain the position of the user's gaze point on the display screen and the actual position of the eye movement interactive object determined within a preset time period. The electronic device then updates the stored eye movement calibration data based on the gaze point position and the actual position of the corresponding interactive object.
[0161] In some examples, during the eye movement calibration process, the electronic device may establish an eye movement calibration channel through steps S901 to S904, wherein steps S901 to S904 are shown in FIG9 :
[0162] S901: The setting application calls the eye movement calibration interface of the system UI to trigger the eye movement calibration process.
[0163] In some embodiments, in response to the user performing a turn-on operation on the switch button corresponding to eye movement interaction in (c) in Figure 6, or in response to the user clicking the start control for starting manual eye movement calibration in Figure 8, the settings application can call the eye movement calibration interface of the system UI so that the system UI can trigger the eye movement calibration process.
[0164] Optionally, an application supporting eye movement interaction in an electronic device can trigger the eye movement calibration process by calling the eye movement calibration interface in the system UI. The system UI includes an eye movement interaction whitelist and / or an eye movement interaction blacklist. The eye movement interaction whitelist is used to indicate applications that can call the eye movement calibration interface, and the eye movement interaction blacklist is used to indicate applications that cannot call the eye movement calibration interface.
[0165] For example, the electronic device may display an eye-movement interaction-supported application A's settings interface, which may include an eye-movement interaction switch. In response to the user turning on the switch, application A may call the eye-movement calibration interface of the system UI.
[0166] S902. The system UI sends an eye movement calibration registration request to the smart perception service.
[0167] The eye movement calibration registration request is used to request the intelligent perception service to perform eye movement calibration and obtain eye movement calibration results.
[0168] In some embodiments, the eye movement calibration registration request includes an eye movement calibration fence. The eye movement calibration fence creates a virtual boundary around the display area of the display screen. When the user gazes within the virtual boundary, the electronic device can calibrate the user's eye movement information.
[0169] S903. The smart perception service sends an eye movement calibration process call request to the smart perception control module.
[0170] In addition, the system UI can also register a callback with the smart perception service. The purpose of registering this callback is to return the eye movement calibration result to the system UI after the smart perception service obtains the eye movement calibration result.
[0171] That is, the system UI can notify the smart perception control module to perform the eye movement calibration operation through the smart perception service. The smart perception service can send the eye movement calibration result obtained from the smart perception control module to the system UI.
[0172] S904: In response to receiving the eye movement calibration process call request, the intelligent perception control module creates a camera path according to the eye movement calibration process call request.
[0173] Specifically, the intelligent perception control module can obtain the number of cameras started, the ID used to indicate the camera, and image parameters such as the resolution, frame rate, and data stream format of the image output by the camera from the eye movement calibration process call request.
[0174] It should be understood that during the startup of an electronic device, the camera service can send a camera query request to the camera HAL. The camera query request is used to query the cameras supported during the operation of the electronic device. After receiving the camera query request, the camera HAL can send the data of the cameras supported by the electronic device to the camera service, and the camera service can store the received data of the cameras supported by the electronic device. The camera data supported by the electronic device includes the camera identification (ID), type, location of each camera, as well as information such as the maximum resolution size, frame rate, and data stream format supported by each camera.
[0175] For example, if an electronic device includes three cameras: a front-facing TOF camera with an ID of A, a front-facing RGB camera with an ID of B, and a rear-facing camera with an ID of C, where rear-facing camera C and the display are located on the same side of the electronic device, the smart perception control module can send a camera query request to the camera service. The camera service sends the camera data supported by the electronic device to the smart perception control module. The smart perception control module can then determine the target camera based on the camera data supported by the electronic device. For example, the target camera can be determined to be the camera with IDs A and B.
[0176] Optionally, as shown in FIG9 , in response to receiving the eye movement calibration process call request, the step S904 of the intelligent perception control module creating a camera path according to the eye movement calibration process call request may include the following steps ( S905 - S909 ):
[0177] S905. The intelligent perception control module sends a camera opening request to the camera service.
[0178] The camera open request includes the target camera's data.
[0179] For example, the smart perception control module can send a request to the camera service to open the camera through the vendor native development kit (VNDK) interface. The request to open the camera can include information such as the camera ID, the resolution size of the camera output image, the frame rate, and the data stream format.
[0180] S906 . In response to receiving the request to open the target camera, the camera service sends a request to open the target camera to the camera HAL.
[0181] The target camera's open request carries stream allocation information, which is used to establish a path for transmitting data and control streams. This information includes the camera ID and image parameters such as the resolution, frame rate, and data stream format of the camera's output image.
[0182] In addition, the camera service can register a callback with the camera HAL. The callback is used to allow the camera HAL to notify the camera service of the result of creating the channel.
[0183] S907: The camera HAL creates a path to the target camera according to the target camera's opening request.
[0184] The camera HAL includes sensor nodes and IFE nodes. The sensor node sends data from the target camera to the camera driver, while the IFE node retrieves the FD of the image data captured by the target camera. The target camera's open request includes data from the Time of Flight (TOF) and RGB cameras. The TOF camera data includes the camera ID and the TOF camera's operating sequence, while the RGB camera data includes the RGB camera ID and the RGB camera's operating sequence. Based on the camera ID, the camera driver configures the operating sequence in the target camera's registers via the I2C bus, enabling the target camera to operate according to the operating sequence in the registers.
[0185] Specifically, the sensor node in the camera HAL can send data from the TOF camera to the camera driver, and the camera driver can configure the working sequence of the TOF camera in the register of the TOF camera. The TOF camera collects image data according to the working sequence in its corresponding register, and the image data is forwarded by the IFE-Lite module and written to the secure memory for storage. The IFE-Lite module can also send the FD corresponding to the image data to the IFE node in the camera HAL through the camera driver. The sensor node in the camera HAL can send data from the RGB camera to the camera driver, and the camera driver can configure the working sequence of the RGB camera in the register of the RGB camera. The RGB camera collects image data according to the working sequence in its corresponding register, and the image data is processed by 3A statistics and raw2yuv conversion by the IFE module. The obtained image data is then scaled by the IPE module based on the preset resolution size and sent to the secure memory for storage. The IPE module can also send the FD corresponding to the image data to the IFE node in the camera HAL through the camera driver.
[0186] Exemplarily, the sensor node sends the eye-tracking calibration mode's streaming information, included in the target camera's open request, to the camera driver module in the kernel layer. The camera driver writes or updates the configuration parameters in the streaming information into the registers of the TOF and RGB cameras. The camera driver then sends a startup command to the TOF and RGB cameras, initiating image data acquisition. In response to receiving the startup command, the TOF and RGB cameras begin acquiring image data.
[0187] The TOF camera then sends the captured TOF RAW image to the IFE-Lite module. The IFE-Lite module sends the TOF RAW image to secure memory and, via the camera driver, transmits the first FD corresponding to the TOF RAW image to the IFE node. The RGB camera first sends the captured RGB RAW image to the IFE module for 3A statistics and raw2yuv conversion, and then sends it to the IPE module for scaling to the preset resolution to produce the processed RGB image. The IPE module sends the processed RGB image to secure memory and, via the camera driver, transmits the second FD corresponding to the processed RGB image to the IFE node.
[0188] Optionally, hard synchronization can be implemented between the TOF camera and the RGB camera to ensure the accuracy of eye movement calibration. Specifically, the TOF camera and the RGB camera can be connected by a cable, and the RGB camera can be set as the master camera module (master) and the TOF camera can be set as the slave camera module (slave). This allows the RGB camera to output a field synchronization signal (xvs) to the TOF camera.
[0189] S908: The camera HAL returns the result of creating the channel to the camera service.
[0190] The result of creating the path can be success or failure. If the result of creating the path is failure, the camera HAL notifies the camera service that the path creation failed. If the result of creating the path is success, the camera HAL notifies the camera service that the path creation was successful, and S909 and subsequent steps can be continued.
[0191] S909. In response to receiving the notification of successful channel creation, the camera service returns a message indicating that camera opening is complete to the smart perception control module.
[0192] The camera opening completion means that the preparation work before the camera takes a photo or a video (for example, camera parameter configuration, power-on, and other preparation work) has been completed.
[0193] Afterwards, the electronic device can perform eye movement calibration based on the established eye movement calibration channel. When displaying the guidance interface, for example, when a calibration circle as shown in FIG. 7 (a) or FIG. 7 (b) is displayed in the display interface based on a preset rule, the electronic device can perform eye movement calibration through the following steps (steps S910 to S920 as shown in FIG. 9 ):
[0194] S910: In response to receiving a message indicating that the camera is opened, the intelligent perception control module sends a data request to the camera service.
[0195] The data request is used to request data flow, that is, to obtain the FD sent by the IFE-Lite module and / or IPE module.
[0196] S911: In response to receiving the data request sent by the intelligent perception control module, the camera service calls the camera HAL to obtain the data stream.
[0197] The data stream may include the first FD and the second FD. For example, the camera driver may send the first FD and the second FD to the IFE node in the camera HAL, and the IFE node then sends the first FD and the second FD to the camera service through the interface of the camera HAL.
[0198] S912. The camera service sends the first FD and the second FD to the intelligent perception control module.
[0199] S913. The smart perception control module sends the first FD and the second FD to the smart perception TA.
[0200] S914. The smart perception TA reads the TOF RAW image and the RGB image from the secure memory according to the first FD and the second FD.
[0201] S915, Smart Perception TA encrypts the TOF RAW image and RGB image.
[0202] The Smart Perception TA includes an encryption module, which is used to encrypt the TOF RAW image and RGB image based on a secret key, thereby ensuring that the TOF RAW image and RGB image will not be intercepted or modified by malicious programs after leaving the TEE side, thereby ensuring the accuracy of eye movement calibration.
[0203] S916. The smart perception TA sends the encrypted TOF RAW image and RGB image to the smart perception control module.
[0204] In some embodiments, the smart perception TA can also synchronously send a secret key to the smart perception control module so that the smart perception control module can decrypt the encrypted TOF RAW image and RGB image based on the secret key.
[0205] S917. The intelligent perception control module decrypts the encrypted TOF RAW image and RGB image, and performs eye movement calibration based on the TOF RAW image and RGB image.
[0206] The Smart Perception Control Module can access preset calibration data. It performs eye movement recognition on the TOF RAW and RGB images to identify the coordinates of the user's gaze point. The Smart Perception Control Module then compares the user's gaze point coordinates with the expected gaze point coordinates in the preset calibration data and determines the user's eye movement calibration result based on the comparison results.
[0207] For example, the intelligent perception control module can calculate the distance between the coordinates of the user's gaze point and the coordinates of the expected gaze point in the preset calibration data. If the distance is less than or equal to the preset distance, it means that the difference between the user's actual gaze point and the expected gaze point is not large, and the eye movement calibration result is successful. If the distance is greater than the preset distance, it means that the difference between the user's actual gaze point and the expected gaze point is large, and the eye movement calibration result is failed.
[0208] Optionally, the intelligent perception control module includes a TOF image processing unit, a face detection and key point extraction unit, an eye movement calibration unit, and an eye movement recognition unit.
[0209] For example, the TOF image processing unit can process the two-phase TOF RAW image acquired by the TOF camera and output a TOF infrared (IR) image with a resolution of 640*480 and the corresponding auto exposure (AE) time. The TOF IR image output by the TOF image processing unit or the RGB image with a resolution of 1024*768 output by the RGB camera is input to the face detection and key point extraction unit. After the face detection and key point extraction unit performs face detection, it can output a facial area rectangle and an array of facial key points.
[0210] The eye movement calibration unit can input 5 preset calibration point information (pixels) or 9 pixels (this application does not limit the number of pixels), and obtain 10 consecutive TOF IR images and 10 RGB images based on each calibration point. Then, the face detection and key point extraction unit processes each image to obtain the face area rectangular frame and face key point array in each image, the current resolution and physical size (PPI) of the electronic device display, and the physical deviation of the calibration IR / RGB relative to the origin in the display interface (which can be the upper left corner of the display). After that, the eye movement calibration unit can output 5*10 or 9*10 16-dimensional floating point (float) calibration feature vectors accordingly.
[0211] The eye movement recognition unit inputs a facial region rectangle and an array of facial key points from a single image, a 5x10 or 9x10 16-dimensional float calibration feature vector, the current resolution and physical size (PPI) of the electronic device's display, and the physical deviation of the calibrated IR / RGB values relative to the display's origin (which can be the upper left corner). The eye movement recognition unit then outputs the gaze point's position relative to the display's origin.
[0212] S918. The intelligent perception control module sends the eye movement calibration results to the intelligent perception service.
[0213] The smart perception control module can pass the eye movement calibration results to the smart perception service based on the callback previously registered with the smart perception service.
[0214] S919. The intelligent perception service sends the eye movement calibration results to the system UI.
[0215] Similarly, the intelligent perception service can pass the eye movement calibration results to the system UI based on the callback previously registered with the system UI.
[0216] S920: The system UI displays a calibration result interface according to the eye movement calibration result.
[0217] The system UI can display a calibration result interface based on the eye movement calibration results to prompt the user whether the calibration is completed. If the eye movement calibration result is a failure, the displayed calibration result interface may include a restart eye movement calibration control; if the eye movement calibration result is a success, the displayed calibration result interface may include an eye movement interaction authorization interface. The eye movement interaction authorization interface may include applications that support eye movement interaction and authorization controls corresponding to each application. In response to the user clicking the authorization control, the electronic device may add the corresponding application to the eye movement interaction whitelist.
[0218] Optionally, during the eye movement calibration process, after the smart perception TA reads the TOF RAW image and RGB image from the secure memory based on the first FD and the second FD, the smart perception TA can perform eye movement calibration based on the TOF RAW image and the RGB image, and then send the eye movement calibration result to the smart perception control module. The smart perception control module sends the eye movement calibration result to the smart perception service, and the smart perception service sends the eye movement calibration result to the system UI. The system UI displays the calibration result interface based on the eye movement calibration result.
[0219] In some examples, if the eye movement calibration result is a calibration failure, the calibration result interface displayed by the system UI may include an indicator for indicating calibration failure and a start control for re-calibrating the eye movement, to remind the user that the eye movement calibration has failed. The user can click the start control for re-calibrating the eye movement to re-execute the calibration process. If the eye movement calibration result is a calibration success, the calibration result interface displayed by the system UI may include an indicator for indicating calibration success, to remind the user that the eye movement calibration has been successful.
[0220] Optionally, when an eye-interaction-enabled application is first run or the eye-interaction feature is enabled, the electronic device may prompt the user to authorize the application. For example, the electronic device may display an authorization interface that may include an authorization control and a never-authorize control. In response to the user clicking the authorization control in the authorization prompt, the electronic device may add the application to the eye-interaction whitelist. In response to the user clicking the never-authorize control in the authorization prompt, the electronic device may add the user to the eye-interaction blacklist.
[0221] After successful eye movement calibration, the electronic device can display a specific interface in the system UI. In response to detecting that the user is gazing at the target area, the electronic device can determine the interactive object. The electronic device then performs corresponding operations on the interactive object based on the detected duration of the user's gaze on the target area.
[0222] For example, as shown in FIG10(a), the display interface shows a drop-down notification bar including a display area for message A, a display area for message B, and a display area for message C. When the user wants to open the application interface corresponding to message A to fully display the content corresponding to message A, they can gaze at the area corresponding to message A in the interface. Afterwards, the electronic device recognizes the user's gaze action of gazing at the display area of message A through an eye movement recognition process. In response to the user's gaze action, the electronic device obtains the link corresponding to message A and performs an opening operation on the link corresponding to message A. As shown in FIG10(b), the content of the link corresponding to message A is displayed on the display screen of the electronic device.
[0223] Optionally, the gaze areas in the display page may be divided according to actual operations performed on the application display content.
[0224] In some examples, a web page can be displayed in an electronic device, and the electronic device can recognize the user's eye movement. When it is recognized that the user's eye movement data is gazing at the next page turning area below the web page, such as the dotted box area shown in (a) of Figure 11, the electronic device can switch the currently displayed web page to the next page. Among them, the way the electronic device switches the web page can be sliding switching or page turning switching. When the electronic device slides and switches, it can determine the amplitude of the sliding switch based on the length of time the user gazes at the lower page turning area. For example, as shown in (a) of Figure 11, if the user gazes at the lower page turning area for 1S, the electronic device can slide the current page up as a whole by one line, so that the first line of the current page is not displayed in the display area, and the first line of the next page is connected with the last line of the current page, as shown in (b) of Figure 11, thereby realizing sliding page turning. When the electronic device switches pages, it can replace the current page with the content of the next page after the user's gaze time reaches a preset gaze threshold.
[0225] The page-turning area overlays the displayed content of the web page. It is understood that the page-turning area can be overlaid on the displayed content of the web page as a transparent layer, so that the user can see the content of the portion of the web page covered by the page-turning area. The page-turning area can also be overlaid on the displayed content of the web page as an opaque layer or a semi-transparent layer. In this way, the user can intuitively feel the presence of the page-turning area, so that the user can only look at the page-turning area when the page is to be turned, thus avoiding page turning errors due to accidental operation.
[0226] In some examples, the display page of the electronic device is an e-book page and a short video playback page. As shown in the display interface of Figure 12, the display interface includes area A at the bottom, area B at the top, area C on the right, and area D on the left. In the e-book page, the eye movement operation area in the e-book page can be determined according to the page turning method set by the user. For example, if the page turning method set by the user is sliding, then area A at the bottom of the display page is the next page turning gaze area, and area B is the previous page turning gaze area. If the page turning method set by the user is switching pages, then area A at the bottom of the display page can be the next page turning gaze area, and area B is the previous page turning gaze area, or area C on the right side of the display page can be the next page turning gaze area, and area D on the left side is the previous page turning gaze area. If the display page is a short video playback page, then area A at the bottom of the display page is the next video switching gaze area, and area B is the previous video switching gaze area.
[0227] After the eye movement calibration process is completed and the eye movement calibration result is successful, the electronic device can trigger the display process of eye movement-based human-computer interaction in a preset scene or when a trigger event occurs.
[0228] The preset scenario may include, for example, a scenario where the electronic device receives a new notification message, a scenario where an application supporting eye movement interaction is launched, or a scenario where an interface supporting eye movement interaction is displayed on the display interface of the electronic device. Alternatively, the triggering event may include, for example, an event where the electronic device receives a new notification message, an event where an application supporting eye movement interaction is launched, or an event where an interface supporting eye movement interaction is displayed on the display interface of the electronic device.
[0229] For example, after receiving a new notification message, the electronic device may display the notification message in the drop-down notification bar, as shown in Figure 10 (a). Subsequently, the electronic device may invoke the eye movement recognition interface of the system UI. The electronic device may also invoke the eye movement recognition interface of the system UI when displaying a web page corresponding to a browser application or a reading page corresponding to an e-book application.
[0230] After the electronic device calls the eye movement recognition interface of the system UI, it can establish an eye movement recognition channel through the following steps S1301-S1303 as shown in Figure 13, so as to complete the eye movement recognition process based on the eye movement recognition channel and realize human-computer interaction based on eye movement.
[0231] S1301. The system UI sends an eye movement recognition registration request to the intelligent perception service.
[0232] The eye movement recognition registration request includes an eye movement recognition fence. The eye movement recognition fence creates a virtual boundary around the display area. When the user looks within the virtual boundary, the electronic device can recognize the user's eye movement information.
[0233] The electronic device can determine the eye movement recognition fence based on the preset scenario or trigger event that calls the eye movement recognition interface of the system UI, or it can obtain the eye movement recognition fence carried by the preset scenario or trigger event. For example, if the preset scenario is to display a message in the notification message drop-down menu bar, the corresponding eye movement recognition fence is the area in the drop-down menu bar where the notification message is displayed, such as the display areas corresponding to messages A, B, and C in Figure 10; if the trigger event is to display a web page of a browser application on the display interface of the electronic device, the trigger event can send the eye movement recognition fence corresponding to the reading interface, such as the dotted box area in Figure 11.
[0234] S1302. The intelligent perception service sends an eye movement recognition process call request to the intelligent perception control module.
[0235] In addition, the system UI can also register a callback with the Smart Perception Service. This callback allows the Smart Perception Service to return the eye movement recognition results to the system UI after obtaining them. In other words, the system UI can use the Smart Perception Service to notify the Smart Perception Control Module to perform eye movement recognition operations. The Smart Perception Service can then send the eye movement recognition results received from the Smart Perception Control Module to the system UI.
[0236] S1303: In response to receiving the eye movement recognition process call request, the intelligent perception control module creates a camera path according to the eye movement recognition process call request.
[0237] In some examples, the intelligent perception control module can obtain current ambient light data and determine the current ambient light brightness based on the ambient light data. Then, based on the current ambient light brightness, the module can determine the target camera to be turned on under the current ambient light brightness. For example, based on the control relationship between ambient light brightness and cameras, the intelligent perception control module can determine the target camera to be turned on under the current ambient light brightness.
[0238] For example, if an electronic device includes three cameras, a front-facing TOF camera with an ID of A, a front-facing RGB camera with an ID of B, and a rear-facing camera with an ID of C, where the rear-facing camera C and the display are on the same side of the electronic device. The control relationship obtained by the intelligent perception control module is: if the current ambient light brightness is greater than 100 lux, the RGB camera is controlled to turn on; if the current ambient light brightness is less than or equal to 100 lux, the TOF camera is controlled to turn on. Then, if the intelligent perception control module obtains a current light brightness of 50, it can control the TOF camera to turn on.
[0239] Understandably, the above considerations take into account that when the current ambient light brightness is less than or equal to 100 lux, the image captured by the RGB camera is less accurate than the image captured by the TOF camera. However, when the current ambient light brightness is greater than 100 lux, the image captured by the RGB camera is more accurate, and there is no need to turn on the TOF camera to capture the image. Therefore, the control relationship between ambient light brightness and the camera in the above example is obtained. The actual control relationship obtained can be determined according to actual needs and is not limited here.
[0240] Optionally, the intelligent perception control module can obtain current ambient light data at certain time intervals and change the camera channel according to the latest acquired current ambient light brightness, thereby ensuring that the currently open camera channel can accurately identify eye movements and reduce the operating costs of the camera channel, such as power consumption and resource occupation.
[0241] For example, the intelligent perception control module can obtain the current ambient light brightness every 2 seconds and determine which camera channel to create or close based on the latest acquired current ambient light brightness. For example, the intelligent perception control module has already created a TOF camera channel, that is, it has turned on the TOF camera. At this time, when the intelligent perception control module detects that the current ambient light brightness is 150 lux, it can control the currently enabled TOF camera channel to be closed and create an RGB camera channel.
[0242] In this way, the currently enabled camera channel can be synchronized with the current ambient light brightness in real time, thereby ensuring that the currently enabled camera channel can capture more accurate images, further ensuring the accuracy of eye movement recognition.
[0243] In some examples, upon receiving an eye movement recognition process call request, the intelligent perception control module can first create two channels for the TOF camera and the RGB camera, that is, simultaneously open the TOF camera and the RGB camera, so that the TOF camera and the RGB camera begin to collect image data at the same time. The intelligent perception control module can then use the image data collected by the RGB camera and the TOF camera to identify whether there are reflective obstructions to the user's eyes, such as whether the user is wearing glasses or whether there are reflective obstructions between the user's eyes and the camera.
[0244] The intelligent perception control module can include a facial recognition unit, which can identify facial eye features based on image data collected by the RGB camera and the TOF camera. If the features identified by the facial recognition unit match the image features of wearing glasses, the user can be considered to be wearing glasses. In addition, if the facial recognition unit identifies a preset number of reflective points in the user's face except for the pupil area, it can be considered that there is a reflective obstruction between the user's eyes and the camera.
[0245] The intelligent perception control module can further control the camera path according to the ambient light brightness after identifying whether there is a reflective obstruction to the user's eyes. For example, if the intelligent perception control module identifies that there is a reflective obstruction to the user's eyes, it can determine whether the current ambient light brightness is greater than the preset ambient light brightness threshold. In response to the current ambient light brightness being greater than the preset ambient light brightness threshold, the intelligent perception control module can control the path of the TOF camera to be closed and keep the RGB camera path in the open state; in response to the current ambient light brightness being less than or equal to the preset ambient light brightness threshold, the intelligent perception control module can control the path of the TOF camera to be open and control the path of the RGB camera to be closed. If the intelligent perception control module identifies that there is no reflective obstruction to the user's eyes, it can control the path of the TOF camera to be closed and keep the path of the RGB camera in the open state.
[0246] Optionally, as shown in FIG13 , in response to receiving the eye movement recognition process call request, the step S1303 of the intelligent perception control module creating a camera path according to the eye movement recognition process call request may include the following steps ( S1304 - S1308 ):
[0247] S1304. The intelligent perception control module sends a request to open the target camera to the camera service.
[0248] The target camera opening request includes the target camera data.
[0249] For example, the smart perception control module can send a request to the camera service through the VNDK interface to open the target camera, wherein the request carries information such as the resolution size and data stream format.
[0250] At the same time, the smart perception control module can register a callback with the camera service. The registered callback is used to notify the smart perception control module that the target camera opening operation is completed after the camera service completes the target camera opening.
[0251] S1305 . In response to receiving the request to open the target camera, the camera service sends a request to open the target camera to the camera HAL.
[0252] The target camera's open request carries stream allocation information, which is used to establish a path for transmitting data and control streams. This information includes the camera ID and image parameters such as the resolution, frame rate, and data stream format of the camera's output image.
[0253] In addition, the camera service can register a callback with the camera HAL. The callback is used to allow the camera HAL to notify the camera service of the result of creating the channel.
[0254] S1306. The camera HAL creates a path to the target camera according to the opening request of the target camera.
[0255] The camera HAL sends the target camera's data to the camera driver via the sensor node and retrieves the FD of the image data captured by the target camera via the IFE node. The target camera's data includes the target camera's ID and the target camera's operating sequence. Based on the camera ID, the camera driver configures the operating sequence in the target camera's registers via the I2C bus, enabling the target camera to operate according to the operating sequence in the registers.
[0256] In some TOF camera pathway examples, the sensor node in the camera HAL can send TOF camera data to the camera driver. The camera driver can then configure the TOF camera's operating sequence in the camera's registers. The TOF camera collects image data based on the operating sequence in its corresponding registers. This image data is forwarded by the IFE-Lite module and written to secure memory for storage. The IFE-Lite module also sends the FD corresponding to the image data to the IFE node in the camera HAL through the camera driver.
[0257] In some RGB camera pathway examples, the sensor node in the camera HAL can send RGB camera data to the camera driver, which can then configure the RGB camera's operating sequence in the camera's registers. The RGB camera captures image data according to the operating sequence in its corresponding registers. This image data is then processed by the IFE module for 3A statistics and raw2yuv conversion. The resulting image data is then scaled to a preset resolution by the IPE module before being sent to secure memory for storage. The IPE module also sends the FD corresponding to the image data to the IFE node in the camera HAL through the camera driver.
[0258] Exemplarily, the sensor node sends the eye movement recognition pattern allocation information contained in the target camera's open request to the camera driver module in the kernel layer. The camera driver writes or updates the configuration parameters in the allocation information into the registers of the TOF camera and / or RGB camera. The camera driver then sends a startup command to the TOF camera and / or RGB camera to enable the TOF camera and / or RGB camera to acquire image data. In response to receiving the startup command, the TOF camera and / or RGB camera begins acquiring image data.
[0259] The TOF camera then sends the captured TOF RAW image to the IFE-Lite module. The IFE-Lite module stores the TOF RAW image in secure memory and sends the first FD corresponding to the TOF RAW image to the camera driver. The RGB camera first sends the captured RGB RAW image to the IFE module for 3A statistics and raw2yuv conversion, and then sends it to the IPE module for scaling to the preset resolution to produce the processed RGB image. The IPE module stores the processed RGB image in secure memory and sends the second FD corresponding to the processed RGB image to the camera driver.
[0260] Optionally, the camera driver may send a message indicating that the configuration parameter writing is completed to the sensor node. In response to receiving the message indicating that the configuration parameter writing is completed, the sensor node sends a start command to the camera driver module.
[0261] S1307: The camera HAL returns the result of creating the channel to the camera service.
[0262] The result of creating the path can be success or failure. If the result of creating the path is failure, the camera HAL notifies the camera service that the path creation failed. If the result of creating the path is success, the camera HAL notifies the camera service that the path creation was successful, and S1308 and subsequent steps can be continued.
[0263] S1308. In response to receiving the notification of successful channel creation, the camera service returns a message indicating that the camera opening is complete to the smart perception control module.
[0264] It is understandable that the camera opening completion means that the preparation work before the camera takes a photo or a video, for example, the preparation work including camera parameter configuration, power-on, etc. has been completed.
[0265] Afterwards, the electronic device can perform eye movement recognition based on the established eye movement recognition channel and realize human-computer interaction based on eye movement recognition.
[0266] For example, as shown in FIG13 , steps S1309 to S1319:
[0267] S1309: In response to receiving the message indicating that the camera is opened, the intelligent perception control module sends a data request to the camera service.
[0268] The data request is used to request to obtain the FD sent by the IFE-Lite module and / or the IPE module.
[0269] S1310: In response to receiving the data request sent by the intelligent perception control module, the camera service calls the camera HAL to obtain the data stream.
[0270] The data stream may include the first FD and / or the second FD. For example, the camera driver may send the first FD and / or the second FD to the IFE node. The IFE node sends the first FD and / or the second FD to the camera service through the interface of the camera HAL.
[0271] S1311. The camera service sends the first FD and / or the second FD to the intelligent perception control module.
[0272] S1312. The smart perception control module sends the first FD and / or the second FD to the smart perception TA.
[0273] S1313. The intelligent perception TA reads the TOF RAW image and / or RGB image from the secure memory according to the first FD and / or the second FD.
[0274] S1314. The intelligent perception TA encrypts the TOF RAW image and / or RGB image.
[0275] Among them, the smart perception TA includes an encryption module, which is used to encrypt the TOF RAW image and / or RGB image based on a secret key, so as to ensure that the TOF RAW image and / or RGB image will not be maliciously intercepted or modified after leaving the TEE side where the smart perception TA is located, thereby ensuring the accuracy of the eye movement recognition data.
[0276] S1315. The smart perception TA sends the encrypted TOF RAW image and / or RGB image to the smart perception control module.
[0277] In some embodiments, the smart perception TA may also send a secret key to the smart perception control module so that the smart perception control module can decrypt the encrypted TOF RAW image and / or RGB image based on the secret key.
[0278] S1316. The intelligent perception control module decrypts the encrypted TOF RAW image and / or RGB image, and performs eye movement recognition processing based on the TOF RAW image and / or RGB image.
[0279] The intelligent perception control module can perform eye movement recognition on the TOF RAW image and / or RGB image to identify the user's eye movement data, which may include data such as gaze point coordinates and gaze duration.
[0280] S1317. The intelligent perception control module sends the eye movement data to the intelligent perception service.
[0281] The smart perception control module can pass the eye movement data to the smart perception service based on the callback previously registered with the smart perception service.
[0282] S1318. The intelligent perception service sends the eye movement data to the system UI.
[0283] Similarly, the intelligent perception service can pass eye movement data to the system UI based on the callback previously registered with the system UI.
[0284] S1319. The system UI determines the interactive object and the interactive operation performed on the interactive object based on the eye movement data.
[0285] Eye movement data can include gaze point coordinates and gaze duration. The system UI can use the gaze point coordinates in the eye movement data to determine the object the user is gazing at, i.e., the interactive object. After confirming the interactive object, the system UI can further perform corresponding interactive operations on the interactive object based on the gaze duration.
[0286] Optionally, after the smart perception TA reads the TOF RAW image and / or RGB image from the secure memory based on the first FD and / or the second FD, the smart perception TA can perform eye movement recognition processing based on the TOF RAW image and / or the RGB image, and then send the eye movement data to the smart perception control module. The smart perception control module sends the eye movement data to the smart perception service, which sends the eye movement data to the system UI. The system UI determines the interactive object and the interactive operation performed on the interactive object based on the eye movement data.
[0287] During eye movement interaction, in some examples, when the user's gaze is on a long notification message that is displayed in a collapsed state, as shown in Figure 14(a), the electronic device can expand the collapsed long notification message based on the user's gaze duration on the area containing the long notification message. If the number of characters in the notification message exceeds a preset character threshold, the electronic device may deem the notification message a long notification message and display it in a collapsed state.
[0288] Specifically, when the electronic device folds and displays a newly received long notification message in the first designated area in the display interface, the electronic device begins to recognize the user's eye movements and determines, based on the eye movement recognition results, whether the user has been staring at the first designated area where the long notification message is displayed within a first preset time period. The area of the first designated area is smaller than the display area in the drop-down notification message bar.
[0289] In response to a user gazing at the first designated area where the long notification message is displayed for a first preset duration, that is, when the electronic device determines based on the eye movement recognition result that the user's gaze position is within the first designated area, the electronic device obtains the user's gaze duration on the designated area based on the eye movement recognition result. If the user's gaze duration on the designated area exceeds the first preset gaze duration threshold, the electronic device may deem that the user intends to perform an interactive operation on the interactive object, and may display the expanded long notification message in the second designated area of the display interface and cancel the folded display of the first designated area, as shown in (b) of Figure 14. The second designated area is larger than the first designated area.
[0290] Furthermore, if the electronic device displays an expanded long notification message in the second designated area of the display interface, and then determines based on eye movement recognition that the user is not gazing at the second designated area, the long notification message can be canceled from the notification message bar, as shown in (c) of Figure 14. Alternatively, the expanded display of the long notification message in the second designated area can be canceled, and the long notification message can be collapsed and displayed again in the first designated area, as shown in (a) of Figure 14.
[0291] In addition, if the electronic device displays the expanded long notification message in the second designated area in the display interface, and determines based on eye movement recognition that the time the user gazes at the second designated area is greater than the second preset gaze time threshold, it can be considered that the user wants to open the application that sent the long notification message. At this time, the electronic device can open the application corresponding to the long notification message. As shown in (b) of Figure 14, if the time the user gazes at the second designated area corresponding to message A is greater than the second preset gaze time threshold, the display interface shown in (d) of Figure 14 can be displayed. Among them, the long notification message and the application can include, for example, a text message notification message corresponding to an information application, a video update notification message corresponding to a video application, and a music recommendation notification message corresponding to a music player application, which are not limited here.
[0292] Optionally, when the electronic device can open the application corresponding to the long notification message, it can first obtain a link corresponding to the long notification message. The link can be a link for opening an interface that can display the content of the long notification message, or it can be a link for opening an interface with the long message notification as the theme, which does not necessarily include the content in the long message notification.
[0293] In response to the user not gazing at the first designated area within the first preset time period, or the time the user gazes at the first designated area does not exceed the first preset gaze time threshold, the electronic device may deem that the user is not interested in the long notification message, that is, has no intention to perform interactive operations, and may cancel the folded display of the first designated area in the display interface after the time the long notification message is folded and displayed exceeds the second preset time period.
[0294] Optionally, when the user's gaze is on an unfolded short notification message, the user can perform interactive operations on the short notification message based on the length of time the user gazes at the area where the short notification message is located. When the number of characters in the notification message content is less than or equal to a preset character threshold, the electronic device can determine that the notification message is a short notification message.
[0295] Specifically, when the electronic device displays a newly received short notification message in the first designated area in the display interface, the electronic device begins to recognize the user's eye movements and determines whether the user is staring at the third designated area where the short notification message is displayed within a third preset time period based on the eye movement recognition results.
[0296] In response to a user gazing at a third designated area displayed on the short notification message for a third preset duration, i.e., when the electronic device determines, based on the eye movement recognition results, that the user's gaze position is within the third designated area, the electronic device obtains, based on the eye movement recognition results, the duration of the user's continuous gaze on the third designated area. If the user's continuous gaze on the third designated area exceeds a third preset gaze duration threshold, the electronic device may deem that the user intends to interact with the short notification message and may display the application interface corresponding to the short notification message on the display interface, i.e., open the application corresponding to the short notification message.
[0297] Furthermore, in response to the user not gazing at the third designated area within a third preset duration, or the duration of the user's gaze at the third designated area not exceeding a fourth preset gaze duration threshold, the electronic device may determine that the user is not interested in the short notification message, i.e., has no intention to interact with the short notification message. The electronic device may cancel the display of the short notification message in the third designated area of the display interface after the duration of displaying the long notification message in the third designated area exceeds the fourth preset duration.
[0298] In some embodiments, a user can interact with an application by gazing at a designated location in the display interface displayed by the application running on the electronic device. The designated location can be one or more areas in the display diagram shown in FIG9 , or other areas determined according to actual needs. Optionally, the designated location can be an invisible transparent area or a visible area. The visible area can be suspended above the display interface displayed by the application, making it easier for the user to accurately focus on the designated location.
[0299] Specifically, the designated location may include the area containing the text content of the notification message. As shown in (a) of Figure 14 , the electronic device can detect that the coordinates of the user's gaze point are within the area displayed for message A. Furthermore, the designated location may also include the display areas for certain controls corresponding to the notification message. For example, as shown in Figure 15 , the designated location corresponding to message A includes a collapse control, a view details control, and a delete control. In response to the user gazing at the collapse control, the electronic device can fold message A for display; in response to the user gazing at the view details control, the electronic device can open the application display interface corresponding to message A; and in response to the user gazing at the delete control, the electronic device can delete message A from the notification message bar display interface. The designated location corresponding to message B includes an expand control, a view details control, and a delete control. In response to the user gazing at the expand control, the electronic device can expand message B for display. The designated location corresponding to message C includes a reply control, a view details control, and a delete control. In response to the user gazing at the reply control, the electronic device can display a text input box for replying to the message. The type and function of the gaze controls in the designated locations can be set based on the actual message and are not limited here.
[0300] For example, when a short video application is running, the electronic device displays a short video display interface, where short video A is currently playing. If the electronic device detects that the user is gazing at the first target area at the bottom of the short video display interface, short video A playing on the short video display interface may be replaced with short video B. Subsequently, if the electronic device detects that the user is gazing at the second target area at the bottom of the short video display interface, short video B playing on the short video display interface may be replaced with short video C. After short video A is replaced with short video B on the short video display interface, if the electronic device detects that the user is gazing at the second target area at the top of the short video display interface, short video B playing on the short video display interface may be replaced with short video A. The recommendation order of short video A is higher than that of short video B, and the recommendation order of short video B is higher than that of short video C. In this way, the electronic device can play short videos in a preset recommendation order when it detects that the user is gazing at the first or second target area on the short video display interface.
[0301] Optionally, when the electronic device detects that the user is gazing at the first target area at the bottom of the short video display interface and the gazing time exceeds 3 seconds, the short video A played in the short video display interface can be replaced with short video B.
[0302] Furthermore, eye movement interaction can also be applied in photography scenarios. In some examples, when an electronic device displays a video or image capture interface, it can respond to the user's gaze and determine the user's gaze location on the display screen. The electronic device can then focus on the image corresponding to the gaze location.
[0303] Optionally, when displaying a video or image capture interface, the electronic device can determine the gaze position on the display screen that changes with the user's eye movement in response to the user's continued gaze. The electronic device can then continuously focus on the image corresponding to the gaze position, thereby achieving tracking focus.
[0304] In some embodiments, when the electronic device displays the lock screen, it can recognize the user's eye movements and perform eye movement unlocking based on the eye movement recognition results. When the electronic device detects that the user is gazing at the gaze unlocking area in the lock screen as shown in Figure 16, it can recognize the user's eye movements to achieve gaze unlocking.
[0305] Optionally, when the electronic device displays the lock screen, it can recognize the user's eye movements and face, and unlock the device based on the eye movement and face recognition results, thereby improving security. For example, when the electronic device detects that the user is gazing at the gaze unlock area in the lock screen as shown in Figure 16, it can recognize the user's eye movements and face, and determine whether the device can be unlocked based on the eye movement recognition results and the face recognition results.
[0306] Exemplarily, when the electronic device detects that the user is gazing at the gaze unlock area in the lock screen interface as shown in FIG16 , it can collect image data. Afterwards, the electronic device determines the user's eye movement data based on the image data, wherein the eye movement data may include eye movement features corresponding to the user, and the user's identity can be identified based on the eye movement features. The electronic device can also determine the user's facial information based on the image data, wherein the facial information may include facial features corresponding to the user, and the electronic device can identify the user's identity based on the facial features. When the user identity verified by the electronic device based on the eye movement features is the same as the user identity verified based on the facial features, the electronic device can unlock the lock screen and display the unlocked operation interface.
[0307] The message processing method provided in this application can determine the user's gaze point and gaze duration on the display screen by collecting and identifying the user's eye images. The electronic device can then determine whether the user wants to operate on the notification message on the display interface based on the user's gaze point and gaze duration, thereby enabling interactive operations on the notification message based on the user's eye movements.
[0308] In this way, users can interact with electronic devices through eye movements, thereby achieving a more convenient contactless human-computer interaction process.
[0309] In the message processing method provided in this application, the intelligent perception control module can obtain current ambient light data when creating a camera path based on the eye movement recognition process call request. The intelligent perception control module can then determine the current ambient light brightness based on this ambient light data and, based on the current ambient light brightness, determine which camera to activate. This allows the camera to be activated based on the actual environment, ensuring the accuracy of the captured image and, consequently, improving the accuracy of eye movement recognition.
[0310] In the message processing method provided in the present application, when the intelligent perception control module creates a camera path according to the eye movement calibration process call request, it can simultaneously establish paths where multiple cameras are located to ensure the accuracy of eye movement calibration.
[0311] In the message processing method provided in this application, during the above-mentioned eye movement calibration process, after the smart perception TA reads the TOF RAW image and RGB image from the secure memory according to the first FD and the second FD, the smart perception TA can perform eye movement calibration processing based on the TOF RAW image and the RGB image; during the above-mentioned eye movement recognition process, after the smart perception TA reads the TOF RAW image and / or the RGB image from the secure memory according to the first FD and / or the second FD, the smart perception TA can perform eye movement recognition processing based on the TOF RAW image and / or the RGB image. This further improves the security of image data during the eye movement calibration or eye movement recognition process, thereby ensuring the accuracy of eye movement calibration and eye movement interaction.
[0312] For example, Figure 17 is a flow chart of a video music processing method provided by an embodiment of the present application. As shown in Figure 10, the method includes the following steps.
[0313] S1701: The electronic device displays a first interface, which includes a notification message.
[0314] In some embodiments, the electronic device can display the first interface through the following process. Specifically, the electronic device displays the third interface, and the third interface includes a long notification message in a folded state. The number of characters in the long notification message is greater than a preset character threshold. The electronic device can obtain the number of characters in the notification message, and determine the notification message with a character number greater than the preset character threshold as a long notification message, and then display the long notification message in a folded state in the third interface, as shown in (a) in Figure 14, thereby ensuring that the notification message is briefly displayed in the drop-down notification message bar.
[0315] The electronic device then collects second image data using the target image sensor. The second image data includes an image of the user's eyes. Based on the second image data, the electronic device then determines the user's second eye movement data. The second eye movement data includes the coordinates of the second gaze point and the second gaze duration. In response to the second gaze point coordinates being within the display area of the long notification message and the second gaze duration being greater than the second preset duration threshold, the electronic device displays the first interface, which includes the long notification message in an expanded state, as shown in FIG14(b).
[0316] In some embodiments, after the electronic device displays the first interface, it can also collect third image data through the target image sensor, and the third image data includes an image of the user's eyes. Afterwards, the electronic device determines the user's third eye movement data based on the user's third image data. The third eye movement data includes third gaze point coordinates and third gaze duration. In response to the third gaze point coordinates being outside the display area of the long notification message on the first interface, the electronic device displays a fourth interface, and the fourth interface includes a long notification message in a folded state, as shown in (a) in Figure 14, and message A is re-displayed in a folded state. Or, the fourth interface does not include a long notification message, as shown in (c) in Figure 14, and message A is no longer displayed in the display interface.
[0317] S1702: Collect first image data through a target image sensor; the first image data includes an eye image of a user.
[0318] In some embodiments, the electronic device may obtain current ambient light data, determine the current ambient light brightness based on the ambient light data, and then determine the target image sensor to be turned on based on the current ambient light brightness. For example, the electronic device may determine the target camera to be turned on under the current ambient light brightness based on the control relationship between the ambient light brightness and the camera.
[0319] In some examples, the electronic device includes a time-of-flight (TOF) image sensor and an RGB image sensor. When the electronic device collects first image data through the target image sensor, the collection can be performed through the following process. Specifically, the electronic device can first obtain the current ambient light brightness, and in response to the current ambient light brightness being greater than a first preset brightness threshold, control the RGB image sensor to collect the first RGB image data; in response to the current ambient light brightness being less than or equal to the first preset brightness threshold, control the TOF image sensor to collect the first TOF image data.
[0320] For example, if the current ambient light brightness is greater than 100 lux, the electronic device controls the RGB camera to turn on; if the current ambient light brightness is less than or equal to 100 lux, the electronic device controls the TOF camera to turn on. Therefore, if the electronic device obtains that the current ambient light brightness is 50, it can control the TOF camera to turn on.
[0321] In some embodiments, in response to the current ambient light brightness being greater than a first preset brightness threshold, the electronic device controls the RGB image sensor to capture first RGB image data and then determines, based on the first RGB image data, whether the user's eyes are covered by a reflective object. If, based on the first RGB image data, it is determined that the user's eyes are not covered by a reflective object, the electronic device controls the RGB image sensor to turn off and controls the TOF image sensor to turn on and capture the first image data.
[0322] The electronic device can identify characteristic information of the user's eyes based on the first RGB image data. If the identified characteristic information matches the image characteristics of someone wearing glasses, the electronic device can determine that the user is wearing glasses, and the glasses are a reflective object. Furthermore, if the facial recognition unit identifies a preset number of reflective points in the user's facial area excluding the pupil, the electronic device can determine that a reflective object is between the user's eyes and the image sensor.
[0323] S1703: Determine first eye movement data of the user based on the first image data of the user; the first eye movement data includes first gaze point coordinates and first gaze duration.
[0324] The electronic device can use the eye movement recognition model to determine the eye movement data. The electronic device includes an eye movement recognition unit, and the eye movement recognition unit includes an eye movement recognition model. Input the facial area rectangular frame and facial key point array in a single picture, 5*10 or 9*10 16-dimensional float type calibration feature vectors, the current resolution and physical size (PPI) of the electronic device display, and the physical deviation of the calibrated IR / RGB relative to the origin in the display screen display interface (which can be the upper left corner of the display screen) into the eye movement recognition model. After that, the eye movement recognition unit can output the gaze point position based on the origin in the display screen display interface as a reference.
[0325] S1704: In response to the first gaze point coordinates being within the display area of the notification message and the first gaze duration being greater than a first preset duration threshold, a second interface is displayed, where the second interface is a display interface of an application corresponding to the notification message.
[0326] In some embodiments, in response to the first gaze point coordinates being outside the display area of the notification message, as shown in (a) of Figure 18, when the user gazes at the display area of any notification message, the electronic device displays the fifth interface shown in (b) of Figure 18 after a first preset duration. The fifth interface may be a page that does not include the notification message.
[0327] In some embodiments, the electronic device includes a time-of-flight (TOF) image sensor and an RGB image sensor. When the target image sensor collects first image data, the electronic device can control the RGB image sensor to collect the first RGB image data and the TOF image sensor to collect the first TOF image data. If, based on the first RGB image data and / or the first TOF image data, it is determined that the user's eyes are covered by a reflective object, the current ambient light brightness is obtained. In response to the current ambient light brightness being greater than a first preset brightness threshold, the electronic device controls the TOF image sensor to turn off.
[0328] In some embodiments, the electronic device may display a sixth interface including at least one calibration location. The electronic device may then capture fourth image data using a target image sensor, determine the coordinates of a fourth gaze point of the user based on the fourth image data, and determine an eye movement calibration result based on an error between the coordinates of the calibration location and the coordinates of the fourth gaze point.
[0329] Among them, the electronic device can display the sixth interface in response to the user operation. For example, as shown in (a) in Figure 6, the interface displayed by the electronic device includes a variety of application icons. In response to the user's click operation on the setting application icon, the electronic device displays the setting interface as shown in (b) in Figure 6, and the setting options displayed in the setting display interface include eye interaction. The activation status of the eye interaction function can be displayed in the operation bar corresponding to eye interaction in the setting interface. As shown in (b) in Figure 6, the operation bar corresponding to eye interaction shows that it is closed, indicating that the electronic device has not enabled the eye interaction function. After the electronic device detects the user's click operation on the eye interaction setting option, it displays the eye interaction setting interface as shown in (c) in Figure 6. The eye interaction setting interface includes a switch button for enabling the eye interaction function. The switch button shown in (c) in Figure 6 indicates that the eye interaction function is not enabled. After detecting the user's click operation on the switch button as shown in (c) in Figure 6, the electronic device can display the sixth interface.
[0330] The electronic device then captures fourth image data via the target image sensor and determines the coordinates of the user's fourth gaze point based on the fourth image data, thereby determining an eye movement calibration result based on the error between the coordinates of the calibration position and the coordinates of the fourth gaze point. For example, the electronic device may obtain the calibration position of the user's eye looking at the display screen, which has been determined within a preset time period, and the coordinates of the fourth gaze point of the eye movement interaction object, which has been determined based on the fourth image data. The electronic device then drives the device to determine the eye movement calibration result based on the error between the coordinates of the calibration position and the coordinates of the fourth gaze point, thereby updating the stored eye movement calibration data.
[0331] In some embodiments, the electronic device includes a time-of-flight (TOF) image sensor and an RGB image sensor. When the electronic device collects fourth image data via the target image sensor, it can control the TOF image sensor to collect second TOF image data and control the RGB image sensor to collect second RGB image data. This ensures that the second TOF image data and the second RGB image data are simultaneously calibrated for eye movement, thereby ensuring the accuracy of the eye movement calibration and subsequently achieving more accurate eye movement recognition.
[0332] Optionally, the electronic device includes a time-of-flight TOF image sensor and an RGB image sensor, and hardware synchronization can be achieved between the TOF camera and the RGB camera to ensure the accuracy of eye movement calibration. Specifically, the TOF camera and the RGB camera can be connected by a connecting line, and the connecting line is used to transmit a synchronization signal so that the TOF image sensor and the RGB image sensor synchronously collect image data based on the synchronization signal. In addition, the electronic device can also set the RGB camera as the main camera module (master) and the TOF camera as the slave camera module (slave). Thereby, the RGB camera outputs a field synchronization signal (xvs) to the TOF camera.
[0333] In some embodiments, the electronic device includes a hardware abstraction HAL layer and a hardware layer. The HAL layer includes an intelligent perception control module and an intelligent perception TA. The hardware layer includes a secure memory, which is used to store image data collected by the target image sensor. The intelligent perception TA runs in a trusted execution environment.
[0334] When the electronic device determines the user's first eye movement data based on the user's first image data, it can control the smart perception control module to obtain a file descriptor. The file descriptor is used to describe the storage location of the first image data in the electronic device. Thereafter, the smart perception TA is controlled to obtain the first image data from the secure memory according to the file descriptor. The smart perception TA encrypts the first image data and sends the encrypted first image data to the smart perception control module. The smart perception control module decrypts the encrypted first image data and determines the first eye movement data based on the first image data. The smart perception TA can also synchronously send a secret key to the smart perception control module so that the smart perception control module can decrypt the encrypted TOF RAW image and RGB image based on the secret key.
[0335] Optionally, after the smart perception TA obtains the first image data from the secure memory according to the file descriptor, it can also determine the first eye movement data according to the first image data, and send the first eye movement data to the smart perception control module.
[0336] In some embodiments, the electronic device further includes a kernel layer; the HAL layer further includes a camera hardware abstraction layer (HAL); the camera HAL includes sensor nodes; the kernel layer further includes a camera driver; and the hardware layer further includes at least one image sensor and corresponding registers. The at least one image sensor is provided in one or more cameras. When the electronic device acquires first image data via a target image sensor, it can control the sensor node to obtain the identifier and configuration parameters of the target image sensor to be controlled. The sensor node sends the identifier and configuration parameters of the target image sensor to the camera driver. The camera driver configures the configuration data of the target image sensor in the register of the target image sensor based on the identifier of the target image sensor. The camera driver sends a message to the sensor node indicating that data configuration is complete. Upon receiving the message, the sensor node sends a first startup command to the camera driver. The camera driver sends a second startup command to the target image sensor. Based on the second startup command, the target image sensor obtains the configuration parameters of the target image sensor from the register and acquires image data based on the configuration parameters.
[0337] In some embodiments, the electronic device also includes an application layer and a framework layer; the application layer includes a system user interface UI, and the framework layer includes an intelligent perception service.
[0338] After displaying the first interface, the electronic device can control the system UI to send a smart perception registration request to the smart perception service. The smart perception registration request is used to initiate the eye movement recognition or eye movement calibration process. Based on the smart perception registration request, the smart perception service sends a smart perception process call request to the smart perception control module. The smart perception process call request includes the identifier and configuration parameters of the target image sensor. The smart perception control module creates a path to the target image sensor based on the identifier and configuration parameters of the target image sensor.
[0339] In some embodiments, the framework layer also includes a camera service. The electronic device can create a path for the target image sensor through the following process. Specifically, the camera service receives a path creation request for the target image sensor sent by the smart perception control module, and the path creation request includes the identifier and configuration parameters of the target image sensor. The camera service sends the identifier and configuration parameters of the target image sensor to the camera HAL; the camera HAL creates a path for the target image sensor based on the identifier of the target image sensor; the camera HAL returns the result of the successful creation of the path of the target image sensor to the camera service; the camera service returns the result of the path creation of the target image sensor to the smart perception control module based on the received result of the successful creation of the path of the target image sensor.
[0340] In some embodiments, when the electronic device controls the smart perception control module to obtain a file descriptor, it can control the smart perception control module to send a data request to the camera service, and the data request is used to obtain the file descriptor; the camera service calls the camera HAL to obtain the file descriptor based on the data request; the camera service sends the file descriptor to the smart perception control module.
[0341] The message processing method provided by the embodiment of the present application is described in detail above in conjunction with Figures 5 to 18. The electronic device provided by the embodiment of the present application is described in detail below in conjunction with Figure 19.
[0342] In one possible design, Figure 19 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. As shown in Figure 19, electronic device 100 may include: a display unit 1901 and a processing unit 1902. Electronic device 100 may be used to implement the functions of the electronic device involved in the above method embodiment.
[0343] Optionally, the display unit 1901 is used to support the electronic device 100 in displaying interface content; and / or support the electronic device 100 in executing S920 in Figure 9, and S1701 and S1704 in Figure 17.
[0344] Optionally, the processing unit 1902 is used to support the electronic device 100 to execute S901-S919 in Figure 9, S1301-S1319 in Figure 13, and S1703 in Figure 17.
[0345] Optionally, the electronic device 100 shown in Figure 19 may further include a storage unit (not shown in Figure 19 ) storing a program or instruction. When the processing unit 1902 executes the program or instruction, the electronic device 100 shown in Figure 19 may execute the message processing method described in the above method embodiment.
[0346] The technical effects of the electronic device 100 shown in FIG19 can refer to the technical effects of the message processing method described in the above method embodiment, and will not be repeated here.
[0347] In addition to being in the form of the electronic device 100, the technical solution provided in this application may also be a functional unit or chip in the electronic device, or a device used in conjunction with the electronic device.
[0348] An embodiment of the present application further provides a readable storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes each function or step in the above-mentioned method embodiment.
[0349] An embodiment of the present application further provides a computer program product, including a computer program. When the computer program runs on an electronic device, the electronic device executes each function or step in the above method embodiment.
[0350] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0351] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0352] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0353] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0354] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0355] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A message processing method, characterized in that: Applied to electronic equipment, the method comprises: Displaying a first interface, wherein the first interface includes a notification message; Collecting first image data through a target image sensor; the first image data includes an eye image of a user; Determining first eye movement data of the user based on the first image data of the user; the first eye movement data includes first gaze point coordinates and first gaze duration; In response to the first gaze point coordinates being within the display area of the notification message and the first gaze duration being greater than a first preset duration threshold, a second interface is displayed, where the second interface is a display interface of an application corresponding to the notification message.
2. The method according to claim 1, characterized in that The displaying of the first interface includes: Displaying a third interface, wherein the third interface includes a long notification message in a folded state; the number of characters in the long notification message is greater than a preset character threshold; Collecting second image data by using a target image sensor; the second image data includes an eye image of a user; Determining second eye movement data of the user based on the second image data of the user; the second eye movement data includes second gaze point coordinates and second gaze duration; In response to the second gaze point coordinates being located within the display area of the long notification message and the second gaze duration being greater than a second preset duration threshold, a first interface is displayed, wherein the first interface includes the long notification message in an expanded state.
3. The method according to claim 2, characterized in that After displaying the first interface, the method further includes: Collecting third image data by using a target image sensor; the third image data includes an eye image of a user; determining third eye movement data of the user based on the third image data of the user; the third eye movement data comprising third gaze point coordinates and third gaze duration; In response to the third gaze point coordinates being outside the display area of the long notification message in the first interface, a fourth interface is displayed, wherein the fourth interface includes the long notification message in a folded state, or the fourth interface does not include the long notification message.
4. The method according to claim 1, characterized in that The method further comprises: In response to the first gaze point coordinates being outside the display area of the notification message, a fifth interface is displayed after a first preset time period, and the fifth interface does not include the notification message.
5. The method according to any one of claims 1 to 4, characterized in that The electronic device includes a time-of-flight TOF image sensor and an RGB image sensor; The collecting of first image data by using a target image sensor includes: Get the current ambient light brightness; In response to the current ambient light brightness being greater than a first preset brightness threshold, controlling the RGB image sensor to collect first RGB image data; In response to the current ambient light brightness being less than or equal to a first preset brightness threshold, the TOF image sensor is controlled to collect first TOF image data.
6. The method according to claim 5, characterized in that After controlling the RGB image sensor to collect first RGB image data in response to the current ambient light brightness being greater than a first preset brightness threshold, the method further includes: If it is determined based on the first RGB image data that the user's eyes are not covered by reflective objects, the RGB image sensor is controlled to be turned off, and the TOF image sensor is controlled to be turned on to collect the first image data.
7. The method according to any one of claims 1 to 4, characterized in that The electronic device includes a time-of-flight TOF image sensor and an RGB image sensor; The collecting of first image data by using a target image sensor includes: Control the RGB image sensor to collect first RGB image data and the TOF image sensor to collect first TOF image data; If it is determined based on the first RGB image data and / or the first TOF image data that the user's eyes are covered by a reflective object, obtaining the current ambient light brightness; In response to the current ambient light brightness being greater than a first preset brightness threshold, the TOF image sensor is controlled to be turned off.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: displaying a sixth interface, wherein the sixth interface includes at least one calibration position; collecting fourth image data by means of a target image sensor; Determine the coordinates of a fourth gaze point of the user based on the fourth image data; An eye movement calibration result is determined based on the coordinates of the calibration position and the error between the coordinates of the fourth gaze point.
9. The method according to claim 8, characterized in that The electronic device includes a time-of-flight TOF image sensor and an RGB image sensor; The collecting the fourth image data by the target image sensor includes: The TOF image sensor is controlled to collect second TOF image data, and the RGB image sensor is controlled to collect second RGB image data.
10. The method according to claim 7 or 9, characterized in that: The electronic device includes a time-of-flight TOF image sensor and an RGB image sensor; the TOF image sensor is connected to the RGB image sensor via a connecting line; the connecting line is used to transmit a synchronization signal so that the TOF image sensor and the RGB image sensor synchronously collect image data based on the synchronization signal.
11. The method according to any one of claims 1 to 10, characterized in that The electronic device comprises a hardware abstraction HAL layer and a hardware layer; The HAL layer includes an intelligent perception control module and an intelligent perception TA, and the hardware layer includes a secure memory, and the secure memory is used to store image data collected by the target image sensor; The smart perception TA runs in a trusted execution environment; The determining the first eye movement data of the user based on the first image data of the user comprises: The intelligent perception control module obtains a file descriptor, where the file descriptor is used to describe a storage location of the first image data in the electronic device; The smart perception TA obtains the first image data from the secure memory according to the file descriptor; The smart perception TA encrypts the first image data and sends the encrypted first image data to the smart perception control module; The intelligent perception control module decrypts the encrypted first image data and The first eye movement data is determined by the smart perception control module based on the first image data; or the smart perception TA determines the first eye movement data according to the first image data, and sends the first eye movement data to the smart perception control module.
12. The method according to claim 11, characterized in that The electronic device further comprises a core layer; The HAL layer also includes a camera hardware abstraction layer HAL, the camera HAL includes a sensor node, the kernel layer also includes a camera driver, the hardware layer also includes at least one image sensor and a corresponding register, and the at least one image sensor is set in one or more cameras; The collecting of first image data by using a target image sensor includes: The sensor node obtains the identification and configuration parameters of the target image sensor to be controlled; The sensor node sends the identification and configuration parameters of the target image sensor to the camera driver; The camera driver configures the configuration data of the target image sensor in a register of the target image sensor according to the identifier of the target image sensor; The camera driver sends a message that data configuration is completed to the sensor node; The sensor node sends a first start command to the camera driver according to the message that the data configuration is completed; The camera driver sends a second start command to the target image sensor; The target image sensor obtains configuration parameters of the target image sensor from a register according to the second start command, and collects image data based on the configuration parameters.
13. The method according to claim 12, characterized in that The electronic device also includes an application layer and a framework layer; The application layer includes the system user interface UI, and the framework layer includes the intelligent perception service; After displaying the first interface, the method further includes: The system UI sends a smart perception registration request to the smart perception service; the smart perception registration request is used to start an eye movement recognition or eye movement calibration process; The smart perception service sends a smart perception process call request to the smart perception control module based on the smart perception registration request; the smart perception process call request includes an identifier and configuration parameters of a target image sensor; The intelligent perception control module creates a path for the target image sensor according to the identification and configuration parameters of the target image sensor.
14. The method according to claim 13, characterized in that The framework layer also includes a camera service; The path of creating the target image sensor comprises: The camera service receives a path creation request of a target image sensor sent by the Hui Perception Control Module; the path creation request includes an identifier and configuration parameters of the target image sensor; The camera service sends the identification and configuration parameters of the target image sensor to the camera HAL; The camera HAL creates a path to the target image sensor based on the identifier of the target image sensor; The camera HAL returns a result indicating that the path to the target image sensor is successfully created to the camera service; The camera service returns the path creation result of the target image sensor to the smart perception control module based on the received path creation result of the target image sensor.
15. The method according to claim 14, characterized in that The intelligent perception control module obtains the file descriptor, including: The smart perception control module sends a data request to the camera service, where the data request is used to obtain a file descriptor; The camera service calls the camera HAL to obtain the file descriptor according to the data request; The camera service sends the file descriptor to the smart perception control module.
16. An electronic device, characterized in that: The electronic device includes a display screen, an image sensor, a memory and one or more processors; the display screen, the image sensor, the memory and the processor are coupled; the display screen is used to display the image generated by the processor, the image sensor is used to collect image data, and the memory is used to store computer program code, and the computer program code includes computer instructions; when the processor executes the computer instructions, the electronic device executes the method described in any one of claims 1-15.
17. A readable storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 15.
Citation Information
Patent Citations
Message processing method, electronic equipment and readable storage medium
CN118550400A
Information processing method and mobile terminal
CN107608514A
Method and device for processing notification message, and terminal
CN107924449A
RGBD-based car driver state detection and identification system
CN108038453A
Message viewing method and terminal
CN110825226A
Cited By
Intelligent porthole system based on TOF infrared perception and use method thereof
CN120075593A
