Display method and electronic device

CN121387223BActive Publication Date: 2026-10-23HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410927364.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2026-10-23
Estimated Expiration
2044-07-10

AI Technical Summary

Technical Problem

然而,由于姿态传感器的功耗较大,当折叠屏电子设备处于低功耗状态(例如灭屏状态)的情况下,通常注销姿态传感器,导致姿态传感器无法采集折叠屏电子设备的姿态数据,进而导致折叠屏电子设备无法在处于低功耗状态的情况下,根据姿态数据切换折叠屏电子设备的显示状态

Benefits of technology

[0033]第七方面,提供了一种计算机程序产品,所述计算机程序产品包括:计算机程序代码,当所述计算机程序代码被电子设备运行时,使得该电子设备执行第一方面以及第一方面中任一种的显示方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121387223B_ABST
    Figure CN121387223B_ABST
Patent Text Reader

Abstract

The application relates to the terminal field and provides a display method and electronic equipment, the method is applied to a folding screen electronic equipment, and the problem that the folding screen electronic equipment cannot switch display screens in a low-power mode is solved, wherein the folding screen electronic equipment comprises a first display screen, a second display screen, a first sensor and a second sensor; when the first sensor is in a registration state and first sensor data corresponding to the first sensor can be acquired, the first sensor data corresponding to the first sensor is acquired, and the first display screen and the second display screen are switched according to the first sensor data; when the first sensor is in a deregistration state and the first sensor data cannot be acquired, second sensor data corresponding to the second sensor is acquired, and the first display screen and the second display screen are switched according to the second sensor data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminals, and more specifically, to a display method and an electronic device. Background Technology

[0002] With the popularization and rapid development of smart electronic devices, various functions and structures have emerged; for example, foldable screen electronic devices. Foldable screen electronic devices are bendable, enabling multiple usage modes. Based on the folding angle from largest to smallest, the usage modes of foldable screen electronic devices can be divided into several different folding states. Typically, foldable screen electronic devices include at least two displays, and the display states of at least two displays differ in different folding states. Foldable screen electronic devices usually use attitude sensors to collect attitude data and then switch the display state based on the collected attitude data. However, due to the high power consumption of attitude sensors, when the foldable screen electronic device is in a low-power state (e.g., screen-off state), the attitude sensor usually deactivates, causing the attitude sensor to be unable to collect attitude data, thus preventing the foldable screen electronic device from switching the display state based on attitude data in a low-power state.

[0003] Therefore, how to switch the display state of a foldable screen electronic device when it is in a low-power state has become an urgent problem to be solved. Summary of the Invention

[0004] This application provides a display method and an electronic device that can ensure that foldable screen electronic devices can meet users' needs in various scenarios and improve the user experience.

[0005] In a first aspect, a display method is provided for use in a foldable screen electronic device. The foldable screen electronic device includes a first display screen, a second display screen, a first sensor, and a second sensor. The first sensor is in a deregistered state when the foldable screen electronic device is in a low-power mode. The method includes:

[0006] If the first sensor is in the registration state, obtain the first sensor data corresponding to the first sensor, and switch the first display screen and the second display screen according to the first sensor data;

[0007] If the first sensor is in a deregistration state, obtain the second sensor data corresponding to the second sensor, and switch between the first display screen and the second display screen based on the second sensor data.

[0008] The first sensor is typically in a deregistered state when the foldable screen electronic device is in a low-power state. Low-power state can refer to the foldable screen electronic device being in a screen-off state.

[0009] The display method provided in this application is applied to a foldable screen electronic device. The foldable screen electronic device includes a first display screen, a second display screen, a first sensor, and a second sensor. When the first sensor is in a registered state and can acquire the first sensor data corresponding to the first sensor, the first sensor data corresponding to the first sensor is acquired, and the first display screen and the second display screen are switched according to the first sensor data. When the first sensor is in a deregistered state and cannot acquire the first sensor data, the second sensor data corresponding to the second sensor is acquired, and the first display screen and the second display screen are switched according to the second sensor data. It should be noted that the first sensor is usually deregistered when the foldable screen electronic device is in a low-power mode (e.g., screen off). That is to say, when the foldable screen electronic device is in a screen-off state, the first display screen and the second display screen can be switched through the second sensor data acquired by the second sensor, thus solving the problem that the foldable screen electronic device cannot switch displays in a low-power mode.

[0010] In conjunction with the first aspect, in some embodiments of the first aspect, the above-mentioned switching of the first display screen and the second display screen based on the second sensor data includes: obtaining the posture information of the foldable screen electronic device based on the second sensor data, wherein the posture information corresponds to the display information of the foldable screen electronic device, and the display information of the foldable screen electronic device is used to indicate the display screen in the foldable screen electronic device that is in a display state; and switching the first display screen and the second display screen based on the posture information.

[0011] It should be understood that the attitude information corresponding to the second sensor data at the current moment can be determined based on the correspondence between the second sensor data and the attitude information.

[0012] Switching between the first and second displays based on the data from the first sensor can also be achieved by obtaining the posture information of the foldable electronic device based on the data from the first sensor, and then switching between the first and second displays based on the posture information.

[0013] In this context, obtaining the attitude information of the foldable screen electronic device based on the first sensor data can also refer to determining the attitude information corresponding to the first sensor data at the current moment based on the correspondence between the first sensor data and the attitude information.

[0014] In the embodiments of this application, when the first sensor is deregistered, the foldable screen electronic device can determine the posture information of the foldable screen electronic device based on the second sensor data collected by the second sensor, and then switch between the first display screen and the second display screen according to the posture information. That is to say, the foldable screen electronic device adaptively switches between the first display screen and the second display screen according to the change in posture information, so that the display screen displayed by the foldable screen electronic device is more in line with the posture information of the foldable screen electronic device. Since the posture information of the foldable screen electronic device usually changes with the relative relationship between the user and the foldable screen electronic device, by displaying a display screen that is more in line with the posture information of the foldable screen electronic device, the user's needs can be better met.

[0015] In conjunction with the first aspect, in some embodiments of the first aspect, the above-mentioned attitude information includes: an unfolded state, a support state, a calendar state, a tent state, a first notebook state, a second notebook state, and a closed state.

[0016] The unfolded state can be as follows: Figure 6 As shown in (a) above, the stent state can be as follows: Figure 6 As shown in (b) above, the closed state can be as follows: Figure 6 As shown in (c) above, the calendar state can be as follows: Figure 7 As shown in (a) above, the tent state can be as follows: Figure 7 As shown in (b) above, the first notebook state can be as follows: Figure 7 As shown in (c) above, the first notebook state can be as follows: Figure 7 As shown in (d) in the figure.

[0017] In conjunction with the first aspect, in some embodiments of the first aspect, the first display screen includes a foldable flexible screen, the first laptop state refers to displaying a first interface in a first area of ​​the first display screen and displaying a second interface in a second area of ​​the first display screen, and the second laptop state refers to displaying the first interface in a second area of ​​the first display screen and displaying the second interface in the first area, the second interface including a black screen interface.

[0018] Among them, such as Figure 7 (c) or as in Figure 7 As shown in (d), the first display screen can refer to display screen 202, the first area can refer to the B side of display screen 202, and the second area can refer to the A side of display screen 202.

[0019] It is understandable that the first laptop state refers to displaying the first interface in the first area of ​​the first display screen and the second interface in the second area of ​​the first display screen. The second laptop state refers to displaying the first interface in the second area of ​​the first display screen and the second interface in the first area. The second interface includes a black screen interface. That is to say, the folding angle range is the same for the first laptop state and the second laptop state, only the area of ​​the screen is different.

[0020] In conjunction with the first aspect, in some embodiments of the first aspect, the first interface described above includes an all-weather display interface.

[0021] An always-on display interface refers to an interface that displays application thumbnails when the electronic device is in a screen-off or off state. For example, an always-on display interface could refer to an interface that displays clock or weather information when the electronic device is in a screen-off state.

[0022] In conjunction with the first aspect, in some embodiments of the first aspect, the method further includes: determining whether the first sensor is in a registered state through a device state management service of the application framework layer.

[0023] The display method provided in this application embodiment determines whether the first sensor is in a registered state through the device state management service of the application framework layer. When the first sensor is in a registered state, it obtains the first sensor data corresponding to the first sensor and switches the first display screen and the second display screen according to the first sensor data. When the first sensor is in a deregistered state, that is, when the first sensor is not in a registered state, it obtains the second sensor data corresponding to the second sensor and switches the first display screen and the second display screen according to the second sensor data. In this way, the switching between the first display screen and the second display screen in the foldable screen electronic device is uniformly managed by the device state management service, avoiding the timing problems caused by switching the display screen through other methods, and thus avoiding the problems of screen flickering or screen freezing caused by timing issues.

[0024] In conjunction with the first aspect, in some embodiments of the first aspect, the method further includes: if the first sensor is in a registered state, the device state management service discards the second sensor data corresponding to the second sensor.

[0025] The display method provided in this application embodiment allows switching between the first display screen and the second display screen if the first sensor is in a registered state. In this case, the device state management service can discard the second sensor data corresponding to the second sensor, avoiding the storage of redundant data in the foldable screen electronic device and saving storage space in the foldable screen electronic device.

[0026] In conjunction with the first aspect, in some embodiments of the first aspect, the first sensor described above includes an attitude sensor.

[0027] In conjunction with the first aspect, in some embodiments of the first aspect, the second sensor described above includes a motion sensor.

[0028] In a second aspect, an electronic device is provided, including a module / unit for performing the display method of the first aspect and any one thereof.

[0029] Thirdly, an electronic device is provided, comprising one or more processors, a memory, a first display screen, a second display screen, a first sensor, and a second sensor; the memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, and the one or more processors calling the computer instructions to cause the electronic device to execute: if the first sensor is in a registered state, acquiring first sensor data corresponding to the first sensor, and switching between the first display screen and the second display screen based on the first sensor data; if the first sensor is in a deregistered state, acquiring second sensor data corresponding to the second sensor, and switching between the first display screen and the second display screen based on the second sensor data.

[0030] Fourthly, an electronic device is provided, the electronic device including one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the electronic device to perform the display method of the first aspect and any one of the first aspects.

[0031] Fifthly, a chip system is provided, the chip system being applied to an electronic device, the chip system including one or more processors, the processors being configured to invoke computer instructions to cause the electronic device to perform the display method of the first aspect and any one thereof.

[0032] In a sixth aspect, a computer-readable storage medium is provided, the computer-readable storage medium storing computer program code, which, when executed by an electronic device, causes the electronic device to perform the display method of the first aspect and any one thereof.

[0033] In a seventh aspect, a computer program product is provided, the computer program product comprising: computer program code, which, when executed by an electronic device, causes the electronic device to perform the display method of the first aspect and any one thereof.

[0034] The display method and electronic device provided in this application are applied to a foldable screen electronic device. The foldable screen electronic device includes a first display screen, a second display screen, a first sensor, and a second sensor. When the first sensor is in a registered state and can acquire the first sensor data corresponding to the first sensor, the first sensor data corresponding to the first sensor is acquired, and the first display screen and the second display screen are switched according to the first sensor data. When the first sensor is in a deregistered state and cannot acquire the first sensor data, the second sensor data corresponding to the second sensor is acquired, and the first display screen and the second display screen are switched according to the second sensor data. It should be noted that the first sensor is usually deregistered when the foldable screen electronic device is in a low-power mode (e.g., screen off). That is to say, when the foldable screen electronic device is in a screen-off state, the first display screen and the second display screen can be switched through the second sensor data acquired by the second sensor, thus solving the problem that the foldable screen electronic device cannot switch displays in a low-power mode. Attached Figure Description

[0035] Figure 1 This is a schematic diagram of a hardware system for an electronic device applicable to this application;

[0036] Figure 2 This is a schematic diagram of a software system applicable to an electronic device of this application;

[0037] Figure 3 This is a schematic diagram of a software system applicable to an electronic device of this application;

[0038] Figure 4 This is a schematic diagram of a software system applicable to an electronic device of this application;

[0039] Figure 5 This is a schematic diagram of a foldable screen electronic device provided in an embodiment of this application;

[0040] Figure 6 This is a schematic diagram of a foldable screen electronic device in different postures according to an embodiment of this application;

[0041] Figure 7 This is a schematic diagram of a foldable screen electronic device in different postures according to an embodiment of this application;

[0042] Figure 8 This is a schematic diagram of a foldable screen electronic device that switches between different displays.

[0043] Figure 9 This is a schematic diagram of another type of foldable screen electronic device switching the display screen;

[0044] Figure 10 This is a flowchart illustrating a display method provided in an embodiment of this application;

[0045] Figure 11 This is a schematic diagram of switching displays in a foldable screen electronic device provided in an embodiment of this application;

[0046] Figure 12 This is a schematic diagram of the screen interface when switching displays in a foldable electronic device;

[0047] Figure 13 This is a flowchart illustrating another display method provided in an embodiment of this application;

[0048] Figure 14 This is a flowchart illustrating another display method provided in an embodiment of this application;

[0049] Figure 15 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0050] Figure 16 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0051] In the embodiments of this application, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "multiple" means two or more.

[0052] To facilitate understanding of the embodiments of this application, the relevant concepts involved in the embodiments of this application will be briefly explained first.

[0053] 1. Posture sensor.

[0054] An attitude sensor is a high-performance three-dimensional motion attitude measurement system. It includes motion sensors such as a three-axis gyroscope, a three-axis accelerometer, and a three-axis electronic compass. Through an embedded Advanced RISC Machine (ARM) processor, it obtains temperature-compensated three-dimensional attitude and orientation data. Utilizing quaternion-based three-dimensional algorithms and special data fusion techniques, it can output zero-drift three-dimensional attitude and orientation data in quaternion and Euler angle representation in real time.

[0055] 2. Hall sensor.

[0056] A Hall sensor is a magnetic field sensor based on the Hall effect; the output voltage of a Hall sensor is proportional to the magnetic field strength. As the name suggests, this device works based on the Hall effect principle; the Hall effect principle states that when a conductor is energized and a magnetic field is applied, a voltage is generated in the transverse direction of the conductor.

[0057] 3. Always On Display (AOD).

[0058] Always-on display is a feature that allows electronic devices to display useful thumbnail information. Even when the phone screen is off, specific information, such as clock information, calendar information, notification information, call information, etc., can be displayed in a minimized manner.

[0059] 4. Facial recognition.

[0060] Facial recognition is a biometric technology that identifies individuals based on their facial features. It involves using a camera or webcam to capture images or video streams containing faces, automatically detecting and tracking faces within the images, and then performing facial recognition on the detected faces. Facial recognition can also be called image recognition or face identification.

[0061] Some foldable screen electronic devices include a first display and a second display, with a camera for facial recognition included on the first display and a camera for facial recognition also included on the second display.

[0062] Some foldable screen electronic devices include a first display and a second display, with a camera for face recognition included on the first display and no camera for face recognition included on the second display.

[0063] Figure 1 A hardware system for an electronic device applicable to this application is shown.

[0064] Electronic device 100 can be a mobile phone, smart screen, tablet computer, wearable electronic device, in-vehicle electronic device, augmented reality (AR) device, virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), projector, etc. This application embodiment does not limit the specific type of electronic device 100.

[0065] Electronic device 100 may include processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0066] It should be noted that, Figure 1 The structure shown does not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include... Figure 1 The components shown may include more or fewer components, or the electronic device 100 may include... Figure 1 The components shown may be a combination of certain components, or the electronic device 100 may include... Figure 1 Sub-components of some of the components shown. Figure 1 The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0067] Processor 110 may include one or more processing units. For example, processor 110 may include at least one of the following processing units: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and neural network processing unit (NPU). These different processing units may be independent devices or integrated devices. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.

[0068] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0069] In some possible cases, the processor in electronic device 110 may include an application processor (AP) and a sensor control processor (SCP). The application processor can be used to transmit processed data to an application program for use; the sensor control processor can be used for data acquisition and processing from sensors.

[0070] In some embodiments, processor 110 may include one or more interfaces. For example, processor 110 may include at least one of the following interfaces: 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 SIM interface, and a USB interface.

[0071] For example, in an embodiment of this application, the processor 110 can be used to execute the display method provided in the embodiment of this application; for example, if the first sensor is in a registered state, the processor obtains the first sensor data corresponding to the first sensor and switches the first display screen and the second display screen according to the first sensor data; if the first sensor is in a deregistered state, the processor obtains the second sensor data corresponding to the second sensor and switches the first display screen and the second display screen according to the second sensor data.

[0072] Figure 1The connection relationships between the modules shown are merely illustrative and do not constitute a limitation on the connection relationships between the modules of the electronic device 100. Optionally, the modules of the electronic device 100 may also adopt a combination of various connection methods described in the above embodiments.

[0073] Electronic device 100 can implement display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0074] Display screen 194 can be used to display images or videos.

[0075] Optionally, the display screen 194 can be used to display images or videos. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini light-emitting diode (Mini LED), a micro light-emitting diode (Micro LED), a micro OLED, or a quantum dot light-emitting diode (QLED). In some embodiments, the electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.

[0076] For example, in an embodiment of this application, the electronic device 100 may be a foldable screen electronic device; the display screen 194 may include at least two displays. For example, the display screen 194 may include a first display screen and a second display screen.

[0077] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0078] The electronic device 100 may also include multiple sensors for collecting corresponding sensor data.

[0079] For example, the electronic device 100 may include an attitude sensor (not shown), a Hall sensor (not shown), and a motion sensor 180N.

[0080] The hardware system of electronic device 100 has been described in detail above. The software system of electronic device 100 will be introduced below.

[0081] Figure 2 This is a schematic diagram of the software system of the electronic device provided in the embodiments of this application.

[0082] like Figure 2 As shown, the system architecture may include an application layer, an application framework layer (FRW), a hardware abstraction layer (HAL), and a kernel layer.

[0083] The application layer may include settings applications or other applications; other applications include, but are not limited to: camera applications, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, SMS, AlwaysOn Display (AOD) applications, etc.

[0084] One such application is the always-on display application, which can be used to control electronic devices to display thumbnail information for certain applications when the screen is off or turned off. For example, an always-on display application can control an electronic device to display clock or weather information when the screen is off.

[0085] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer; the application framework layer may include some predefined functions.

[0086] For example, in an embodiment of this application, the application framework layer 220 may further include a system service module, which may include power management service, window management service, device status management service and sensor management service.

[0087] The power management service can be used to manage the power supply to the first and second displays when switching between them.

[0088] Window management services can be used to create and manage application windows, such as adding, removing, and updating windows.

[0089] The window management service can also track the window currently in focus and handle focus shifts.

[0090] The window management service can also control the layout of windows, determine the size, position, and hierarchy of windows.

[0091] Device status management services can be used to determine the status of electronic devices based on sensor data collected by sensors, and further determine whether to switch displays based on the status of the electronic devices. For example, the device status management service can determine whether to switch the currently displayed first display to a second display based on the status of the electronic devices. Furthermore, the device status manager can send corresponding instructions to the power management service and the window management service, so that the power management service controls the power supply to the display based on the instructions, and the window management service switches the content displayed on the display based on the instructions.

[0092] The sensor management service can be used to acquire sensor data collected by sensors. The sensor management service can then send the acquired sensor data to the device management service.

[0093] The Hardware Abstraction Layer (HAL) is used to abstract hardware. The HAL can include multiple interfaces.

[0094] For example, the hardware abstraction layer can have a motion sensor HIDL interface, a motion sensor HAL interface, other sensor HIDL interfaces, and other sensor HAL interfaces. Here, "other sensors" can refer to native system sensors, such as attitude sensors and Hall effect sensors. Motion sensors are sensors used to acquire state information of electronic devices.

[0095] HIDL (HAL interface definition language) refers to the interface between HAL and the user. These interfaces can be data types or methods, which are organized in interfaces and packages.

[0096] Optionally, motion sensors can be used for downsampling, determining whether an electronic device has entered a stationary state, rotating and blending the content displayed on the screen, and for dynamic control via dual gyroscope access.

[0097] In some cases, complex sensors may also use a sensor control processor (SCP) for data acquisition and processing. Therefore, the software framework of electronic devices may also include... Figure 2 The sensor subsystem framework layer and sensor subsystem driver layer are shown.

[0098] The sensor subsystem framework layer may include a sensor client manager and an event dispatch manager.

[0099] The sensor subsystem driver layer can include sensor drivers. Sensor drivers can send acquired sensor data to the event dispatch manager, which then sends it to the sensor client manager, and finally the sensor client manager sends it to the application processor side.

[0100] Sensor drivers can include motion sensor drivers and other sensor drivers.

[0101] In some possible cases, such as Figure 3 As shown, a sensor integration layer, Sensor Hub, can be included between the system's software framework and the sensor's software framework. Sensor Hub can be used to process various sensor data and perform fusion processing on the sensor data.

[0102] Sensor Hub can include virtual sensors and sensor drivers.

[0103] The virtual sensor can include algorithms corresponding to various sensors, such as downsampling algorithms, stationary detection algorithms, rotation fusion algorithms, and dual gyroscope access dynamic control algorithms for motion sensors; algorithms corresponding to attitude sensors; and algorithms corresponding to Hall sensors.

[0104] Sensor drivers can include accelerometer sensor drivers and gyroscope sensor drivers.

[0105] Sensor drivers can also include Hall sensor drivers.

[0106] In some cases, native libraries can also be included between the application framework layer and the hardware abstraction layer, such as... Figure 3 As shown. The local library can include sensor services and device status services.

[0107] Sensor data collected by the attitude sensor and Hall sensor can be sent to the sensor service in the local library via the other sensor HAL interface and other sensor HIDL interface in the hardware abstraction layer. From there, it is sent to the sensor management service in the application framework layer, and then from the sensor management service to the window manager in the application framework layer, or other applications in the application layer. These other applications can determine the folding state of the electronic device based on the sensor data collected by the attitude sensor and Hall sensor, and then perform corresponding operations based on the folding state, including but not limited to switching the display screen.

[0108] Sensor data collected by the motion sensor can be sent to the device status service in the local library via the motion sensor HAL interface and motion sensor HIDL interface in the hardware abstraction layer. This data is then sent to the device status management service in the application framework layer via the device status service in the local library, and finally to the all-day display (AOD) application in the application layer. AOD can determine the folding state of the electronic device based on the sensor data collected by the motion sensor, and then perform corresponding operations based on the folding state, including but not limited to switching the display screen. Switching the display screen includes... Figure 5 The display switching between display screens 201 and 202 shown in (a) includes switching the display orientation on display screen 201 and switching the display orientation on display screen 202. In one possible scenario, an image may be displayed on side A of display screen 202 while side B of display screen 202 is black, or a black screen may be displayed on side A of display screen 202 while an image is displayed on side B of display screen 202. The display switching may also include switching between displaying an image on side A of display screen 202 and displaying a black screen on side B of display screen 202, and switching between displaying a black screen on side A of display screen 202 and displaying an image on side B of display screen 202.

[0109] In one possible scenario, the data collected by the attitude sensor, Hall sensor, and motion sensor can be arranged according to... Figure 4 The transmission path shown is as follows: Figure 4 As shown, sensor data collected by the attitude sensor and Hall sensor can be sent to the sensor service in the local library through the other sensor HAL interface and other sensor HIDL interface in the hardware abstraction layer. This data is then sent to the sensor management service in the application framework layer via the sensor service in the local library, and then to the window manager in the application framework layer. Finally, the window manager sends the sensor data to the application in the application layer that needs to acquire it. Similarly, sensor data collected by the motion sensor can be sent to the device status service in the local library through the motion sensor HAL interface and motion sensor HIDL interface in the hardware abstraction layer. This data is then sent to the device status management service in the application framework layer, and then to the window manager in the application framework layer. Finally, the window manager sends the device status management service to the always-on display (AOD) application in the application layer. AOD can determine the folding state of the electronic device based on the sensor data collected by the motion sensor, and then perform corresponding operations based on the folding state, including but not limited to switching the display screen.

[0110] The following describes the various folding postures of electronic devices.

[0111] Typically, a foldable electronic device can include a flexible screen that can be folded. Depending on the folding angle of the flexible screen and the placement of the foldable electronic device along the direction of gravity, the posture of the foldable electronic device can include: unfolded state, stand state, calendar state, tent state, first notebook state, second notebook state, and closed state.

[0112] For example, the foldable screen phone 100 includes a display screen 201 and a display screen 202, wherein the display screen 202 is a foldable flexible screen. When the display screen 202 is in the unfolded state, the display screen 202 is in the open state, such as... Figure 5 As shown in (a); when display screen 202 is in the folded state, display screen 201 is in the open state and display screen 202 is in the closed state, as shown in (a). Figure 5 As shown in (b) above. Here, "display 202 is on" means that the display shows relevant information, and the information displayed can be changed according to the user's operation. "Display 202 is off" means that display 202 does not display any information, and the foldable screen electronic device is not supplying power to display 202. Display 201 is in a similar on or off state to display 202 described above, and will not be repeated here.

[0113] Optionally, such as Figure 5 As shown in (a), axis k can be the axis when the foldable screen electronic device is bent; display screen 201 can be located to the left of axis k, that is, it can refer to the back of the B side of display screen 202; the B side of display screen 202 can include a camera, and display screen 201 can also include a camera.

[0114] Optionally, such as Figure 6 As shown in (b), the folding angle can refer to the angle between the inner screen of side A and the inner screen of side B in a foldable screen electronic device.

[0115] For example, the folding angle can be as follows Figure 6 As shown in (b) in the figure, the folding angle can refer to the folding angle C.

[0116] If the folding angle of the display screen 202 is within the first range, the foldable screen electronic device is in the unfolded state, for example, as Figure 6 As shown in (a) of the diagram. The first range can be greater than 150° and less than or equal to 180°. When the foldable screen electronic device is in the unfolded state, display screen 202 is typically in the open state, and display screen 201 is in the closed state.

[0117] If the folding angle of the display 202 is within the second range, the foldable screen electronic device is in stand mode, for example, as Figure 6As shown in (b) of the diagram. The second range can be greater than 45° and less than or equal to 150°. When the foldable screen electronic device is in stand mode, display 202 is typically in the open state, and display 201 is in the closed state.

[0118] If the folding angle of the display screen 202 is within the third range, the foldable screen electronic device is in a closed state, for example, as Figure 6 As shown in (c) above. The third range can be greater than 0° and less than or equal to 45°. When the foldable screen electronic device is in the closed state, display screen 202 is typically in the closed state, and display screen 201 is in the open state.

[0119] If the folding angle of the display screen 202 is within the fourth range, one side of the display screen 202 (e.g., Figure 5 The display screen 202 shown in (a) is placed horizontally (side A) and remains in the above state for a preset time. The foldable screen electronic device is in calendar state, for example, as shown in (a). Figure 7 As shown in (a) of the diagram. The fourth range can be greater than 0° and less than or equal to 80°. The preset duration can be 400ms. When the foldable screen electronic device is in calendar mode, display screen 202 is typically off, and display screen 201 is on.

[0120] If the folding angle of display screen 202 is within the fifth range, and the midpoint of the folding angle of display screen 202 is perpendicular to the horizontal direction, the foldable screen electronic device is in a tent state, for example, as... Figure 7 As shown in (b) of the diagram. The fifth range can be greater than 0° and less than or equal to 100°. When the foldable screen electronic device is in tent mode, display 202 is typically closed, and display 201 is open.

[0121] It should be noted that, compared to the foldable screen electronic device being in calendar mode and tent mode, both involve display screen 201 being open and display screen 202 being closed, but the display orientation of display screen 201 differs. When the foldable screen electronic device is in calendar mode, the display orientation of display screen 201 is the first orientation, such as... Figure 7 As shown in (a); when the foldable screen electronic device is in tent mode, the display orientation of the display screen 201 is the second orientation, as shown in (a). Figure 7 As shown in (b) in the figure; wherein the first direction and the second direction are opposite.

[0122] If the folding angle of the display screen 202 is within the sixth range, one side of the display screen 202 (e.g., Figure 5 (a) The A side of the display screen 202 shown in the figure is placed horizontally, and the other side of the display screen 202 (e.g., Figure 5In (a) shown in the diagram, the angle between side B of the display 202 and the horizontal plane is within the seventh range, and the foldable screen electronic device is in the first notebook state, for example, as Figure 7 As shown in (c) above. The sixth range can be greater than 90° and less than or equal to 150°, and the seventh range can be 90° ± 10°. When the foldable screen electronic device is in its first notebook state, the display 201 is typically closed, and one side of the display 202 (e.g., Figure 5 (a) In the diagram, side A of the display screen 202 is in the on state and is displaying an image normally. The other side of the display screen 202 (e.g., Figure 5 The B side of the display screen 202 shown in (a) does not display an image and can display black.

[0123] If the folding angle of display screen 202 is within the eighth range, the other side of display screen 202 (for example, Figure 5 (a) The B side of the display screen 202 shown in the figure is placed horizontally, and one side of the display screen 202 (e.g., Figure 5 In (a) shown in the diagram, the angle between surface A of the display 202 and the horizontal plane is within the ninth range, and the foldable screen electronic device is in the second notebook state, for example, as Figure 7 As shown in (d) in the diagram. The eighth range can be greater than 90° and less than or equal to 150°, and the ninth range can be 270° ± 10°. When the foldable screen electronic device is in its first notebook state, the display 201 is typically closed, and the other side of the display 202 (e.g., Figure 5 The B side of the display screen 202 shown in (a) is in the on state and is displaying the image normally. One side of the display screen 202 (e.g., Figure 5 The A side of the display screen 202 shown in (a) does not display an image and can display black.

[0124] It should be noted that the sixth and eighth ranges can be the same or different, and this application embodiment does not limit this. Taking the sixth and eighth ranges being the same as an example, when the sixth and eighth ranges are the same, compared with the second notebook state, in the first notebook state, the A side of the display screen 202 is displayed normally, and the B side of the display screen 202 is black; in the second notebook state, the B side of the display screen 202 is displayed normally, and the A side of the display screen 202 is black. That is, when the foldable screen electronic device switches from the first notebook state to the second notebook state, or from the second notebook state to the first notebook state, it is necessary to switch the display area and display direction of the display screen 202.

[0125] In some cases, foldable screen electronic devices acquire their posture through attitude sensors and Hall sensors.

[0126] Among them, the attitude sensor consumes a lot of power. In order to meet the low power consumption requirements of electronic devices, the attitude sensor is usually in sleep mode when the foldable screen electronic device is in the off state, and cannot collect sensor data used to determine the attitude of the electronic device.

[0127] The Hall sensor can only determine whether the foldable electronic device is in a closed state. For example, if the folding angle of the foldable electronic device is between 0° and 15°, the Hall sensor reports to the window manager that the foldable electronic device is in a folded state; if the folding angle is between 15° and 180°, it reports to the window manager that the foldable electronic device is in an open state. Then, based on the Hall sensor's report that the foldable electronic device is in an open state, the window manager wakes up the attitude sensor and collects corresponding data through the attitude sensor to determine whether the foldable electronic device is in an open state, a stand state, a calendar state, a tent state, a first laptop state, a second laptop state, or a closed state.

[0128] In this scenario, if the user is in the first laptop mode of the foldable electronic device, that is, when side A of display 202 is open and display 201 is closed, such as Figure 8 As shown in (a) above. The user turns off the display screen of the foldable electronic device. With the screen off, the foldable electronic device deactivates the attitude sensor, putting it into sleep mode. Then, the user folds the foldable electronic device so that the folding angle is less than 15°. At this time, since the foldable electronic device is in a closed state, the display screen 201 should be in an all-weather display state, for example, displaying time information on the display screen 201. Figure 8 As shown in (b) above. And display screen 202 should be in the off state.

[0129] However, because the folding angle of the foldable electronic device, as detected by the Hall sensor, is less than 15°, the window manager does not wake up the attitude sensor. Therefore, the attitude sensor cannot collect data, and consequently, the foldable electronic device cannot determine its folding state based on the data collected by the attitude sensor. Consequently, the foldable electronic device cannot switch displays based on its folding state. The display state of the foldable electronic device remains consistent with its state before the screen went out; that is, side A of display 202 is in the open state, and display 201 is in the closed state. Figure 8As shown in (c) above. In this case, the foldable screen electronic device wirelessly achieves all-day AOD display according to the folded state of the foldable screen electronic device.

[0130] In some possible scenarios, foldable screen electronic devices will also perform facial recognition via cameras. Specifically, display screen 201 may contain one camera, such as a first camera, and display screen 202 may contain one camera, such as a second camera. The second camera can be located on the B-side of display screen 202, for example... Figure 5 As shown in (a) in the figure.

[0131] In this scenario, if the user is in the first laptop mode of the foldable electronic device, that is, when side A of display 202 is open and display 201 is closed, such as Figure 9 As shown in (a) of the diagram. The foldable electronic device performs facial recognition via a second camera 2021 on the display screen 201. The user turns off the display screen of the foldable electronic device. As the foldable electronic device turns off, it deactivates the posture sensor, putting it into a sleep state. Then, the user folds the foldable electronic device so that the folding angle is less than 15°. At this time, if the user manually opens the foldable electronic device using a button, the foldable electronic device is in a closed state, the display screen 201 should be in an open state, and the display screen 202 should be in a closed state, as shown in (a). Figure 9 As shown in (b), the foldable screen electronic device can perform face recognition via the first camera 2011 on the display screen 201.

[0132] However, because the folding angle of the foldable electronic device obtained by the Hall sensor is less than 15°, the window manager reports the posture of the foldable electronic device as folded. The window manager does not wake up the posture sensor, therefore the posture sensor cannot collect data. Consequently, the foldable electronic device cannot determine its folding state based on the data collected by the posture sensor, and therefore cannot switch the display screen based on its folding state. The display state of the foldable electronic device remains consistent with the display state before the screen is turned off, that is, side A of display screen 202 is in the open state, and display screen 201 is in the closed state, such as... Figure 9 As shown in (c) above. In this case, the foldable screen electronic device cannot call the first camera set on the display 201 for face recognition.

[0133] In this scenario, the foldable electronic device can obtain its folding state through a first application in the application layer, and then notify the device state management service of the folding state through the first application to switch the display screen. The first application can be an always-on display application or any other application that uses the camera for facial recognition; this embodiment does not impose any limitations on this.

[0134] The following example uses a 24 / 7 display application as an example. Figure 10 The embodiments shown will be described in detail. Figure 10 As shown, the method includes:

[0135] S101, The all-weather display application obtains the attitude information of the foldable screen electronic device and determines whether to switch the display screen based on the attitude information.

[0136] It should be understood that when the attitude sensor is deactivated and cannot collect the corresponding sensor data, the all-weather display application can obtain data from a virtual motion sensor and then determine the attitude information of the foldable screen electronic device based on the data obtained from the virtual motion sensor.

[0137] Optionally, the data acquired by the motion sensor may include, but is not limited to, acceleration data, gyroscope data, or other data collected by the motion sensor from the display screen.

[0138] Among them, the data acquired by the motion sensor in the virtual sensors of Sensor Hub can be obtained through, for example... Figure 3 The transmission path shown is transmitted to the all-weather display application, that is, it is sent to the device status service in the local library through the motion sensor HAL interface and motion sensor HIDL interface in the hardware abstraction layer, then sent to the device status management service in the application framework layer through the device status service in the local library, and finally sent to the all-weather display application in the application layer by the device status management service.

[0139] If the display screen of the foldable electronic device needs to be switched based on the posture information, the all-weather display application sends switching information to the foldable screen management service, which is to execute S102. The display screen switching information can be used to indicate the information for switching the display screen, for example, switching from display screen 201 to display screen 202, or switching from display screen 202 to display screen 201.

[0140] S102, The always-on display application sends display switching information to the foldable screen management service.

[0141] Among them, the all-weather display application can carry the display switching information in setDisplayMode, and then send the display switching information to the foldable screen management service setDisplayMode.

[0142] S103, The foldable screen management service sends a display switching request to the device status management service.

[0143] The display switching request can be carried in requestState(). The foldable screen management service can send the display switching request by sending requestState() to the device state management, thus triggering the display switching.

[0144] S104. The device status management service sends a display screen switching notification to the display management service.

[0145] The display switching notification can be carried in onStatechange(). The device state management service can send the display switching notification by sending onStatechange() to the display management service.

[0146] S105. The device status management service sends a display screen switching notification to the all-weather display management service.

[0147] The display switching notification can be carried in onStatechange(). The device state management service can send the display switching notification by sending onStatechange() to the 24 / 7 display management service.

[0148] S106. The display management service sends a window refresh notification to the window manager.

[0149] The window refresh notification can indicate information for switching displays, such as switching from display 201 to display 202, or vice versa. At this point, the always-on display application synchronizes the display switching information with the window manager. The window manager can then determine whether to display the desired interface on display 201 or display 202 based on the synchronized display switching information from the always-on display application and the information of the display to be displayed. The desired interface can refer to the always-on display interface, which displays specified information in a minimized state, such as clock information, calendar information, notification information, call information, etc.

[0150] S107, The display management service exchanges information between logical display screen 201 and logical display screen 202.

[0151] It should be understood that during the display process of foldable screen electronic devices, such as... Figure 11 As shown in (a), after determining the display information of display screen 201 and display screen 202 in the window manager, the display information in display screen 201 is sent to the logical display screen 201 in the display management service, and the display content of display screen 202 is sent to the logical display screen 202 in the display management service. Then, the logical display screen 201 sends the display information of display screen 201 to the physical display screen 201 in the display management service, and the logical display screen 202 sends the display content of display screen 202 to the physical display screen 202 in the display management service.

[0152] If a foldable screen electronic device switches displays, the display content of displays 201 and 202 is usually not switched in the window manager. Instead, the display management service switches the display content of logical display 201 from being sent to physical display 201 to being sent to physical display 202, and vice versa. Figure 11 As shown in (b) above. That is to say, the display switching of the foldable screen electronic device is realized by exchanging the logic display 201 and the logic display 202.

[0153] S108, Display management service switches the power-on state between display screen 201 and display screen 202.

[0154] S109. The display management service enables the backlight of the currently implemented display screen.

[0155] S110, the all-weather display application displays the all-weather display interface.

[0156] Understandably, after the always-on display application obtains the posture information of the foldable screen electronic device, it can display the always-on display interface after a preset interval because it synchronizes the display switching information with the window manager. For example, the preset interval could be 400ms; the always-on display application could send the display switching information to the foldable screen management service and then display the always-on display interface after 400ms.

[0157] Among them, the 24 / 7 display application can call the window manager to display the 24 / 7 display interface.

[0158] In the embodiments of this application, when the foldable screen electronic device is in a screen-off state and the posture sensor cannot collect data, the foldable screen electronic device can determine the posture information of the foldable screen electronic device based on the data collected by the virtual motion sensor through a first application (e.g., an always-on display application). Then, the first application determines the display switching information of the foldable screen electronic device and synchronizes the display switching information to the window manager so that the window manager can switch the display of the foldable screen electronic device, thus avoiding the situation where the foldable screen electronic device cannot switch the display when the screen is off.

[0159] S111, The all-weather display application sends a wake-up command to the TP driver.

[0160] Typically, users wake up the display by tapping on it. For example, when a user taps on the screen... Figure 5 Double-clicking on display 201, as shown in (a), wakes up display 201, powering it on and displaying the corresponding content. When a user double-clicks display 201, a TP101 command is typically sent to the TP driver to wake it up. During display switching based on attitude information, since the user does not wake up the display, the all-weather display application can send a TP101 command to the TP driver to wake it up. The TP driver can be used to enable the display's call operation.

[0161] S112, The all-weather display management service sends a display switching notification to the TP driver.

[0162] The display switching notification can be used to indicate information about switching displays, such as switching from display 201 to display 202, or vice versa. The 24 / 7 display management service sends the display switching notification to the TP driver so that the TP driver enables the display indicated by the display switching notification.

[0163] For example, if the display switching information indicates a switch from display 201 to display 202, then the TP driver will disable display 201 and enable display 202 based on the display switching information.

[0164] S113, The all-weather display management service sends a power-on command to the TP driver.

[0165] The TP driver power-on command is used to instruct the corresponding TP driver of the display screen to power on. For example, if the display screen switching information indicates a switch from display screen 201 to display screen 202, then when the TP driver receives the TP driver power-on command sent by the all-weather display management service, it will power down the TP driver of display screen 201 and power on the TP driver of display screen 202.

[0166] The display method provided in this application is applied to a foldable screen electronic device. The foldable screen electronic device includes a first display screen, a second display screen, a first sensor, and a second sensor. When the first sensor is in a registered state and can acquire the first sensor data corresponding to the first sensor, the first sensor data corresponding to the first sensor is acquired, and the first display screen and the second display screen are switched according to the first sensor data. When the first sensor is in a deregistered state and cannot acquire the first sensor data, the second sensor data corresponding to the second sensor is acquired, and the first display screen and the second display screen are switched according to the second sensor data. It should be noted that the first sensor is usually deregistered when the foldable screen electronic device is in a low-power mode (e.g., screen off). That is to say, when the foldable screen electronic device is in a screen-off state, the first display screen and the second display screen can be switched through the second sensor data acquired by the second sensor, thus solving the problem that the foldable screen electronic device cannot switch displays in a low-power mode.

[0167] In general, always-on display applications typically execute the steps of displaying the always-on display interface at preset intervals after determining that the foldable electronic device needs to switch displays. However, these preset intervals are usually based on user experience. In some possible cases, display malfunctions may occur due to timing discrepancies. These display malfunctions include the outer screen of the foldable electronic device (equivalent to display 201) freezing, the outer screen of the foldable electronic device lighting up when the foldable electronic device is in the unfolded state, or screen flickering during display switching.

[0168] For example, foldable screen electronic devices are in their first laptop mode and display an always-on display interface, such as... Figure 12 As shown in (a) above. The foldable screen electronic device switches from the first notebook state to the closed state, and the foldable screen electronic device can proceed according to... Figure 10The steps shown are for switching the display screen. Specifically, after the all-weather display application determines that the foldable screen electronic device needs to switch the display screen, it sends display screen switching information to the foldable screen management service, which then sequentially passes this information to the display management service. Upon receiving the display screen switching information, the display management service can execute steps S107 to S109 to achieve the display screen switch. Simultaneously, after determining that the foldable screen electronic device needs to switch the display screen, the all-weather display application displays the all-weather display interface at preset intervals. These preset intervals are also based on user experience. If, within the preset interval, the foldable screen electronic device has not completed the steps of "the all-weather display application sending display screen switching information to the foldable screen management service, which then sequentially passes this information to the display management service, and the display management service executing steps S107 to S109 to achieve the display screen switch," then the foldable screen electronic device will display the content of display screen 201 on display screen 202 for a short period before switching the content of display screen 201 back to display screen 201. While display screen 202 is displaying the content displayed on display screen 201, display screen 201 displays a black screen. Then, after a short interval, the content displayed on display screen 201 is displayed on display screen 201 again. Figure 12 As shown in (b) above. This situation is commonly referred to as screen flickering between the inner and outer screens.

[0169] For example, when the all-weather display application displays the all-weather display interface 2022, it sends the TP101 command to the TP driver to enable it. The all-weather display management service can send a display switching command and a TP driver power-on command to the TP driver after receiving the display switching information from the device status management service. If the TP101 command from the TP driver is sent before the all-weather display management service sends the display switching command and the TP driver power-on command, the TP driver can execute TP driver enabling, display enabling, and TP driver power-on sequentially. However, if the TP101 command from the TP driver is sent after the all-weather display management service sends the display switching command and the TP driver power-on command, the TP driver will receive the display switching command or the TP driver power-on command, preventing the TP driver from being enabled and thus preventing the sequential enabling of the display or power-on of the TP driver. This will cause the display to be unable to obtain reporting information and therefore unable to perform corresponding operations, i.e., unresponsive to operations on the display. This situation can also be called a frozen display.

[0170] To avoid screen freezing or flickering issues on both the inner and outer screens caused by the aforementioned timing problems, foldable electronic devices can determine their posture information using data acquired by a motion sensor when the posture sensor is in a deregistered state. Conversely, when the posture sensor is in a registered state, the motion sensor data is discarded, and the posture sensor data is used to determine the device's posture information. Specifically, the posture sensor typically deregisters when the foldable electronic device is in a screen-off state. Therefore, determining the posture information using motion sensor data when the posture sensor is deregistered can mean that the device's posture information is determined using motion sensor data when the screen is off. Alternatively, the posture sensor typically registers when the foldable electronic device is in a screen-on state. Therefore, determining the posture information using posture sensor data when the posture sensor is registered can mean that the motion sensor data is discarded, and the posture sensor data is used to determine the device's posture information when the screen is on.

[0171] Foldable screen electronic devices can be Figure 4 The transmission path shown uniformly reports the data collected by the motion sensor, attitude sensor, and Hall sensor to the window management service, which then sends it to the device status management service. Finally, the device status management service determines whether to switch screens and executes subsequent related operations. The following is a breakdown of the process... Figure 13 and Figure 14 The embodiments shown will be described in detail below.

[0172] Figure 13 This is a flowchart illustrating a display method provided in an embodiment of this application, as shown below. Figure 13 As shown, the method includes:

[0173] S201. The all-weather display application sends a gesture listening request to the foldable screen management service.

[0174] Among them, the posture listening request is used to request the foldable screen management service to listen for the posture information of foldable screen electronic devices.

[0175] Since the data acquired by the motion sensor is not reported to the always-on display application, the always-on display application does not determine the posture information of the foldable screen electronic device based on the data acquired by the motion sensor. In this case, the always-on display application can request the foldable screen management service to listen for the posture information of the foldable screen electronic device. When the posture of the foldable screen electronic device changes, it can send the changed posture information to the always-on display application, so that the always-on display application can display the always-on display interface based on the changed posture information.

[0176] In other words, the all-weather display application does not need to determine the attitude information of the foldable screen electronic device based on the data reported by the motion sensor. Instead, it can directly listen to the attitude information of the foldable screen electronic device through the foldable screen management service. This avoids the timing problems mentioned in S101 to S113 that occur when the all-weather display application determines the attitude information based on the data obtained by the motion sensor and then switches the display screen according to the attitude information.

[0177] In one possible scenario, the motion sensor will only send the collected data to the device status management service when the attitude sensor is deregistered, further avoiding timing issues during the display switching process.

[0178] For example, such as Figure 14 As shown, when registering various sensors on a foldable screen electronic device, the attitude sensor can be registered when the screen is on and deregistered when the screen is off. For example... Figure 14 As shown, it includes:

[0179] S2011, Register motion sensor.

[0180] S2012. When the foldable screen electronic device is in the on state, register the attitude sensor; when the foldable screen electronic device is in the off state, deregister the attitude sensor.

[0181] S2013, Register Hall sensor.

[0182] S2014. Determine whether the attitude sensor has been registered.

[0183] If an attitude sensor is registered, the data collected by the motion sensor is discarded, which means executing S2015.

[0184] If the note sensor is deregistered, the attitude information is determined based on the motion sensor data, which is to execute S2016.

[0185] S2015, Discard the data collected by the motion sensor.

[0186] S2016. Determine attitude information based on motion sensor data.

[0187] S2017. Determine attitude information based on attitude sensor data and / or Hall sensor data.

[0188] S2018. Determine if the attitude information is valid.

[0189] The attitude information can refer to the attitude information determined based on motion sensors, or it can be determined based on attitude sensor data and / or Hall sensors.

[0190] For example, when a foldable electronic device is in the on state, the data collected by the motion sensor will be discarded because the attitude sensor is in the registered state. Therefore, the attitude information can be determined based on the attitude sensor data and / or the Hall sensor.

[0191] For example, when a foldable electronic device is in a screen-off state, the posture sensor cannot acquire data because it is in a deregistered state. In this case, the posture information can be determined based on the motion sensor.

[0192] It is understandable that motion sensors, attitude sensors, and Hall effect sensors typically acquire data periodically according to a preset sampling period. Optionally, if the attitude information determined based on the data acquired by the sensors at the current moment is inconsistent with the attitude information determined at the previous sampling moment, then the attitude information is valid; if the attitude information determined based on the data acquired by the sensors at the current moment is consistent with the attitude information determined at the previous sampling moment, then the attitude information is invalid.

[0193] If the attitude information is valid, it is sent to other modules so that they can start executing the display switching process, which is also called S2019.

[0194] If the attitude information is invalid, that is, if the attitude information determined by the data collected by the sensor at the current moment is consistent with the attitude information determined at the previous sampling moment, then the foldable screen electronic device does not need to change the display state of the display screen. Therefore, the attitude information can be discarded without any processing, that is, S20110 is executed.

[0195] S2019, Send attitude information.

[0196] S20110, Discard attitude information.

[0197] The display method provided in this application embodiment allows switching between the first display screen and the second display screen if the first sensor is in a registered state. In this case, the device state management service can discard the second sensor data corresponding to the second sensor, avoiding the storage of redundant data in the foldable screen electronic device and saving storage space in the foldable screen electronic device.

[0198] S202. When the foldable screen electronic device is in the screen-on state, the device state management service receives data from the first sensor.

[0199] The first sensor may include an attitude sensor and / or a Hall sensor.

[0200] The data from the first sensor is carried in onSensorChanged(sensorEvent). The first sensor can send onSensorChanged(sensorEvent) to the device state management service so that the device state management service can obtain the data from the first sensor.

[0201] S203. If the device status management service determines to switch the display screen based on the first data, it sends a display screen switching notification to the all-weather management service.

[0202] The display switching notification may carry display switching information, which can be used to indicate the switching of the display screen, such as switching from display screen 201 to display screen 202, or switching from display screen 202 to display screen 201.

[0203] Display switching notifications can be carried in onStatechange(). The device state management service can send display switching notifications by sending onStatechange() to the display management service.

[0204] S204, The all-weather management service sends a display switching notification to the TP driver.

[0205] The display switching notification can be used to indicate information about switching displays, such as switching from display 201 to display 202, or vice versa. The 24 / 7 display management service sends the display switching notification to the TP driver so that the TP driver enables the display indicated by the display switching notification.

[0206] For example, if the display switching information indicates a switch from display 201 to display 202, then the TP driver will disable display 201 and enable display 202 based on the display switching information.

[0207] S205, the all-weather management service sends a power-on command to the TP driver.

[0208] The TP driver power-on command is used to instruct the corresponding TP driver of the display screen to power on. For example, if the display screen switching information indicates a switch from display screen 201 to display screen 202, then when the TP driver receives the TP driver power-on command sent by the all-weather display management service, it will power down the TP driver of display screen 201 and power on the TP driver of display screen 202.

[0209] Through the steps shown in S202 to S205, the foldable screen electronic device can determine the attitude information of the foldable screen electronic device through the data reported by the attitude sensor and / or Hall sensor.

[0210] S206. When the foldable screen electronic device is in the off state, the device state management service receives data from the second sensor.

[0211] The second sensor can refer to a motion sensor.

[0212] Optionally, the data from the second sensor may include, but is not limited to, acceleration data, gyroscope data, or other data from the display screen acquired by the motion sensor.

[0213] S207. If the device status management service determines to switch the display screen based on the second data, it sends the display screen switching information to the display management service.

[0214] Among them, the device status management service can determine the posture information of the foldable screen electronic device based on the second data, and then determine whether to switch the display screen based on the posture information of the foldable screen electronic device at the current moment.

[0215] Optionally, the device status management service can determine the attitude information of the foldable screen electronic device based on the correspondence between the second data and the attitude information of the foldable screen electronic device.

[0216] For example, the hn_device_state_configuration.xml file in the / vendor / etc / devicestate directory includes a first notebook state and a second notebook state. After reporting the motion sensor data to the device state management service, the posture of the foldable screen electronic device is determined based on the data value in the motion sensor data.

[0217] The `hn_device_state_configuration.xml` file in the ` / vendor / etc / devicestate` directory includes:

[0218]

[0219] Among them, STATE_NOTEBOOK_A represents the first notebook state, and STATE_NOTEBOOK_B represents the second notebook state.

[0220] When the data from the second sensor falls within the range corresponding to the following code, the attitude information corresponding to the data from the second sensor is the first notebook state.

[0221] “ <min-inclusive> 2< / min-inclusive>

[0222] <max-inclusive> 2< / max-inclusive>

[0223]

[0224] <value>

[0225] <min-inclusive> 3< / min-inclusive>

[0226] <max-inclusive> 3< / max-inclusive> "

[0227] When the data from the second sensor falls within the range corresponding to the following code, the attitude information corresponding to the data from the second sensor is the second notebook state.

[0228] " <min-inclusive> 2< / min-inclusive>

[0229] <max-inclusive> 2< / max-inclusive>

[0230] < / value>

[0231] <value>

[0232] <min-inclusive> 4< / min-inclusive>

[0233] <max-inclusive> 4< / max-inclusive> "

[0234] S208, The display management service exchanges information between logical display screen 201 and logical display screen 202.

[0235] It should be understood that during the display process of foldable screen electronic devices, such as... Figure 11 As shown in (a), after determining the display information of display screen 201 and display screen 202 in the window manager, the display information in display screen 201 is sent to the logical display screen 201 in the display management service, and the display content of display screen 202 is sent to the logical display screen 202 in the display management service. Then, the logical display screen 201 sends the display information of display screen 201 to the physical display screen 201 in the display management service, and the logical display screen 202 sends the display content of display screen 202 to the physical display screen 202 in the display management service.

[0236] If a foldable screen electronic device switches displays, the display content of displays 201 and 202 is usually not switched in the window manager. Instead, the display management service switches the display content of logical display 201 from being sent to physical display 201 to being sent to physical display 202, and vice versa. Figure 11 As shown in (b) above. That is to say, the display switching of the foldable screen electronic device is realized by exchanging the logic display 201 and the logic display 202.

[0237] S209, Display management service switches the power-on state between display screen 201 and display screen 202.

[0238] Optionally, the display management service can also enable the backlight of the currently implemented display.

[0239] S210, The display management service sends display switching information to the window management service.

[0240] S211, Window Management Service determines window drawing information.

[0241] The window management service can determine window drawing information based on display switching information.

[0242] For example, if the display switching information indicates a switch from display screen 201 to display screen 202, since display screen 201 and display screen 202 have different sizes, the window management service can modify the size of the display content originally displayed on display screen 201 from a first size to a second size. Here, the first size is the display size of the display content on display screen 201, and the second size is the display size of the display content on display screen 202.

[0243] S212, Window Management Service draws and displays the interface.

[0244] S213. The window management service sends display switching information to the 24 / 7 display management service.

[0245] S214. The all-weather display management service sends display switching information to the foldable screen management service.

[0246] S215, The foldable screen management service sends display switching information to the always-on display application.

[0247] S216, The application displays an all-day display interface.

[0248] S217. The always-on display application returns the switched display information to the foldable screen management service.

[0249] S218, The all-weather display application sends a wake-up command to the TP driver.

[0250] The implementation method of the above steps and Figure 10 The steps shown are implemented in a similar way, and will not be described again here.

[0251] The display method provided in this application embodiment determines whether the first sensor is in a registered state through the device state management service of the application framework layer. When the first sensor is in a registered state, it obtains the first sensor data corresponding to the first sensor and switches the first display screen and the second display screen according to the first sensor data. When the first sensor is in a deregistered state, that is, when the first sensor is not in a registered state, it obtains the second sensor data corresponding to the second sensor and switches the first display screen and the second display screen according to the second sensor data. In this way, the switching between the first display screen and the second display screen in the foldable screen electronic device is uniformly managed by the device state management service, avoiding the timing problems caused by switching the display screen through other methods, and thus avoiding the problems of screen flickering or screen freezing caused by timing issues.

[0252] It should be understood that the above examples are provided to help those skilled in the art understand the embodiments of this application, and are not intended to limit the embodiments of this application to the specific values ​​or scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or changes based on the above examples, and such modifications or changes also fall within the scope of the embodiments of this application.

[0253] The above text combined Figures 1 to 14 The display method provided in the embodiments of this application has been described in detail; the following will be combined with Figure 15 The apparatus embodiments of this application are described in detail below. It should be understood that the apparatus in the embodiments of this application can perform the various methods described in the foregoing embodiments of this application, that is, the specific working processes of the various products described below can be referred to the corresponding processes in the foregoing method embodiments.

[0254] Figure 15 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 700 includes an acquisition module 730 and a processing module 720.

[0255] If the first sensor is in a registered state, the processing module 720 is used to obtain the first sensor data corresponding to the first sensor, and switch the first display screen and the second display screen according to the first sensor data.

[0256] If the first sensor is in a deregistration state, the processing module 720 is used to obtain the second sensor data corresponding to the second sensor, and switch the first display screen and the second display screen according to the second sensor data.

[0257] Optionally, electronic device 700 may refer to foldable screen electronic device, including a first display screen, a second display screen, a first sensor, and a second sensor.

[0258] It should be noted that the aforementioned electronic device 700 is embodied in the form of functional modules. The term "module" here can be implemented in software and / or hardware, without specific limitations.

[0259] For example, a "module" can be a software program, a hardware circuit, or a combination of both that implements the above functions. The hardware circuit may include an application-specific integrated circuit (ASIC), electronic circuitry, a processor (e.g., a shared processor, a proprietary processor, or a group processor) and memory for executing one or more software or firmware programs, integrated logic circuitry, and / or other suitable components that support the described functions.

[0260] Therefore, the units of the various examples described in the embodiments of this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0261] Figure 16 A schematic diagram of the structure of an electronic device provided in this application is shown. Figure 16 The dashed lines in the diagram indicate that the unit or module is optional; the electronic device 800 can be used to implement the methods described in the above method embodiments.

[0262] The electronic device 800 includes one or more processors 801, which support the implementation of the camera switching method in the method embodiments. The processor 801 can be a general-purpose processor or a special-purpose processor. For example, the processor 801 can be a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, such as discrete gates, transistor logic devices, or discrete hardware components.

[0263] The processor 801 can be used to control the electronic device 800, execute software programs, and process data from the software programs. The electronic device 800 may also include a communication unit 805 for inputting (receiving) and outputting (transmitting) signals.

[0264] For example, electronic device 800 may be a chip, communication unit 805 may be the input and / or output circuit of the chip, or communication unit 805 may be the communication interface of the chip, and the chip may be a component of terminal device or other electronic device.

[0265] For example, electronic device 800 can be a terminal device, communication unit 805 can be the transceiver of the terminal device, or communication unit 805 can be the transceiver circuit of the terminal device.

[0266] The electronic device 800 may include one or more memories 802, which store a program 804. The program 804 can be executed by the processor 801 to generate instructions 803, causing the processor 801 to execute the display method described in the above method embodiments according to the instructions 803.

[0267] Optionally, the memory 802 may also store data.

[0268] Optionally, the processor 801 can also read data stored in the memory 802, which may be stored at the same memory address as the program 804, or the data may be stored at a different memory address than the program 804.

[0269] The processor 801 and memory 802 can be configured separately or integrated together, for example, integrated on the system-on-chip (SOC) of the terminal device.

[0270] For example, the memory 802 can be used to store the related program 804 of the display method provided in the embodiments of this application, and the processor 801 can be used to call the related program 804 of the display method stored in the memory 802 when executing the display method of the foldable screen electronic device, and execute the display method of the embodiments of this application; for example, if the first sensor is in the registration state, the first sensor data corresponding to the first sensor is obtained, and the first display screen and the second display screen are switched according to the first sensor data; if the first sensor is in the deregistration state, the second sensor data corresponding to the second sensor is obtained, and the first display screen and the second display screen are switched according to the second sensor data.

[0271] Alternatively, the processor 801 can be used to execute Figures 10 to 13 The various steps / functions of the embodiments shown.

[0272] This application also provides a computer program product that, when executed by processor 801, implements the method of switching cameras in any of the method embodiments of this application.

[0273] The computer program product can be stored in memory 802, for example, program 804. Program 804 is finally converted into an executable object file that can be executed by processor 801 after processing such as preprocessing, compilation, assembly and linking.

[0274] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a computer, implements the camera switching method described in any of the method embodiments of this application. The computer program may be a high-level language program or an executable object program.

[0275] Optionally, the computer-readable storage medium is, for example, memory 802. Memory 802 can be volatile memory or non-volatile memory, or memory 802 can include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0276] It should be noted that, despite the above Figure 16 The illustrated electronic device 800 only shows the memory, processor, and communication interface. However, those skilled in the art should understand that in specific implementations, the electronic device 800 may also include other devices necessary for normal operation. Furthermore, depending on specific needs, those skilled in the art should understand that the aforementioned electronic device 800 may also include hardware devices for implementing other additional functions. Moreover, those skilled in the art should understand that the aforementioned electronic device 800 may only include the devices necessary for implementing the embodiments of this application, and may not necessarily include... Figure 16 All the devices shown.

[0277] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.

[0278] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.

[0279] In this application, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0280] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0281] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0282] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0283] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0284] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0285] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0286] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.< / value>

Claims

1. A display method, characterized in that, The method is applied to a foldable screen electronic device, which includes a first display screen, a second display screen, a first sensor, and a second sensor. The first sensor is in a deregistration state when the foldable screen electronic device is in a low-power mode. The first display screen is a foldable flexible screen and includes a first area and a second area. When the first area of ​​the first display screen is in the open state and the second display screen is in the closed state, the first sensor is deactivated in response to the user's screen-off operation; When the foldable screen electronic device is in a closed state, the second sensor data corresponding to the second sensor is acquired, and the first display screen and the second display screen are switched according to the second sensor data.

2. The method according to claim 1, characterized in that, The step of switching between the first display screen and the second display screen based on the second sensor data includes: The attitude information of the foldable screen electronic device is obtained based on the second sensor data, wherein the attitude information corresponds to the display information of the foldable screen electronic device, and the display information of the foldable screen electronic device is used to indicate the display screen in the foldable screen electronic device that is in the display state; Switching between the first display screen and the second display screen based on the posture information.

3. The method according to claim 2, characterized in that, The attitude information includes: unfolded state, support state, calendar state, tent state, first notebook state, second notebook state, and closed state.

4. The method according to claim 3, characterized in that, The first display screen includes a foldable flexible screen. The first laptop state refers to displaying a first interface in a first area of ​​the first display screen and a second interface in a second area of ​​the first display screen. The second laptop state refers to displaying the first interface in the second area of ​​the first display screen and a second interface in the first area. The second interface includes a black screen interface.

5. The method according to claim 4, characterized in that, The first interface includes an all-weather display interface.

6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: The device status management service at the application framework layer determines whether the first sensor is in a registered state.

7. The method according to claim 6, characterized in that, The method further includes: If the first sensor is in a registered state, the device status management service discards the second sensor data corresponding to the second sensor.

8. The method according to any one of claims 1 to 5, characterized in that, The first sensor includes an attitude sensor.

9. The method according to any one of claims 1 to 5, characterized in that, The second sensor includes a motion sensor.

10. The method according to any one of claims 1 to 5, characterized in that, If the foldable screen electronic device is in a screen-off state, the first sensor is in a deregistration state; if the foldable screen electronic device is in a screen-on state, the first sensor is in a registration state.

11. An electronic device, characterized in that, include: One or more processors and memory; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the electronic device to perform the display method as described in any one of claims 1 to 10.

12. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system including one or more processors, the processors being configured to invoke computer instructions to cause the electronic device to perform the display method as described in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the display method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Screen-on control method and electronic equipment

    CN111262975A

  • Display method and electronic equipment

    CN115686407A