Interface display method and electronic device
By automatically switching the display screen according to the hinge angle in foldable screen devices, the problem of half-screen display in vertical mode is solved, the continuity and consistency of the user interface are achieved, and the user experience is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-04-30
- Publication Date
- 2026-06-09
AI Technical Summary
The half-screen display problem that may occur in the vertical state of foldable screen devices affects the user experience, and existing technologies cannot effectively manage and display the user interface in different folding states.
By automatically switching between the first and second displays when the hinge angle of the electronic device changes, the continuity and usability of the user interface are ensured. Hall sensors and angle sensors are used to detect the device status, and the intelligent switching is performed in combination with the hinge angle algorithm module and the application processor.
It achieves a consistent and seamless display of the user interface in different folded states, improving the user experience and adapting to users' actual usage scenarios and needs.
Smart Images

Figure CN119248392B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to an interface display method and an electronic device. Background Technology
[0002] Currently, foldable screen technology is a significant innovation in the field of mobile devices in recent years. It allows the screen to bend and fold without damage, enabling devices to switch between compact and extended form factors, providing users with a larger screen area and new interaction methods while maintaining portability.
[0003] However, foldable screen devices face unique challenges in design and functionality. One of these challenges is managing and displaying the user interface in different folded states.
[0004] The current solution is to pause attitude data reporting in the vertical state, but this may cause a half-screen display problem in the unfolded state. Moreover, once the half-screen display problem occurs, the problem will persist in the vertical state, thus affecting the user experience. Summary of the Invention
[0005] This application provides an interface display method and an electronic device. When the user unfolds or folds the electronic device, even in a vertical state, the interface display method can automatically switch between the first display screen and the second display screen according to the change of the hinge angle of the electronic device to accurately display the user interface, ensuring the continuity and usability of the user interface, and solving the half-screen display problem that may occur in the vertical state of foldable screen devices.
[0006] The technical solution is as follows:
[0007] This application provides a first aspect of an interface display method applied to an electronic device, the electronic device comprising a hinge, a first body, and a second body, the hinge being used to connect the first body and the second body; the method comprising:
[0008] At the first moment, in response to the user's screen-on operation, the electronic device lights up and displays the user interface on the first display screen. At the first moment, the electronic device is in a folded state.
[0009] At the second moment, in response to the user unfolding the electronic device, the user interface is displayed on the second display screen. At the second moment, the hinge angle between the first body and the second body is the first angle, the electronic device is in a vertical state, and the second moment is after the first moment.
[0010] At the third moment, in response to the user folding the electronic device, the user interface is displayed on the first display screen, and at the third moment, the electronic device is in a vertical state;
[0011] At the fourth moment, after the user unfolds the electronic device, the user interface is displayed on the first display screen. At the fourth moment, the electronic device is not in a vertical position, the hinge angle between the first body and the second body is the first angle, and the display area of the second display screen is larger than the display area of the first display screen. The fourth moment occurs after the third moment.
[0012] In this implementation, the electronic device (or device, foldable screen device, etc.) is in a vertical state, which can be understood as similar to the upright state of a book. In the vertical state, the display plane of the electronic device is nearly perpendicular to the horizontal plane, or the central axis or central rotation axis of the hinge of the electronic device is nearly perpendicular to the horizontal plane.
[0013] It should be understood that when a user unfolds an electronic device, it means switching the electronic device from a folded or stand-up state to an unfolded state. At the second moment, the hinge angle between the first and second bodies of the electronic device... [93°, 180°].
[0014] Taking a smartphone with an outward-folding screen as an example, the first display screen in the folded state can be part of the smartphone's entire screen (second display screen) for quickly viewing notifications or performing simple operations. Conversely, taking a smartphone with an inward-folding screen as another example, the first display screen in the folded state can be the smartphone's outer screen for quickly viewing notifications or performing simple operations.
[0015] The interface display method provided in this application is applicable to foldable electronic devices with hinges, such as foldable smartphones or tablets. First moment: The user performs a screen-on operation, the electronic device lights up in the folded state, and the user interface is displayed on the first display screen. Second moment: The user unfolds the electronic device, the electronic device is in a vertical state, and the user interface is displayed on the second display screen, detected by a Hall sensor. At this time, the hinge angle between the first and second bodies is a first angle, and this moment occurs after the first moment. Third moment: The user folds the electronic device, and the electronic device still displays the user interface on the first display screen in the vertical state. Fourth moment: The user unfolds the electronic device again, this time the electronic device is not in a vertical state. A screen-switching strategy is determined based on the hinge angle between the first and second bodies. Since the hinge angle between the first and second bodies is the first angle, the user interface is displayed on the first display screen, even though the display area of the second display screen is larger than that of the first display screen. Using the above method, the electronic device, in a vertical state, can intelligently switch the display screen according to its physical state (folded or unfolded) and the hinge angle, thereby providing a flexible and consistent user experience.
[0016] As an alternative example, at the second moment, the electronic device is in a vertical position, meaning it may be fully or partially unfolded. The time from when the user begins to operate the device and the screen lights up (the first moment) to when the device unfolds (the second moment) exceeds a preset duration (e.g., 10 seconds or 15 seconds). If both conditions are met, the electronic device will display the user interface on the second display screen. It should be understood that the aforementioned preset duration can be a time threshold set by the device manufacturer based on user habits and device usage to determine whether the user wants to enter a new working mode or view more content. Through the above example, detecting user actions and time intervals intelligently determines when to display the user interface on the second display screen, thereby providing a more personalized and user-responsive device experience.
[0017] As another alternative example, at the fourth moment, after the user unfolds the electronic device, if it is determined that the electronic device is not in a vertical position and the first angle is less than a preset angle, the user interface is displayed on the first display screen.
[0018] In this application example, "not vertical" or "not vertical" can be understood as the electronic device not being in a completely vertical position. The aforementioned preset angle is set by the manufacturer based on the device design and usage scenario to determine whether the device is in a suitable state for displaying the user interface. This is because the hinge angle between the first and second bodies varies during the process of the electronic device being unfolded by the user. If the angle is [0°, 33°], the electronic device is considered to be in a folded state. The hinge angle between the first and second bodies of the electronic device... If the angle is [33°, 93°], then the electronic device is considered to be switching from a folded state to a stand-up state. The hinge angle between the first and second bodies of the electronic device... If the angle is [93°, 180°], then the electronic device is considered to have switched from a stand-up state to an unfolded state. Therefore, the aforementioned preset angle can be 93°. When the electronic device is not in a vertical state and the unfolded angle is less than 93°, the user interface is displayed on the first display screen. Furthermore, the display system of the electronic device can intelligently adjust the displayed content according to the physical state of the device, ensuring that the user can obtain a suitable interface display in different usage modes.
[0019] The interface display method for electronic devices provided in this application enables the electronic device to intelligently respond to user operations and the physical state of the device in a vertical state, ensuring the consistency and usability of the user interface and making the switching of the display screen more in line with the user's actual usage. Regardless of whether the electronic device is in a vertical or non-vertical state, folded or unfolded, it can provide users with the best interface layout and function access in different usage scenarios, solving the problem of inconsistency between interface display and usage state when using foldable screen devices.
[0020] According to the first aspect, or any implementation of the first aspect above, the method further includes:
[0021] At the fifth moment, in response to the user unfolding the electronic device, the user interface is displayed on the second display screen. At the fifth moment, the electronic device is not in a vertical state, the hinge angle between the first body and the second body is a second angle, the second angle is greater than the first angle, and the fifth moment is after the first moment or the third moment.
[0022] In this implementation, at the fifth moment, when the user unfolds the electronic device again, the hinge angle of the electronic device adjusts to a second angle that is larger than the first angle. At this time, the second display screen will show the user interface, providing a different perspective and a larger display area than before. It is evident that the display interface of the electronic device can dynamically adjust according to the folded and unfolded state of the device, providing the user with a consistent and seamless user experience.
[0023] According to the first aspect, or any implementation of the first aspect above, the method further includes:
[0024] At the sixth moment, after the user unfolds the electronic device, the user interface is displayed on the first display screen. At the sixth moment, the hinge angle between the first body and the second body is the first angle, the electronic device is in a vertical state, and the sixth moment is between the first moment and the second moment.
[0025] In this implementation, at the sixth moment, after the user unfolds the electronic device, the first display screen shows the user interface. At this time, the hinge angle between the first and second bodies is the first angle. It should be understood that at the sixth moment, the hinge angle of the electronic device is not fully unfolded to the second angle described at the second moment, but remains at a smaller angle to accommodate different usage scenarios or user comfort. It should be understood that the sixth moment occurs between the first and second moments, and the user unfolds the device at some point after the initial screen light-up and before it is fully unfolded.
[0026] According to the first aspect, or any implementation of the first aspect above, at the second moment, in response to the user unfolding the electronic device, displaying the user interface on the second display screen includes:
[0027] At the second moment, in response to the user unfolding the electronic device, and based on the fact that the electronic device is in a vertical position and the duration between the second moment and the first moment is greater than a preset duration, the user interface is displayed on the second display screen.
[0028] In this implementation, at the second moment, the electronic device is in a vertical position, meaning it may be fully or partially unfolded. The time from when the user begins to operate the device and the screen lights up (the first moment) to when the device unfolds (the second moment) exceeds a preset duration (e.g., 10 seconds or 15 seconds). If both conditions are met, the electronic device displays the user interface on the second display screen. It should be understood that this preset duration can be a time threshold set by the device manufacturer based on user habits and device usage to determine whether the user wants to enter a new working mode or view more content. By detecting user actions and time intervals, the system intelligently determines when to display the user interface on the second display screen, thus providing a more personalized and user-responsive device experience.
[0029] According to the first aspect, or any implementation of the first aspect above, at the second moment, in response to the user unfolding the electronic device, displaying the user interface on the second display screen includes:
[0030] At the second moment, in response to the user unfolding the electronic device, voltage data detected by the Hall sensor is acquired;
[0031] The deployment of the electronic device is determined based on the voltage data;
[0032] The user interface is displayed on the second display screen.
[0033] In this implementation, when it's impossible to intelligently determine when to display the user interface on the second display screen by detecting user actions and time intervals, a Hall sensor within the electronic device can detect voltage changes caused by changes in the magnetic field when the user unfolds the electronic device. It should be understood that the Hall sensor is located on one side of the electronic device and, because it can sense the presence of magnets or other magnetic components on the opposite side, can be used to detect whether the electronic device is in an unfolded or folded state. The software architecture (AP) of the electronic device analyzes the voltage data provided by the Hall sensor to determine whether the electronic device has been unfolded. Once it is determined that the electronic device is in an unfolded state, the user interface is displayed on the second display screen.
[0034] According to the first aspect, or any implementation of the first aspect above, the fourth moment, after the user unfolds the electronic device, displays the user interface on the first display screen, including:
[0035] At the fourth moment, after the user unfolds the electronic device, if it is determined that the electronic device is not in a vertical position and the first angle is less than a preset angle, the user interface is displayed on the first display screen.
[0036] In this implementation, "not vertical" or "not vertical" can be understood as the electronic device not being in a completely vertical position. The aforementioned preset angle is set by the manufacturer based on the device design and usage scenario to determine whether the device is in a suitable position for displaying the user interface.
[0037] Due to the hinge angle between the first and second bodies during the unfolding of the electronic device by the user... If the angle is [0°, 33°], the electronic device is considered to be in a folded state. The hinge angle between the first and second bodies of the electronic device... If the angle is [33°, 93°], then the electronic device is considered to be switching from a folded state to a stand-up state. The hinge angle between the first and second bodies of the electronic device... If the angle is [93°, 180°], then the electronic device is considered to have switched from a stand-up state to an unfolded state. Therefore, the aforementioned preset angle can be 93°. When the electronic device is not in a vertical state and the unfolded angle is less than 93°, the user interface is displayed on the first display screen. Furthermore, the display system of the electronic device can intelligently adjust the displayed content according to the physical state of the device, ensuring that the user can obtain a suitable interface display in different usage modes.
[0038] According to the first aspect, or any implementation of the first aspect above, in the fifth moment, in response to the user unfolding the electronic device, displaying the user interface on the second display screen includes:
[0039] At the fifth moment, in response to the user unfolding the electronic device, when it is determined that the electronic device is not in a vertical state and the second angle is greater than a preset angle, the user interface is displayed on the second display screen.
[0040] In this embodiment, the preset angle can be 93°. When the electronic device is not in a vertical position and the unfolded angle is greater than 93°, the user interface is displayed on the second display screen. Furthermore, the display system of the electronic device can intelligently adjust the displayed content according to the physical state of the device, ensuring that the user can obtain a suitable interface display in different usage modes.
[0041] According to the first aspect, or any implementation of the first aspect above, the sixth moment, after the user unfolds the electronic device, displays the user interface on the first display screen, including:
[0042] At the sixth moment, after the user unfolds the electronic device, if it is determined that the electronic device is in a vertical position and the time between the sixth moment and the first moment is less than a preset time, the user interface is displayed on the first display screen.
[0043] In this implementation, at the sixth moment mentioned above, after the user unfolds the electronic device, it is first determined whether the electronic device is in a vertical position, and the time length from the user's screen-on operation to unfolding the device is also calculated. If the electronic device is vertical and the operation time is shorter than the preset time, the user interface will be displayed on the first display screen.
[0044] According to the first aspect, or any implementation of the first aspect above, the electronic device includes an application processor (AP) and an enhanced digital signal processor (ADSP), and the method further includes:
[0045] In response to the user's screen-on operation, the AP sends a listening request to the ADSP. The listening request is used to request the ADSP to listen to the hinge angle between the first body and the second body. The AP and the ADSP communicate with each other based on the inter-core communication interface.
[0046] Upon receiving the monitoring request, the ADSP calculates the hinge angle between the first body and the second body based on the sensor data sent by the sensors of the electronic device.
[0047] According to the first aspect, or any implementation of the first aspect above, the ADSP includes a hinge angle algorithm module and at least one angle sensor driver;
[0048] When the ADSP receives the monitoring request, the method of calculating the hinge angle between the first body and the second body based on sensor data sent by the sensors of the electronic device includes:
[0049] When the hinge angle algorithm module receives the listening request, it sends a sensor data reporting request to the at least one angle sensor driver.
[0050] When the at least one angle sensor driver receives the sensor data reporting request, it reports the sensor data to the hinge angle algorithm module at a fixed frequency.
[0051] The hinge angle algorithm module calculates the hinge angle between the first fuselage and the second fuselage based on the sensor data.
[0052] In this implementation, when a user performs a screen-on operation by clicking the screen of the electronic device or pressing any button on the electronic device, the application processor sends a listening request to the enhanced digital signal processor (ADSP). This request is to allow the ADSP to listen to and calculate the hinge angle between the first and second frames of the electronic device.
[0053] After receiving a listening request, the enhanced digital signal processor (ADSP) begins processing sensor data acquired by at least one angle sensor from the electronic device. These sensors may include gyroscopes, accelerometers, or other sensors capable of detecting physical changes. The ADSP uses this data to calculate the hinge angle between the first and second fuselages and adjusts the display screen or other functions on the electronic device accordingly, allowing the foldable or deformable electronic device to more flexibly adapt to the user's interface display needs.
[0054] According to the first aspect, or any implementation of the first aspect above, the sensor data includes: an acceleration component in the direction of the coordinate axis and an angular velocity component in the direction about the coordinate axis;
[0055] The hinge angle algorithm module calculates the hinge angle between the first fuselage and the second fuselage based on the sensor data, including:
[0056] The hinge angle algorithm module filters the acceleration component in the direction of the coordinate axis based on the angular velocity component around the coordinate axis to obtain the hinge angle between the first fuselage and the second fuselage.
[0057] According to the first aspect, or any implementation of the first aspect above, the hinge angle algorithm module filters the acceleration component in the direction of the coordinate axis based on the angular velocity component around the coordinate axis to obtain the hinge angle between the first fuselage and the second fuselage, including:
[0058] The hinge angle algorithm module uses the Kalman filter method to filter the acceleration components in the X and Z directions based on the angular velocity components around the Y-axis, thereby obtaining the hinge angle between the first fuselage and the second fuselage.
[0059] In this implementation, firstly, the initial angle between the two fuselages is obtained by measuring the acceleration components of each display screen in the X and Z axes (denoted as gx1, gx2, gz1, and gz2, respectively). Then, the angular velocity component in the Y axis direction is used to filter this initial angle to obtain a more accurate hinge angle.
[0060] According to the first aspect, or any implementation of the first aspect above, the sensors of the electronic device include an accelerometer sensor and a gyroscope sensor; the method further includes:
[0061] The at least one angle sensor drives the reception of the raw electrical signal reported by the accelerometer sensor and the raw electrical signal reported by the gyroscope sensor.
[0062] Driven by the at least one angle sensor, the raw electrical signal reported by the acceleration sensor is processed to obtain the acceleration component in the direction of the coordinate axis.
[0063] Driven by at least one angle sensor, the raw electrical signal reported by the gyroscope sensor is processed to obtain the angular velocity component around the coordinate axis.
[0064] In this implementation, the electronic device uses accelerometers and gyroscopes to monitor its physical state. These sensors provide raw electrical signals reflecting the device's motion in space. Since these raw electrical signals typically contain noise and potential interference, they need to be filtered and converted before they can be used for further calculations and analysis. To convert these raw signals into useful data, the angle sensor drive within the electronic device performs the following steps:
[0065] In its implementation, the angle sensor driver first receives raw electrical signals from the accelerometer and gyroscope sensors. These signals are the sensors' direct electrical responses to the device's motion. The angle sensor driver processes the raw electrical signals reported by the accelerometer to obtain the acceleration components of the device along the coordinate axes. Similarly, the angle sensor driver also processes the raw electrical signals reported by the gyroscope to obtain the angular velocity components of the device about the coordinate axes, which reflect the rotational rates of various parts of the electronic device around the coordinate axes.
[0066] According to the first aspect, or any implementation of the first aspect above, before the hinge angle algorithm module calculates the hinge angle between the first fuselage and the second fuselage based on the sensor data, the method further includes:
[0067] The hinge angle algorithm module calculates an estimated error value based on the acceleration component in the direction of the Y coordinate axis. The estimated error value is used to characterize the error between the hinge angle calculated by the hinge angle algorithm module and the actual hinge angle.
[0068] If the estimated error value is greater than or equal to the error threshold, the hinge angle algorithm module performs vertical entry detection on the electronic device based on the acceleration component in the direction of the Y coordinate axis.
[0069] When the electronic device meets the vertical entry condition, a stationary detection is performed on the electronic device to obtain the detection result;
[0070] Based on the detection results, the exit conditions satisfied by the electronic device are determined;
[0071] If the electronic device meets the exit condition, it is determined that the electronic device has exited the vertical state, and the estimated error value is updated, wherein the updated estimated error value is less than the error threshold.
[0072] After obtaining the updated estimated error value, the hinge angle between the first fuselage and the second fuselage is calculated based on the sensor data by the hinge angle algorithm module.
[0073] It should be understood that vertical entry detection is used to confirm whether an electronic device meets the vertical entry conditions. In one possible example, vertical entry detection can be used to detect… Gy Does it fall within a certain threshold range? This threshold range is relatively This makes it easier for electronic devices to meet the vertical state entry condition, and if so, the electronic device is considered to be in a vertical state.
[0074] If the electronic device meets the vertical entry condition (i.e., the device is in a vertical state), the hinge angle algorithm module will perform a stationary detection to determine whether the electronic device is stationary. For example, it can detect whether the electronic device is stationary based on the gravitational acceleration components Gx, Gy, and Gz measured on the X, Y, and Z axes of the electronic device, combined with two stationary threshold values. When detected... and When an electronic device is considered to be at rest, this rest includes absolute rest and relative rest (uniform motion). Otherwise, the electronic device is considered to be in motion.
[0075] It should be understood that after each screen is turned on by an electronic device, the ADSP only performs a vertical state check once. When the electronic device meets the vertical state entry condition, that is, when it is determined that the electronic device is in a vertical state, the vertical state flag is set to true. Once the screen is turned on again, the electronic device exits the vertical state, the vertical state flag becomes false, and no more vertical state checks are performed. It is considered that the electronic device has exited the vertical state until the screen is turned off and then on again, at which point the vertical state flag is updated to true.
[0076] It should be noted that the stationary threshold value in the example of this application is set based on the square of the standard value of gravitational acceleration (approximately 9.81 m / s² on the Earth's surface). When the total acceleration measured by the accelerometer (i.e., the square root of the sum of the squares of the acceleration components on all axes) is close to this standard value, the electronic device can be considered to be approximately stationary.
[0077] According to the first aspect, or any implementation of the first aspect above, the exit condition includes: a first exit condition and a second exit condition, wherein the constraint range of the first exit condition is smaller than the constraint range of the second exit condition;
[0078] The step of determining the exit conditions satisfied by the electronic device based on the detection results includes:
[0079] If the detection result indicates that the electronic device is stationary, the electronic device is determined to meet the first exit condition based on the acceleration component in the Y-axis direction being greater than a first threshold value, or the acceleration component in the Y-axis direction being less than a second threshold value. The stationary state includes: an absolutely stationary state and a uniform motion state.
[0080] If the detection result indicates that the electronic device is not stationary, the electronic device is determined to meet the second exit condition based on the acceleration component in the Y-axis direction being greater than the third threshold value, or the acceleration component in the Y-axis direction being less than the fourth threshold value. The first threshold value is less than the third threshold value, the second threshold value is less than the first threshold value, and the fourth threshold value is less than the second threshold value.
[0081] It should be understood that the static state includes: an absolutely static state and a uniform motion state. The first threshold value is less than the third threshold value, the second threshold value is less than the first threshold value, and the fourth threshold value is less than the second threshold value; otherwise, the electronic device is considered not to meet the second exit condition.
[0082] Compared to the first exit condition (narrow threshold) mentioned above, the second exit condition (wide threshold) is more difficult to exit. Optionally, as an example, the first exit condition can be: Gy The first threshold is 10.3 m / s. 2 or G y The second threshold is 9.3 m / s. 2 The second exit condition can be: G y The third threshold is 10.9 m / s. 2 or G y The fourth threshold is 8.7 m / s. 2 .
[0083] In the above implementation, the hinge angle algorithm module of the electronic device determines whether the electronic device meets specific exit conditions based on the sensor data of the accelerometer. These exit conditions are to determine whether the electronic device can exit from the vertical state, that is, to switch from the vertical state to the non-vertical state.
[0084] If the electronic device is stationary (including absolute or relative stillness, i.e., uniform motion), the hinge angle algorithm module checks whether the acceleration component in the Y-axis direction is greater than a first threshold or less than a second threshold. If so, the device meets the first exit condition. If the electronic device is not stationary, the hinge angle algorithm module checks whether the acceleration component in the Y-axis direction is greater than a third threshold or less than a fourth threshold. If so, the electronic device is considered to meet the second exit condition. By using the hinge angle algorithm module to adjust the calculation threshold range for the electronic device to exit the vertical state based on its stationary or moving state, this ensures that when the electronic device exits the vertical state, the vertical state is more easily identified and exited, accurately reflecting the physical state of the electronic device, thus facilitating rapid screen display switching.
[0085] According to the first aspect, or any implementation of the first aspect above, after the hinge angle algorithm module calculates the hinge angle between the first fuselage and the second fuselage based on the sensor data, the method further includes:
[0086] The hinge angle algorithm module reports the calculated hinge angle and the updated estimated error value to the AP;
[0087] The AP determines the folded state flag bit based on the hinge angle and the updated estimation error value;
[0088] If the AP determines that the electronic device is in a folded state based on the folded state flag, then the user interface is displayed on the first display screen;
[0089] If the AP determines that the electronic device is in the unfolded state based on the folded state flag, then the user interface is displayed on the second display screen.
[0090] In this implementation, after the hinge angle algorithm module calculates the hinge angle between the first and second bodies based on sensor data, it reports the calculated hinge angle and the updated estimated error value to the application processor (AP). The AP determines a folded state flag based on the received hinge angle and estimated error value. This flag indicates whether the device is currently in a folded or unfolded state. If the AP determines the electronic device is in a folded state, the first display screen will show the user interface; if the AP determines the electronic device is in an unfolded state, the second display screen will show the user interface.
[0091] According to the first aspect, or any implementation of the first aspect above, the AP includes: a sensor hardware abstraction layer and a folding machine display management service layer;
[0092] The AP determines the folded state flag bit based on the hinge angle and the updated estimation error value, including:
[0093] If the sensor hardware abstraction layer determines that the updated estimated error value is less than the error threshold, then the hinge angle is reported to the folding machine display management service layer on the AP.
[0094] The folding device display management service layer determines the folding state flag of the electronic device based on the hinge angle.
[0095] In this implementation, the application processor (AP) comprises a sensor hardware abstraction layer and a folding display management service layer to collaboratively determine the folding state of the electronic device. Specifically, the sensor hardware abstraction layer handles low-level hardware interactions and data processing, while the folding display management service layer is responsible for making high-level decisions based on this data, such as the display state of the user interface. This layered architecture helps improve system efficiency and reliability, while also making the system easier to maintain and upgrade.
[0096] According to the first aspect, or any implementation of the first aspect above, the method further includes:
[0097] If the sensor hardware abstraction layer determines that the updated estimated error value is greater than or equal to the error threshold, then it will not report the hinge angle to the folding machine display management service layer.
[0098] According to the first aspect, or any implementation of the first aspect above, if the AP determines that the electronic device is in a folded state based on the folded state flag, then displaying the user interface on the first display screen includes:
[0099] The folding device display management service layer determines whether the folding state of the electronic device has changed based on the folding state flag bit.
[0100] When the folding state of the electronic device changes, if the folding state flag indicates that the electronic device is in a folded state, the folding device display management service layer displays the user interface on the first display screen.
[0101] According to the first aspect, or any implementation of the first aspect above, if the AP determines that the electronic device is in an unfolded state based on the folded state flag, then displaying the user interface on the second display screen includes:
[0102] The folding device display management service layer determines whether the folding state of the electronic device has changed based on the folding state flag bit.
[0103] When the folded state of the electronic device changes, if the folded state flag indicates that the electronic device is in the unfolded state, the folding device display management service layer displays the user interface on the second display screen.
[0104] In this implementation, the folding device display management service layer monitors the folding state of the electronic device and updates the display interface based on changes in the folding state. The folding device display management service layer checks a folding state flag to determine if the folding state of the electronic device has changed. If the folding state of the electronic device has changed, and the folding state flag indicates that the device is in a folded state, the folding device display management service layer displays the user interface on the first display screen, ensuring that the user interface responds promptly and is displayed on the corresponding display screen when the user folds or unfolds the electronic device. If the folding state of the electronic device has changed, and the folding state flag indicates that the device is in an unfolded state, the folding device display management service layer displays the user interface on the second display screen, ensuring that the user interface responds promptly and is displayed on the corresponding display screen when the user folds or unfolds the electronic device.
[0105] According to the first aspect, or any implementation of the first aspect above, the method further includes:
[0106] If the electronic device does not meet the exit condition, a timer is started by the hinge angle algorithm module;
[0107] When the timer exceeds a predetermined duration and the electronic device remains in a vertical position, voltage data is obtained from the Hall sensor driver through the hinge angle algorithm module. The voltage data is collected by the Hall sensor connected to the Hall sensor driver on the electronic device and is used to determine whether the electronic device is folded or unfolded.
[0108] The hinge angle algorithm module reports the voltage data and vertical state flag to the AP, wherein the vertical state flag is used to characterize that the electronic device is in a vertical state;
[0109] If the AP determines that the electronic device is in a folded state based on the voltage data, then the user interface is displayed on the first display screen;
[0110] If the AP determines that the electronic device is in an unfolded state based on the voltage data, then the user interface is displayed on the second display screen.
[0111] In this implementation, when the electronic device is in a vertical state for a long time, the hinge angle algorithm module will adjust the screen switching strategy. It will switch the display screen based on whether the device is in a folded or unfolded state detected by the Hall effect sensor. This can avoid the problem of not being able to adaptively switch the screen due to a long period of vertical state, improve the user experience of foldable screen phones in different usage scenarios, and make the screen switching more in line with the user's actual usage situation.
[0112] According to the first aspect, or any implementation of the first aspect above, after the hinge angle algorithm module starts the timer, the method further includes:
[0113] Upon determining that the electronic device has exited the vertical state, the hinge angle algorithm module stops the timer.
[0114] According to the first aspect, or any implementation of the first aspect above, after the hinge angle algorithm module starts the timer, the method further includes:
[0115] After the timer reaches the predetermined duration, the process returns to determining the exit conditions met by the electronic device based on the detection results, until the electronic device exits the vertical state or the timer exceeds the predetermined duration.
[0116] According to the first aspect, or any implementation of the first aspect above, the AP includes a folding machine display management service layer;
[0117] If the AP determines that the electronic device is in a folded state based on the voltage data, then displaying the user interface on the first display screen includes:
[0118] The folding device display management service layer determines that the electronic device is in a folded state based on the voltage data and displays the user interface on the first display screen.
[0119] According to the first aspect, or any implementation of the first aspect above, the AP includes a folding machine display management service layer;
[0120] If the AP determines that the electronic device is in a folded state based on the voltage data, then displaying the user interface on the first display screen includes:
[0121] The folding device display management service layer on the AP determines that the electronic device is in an unfolded state based on the voltage data and displays the user interface on the second display screen.
[0122] According to the first aspect, or any implementation of the first aspect above, the method further includes:
[0123] If the estimated error value is determined to be less than the error threshold, the hinge angle between the first fuselage and the second fuselage is calculated by the hinge angle algorithm module based on the sensor data.
[0124] In a second aspect, this application provides an electronic device comprising a hinge, a first body, and a second body, the hinge being used to connect the first body and the second body;
[0125] An enhanced digital signal processor (ADSP) is used to invoke any of the methods described to determine the hinge angle between the first fuselage and the second fuselage;
[0126] The application processor (AP) communicates with the ADSP via an inter-core communication interface to invoke any of the methods described above. Based on the hinge angle, if the electronic device is in a folded state, the user interface is displayed on the first display screen; if the electronic device is in an unfolded state, the user interface is displayed on the second display screen.
[0127] The second aspect and any implementation thereof correspond to the first aspect and any implementation thereof, respectively. The technical effects of the second aspect and any implementation thereof are similar to those of the first aspect and any implementation thereof, and will not be repeated here.
[0128] Thirdly, an electronic device is provided, including a module / unit for performing the first aspect or any of the methods in the first aspect.
[0129] Fourthly, an electronic device is provided, including one or more processors and a memory;
[0130] The memory is coupled to 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 first aspect or any of the methods in the first aspect.
[0131] 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 first aspect or any of the methods in the first aspect.
[0132] In a sixth aspect, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the first aspect or any one of the methods in the first aspect.
[0133] 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 first aspect or any one of the methods in the first aspect.
[0134] This application provides an interface display method applicable to foldable electronic devices with hinges, such as foldable smartphones or tablets. First moment: The user performs a screen-on operation, the electronic device lights up in its folded state, and displays the user interface on a first display screen. Second moment: The user unfolds the electronic device, and the user interface is displayed on a second display screen in a vertical state. At this time, the hinge angle between the first and second bodies is a first angle, and this moment occurs after the first moment. Third moment: The user folds the electronic device, and the electronic device still displays the user interface on the first display screen in a vertical state. Fourth moment: The user unfolds the electronic device again, and the user interface is displayed on the first display screen, although the display area of the second display screen is larger than that of the first display screen. Using the above method, the electronic device can intelligently switch displays based on its physical state (folded or unfolded) and hinge angle in a vertical state, thereby providing a flexible and consistent user experience.
[0135] Since the electronic device includes the interface display method described above, it possesses at least all the beneficial effects of the interface display method, which will not be elaborated further here. Attached Figure Description
[0136] Figure 1 This is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of this application;
[0137] Figure 2A schematic block diagram illustrating the software and hardware architecture of an electronic device 100 provided for embodiments of this application;
[0138] Figure 3(a) is a schematic diagram of the folded state of an electronic device 100 with an inwardly folding screen provided in this application example;
[0139] Figure 3(b) is a schematic diagram of the form of an electronic device 100 with an inwardly folding screen provided in this application when it is in the support state;
[0140] Figure 3(c) is a schematic diagram of the unfolded state of an electronic device 100 with an inwardly folding screen provided in this application example;
[0141] Figure 4(a) is a schematic diagram of the form of an electronic device 100 with an outward folding screen provided in this application when it is in a folded state;
[0142] Figure 4(b) is a schematic diagram of the form of an electronic device 100 with an outward folding screen provided in this application when it is in the support state;
[0143] Figure 4(c) is a schematic diagram of the unfolded state of an electronic device 100 with an outwardly folding screen provided in this application example;
[0144] Figure 5 A schematic diagram illustrating the unfolding process of an electronic device 100 with an outwardly folding screen, provided as an example of this application;
[0145] Figure 6 A schematic diagram illustrating the closing process of an electronic device 100 with an outwardly folding screen, provided as an example of this application;
[0146] Figure 7 Another example of this application provides a schematic diagram of the form of an electronic device 100 with an outwardly folding screen in the support state.
[0147] Figure 8 Another example of this application provides a schematic diagram of the form of an electronic device 100 with an outwardly folding screen in the support state.
[0148] Figure 9 This is a flowchart illustrating an interface display method provided in an embodiment of this application;
[0149] Figure 10(a) is a schematic diagram of the form of an electronic device with an outward folding screen provided in the example of this application at the first moment;
[0150] Figure 10(b) is a schematic diagram of the form of an electronic device with an outward folding screen provided in the example of this application at a second moment;
[0151] Figure 10(c) is a schematic diagram of the form of an electronic device with an outward folding screen provided in the example of this application at a third moment;
[0152] Figure 10(d) is a schematic diagram of the form of an electronic device with an outward folding screen provided in the example of this application at the third moment;
[0153] Figure 11(a) is a schematic diagram of the form of an electronic device with an outward folding screen provided in the example of this application at the fifth moment;
[0154] Figure 11(b) is a schematic diagram of the form of an electronic device with an outward folding screen provided in the example of this application at the sixth moment;
[0155] Figure 12 A schematic diagram illustrating the interaction flow between an application processor (AP) and an enhanced digital signal processor (ADSP) in an electronic device, as provided in this application example;
[0156] Figure 13 A schematic diagram illustrating the interaction flow between an application processor (AP) and an enhanced digital signal processor (ADSP) in an electronic device, as provided in this application example;
[0157] Figure 14 A schematic diagram illustrating the interaction flow between an application processor (AP) and an enhanced digital signal processor (ADSP) in an electronic device, as provided in this application example;
[0158] Figure 15 A schematic diagram illustrating the interaction flow between an application processor (AP) and an enhanced digital signal processor (ADSP) in an electronic device, as provided in this application example;
[0159] Figure 16 A schematic diagram illustrating the interaction flow between an application processor (AP) and an enhanced digital signal processor (ADSP) in an electronic device, as provided in this application example;
[0160] Figure 17 A schematic diagram illustrating the interaction flow between an application processor (AP) and an enhanced digital signal processor (ADSP) in an electronic device, as provided in this application example;
[0161] Figure 18 A flowchart illustrating an optional interface display method provided as an example in this application;
[0162] Figure 19 This is a schematic diagram of the structure of an interface display device provided in an embodiment of this application. Detailed Implementation
[0163] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0164] It should be understood that "multiple" as mentioned in this application refers to two or more. In the description of this application, unless otherwise stated, " / " means "or", for example, A / B can mean A or B; "and / or" in this document is merely a description of the relationship between related objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone.
[0165] Furthermore, to facilitate a clear description of the technical solutions of this application, terms such as "first" and "second" are used to distinguish identical or similar items with substantially the same function and effect. The terms "first" and "second," etc., in the specification and claims of the embodiments of this application are used to distinguish different objects, not to describe a specific order of objects. For example, "first target object" and "second target object," etc., are used to distinguish different target objects, not to describe a specific order of target objects.
[0166] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0167] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more. For example, multiple processing units means two or more processing units; multiple systems means two or more systems.
[0168] First, some terms used in the embodiments of this application will be explained to facilitate understanding by those skilled in the art.
[0169] An acceleration sensor (ACC) is an electronic device that measures acceleration force. Acceleration force is the force acting on an object during acceleration.
[0170] A gyroscope sensor (Gyro) is a simple and easy-to-use positioning control system based on free space movement and gestures. It determines the direction of a moving object based on the principle that the direction pointed to by the rotation axis is not affected by external forces. Originally used in helicopter models, it is now widely used in mobile portable devices such as mobile phones.
[0171] An application processor (AP) is the main processor in an electronic device (such as a smartphone) that is responsible for executing the operating system, user interface, and applications.
[0172] A digital signal processor (DSP) is a microprocessor specifically designed for digital signal processing, enabling it to process signals at high speed and high efficiency.
[0173] An Advanced Digital Signal Processor (ADSP) can be understood as an enhanced digital signal processor (DSP) or a high-level digital signal processing chip, which primarily processes digitized signals through a digitization process.
[0174] The Qualcomm Messaging Interface (QMI) is an architecture and protocol for communication between the hardware architecture and application software architecture on a mobile platform. It provides a standardized interface for inter-process communication across multiple processors, enabling applications to communicate with the hardware architecture and perform various functions such as data transfer, network connectivity, telephone calls, and SMS.
[0175] The above is a brief introduction to the terms used in the embodiments of this application, and will not be repeated below.
[0176] Before describing the technical solutions of the embodiments of this application, the electronic devices in the embodiments of this application will first be described in conjunction with the accompanying drawings. For example, please refer to... Figure 1 , Figure 1 This is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of this application.
[0177] Optionally, the electronic device 100 can be referred to as a terminal or a terminal device. The specific product form of the electronic device 100 can be a smart terminal, such as a mobile phone, tablet computer, wearable device, augmented reality / virtual reality device, laptop computer, in-vehicle device, or personal digital assistant (PDA) with a foldable screen. Specifically, the functional modules involved in this application can be deployed on the DSP chip of the relevant device, specifically as applications or software. The interface switching display function of an electronic device with a foldable screen can be realized through software installation or upgrades, and through hardware calls and coordination.
[0178] It should be understood that, Figure 1 The electronic device 100 shown is only one example of an electronic device, and the electronic device 100 may have more or fewer components than shown in the figure, may combine two or more components, or may have different component configurations. Figure 1The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0179] Electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include pressure sensors, gyroscope sensors, accelerometers, temperature sensors, motion sensors, barometric pressure sensors, magnetic sensors, distance sensors, proximity sensors, fingerprint sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.
[0180] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, memory, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0181] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0182] 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.
[0183] USB interface 130 is an interface that conforms to the USB standard specification, specifically it can be a Mini USB interface, Micro USB interface, USB Type C interface, etc.
[0184] The charging management module 140 receives charging input from a charger, which can be a wireless charger or a wired charger. While charging the battery 142, the charging management module 140 can also power the electronic device via the power management module 141. The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and powers the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160, etc.
[0185] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor.
[0186] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization.
[0187] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
[0188] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi, Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc.
[0189] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.
[0190] Electronic device 100 implements display functions through a GPU, display screen 194, and application processor. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0191] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. In some embodiments, electronic device 100 may include one or N displays screens 194, where N is a positive integer greater than 1.
[0192] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0193] The ISP is used to process data fed back from the camera. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's image sensor. The light signal is converted into an electrical signal, and the image sensor transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye.
[0194] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard formats such as RGB and YUV. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0195] The camera 193 can be located at the edge of the electronic device, and can be an under-display camera or a pop-up camera. The camera 193 may include a rear-facing camera, or a rear-facing camera. This application embodiment does not limit the specific location and shape of the camera 193. The electronic device 100 may include one or more cameras with different focal lengths, such as telephoto cameras, wide-angle cameras, ultra-wide-angle cameras, or panoramic cameras.
[0196] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to perform data storage functions.
[0197] The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121, such as enabling the electronic device 100 to implement the frequency-limiting operation method in this embodiment. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.). Furthermore, the internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0198] Electronic device 100 can implement audio functions through audio module 170 and application processor, such as music playback and recording.
[0199] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0200] A touch sensor, also known as a "touch panel," can be located on the display screen 194. The touch sensor and display screen 194 together form a touchscreen, also called a "touch screen." The touch sensor detects touch operations applied to or near it. The touch sensor can then transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194.
[0201] A pressure sensor is used to sense pressure signals and can convert these signals into electrical signals. In some embodiments, the pressure sensor may be located on the display screen 194. The electronic device 100 may also calculate the position of a touch based on the detection signal from the pressure sensor.
[0202] A gyroscope sensor can be used to determine the motion attitude of an electronic device 100. In some embodiments, the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor.
[0203] An accelerometer can detect the magnitude of acceleration of an electronic device 100 in various directions (typically three axes). When the electronic device 100 is stationary, the accelerometer can detect the magnitude and direction of gravity. Accelerometers can also be used to identify the posture of electronic devices, and are applied in applications such as screen orientation switching and pedometers.
[0204] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0205] The software and hardware architectures of the electronic device 100 will be described next. The software system of the electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses the layered architecture of the Android system as an example to illustrate the software architecture of the electronic device 100.
[0206] Please see Figure 2 , Figure 2 A schematic block diagram illustrating the software and hardware architecture of an electronic device 100 provided in this application embodiment, with reference to... Figure 2 As shown, the above software architecture includes an Application Processor (AP), and the hardware architecture includes an Enhanced Digital Signal Processor (ADSP). The AP framework adopts a layered architecture, dividing the software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the foldable display management service layer, the application framework layer, and the hardware abstraction layer.
[0207] In this application example, the application framework layer in AP can be Figure 2 The sensor framework (sensorFWK) shown has a hardware abstraction layer specifically called the sensor hardware abstraction layer (sensor HAL). The sensor HAL can include: the hinge angle sensor hardware abstraction layer (hinge_angle.cpp) and the Hall sensor hardware abstraction layer (extend_hall.cpp).
[0208] The application layer may include a series of application packages, see reference. Figure 2As shown, the application package can include applications such as a gallery, authoring assistant, quick app engine, and light editing service. The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer, including various components and services to support Android development. The application framework layer includes some predefined functions. The application framework layer can include a window manager, content provider, notification manager, resource manager, search engine, learning memory library, and visual image module, etc.
[0209] Reference Figure 2 As shown, the hardware architecture of the ADSP includes: a hinge angle algorithm module, a sensor driver, and a Hall sensor driver. The ADSP can also be equipped with multiple external or additional components, such as Hall sensors, accelerometer sensors (ACC), and gyroscope sensors (GYRO). These sensors are directly connected to their corresponding drivers in the ADSP.
[0210] It should be understood that, in the examples of this application, the driver on the ADSP is used to communicate directly with the hardware. For example, the driver on the ADSP may also include at least a display driver, a camera driver, and a sensor driver. The hardware on the ADSP may include devices such as a camera, a display screen, a microphone, a processor, and memory.
[0211] Figure 2 The architecture diagram illustrates the communication mechanism between the software architecture (AP) and the hardware architecture (ADSP). Communication between the AP and ADSP is achieved through the inter-core communication interface (QMI). Based on this architecture, in a foldable screen device, a sensor driver (hinge_angle driver) can acquire sensor data collected by sensors, such as acceleration components along the coordinate axes and angular velocity components around the coordinate axes. The hinge angle algorithm module (hinge_angle aglo) determines the hinge angle, i.e., the folding angle, of the electronic device based on this sensor data. Then, the AP side, based on the hinge angle calculated by the ADSP side, determines whether the electronic device is in a folded or unfolded state. If the hinge angle determines the electronic device is in a folded state, the user interface is displayed on the first display screen; if the hinge angle determines the electronic device is in an unfolded state, the user interface is displayed on the second display screen.
[0212] It should be noted that the following is adopted: Figure 2The architecture shown allows for the calculation of the hinge angles of the first and second bodies of the electronic device, even when the screen is off and the application processor (AP) enters a sleep state. This is because the touch IC and various sensors for detecting the status are all running or mounted in the ADSP. The system can then control the folded or unfolded state of the electronic device based on these hinge angles, which helps optimize device performance and user experience.
[0213] Understandable Figure 2 The software architecture AP and hardware architecture ADSP shown do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than shown, or combine some components, or split some components, or have different component arrangements.
[0214] The interface display method provided in this application can be applied to electronic devices with foldable screens. Optionally, the electronic device may include a mobile phone, tablet computer, smartwatch, laptop computer, virtual and real fusion device, super mobile personal computer, smart TV, smart screen, high-definition TV, smart speaker, smart projector, etc.
[0215] It should be understood that, taking an electronic device with a foldable screen as an example, the electronic device includes a hinge, a first body, and a second body, with the hinge used to connect the first body and the second body; the hinge angle between the first body and the second body... The value range is [0°, 180°]. It should be understood that the hinge angle refers to the rotation angle between two objects, and is usually used to describe the folding angle between the two bodies of a foldable device (such as a foldable smartphone) or the screen driven by the two bodies.
[0216] Devices with folding structures generally use hinges (spindles) for connection. Schematably, the hinge structures used to connect the two bodies of an electronic device can be broadly categorized into two types: a simple single hinge and a complex hinge composed of multiple hinges combined in different ways. In the example of this application, a complex hinge can be used to connect the first and second bodies of the electronic device.
[0217] It should be understood that a single hinge structure is relatively simple. Simply put, one hinge is nested within another to achieve limiting and rotation. Flip phones from the feature phone era basically used this single hinge structure, and today, most laptops on the market, including tablets, also use a common single hinge structure. The flip range of these single hinge laptops is generally within 180°. However, complex hinge structures and forms are not limited to one type. Different structural designs, different numbers of small hinges, and even different mechanical structures can be added to achieve different form changes to adapt to the needs of different products.
[0218] Please refer to Figures 3(a), 3(b), and 3(c), which provide schematic diagrams of multiple electronic devices 100 with inward-folding screens. An inward-folding screen is a folded screen formed by folding inward along the central axis of the hinge, creating a folding edge or axis. On the electronic device 100 with an inward-folding screen, the first display screen is located on the outside of the first or second body, and the second display screen is located on the inside of the first or second body. When the electronic device 100 with an inward-folding screen is in a folded state, the first and second display screens face away from each other. The second display screen is folded inwards. The first and second bodies of the electronic device are folded along the central axis of the hinge, creating a folding edge or axis, which can fold the second display screen into two parts (a left side screen and a right side screen), both of which are invisible to the user. The first display screen is located behind the second display screen and is visible to the user regardless of whether the inward-folding screen is folded.
[0219] Figure 3(a) shows a schematic diagram of the electronic device 100 with an inwardly folding screen in its folded state (including fully closed or nearly closed). When the folding screen of the electronic device 100 is fully folded, the first display screen 1001 is visible to the user, while the second display screen 1002 is not visible to the user. During the unfolding process of the electronic device 100 by the user, the hinge angle between the first body 1003 and the second body 1004... A hinge angle of [0°, 33°] indicates that the electronic device is in a folded state. This refers to the hinge angle between the first and second bodies of the electronic device during the process of being closed or folded by the user. If the value is [0°, 27°], then the electronic device is considered to have switched from the support state to the folded state.
[0220] Figure 3(b) shows a schematic diagram of the electronic device with an inwardly folding screen in its stand-up configuration. In this example, during the unfolding of the electronic device 100 by the user, the hinge angle between the first and second bodies of the electronic device 100 is... If the angle is [33°, 93°], then the electronic device is considered to be switching from a folded state to a stand-up state. During the process of the electronic device being closed or folded by the user, the hinge angle between the first and second bodies of the electronic device... If the angle is [27°, 87°], then the electronic device is considered to have switched from the deployed state to the support state.
[0221] Figure 3(c) shows a schematic diagram of the unfolded state of an electronic device with an inwardly folding screen. In this example, during the unfolding process of the electronic device by the user, the hinge angle between the first body and the second body of the electronic device is... If the angle is [93°, 180°], then the electronic device is considered to be switching from the supported state to the unfolded state. During the process of the electronic device being closed or folded by the user, the hinge angle between the first and second bodies of the electronic device... If the angle is [87°, 180°], then the electronic device is considered to be in the unfolded state.
[0222] Please refer to Figures 4(a), 4(b), and 4(c), which provide schematic diagrams of the product forms of multiple electronic devices 100 with outward-folding screens. An outward-folding screen is a folded screen formed by folding outwards along the central axis of the hinge, creating a folded edge or axis. Figure 4(a) shows the electronic device 100 with an outward-folding screen in its folded state. After the folded screen of the electronic device 100 is fully folded, the first display screen is visible to the user and displays the user interface. Figure 4(b) shows the electronic device with an inward-folding screen in its support state. Figure 4(c) shows the electronic device with an outward-folding screen in its unfolded state.
[0223] When the electronic device 100 with an outward-folding screen is in a folded state, that is, when the first and second bodies of the electronic device are folded along the central axis of the hinge to form a folding edge or folding axis, the folding screen can be folded to form at least two displays. On the electronic device 100 with an outward-folding screen, the first display is part of the second display. After the outward-folding screen is folded, the first and second displays face away from each other. Since the first display is part of the second display, both the first and second displays are visible to the user in either the folded or unfolded state. However, when the electronic device is in the folded state, the first display displays the user interface; when the electronic device is in the unfolded state, the second display displays the user interface.
[0224] It should be understood that if the display screen with the main camera in the electronic device 100 is the main display screen, then the second display screen is the main display screen, and the first display screen is the secondary display screen. Correspondingly, the hinge angle sensor (integrating an accelerometer and a gyroscope sensor for calculating the hinge angle) on the second display screen is the main hinge angle sensor, and the sensor on the first display screen (integrating an accelerometer and a gyroscope sensor for calculating the hinge angle) is the secondary hinge angle sensor. The distinction between main and secondary in the above example is only for easier differentiation between the first and second display screens, and the specific functions and implementation are not specifically limited in this application.
[0225] Please see Figure 5 As shown, Figure 5This application provides a schematic diagram illustrating the unfolding process of an electronic device 100 with an outward-folding screen. For an electronic device 100 with an inward-folding or outward-folding screen, during the unfolding process by the user, taking a hysteresis angle N° of 3° (which can also be 2°, 4°, 5°, etc., depending on the electronic device or user usage) as an example, the hinge angle between the first body and the second body... If the angle is [0°, 33°], the electronic device is considered to be in a folded state. The hinge angle between the first and second bodies of the electronic device... If the angle is [33°, 93°], then the electronic device is considered to be switching from a folded state to a stand-up state. The hinge angle between the first and second bodies of the electronic device... If the angle is [93°, 180°], then the electronic device is considered to have switched from the stand-up state to the unfolded state. It should be noted that during the process of the electronic device going from folded to unfolded, in the stand-up state, the electronic device displays the user interface on the second display screen (i.e., full-screen display).
[0226] Please see Figure 6 As shown, Figure 6 This application provides a schematic diagram illustrating the closing process of an electronic device 100 with an outward-folding screen. Taking a hysteresis angle N° of 3° (which can also be 2°, 4°, 5°, etc., depending on the electronic device or user usage) as an example, the hinge angle between the first and second bodies of the electronic device... A value of [0°, 27°] indicates that the electronic device is transitioning from a stand-up state to a folded state. The hinge angle between the first and second bodies of the electronic device is... If the angle is [27°, 87°], then the electronic device is considered to be switching from the deployed state to the supported state. The hinge angle between the first and second bodies of the electronic device... If the angle is [87°, 180°], the electronic device is considered to be in the unfolded state. It should be noted that during the process of unfolding and folding the electronic device, in the stand state, the electronic device displays the user interface on the first display screen (i.e., half-screen display).
[0227] It should be understood that the foldable screen (inward folding screen and outward folding screen) in the above embodiments of this application, after being folded, is divided into at least two screens. These can be multiple independent screens or a single, integrated screen, simply folded into at least two parts. For example, the foldable screen can be a flexible foldable screen. A flexible foldable screen includes folding edges made of a flexible material. Part or all of the flexible foldable screen is made of a flexible material. The at least two screens formed after the flexible foldable screen is folded are a single, integrated screen, simply folded into at least two parts.
[0228] Please see Figure 7 As shown, Figure 7Another example of this application provides a schematic diagram of the form of an electronic device 100 with an outwardly folding screen in its support state. The display screen of the electronic device 100 is divided into a first display screen 1001 and a second display screen 1002. Both the first display screen 1001 and the second display screen 1002 are provided with hinge angle sensors, specifically, the hinge angle sensors integrate an accelerometer sensor and a gyroscope sensor. Figure 7 In the electronic device 100 shown, a hinge angle sensor A is provided on the first display screen 1001, and the hinge angle sensor A integrates an accelerometer a and a gyroscope a. A hinge angle sensor B is provided on the second display screen 1002, and the hinge angle sensor B integrates an accelerometer b and a gyroscope b.
[0229] The gyroscope sensor is used to determine the motion attitude of the electronic device. Specifically, it can be used to measure the angular velocity components around the X-axis, Y-axis, and Z-axis of the display screen. The accelerometer sensor is used to measure the acceleration components around the X-axis, Y-axis, and Z-axis of the display screen.
[0230] Please see Figure 8 As shown, Figure 8 Another example of the electronic device 100 with an outward-folding screen provided in this application is a schematic diagram of its form in the support state. The hinge of the electronic device corresponds to the Y-axis. The electronic device can determine the hinge angle between the first body and the second body by using the acceleration components (gx1, gx2, gz1, gz2) of each display screen in the X-axis direction and the acceleration components (gx1, gx2, gz1, gz2) in the Z-axis direction, which are measured by the accelerometer and gyroscope sensors, and by filtering the initial angle based on the angular velocity component around the Y-axis direction. .in, This represents the final calculated hinge angle. 1 and 2 represents the tilt angle of the first fuselage and the second fuselage relative to the horizontal plane, respectively.
[0231] For example, based on the acceleration components along the X-axis and the acceleration components along the Z-axis (gx1, gx2, gz1, gz2), the hinge angle can be calculated using the following formula. :
[0232] ;
[0233] .
[0234] In the electronic device 100 with an outward-folding screen, the switching of the display screen (i.e., switching from one display mode to another) is mainly achieved by detecting the hinge angle (i.e., hinge angle, folding angle) between the first body and the second body. Therefore, in the embodiments of this application, the hinge angle between the first body and the second body of the electronic device is determined... Then, the hinge angle can be used to determine whether to switch the display screen of the foldable phone, for example, whether to display the user interface on the first display screen or the second display screen.
[0235] When a user folds or unfolds an electronic device, the device determines which display screen to show the user interface on based on the hinge angle. This allows the device to provide different user interfaces and functions depending on its folding state. For example, taking a smartphone with an outward-folding screen as an example, when the smartphone is fully unfolded, it provides the user with a large, complete view; while when the smartphone is partially or fully folded, it may only display the interface on a small screen or half-screen to facilitate one-handed operation, making foldable phones more flexible and versatile.
[0236] However, it is worth noting that when the electronic device is in a vertical state (the display plane of the electronic device is nearly perpendicular to the horizontal plane, or it can also be understood as the central axis or central rotation axis of the hinge of the electronic device being nearly perpendicular to the horizontal plane, for example, allowing a deviation of ±3° based on 90°), the gravitational acceleration of the electronic device is concentrated in the Y-axis direction, while the gravitational acceleration components in the X-axis and Z-axis directions are very small. This will result in very small effective calculation data for the folding hinge angle (the Z-axis component and X-axis component of gravitational acceleration), which in turn leads to inaccurate calculation of the hinge angle between the first and second bodies. Especially when the electronic device is shaking or there is electronic noise, this inaccuracy may cause the display screen to switch erroneously.
[0237] To address this issue, current foldable screen devices typically suppress attitude reporting in vertical orientation. This means that the device's algorithm temporarily stops reporting attitude data when a vertical orientation is detected. Consequently, in vertical orientation, regardless of the hinge angle change, the device's underlying system will not report a state change, thus preventing accidental screen switching.
[0238] However, this approach is not the optimal solution for foldable screen devices because it may lead to a half-screen display issue in the unfolded state. Once this half-screen display issue occurs, it will persist in the vertical state, thus affecting the user experience.
[0239] Therefore, for the design of foldable screen devices, a more sophisticated algorithm is needed to process the posture data of electronic devices in the vertical state. This is to ensure that even when the electronic device is in the vertical state, the hinge angle between the first and second bodies of the electronic device can be accurately calculated, so as to ensure that users can obtain accurate and reliable screen display even when the electronic device is in the vertical state, thereby providing a better user experience.
[0240] This application provides an interface display method applied to electronic devices. Figure 9 This is a flowchart illustrating an interface display method provided in an embodiment of this application, as shown below. Figure 9 As shown, an interface display method includes:
[0241] In the S910, the electronic device lights up its screen in response to the user's screen-on operation and displays the user interface on the first display screen. At the first moment, the electronic device is in a folded state.
[0242] S920, at the second moment, in response to the user unfolding the electronic device, the user interface is displayed on the second display screen. At the second moment, the hinge angle between the first body and the second body is the first angle, and the electronic device is in a vertical state. The second moment is after the first moment.
[0243] S930, in the third moment, in response to the user folding the electronic device, the user interface is displayed on the first display screen, and in the third moment, the electronic device is in a vertical state.
[0244] S940, at the fourth moment, after the user unfolds the electronic device, the user interface is displayed on the first display screen. At the fourth moment, the electronic device is not in a vertical state, the hinge angle between the first body and the second body is the first angle, and the display area of the second display screen is larger than the display area of the first display screen. The fourth moment is after the third moment.
[0245] In this application example, "vertical state" means that the display plane of the electronic device is nearly perpendicular to the horizontal plane, or it can also be understood as the central axis or central rotation axis of the hinge of the electronic device being nearly perpendicular to the horizontal plane, for example, allowing a deviation of ±3° based on 90°.
[0246] Taking the electronic device in this application example as a device with an inwardly folding screen, the first display screen and the second display screen can be understood as two independent display screens. In this case, the display area of the first display screen and the display area of the second display screen can be the same or different.
[0247] Taking the electronic device in this application example as a device with an outward-folding screen, the first display screen can actually be part of the second display screen. When the electronic device is folded, the user interface is displayed on the display area of the first display screen; when the electronic device is unfolded, the user interface is displayed on the display area of the second display screen. Therefore, the display area of the second display screen is larger than the display area of the first display screen.
[0248] It should be noted that in actual use, users can use the display screen with the main camera on the electronic device as the main display screen, and the display screen without a camera or with a secondary camera as the secondary display screen. For example, if the first display screen has a main camera, then the first display screen is the default main display screen, and the second display screen of the electronic device in the folded state is the secondary display screen.
[0249] Furthermore, the main and secondary displays can be adjusted according to user habits or personalized settings. For devices with outward folding mechanisms, the displays bend outward when the device is folded. For example, the main display can be a large screen when unfolded, serving as the second display for primary operations and applications. The secondary display is a small external screen in the folded state, serving as the first display for quickly viewing notifications, time, weather, etc.
[0250] It is understood that the method of this application can be achieved through the collaborative work of the software architecture AP and the hardware architecture ADSP in the electronic device to ensure that the user interface can be adapted to switch to the appropriate display screen to display the user interface according to changes in the physical state of the electronic device.
[0251] For example, at the software level, the operating system on the AP needs to be able to detect the user's screen-on operation and trigger the screen-on event. At the hardware level, sensors on the electronic devices are used to recognize user operations, such as touching the screen or pressing a button, etc.
[0252] Please refer to Figure 10(a). Figure 10(a) is a schematic diagram of the form of an electronic device with an outwardly folding screen provided by the example of this application at the first moment. At the first moment T1, the user performs a screen-on operation on the electronic device 100, and the electronic device 100 immediately lights up the screen. At this moment, the electronic device 100 is in a folded state, and the user interface is displayed on the first display screen 1001, providing a compact information view.
[0253] Taking an electronic device 100 as a smartphone with an outward-folding screen as an example, the first display screen in the folded state can be part of the entire smartphone screen (second display screen) for quickly viewing notifications or performing simple operations. Furthermore, taking the aforementioned electronic device as a smartphone with an inward-folding screen as an example, the first display screen in the folded state can be the smartphone's outer screen for quickly viewing notifications or performing simple operations.
[0254] Please refer to Figure 10(b), which is a schematic diagram of the configuration of an electronic device with an outward-folding screen provided in this application example at a second moment. At the second moment T2, following the first moment T1, in response to the user unfolding the electronic device 100, the second display screen 1002 takes over the display of the user interface to maintain the continuity of the user interface and provide richer information in a larger display area. It should be understood that the user unfolding the electronic device 100 refers to switching the electronic device from a folded state or a stand state to an unfolded state. At the second moment, the hinge angle between the first body 1003 and the second body 1004 of the electronic device 100... [93°, 180°].
[0255] Furthermore, at the second moment, the electronic device 100 is in a vertical state, which can be understood as similar to the upright state of a book. In the vertical state, the display plane of the electronic device 100 is nearly perpendicular to the horizontal plane, or the central axis or central rotation axis of the hinge of the electronic device 100 is nearly perpendicular to the horizontal plane.
[0256] Please refer to Figure 10(c). Figure 10(c) is a schematic diagram of the form of an electronic device with an outward folding screen provided in this application at the third moment. At the third moment T3 after the first moment T1 or the second moment T2, the user folds the electronic device 100, but the electronic device 100 still remains in a vertical state. The first display screen 1001 redisplays the user interface and adapts to the new folding angle of the electronic device after the user's folding operation in real time.
[0257] Please refer to Figure 10(d). Figure 10(d) is a schematic diagram of the form of an electronic device with an outward folding screen provided in this application example at the third time. At the fourth time T4 after the third time T3, the user unfolds the electronic device 100, which is still in a vertical state. In the unfolded state, the hinge angle between the first body 1003 and the second body 1004 of the electronic device 100 remains at the first angle α. The first display screen 1001 continues to display the user interface, even though the display area of the second display screen is larger than the display area of the first display screen.
[0258] The interface display method for electronic devices provided in this application enables the electronic device to intelligently respond to user operations and the physical state of the device in a vertical state, ensuring the consistency and usability of the user interface and making the switching of the display screen more in line with the user's actual usage. Regardless of whether the electronic device is in a vertical or non-vertical state, folded or unfolded, it can provide users with the best interface layout and function access in different usage scenarios, solving the problem of inconsistency between interface display and usage state when using foldable screen devices.
[0259] It should be understood that the interface display method described in the examples of this application can be adapted to different types of electronic devices (e.g., devices with inward folding screens and devices with outward folding screens), as well as electronic devices in different states (folded state, unfolded state, vertical state, stationary state), so that electronic devices can maintain the continuity and consistency of the display interface under different physical states, and can also optimize the display content for users according to the actual visible area of the display screen.
[0260] As an alternative example, at the second moment, the electronic device is in a vertical position, meaning it may be fully or partially unfolded. The time from when the user begins to operate the device and the screen lights up (the first moment) to when the device unfolds (the second moment) exceeds a preset duration (e.g., 10 seconds or 15 seconds). If both conditions are met, the electronic device will display the user interface on the second display screen. It should be understood that the aforementioned preset duration can be a time threshold set by the device manufacturer based on user habits and device usage to determine whether the user wants to enter a new working mode or view more content. Through the above example, detecting user actions and time intervals intelligently determines when to display the user interface on the second display screen, thereby providing a more personalized and user-responsive device experience.
[0261] As another alternative example, when it's impossible to intelligently determine when to display the user interface on the second display screen by detecting user actions and time intervals, a Hall sensor within the electronic device can detect voltage changes caused by variations in the magnetic field when the user unfolds the device. It should be understood that the Hall sensor, located on one side of the electronic device, can detect the presence of magnets or other magnetic components on the opposite side, thus enabling it to detect whether the electronic device is unfolded or folded. The electronic device's software system analyzes the voltage data provided by the Hall sensor to determine if the device has been unfolded; once it is determined to be unfolded, the user interface is displayed on the second display screen.
[0262] Furthermore, even when it is impossible to intelligently determine when to display the user interface on the second display by detecting user actions and time intervals, users can still see the content that was previously displayed on the first display on the larger second display, providing users with a better visual experience and more interactive space.
[0263] As another alternative example, at the fourth moment, after the user unfolds the electronic device, when it is determined that the electronic device is not in a vertical position and the first angle is less than a preset angle, the user interface is displayed on the first display screen.
[0264] In this application example, "not vertical" or "not vertical" can be understood as the electronic device not being in a completely vertical position. The aforementioned preset angle is set by the manufacturer based on the device design and usage scenario to determine whether the device is in a suitable state for displaying the user interface. This is because the hinge angle between the first and second bodies varies during the process of the electronic device being unfolded by the user. If the angle is [0°, 33°], the electronic device is considered to be in a folded state. The hinge angle between the first and second bodies of the electronic device... If the angle is [33°, 93°], then the electronic device is considered to be switching from a folded state to a stand-up state. The hinge angle between the first and second bodies of the electronic device... If the angle is [93°, 180°], then the electronic device is considered to have switched from a stand-up state to an unfolded state. Therefore, the aforementioned preset angle can be 93°. When the electronic device is not in a vertical state and the unfolded angle is less than 93°, the user interface is displayed on the first display screen. Furthermore, the display system of the electronic device can intelligently adjust the displayed content according to the physical state of the device, ensuring that the user can obtain a suitable interface display in different usage modes.
[0265] Please refer to Figure 11(a), which is a schematic diagram of the form of an electronic device with an outward-folding screen provided in this application at the fifth moment. After the fourth moment T4, at the fifth moment T5, when the user unfolds the electronic device again, the hinge angle of the electronic device is adjusted to a second angle β, which is larger than the first angle α. The second display screen will display the user interface, providing a different perspective and a larger display area than before. It can be seen that the display interface of the electronic device can dynamically adjust according to the folding and unfolding state of the device, providing the user with a consistent and seamless user experience.
[0266] In one example, at the fifth moment, the display method of the electronic device further considers the specific unfolded state of the device and the user's operation. At the fifth moment, in response to the user unfolding the electronic device, when it is determined that the electronic device is not in a vertical state and the second angle β is greater than a preset angle, the user interface is displayed on the second display screen.
[0267] It should be understood that the above angles can be determined based on the actual situation or user habits, and the examples in this application are not specifically limited.
[0268] When the electronic device is not in a vertical position and its unfolded angle is greater than a preset angle, the user interface is displayed on a second display screen. Furthermore, the display system of the electronic device can intelligently adjust the displayed content according to the physical state of the device, ensuring that the user receives a suitable display screen in different usage modes.
[0269] Please refer to Figure 11(b), which is a schematic diagram of the form of an electronic device with an outwardly folding screen provided in this application at the sixth moment. At the sixth moment T6, after the user unfolds the electronic device, the user interface is displayed on the first display screen. At this time, during the process of the user operating the electronic device to change from the folded state to the unfolded state, it passes through the support state, and the hinge angle between the first body and the second body is the first angle α, so the user interface is still displayed on the first display screen.
[0270] It should be understood that at the sixth moment, the hinge angle of the electronic device is not fully extended to the second angle β described at the second moment T2, but remains at a smaller angle α, which can adapt to different usage scenarios or user comfort. It should be understood that the sixth moment occurs between the first and second moments, at some point between the initial operation of the electronic device after the screen lights up and before the device is fully extended.
[0271] The above examples demonstrate how electronic devices can flexibly adapt to user needs in different usage modes, whether fully unfolded or partially unfolded. Users can choose the most suitable angle and state to use the device based on their personal habits and scenarios, while maintaining access to and interaction with the interface.
[0272] In one example, at the sixth moment T6 mentioned above, after the user unfolds the electronic device, it is first determined whether the electronic device is in a vertical position, and the time length from the user's screen-on operation to unfolding the device is also calculated. If the electronic device is vertical and the operation time is shorter than the preset time, the user interface will be displayed on the first display screen.
[0273] This design takes into account situations where users may only want to quickly view information rather than fully unfolding the device for extended use. Through this approach, electronic devices can provide a more convenient and intuitive user experience while avoiding unnecessary energy consumption, as the second display screen does not unfold when the user only needs to view information quickly, enhancing the device's practicality and convenience.
[0274] The following is in conjunction with the appendix Figure 12 This paper explains how electronic devices utilize their internal application processors (APs) and enhanced digital signal processors (ADSPs) to achieve intelligent monitoring of device status and interface display processing.
[0275] In one alternative implementation, the electronic device includes an application processor (AP) and an enhanced digital signal processor (ADSP). See [link to relevant documentation]. Figure 12 , Figure 12 This application provides an example of an interaction flow diagram between an application processor (AP) and an enhanced digital signal processor (ADSP) in an electronic device. The method includes:
[0276] S1210, in response to the user's screen-on operation, the AP sends a listening request to the ADSP.
[0277] The monitoring request is used to request the ADSP to monitor the hinge angle between the first and second fuselages. Communication between the AP and ADSP is based on an inter-core communication interface. This interface allows the two processors to efficiently exchange data and instructions.
[0278] During the execution of step S920, step S1210 is executed, that is, in response to the user's screen-on operation, the AP sends a listening request to the ADSP. Similarly, during the execution of step S1210, step S910 can also be executed synchronously, that is, at this first moment, the electronic device lights up and displays the user interface on the first display screen. At this first moment, the electronic device is in a folded state.
[0279] S1220, upon receiving a listening request, the ADSP calculates the hinge angle between the first and second fuselages based on sensor data sent by the sensors of the electronic device.
[0280] During the execution of step S920, at the second moment, in response to the user unfolding the electronic device, while displaying the user interface on the second display screen, the execution of step S1220 is carried out to calculate the hinge angle between the first body and the second body as the first angle.
[0281] In one example, because changes in the hinge angle can reflect whether the electronic device is folded or unfolded, responding to the user's physical actions ensures that the user interface can adjust appropriately according to the actual state of the device. The specific implementation process is as follows:
[0282] When a user turns on the screen of an electronic device by tapping the screen or pressing any button, the application processor sends a listening request to the enhanced digital signal processor (ADSP). This request allows the ADSP to listen to and calculate the hinge angle between the first and second housings of the electronic device.
[0283] After receiving a listening request, the enhanced digital signal processor (ADSP) begins processing sensor data acquired by at least one angle sensor from the electronic device. These sensors may include gyroscopes, accelerometers, or other sensors capable of detecting physical changes. The ADSP uses this data to calculate the hinge angle between the first and second fuselages and adjusts the display screen or other functions on the electronic device accordingly, allowing the foldable or deformable electronic device to more flexibly adapt to the user's interface display needs.
[0284] In one alternative implementation, an enhanced digital signal processor (ADSP) processes sensor data related to the hinge angle of the electronic device to obtain the hinge angle between the first and second fuselages. The ADSP includes a hinge angle algorithm module and at least one angle sensor driver. See also... Figure 13 , Figure 13 This application provides a schematic diagram illustrating the interaction flow between an application processor (AP) and an enhanced digital signal processor (ADSP) in an electronic device. The method further includes:
[0285] S12201, when the hinge angle algorithm module receives a listening request, it sends a sensor data reporting request to at least one angle sensor driver.
[0286] S12202, when at least one angle sensor driver receives a sensor data reporting request, the sensor data is reported to the hinge angle algorithm module at a fixed frequency.
[0287] S12203, the hinge angle algorithm module calculates the hinge angle between the first fuselage and the second fuselage based on sensor data.
[0288] It is understandable that at the above steps T2, T4, T5, and T6, the hinge angle algorithm module can calculate the hinge angle between the first fuselage and the second fuselage based on the sensor data, based on the above steps S12201 to S12203.
[0289] It should be understood that in the example of this application, the ADSP is equipped with at least one Hall sensor driver and at least one angle sensor driver. When there is only one angle sensor driver, it is used to process sensor data uploaded by the accelerometer sensor and sensor data uploaded by the gyroscope sensor. When there are two angle sensor drivers, the accelerometer sensor driver can be used to process the sensor data uploaded by the accelerometer sensor, and the gyroscope sensor driver can be used to process the sensor data uploaded by the gyroscope sensor.
[0290] When a user activates the screen-on operation, the software architecture (AP) on the electronic device sends a listening request to the hinge angle algorithm module in the hardware architecture (ADSP). Upon receiving the listening request, the hinge angle algorithm module instructs at least one angle sensor driver in the ADSP to begin reporting sensor data. After receiving the data reporting request, at least one angle sensor driver reports the collected sensor data to the hinge angle algorithm module at a predetermined fixed frequency, enabling the hinge angle algorithm module to use this sensor data to calculate the hinge angle between the first and second housings. This process allows the electronic device to monitor its physical state in real time using the ADSP and, through the AP, adjust or switch the display screen to show the user interface or other functions based on the hinge angle, providing a smoother and more intuitive user experience.
[0291] In one optional implementation, the sensor data includes: an acceleration component in the direction of the coordinate axis and an angular velocity component around the coordinate axis; a hinge angle algorithm module calculates an initial angle between the first fuselage and the second fuselage based on the acceleration component in the direction of the coordinate axis; and filters the initial angle based on the angular velocity component around the coordinate axis to obtain the hinge angle between the first fuselage and the second fuselage.
[0292] In the aforementioned optional implementation, the hinge angle algorithm module first uses the acceleration components measured by the sensors to calculate the initial angle between the first and second fuselages. Specifically, this initial angle is estimated based on the acceleration changes of the electronic device in space, initially determining the relative position between the first and second fuselages. Since the angular velocity components reflect the rotation rate of various parts of the device around the coordinate axes, this data helps the algorithm module to more accurately understand the dynamic changes of the device. Next, the hinge angle algorithm module uses the angular velocity components to filter this initial angle to reduce measurement noise and other possible interference, thereby obtaining a more accurate and stable hinge angle measurement value.
[0293] It should be understood that filtering is a signal processing technique that helps extract useful signals while suppressing noise. In this case, the filter might be designed as a low-pass filter, allowing low-frequency signals to pass through while blocking high-frequency noise. Thus, when two parts of the electronic device move relative to each other, the hinge angle algorithm module can accurately measure the change in angle between them.
[0294] In one specific implementation, the hinge angle algorithm module calculates the initial angle between the first fuselage and the second fuselage based on the acceleration components in the X-axis direction and the acceleration components in the Z-axis direction; the hinge angle algorithm module uses the Kalman filter method to filter the initial angle based on the angular velocity components around the Y-axis direction to obtain the hinge angle between the first fuselage and the second fuselage.
[0295] In the example above, the initial angle between the two fuselages is first obtained by measuring the acceleration components of each display screen in the X and Z axes (denoted as gx1, gx2, gz1, and gz2, respectively). Then, the angular velocity component in the Y axis direction is used to filter this initial angle to obtain a more accurate hinge angle.
[0296] For example, the hinge angle algorithm module, based on the acceleration components along the X-axis and the acceleration components along the Z-axis (gx1, gx2, gz1, gz2), can calculate the hinge angle using the following formula. :
[0297] ;
[0298] .
[0299] In this formula, Indicates the final hinge angle. 1 and 2 represents the tilt angles of the first and second fuselages relative to the horizontal plane, respectively. By multiplying the acceleration components and taking the square root of the sum of squares, the cosine values of the two angles can be calculated using the properties of trigonometric functions to obtain the initial angles. The hinge angle algorithm module uses the Kalman filter to process the angular velocity components, that is, it filters the initial angles calculated from the acceleration components based on the angular velocity components to obtain the final hinge angles.
[0300] It should be understood that the Kalman filter is an optimization algorithm capable of estimating the state of a dynamic system in the presence of noise. Through prediction and update steps, the Kalman filter continuously corrects the estimation of the system state, thereby optimizing the calculation of the hinge angle. Even in the presence of noise in acceleration and angular velocity measurements, it helps the algorithm module accurately estimate the hinge angle, providing a dynamic and adaptive way to process sensor data. This enables electronic devices to respond more accurately to user operations and changes in the physical state of the device.
[0301] In one example, the sensors of the electronic device include an accelerometer and a gyroscope. In this embodiment, at least one angle sensor is used to drive the reception of the raw electrical signals reported by the accelerometer and the gyroscope. The raw electrical signals reported by the accelerometer are processed by the at least one angle sensor to obtain the acceleration component in the direction of the coordinate axis. The raw electrical signals reported by the gyroscope are also processed by the at least one angle sensor to obtain the angular velocity component around the coordinate axis.
[0302] It should be understood that electronic devices use accelerometers and gyroscopes to monitor their physical state. These sensors provide raw electrical signals reflecting the device's motion in space. Since these raw electrical signals typically contain noise and potential interference, they need to be filtered and converted before they can be used for further calculations and analysis. To convert these raw signals into useful data, the angle sensor drive within the electronic device performs the following steps:
[0303] In its implementation, the angle sensor driver first receives raw electrical signals from the accelerometer and gyroscope sensors. These signals are the sensors' direct electrical responses to the device's motion. The angle sensor driver processes the raw electrical signals reported by the accelerometer to obtain the acceleration components of the device along the coordinate axes. Similarly, the angle sensor driver also processes the raw electrical signals reported by the gyroscope to obtain the angular velocity components of the device about the coordinate axes, which reflect the rotational rates of various parts of the electronic device around the coordinate axes.
[0304] Please see Figure 14 , Figure 14 This application provides a schematic diagram illustrating the interaction flow between an application processor (AP) and an enhanced digital signal processor (ADSP) in an electronic device. In one example, before the hinge angle algorithm module calculates the hinge angle between the first and second fuselages based on sensor data, the method further includes:
[0305] S1201, the hinge angle algorithm module calculates the estimated error value based on the acceleration component in the direction of the Y coordinate axis. The estimated error value is used to characterize the error between the hinge angle calculated by the hinge angle algorithm module and the actual hinge angle.
[0306] S1202, when the estimated error value is greater than or equal to the error threshold, the hinge angle algorithm module performs vertical entry detection on the electronic device based on the acceleration component in the direction of the Y coordinate axis.
[0307] Through the above step S1202, the vertical state entry detection of the electronic device is performed, and it is determined in step S920 that the electronic device is in the vertical state. It can be understood that in step S930, at the third moment, the electronic device is still in the vertical state.
[0308] S1203, when the electronic device meets the vertical state entry condition, perform static detection on the electronic device to obtain a detection result.
[0309] S1204, based on the detection result, determine the exit condition that the electronic device meets.
[0310] S1205, when the electronic device meets the exit condition, determine that the electronic device exits the vertical state and update the estimated error value, where the updated estimated error value is less than the error threshold.
[0311] Among them, after obtaining the updated estimated error value, execute the above step S12203, and calculate the hinge angle between the first fuselage and the second fuselage based on the sensor data through the hinge angle algorithm module.
[0312] Before calculating the hinge angle between the first fuselage and the second fuselage, the hinge angle algorithm module first uses the acceleration component in the Y-axis direction to calculate an estimated error value. This error value represents the difference between the hinge angle calculated by the algorithm and the actual hinge angle. If it is determined that the estimated error value is less than the error threshold, then execute to calculate the hinge angle between the first fuselage and the second fuselage based on the sensor data through the hinge angle algorithm module. If this estimated error value is greater than or equal to a preset error threshold, for example, 0.4, the hinge angle algorithm module will further detect whether the electronic device is in the vertical state.
[0313] It should be understood that the vertical state entry detection is to confirm whether the electronic device meets the vertical state entry condition. In an optional example, the vertical state entry detection can be to detect Gy whether it falls within a threshold range: , this threshold range is compared with , and it is easier for the electronic device to meet the vertical state entry condition. If so, the electronic device is regarded as being in the vertical state.
[0314] It should still be understood that after each screen-on of the electronic device, ADSP only makes a vertical state judgment once after the screen is on. When the electronic device meets the vertical state entry condition, that is, when it is determined that the electronic device is in the vertical state, the vertical state flag is set to true; once after this screen-on, the electronic device exits the vertical state, the vertical state flag becomes false, and no more vertical state judgments are made, and it is considered that the electronic device has exited the vertical state until the screen of the electronic device is turned off and then turned on again to update the vertical state flag to true.
[0315] If the electronic device meets the above vertical entry conditions, the hinge angle algorithm module will perform a stationary detection to determine whether the electronic device is in a stationary state. For example, this can be done based on the gravitational acceleration components measured on the X, Y, and Z axes of the electronic device. Gx , Gy and Gz The system combines two threshold values to detect whether the electronic device is in a stationary state.
[0316] In one example, it is possible, but not limited to, when a detection is made... and When an electronic device is considered to be at rest, this rest includes absolute rest and relative rest (uniform motion). Otherwise, the electronic device is considered to be in motion.
[0317] It should be noted that the stationary threshold value in the example of this application is set based on the square of the standard value of gravitational acceleration (approximately 9.81 m / s² on the Earth's surface). When the total acceleration measured by the accelerometer (i.e., the square root of the sum of the squares of the acceleration components on all axes) is close to this standard value, the electronic device can be considered to be approximately stationary.
[0318] Next, based on whether the electronic device is stationary or in motion, the exit conditions that the electronic device must meet are determined. If the electronic device meets the exit conditions, the hinge angle algorithm module updates the estimated error value, ensuring that the updated value is less than the error threshold. That is, the hinge angle algorithm module considers that the electronic device is no longer in a vertical state, or that the state of the electronic device is stable enough, and the next hinge angle calculation can proceed.
[0319] After updating the estimated error value, the hinge angle algorithm module calculates the hinge angle between the first and second bodies based on the sensor data. This ensures that the hinge angle measurement is as accurate as possible, enabling the user interface of the electronic device to be appropriately adjusted according to the actual physical state of the device.
[0320] In one optional implementation, the exit conditions include: a first exit condition and a second exit condition, wherein the constraint range of the first exit condition is smaller than the constraint range of the second exit condition.
[0321] If the detection result indicates that the electronic device is stationary, the electronic device is determined to meet the first exit condition based on whether the acceleration component in the Y-axis direction is greater than the first threshold or less than the second threshold; otherwise, the electronic device is considered not to meet the first exit condition.
[0322] If the detection result indicates that the electronic device is not stationary, the electronic device is determined to meet the second exit condition based on the acceleration component in the Y-axis direction being greater than the third threshold or the acceleration component in the Y-axis direction being less than the fourth threshold.
[0323] It should be understood that the static state includes: absolute stillness and uniform motion. The first threshold value is less than the third threshold value, the second threshold value is less than the first threshold value, and the fourth threshold value is less than the second threshold value; otherwise, the electronic device is considered not to meet the second exit condition.
[0324] Compared to the first exit condition (narrow threshold) mentioned above, the second exit condition (wide threshold) is more difficult to exit. Optionally, in one example, the first exit condition is G. y The first threshold is 10.3 m / s. 2 or G y The second threshold is 9.3 m / s. 2 The second exit condition is G. y The third threshold is 10.9 m / s. 2 or G y The fourth threshold is 8.7 m / s. 2 .
[0325] In the above implementation, the hinge angle algorithm module of the electronic device determines whether the electronic device meets specific exit conditions based on the data from the acceleration sensor. These exit conditions are to determine whether the device can exit from the vertical state, that is, to transition from the vertical state to the non-vertical state.
[0326] If the electronic device is stationary (including absolute or relative stillness, i.e., uniform motion), the hinge angle algorithm module checks whether the acceleration component in the Y-axis direction is greater than a first threshold or less than a second threshold. If so, the device meets the first exit condition. If the electronic device is not stationary, the hinge angle algorithm module checks whether the acceleration component in the Y-axis direction is greater than a third threshold or less than a fourth threshold. If so, the electronic device is considered to meet the second exit condition. By using the hinge angle algorithm module to adjust the calculation threshold range for the electronic device to exit the vertical state based on its stationary or moving state, this ensures that when the electronic device exits the vertical state, the vertical state is more easily identified and exited, accurately reflecting the physical state of the electronic device, thus facilitating rapid screen display switching.
[0327] This application provides a wide-threshold and narrow-threshold adaptive switching mechanism to improve the flexibility and accuracy of judgment. When an electronic device such as a foldable screen phone is determined to be in a stationary state, stationary detection is performed using data obtained from an accelerometer. When the electronic device is in a relatively stationary state, the hinge angle algorithm module adopts or switches to narrow-threshold recognition (easy to exit the vertical state), that is, it determines whether the electronic device meets the first exit condition. This makes it easier to identify and exit the vertical state, thereby facilitating rapid screen display switching. Conversely, even when the narrow-threshold recognition is used to determine whether the electronic device has exited the vertical state, if the electronic device remains in the vertical state for a long time, the hinge angle algorithm module will adjust the screen switching strategy, using the Hall effect sensor to detect whether the device is in a folded or unfolded state to switch the display screen (described in subsequent embodiments). This avoids the problem of the device being unable to adaptively switch the display screen due to being in the vertical state for a long time, improving the user experience of foldable screen devices in different usage scenarios, and making the display switching more in line with the user's actual usage.
[0328] Taking a foldable phone as an example, a magnet can be placed on the first part of the phone's body, and a Hall sensor can be placed on the second part. The magnet and Hall sensor are combined to detect changes in the magnetic field. When the electronic device is folded or unfolded, the strength and direction of the magnetic field change, thus determining whether the phone is in a folded or unfolded state. By providing a display switching method that comprehensively utilizes accelerometers and Hall sensors, the screen switching accuracy of foldable phones can be optimized, improving the display switching response rate under different postures and thus enhancing the user experience.
[0329] Please see Figure 15 , Figure 15 This application provides a schematic diagram illustrating the interaction flow between an application processor (AP) and an enhanced digital signal processor (ADSP) in an electronic device. As an optional implementation, after the hinge angle algorithm module calculates the hinge angle between the first and second fuselages based on sensor data, the method further includes:
[0330] S1230, the hinge angle algorithm module, reports the calculated hinge angle and the updated estimated error value to the AP.
[0331] S1240, AP determines the folded state flag based on the hinge angle and the updated estimated error value.
[0332] S1250, if the AP determines that the electronic device is in a folded state based on the folded state flag, then the user interface is displayed on the first display screen.
[0333] S1260, if the AP determines that the electronic device is in the unfolded state based on the folded state flag, then the user interface is displayed on the second display screen.
[0334] Through the above method steps S1230 to S1260, the example of this application can determine whether the electronic device is in a folded or unfolded state at the first time T1, the second time T2, the third time T3, the fourth time T4, the fifth time T5, and the sixth time T6. When the electronic device is in a folded or unfolded state, during the process of the user unfolding the electronic device, the first display screen or the second display screen is specifically used for displaying the interface.
[0335] In this example, after the hinge angle algorithm module calculates the hinge angle between the first and second bodies based on sensor data, it reports the calculated hinge angle and the updated estimated error value to the application processor (AP). The AP determines a folded state flag based on the received hinge angle and estimated error value. This folded state flag indicates whether the device is currently in a folded or unfolded state. If the AP determines the electronic device is in a folded state, the first display screen will show the user interface; if the AP determines the electronic device is in an unfolded state, the second display screen will show the user interface.
[0336] When an electronic device is in a vertical orientation, the user interface display can be adjusted based on the device's physical state (folded or unfolded), providing a more intuitive and adaptive user experience. For example, when an electronic device is folded, only a small display or external display may be available, while when unfolded, a larger internal display may be used. In this way, the electronic device ensures that the user always sees the relevant information and interface on the most suitable screen, regardless of whether the device is folded or unfolded.
[0337] Please see Figure 16 , Figure 16 This application provides a schematic diagram illustrating the interaction flow between an application processor (AP) and an enhanced digital signal processor (ADSP) in an electronic device. The application processor (AP) includes a sensor hardware abstraction layer and a folding display management service layer to collaboratively determine the folding state of the electronic device. Specifically, the sensor hardware abstraction layer is responsible for handling low-level hardware interactions and data processing, while the folding display management service layer is responsible for making high-level decisions based on this data, such as the display state of the user interface. This layered architecture helps improve system efficiency and reliability, while also making the system easier to maintain and upgrade.
[0338] In one implementation, please refer to Figure 16 The AP determines the folded state flag based on the hinge angle and the updated estimation error value, including:
[0339] S12401, If the sensor hardware abstraction layer determines that the updated estimated error value is less than the error threshold, the hinge angle is reported to the folding machine display management service layer on the AP.
[0340] S12402, the folding device display management service layer determines the folding state flag of the electronic device based on the hinge angle.
[0341] Furthermore, if the sensor hardware abstraction layer determines that the updated estimated error value is greater than or equal to the error threshold, it will not report the hinge angle to the folding machine display management service layer.
[0342] If the sensor hardware abstraction layer determines that the updated estimated error value is less than the error threshold, it will report the hinge angle to the folding display management service layer in the AP. The folding display management service layer then determines the folding state flag of the electronic device based on the received hinge angle, ensuring that the electronic device can adjust the display of the user interface according to its physical state (folded or unfolded).
[0343] If the sensor hardware abstraction layer determines that the updated estimated error value is greater than or equal to the error threshold, the hinge angle will not be reported to the folding device display management service layer. This means that the hinge angle data will only be used for further processing and display state decisions when the estimated error value is within an acceptable range. This prevents inaccurate state judgments due to excessive errors and ensures that the display screen of the user interface dynamically adjusts according to the folding state of the folding device.
[0344] In one implementation, the folding device display management service layer monitors the folding state of the electronic device and updates the display interface based on changes in the folding state. The folding device display management service layer checks a folding state flag to determine if the folding state of the electronic device has changed. If the folding state of the electronic device has changed, and the folding state flag indicates that the device is in a folded state, the folding device display management service layer displays the user interface on the first display screen, ensuring that the user interface responds promptly and is displayed on the corresponding display screen when the user folds or unfolds the electronic device.
[0345] In one implementation, if the folded state of the electronic device changes and the folded state flag indicates that the device is in the unfolded state, the folding device display management service layer will display the user interface on the second display screen, ensuring that the user interface can respond in a timely manner and be displayed on the corresponding display screen when the user folds or unfolds the electronic device.
[0346] As an example, in one alternative embodiment, a Hall sensor is typically used to detect changes in magnetic fields, such as proximity switches, position detection, etc.
[0347] For an alternative implementation, please refer to [link / reference]. Figure 17 , Figure 17 This application provides a schematic diagram illustrating the interaction flow between an application processor (AP) and an enhanced digital signal processor (ADSP) in an electronic device. The method further includes:
[0348] S1601, if the electronic device does not meet the exit conditions, the timer is started through the hinge angle algorithm module.
[0349] S1602, when the timer exceeds the predetermined duration and the electronic device still remains in a vertical state, voltage data is obtained from the Hall sensor driver through the hinge angle algorithm module. The voltage data is collected by the Hall sensor connected to the Hall sensor driver on the electronic device and is used to determine whether the electronic device is folded or unfolded.
[0350] S1603, the hinge angle algorithm module reports the voltage data and vertical state flag to the AP, where the vertical state flag is used to indicate that the electronic device is in vertical state.
[0351] S1604, if the AP determines that the electronic device is in a folded state based on the voltage data, then the user interface is displayed on the first display screen;
[0352] S1605, if the AP determines that the electronic device is in the unfolded state based on the voltage data, then the user interface is displayed on the second display screen.
[0353] Through the above steps S1601 to 1605, when the timer exceeds the predetermined duration and the electronic device remains in a vertical state, the hinge angle algorithm module obtains voltage data from the Hall sensor to realize that at the second moment T2, in response to the user unfolding the electronic device, the voltage data detected by the Hall sensor is obtained; then, the AP side determines that the electronic device is unfolded based on the voltage data; and the user interface is displayed on the second display screen.
[0354] It should be understood that the vertical state flag means that after each time the screen of an electronic device is turned on, the ADSP only performs a vertical state judgment once after the screen is turned on, and the flag is true at this time; once the screen is turned on again, the electronic device exits the vertical state, the vertical state flag becomes false, and no more vertical state judgment is performed, and it is considered that the electronic device has exited the vertical state, until the screen is turned off and then on again, at which point the vertical state flag is updated to true.
[0355] In one alternative implementation, if the electronic device does not meet the exit conditions, the hinge angle algorithm module starts a timer. If the timer exceeds a predetermined duration and the electronic device remains in a vertical state, the hinge angle algorithm module acquires voltage data from the Hall sensor driver. This voltage data is collected by the Hall sensor on the device and is used to determine whether the device is folded or unfolded. The hinge angle algorithm module reports the voltage data and a vertical state flag to the application processor (AP), whereby the vertical state flag indicates that the electronic device is currently in a vertical state.
[0356] If the access point (AP) determines the device is in a folded state based on the voltage data, it displays the user interface on the first display screen. If the AP determines the device is in an unfolded state based on the voltage data, it displays the user interface on the second display screen. Hall effect sensors are commonly used to detect changes in magnetic fields, such as in proximity switches and position detection.
[0357] After the hinge angle algorithm module starts the timer, it stops the timer once it determines that the electronic device has exited the vertical state. After the timer has run for a predetermined duration (e.g., 10 seconds, 15 seconds, etc.), it returns to the process of determining the exit conditions met by the electronic device based on the detection results, until the electronic device exits the vertical state or the timer runs for a longer period.
[0358] In one alternative implementation, the application processor (AP) includes a foldable display management service layer that can determine the state of the electronic device based on voltage data: if the voltage data indicates that the device is folded, the foldable display management service layer displays the user interface on a first display screen. Conversely, if the voltage data indicates that the device is unfolded, the user interface is displayed on a second display screen. This method enables electronic devices with two or more displays and usage modes to intelligently switch displays based on their physical state (folded or unfolded), improving the user experience.
[0359] The following is in conjunction with the appendix Figure 18 This section details how to determine the display screen for the user interface when the electronic device meets and does not meet the exit conditions. Please refer to [link / reference]. Figure 18 , Figure 18 This application provides a schematic diagram illustrating the interaction flow between an application processor (AP) and an enhanced digital signal processor (ADSP) in an electronic device.
[0360] S1801, the hinge angle algorithm module calculates the estimated error value based on the acceleration component in the direction of the Y coordinate axis.
[0361] S1802, when the estimated error value is greater than or equal to the error threshold, the hinge angle algorithm module performs vertical entry detection on the electronic device based on the acceleration component in the direction of the Y coordinate axis.
[0362] S1803: When the electronic device meets the vertical entry condition, perform a static detection on the electronic device and obtain the detection result.
[0363] S1804a, if the detection result indicates that the electronic device is in a stationary state, determine that the electronic device meets the first exit condition.
[0364] S1805a, if the detection result indicates that the electronic device is not in a stationary state, determine that the electronic device meets the second exit condition.
[0365] S1806, if the electronic device meets the exit conditions, determine that the electronic device has exited the vertical state and update the estimated error value.
[0366] S1807, the hinge angle algorithm module calculates the hinge angle between the first fuselage and the second fuselage based on sensor data.
[0367] S1808, the hinge angle algorithm module, reports the calculated hinge angle and the updated estimated error value to the AP.
[0368] S1809, AP determines the folded state flag based on the hinge angle and the updated estimated error value.
[0369] S1810: If the AP determines that the electronic device is in a folded state based on the folded state flag bit, it displays the user interface on the first display screen; if the AP determines that the electronic device is in an unfolded state based on the folded state flag bit, it displays the user interface on the second display screen.
[0370] S1804b: If the detection result indicates that the electronic device is in a stationary state, it is determined that the electronic device does not meet the first exit condition.
[0371] S1805b: If the detection result indicates that the electronic device is not in a stationary state, it is determined that the electronic device does not meet the second exit condition.
[0372] S1811, if the electronic device does not meet the exit conditions, the timer is started through the hinge angle algorithm module.
[0373] S1812, when the timer has exceeded the predetermined duration and the electronic device remains in a vertical position, obtains voltage data from the Hall sensor drive through the hinge angle algorithm module.
[0374] S1813, the hinge angle algorithm module reports the voltage data and vertical state flag to the AP.
[0375] S1814, if the AP determines that the electronic device is in a folded state based on the voltage data, the user interface is displayed on the first display screen; if the AP determines that the electronic device is in an unfolded state based on the voltage data, the user interface is displayed on the second display screen.
[0376] Through the above example, when the electronic device exits the vertical state under the condition that the exit conditions are met, the hinge angle algorithm module calculates the hinge angle between the first and second bodies based on sensor data. Then, the AP determines a folded state flag based on the hinge angle and the updated estimated error value. If the folded state flag indicates the electronic device is in a folded state, the user interface is displayed on the first screen; if it indicates the electronic device is in an unfolded state, the user interface is displayed on the second screen. Conversely, if the exit conditions are not met, the hinge angle algorithm module starts a timer. If the timer exceeds a predetermined duration and the electronic device remains in a vertical state, the hinge angle algorithm module acquires voltage data from the Hall sensor. Then, if the AP determines the electronic device is in a folded state based on the voltage data, the user interface is displayed on the first screen; if it determines the electronic device is in an unfolded state based on the voltage data, the user interface is displayed on the second screen. This avoids the problem of the device being unable to adaptively switch displays due to prolonged vertical operation, improving the user experience of the foldable screen device in different usage scenarios and making the display switching more consistent with the user's actual usage.
[0377] According to an embodiment of this application, based on the above-described interface display method embodiment, an electronic device is also provided. The electronic device includes a hinge, a first body, and a second body, the hinge being used to connect the first body and the second body; an enhanced digital signal processor (ADSP) for invoking the interface display method as described above to determine the hinge angle between the first body and the second body; and an application processor (AP) for communicating with the ADSP via an inter-core communication interface, for invoking the interface display method as described above, determining that the electronic device is in a folded state based on the hinge angle, and displaying the user interface on a first display screen; and determining that the electronic device is in an unfolded state based on the hinge angle, and displaying the user interface on a second display screen.
[0378] In combination with the above Figure 2As shown in the schematic block diagram of an electronic device 100, the software architecture of the electronic device includes an application processor (AP), and the hardware architecture includes an enhanced digital signal processor (ADSP). The application framework layer in the AP can be a sensor framework layer (sensor FWK), and the hardware abstraction layer is specifically a sensor hardware abstraction layer (sensor HAL). The sensor HAL can include a hinge angle sensor hardware abstraction layer (hinge_angle.cpp) and a Hall sensor hardware abstraction layer (extend_hall.cpp).
[0379] The hardware architecture of ADSP includes: hinge angle algorithm module (hinge_angle aglo), angle sensor driver (hinge_angle driver), Hall sensor driver (extend_hall driver). ADSP can also be equipped with multiple external components or additional components, such as Hall sensor, accelerometer sensor ACC, and gyroscope sensor GYRO, etc. These sensors are directly connected to the corresponding drivers in ADSP.
[0380] It should be understood that, in the examples of this application, the driver on the ADSP is used to communicate directly with the hardware. For example, the driver on the ADSP may also include at least a display driver, a camera driver, and a sensor driver. The hardware on the ADSP may include devices such as a camera, a display screen, a microphone, a processor, and memory.
[0381] Since the communication between the AP and ADSP is implemented through the inter-core communication interface QMI, based on the above architecture, the interface display method is called as described above. In the foldable screen device, on the ADSP side, the sensor driver (hinge_angledriver) is used to obtain the sensor data of the electronic device collected by the sensor, such as the acceleration component in the direction of the coordinate axis and the angular velocity component around the coordinate axis. The hinge angle algorithm module (hinge_angle aglo) determines the hinge angle of the electronic device, i.e., the folding angle, based on the above sensor data. Then, the AP side determines whether the electronic device is in a folded state or an unfolded state based on the hinge angle calculated by the ADSP side.
[0382] Furthermore, the hinge angle can be used to determine whether the electronic device is in a folded state and display the user interface on the first display screen; the hinge angle can also be used to determine whether the electronic device is in an unfolded state and display the user interface on the second display screen. Even in a vertical state, the electronic device can still intelligently switch displays according to changes in its physical shape (folded or unfolded), thus providing a flexible user experience.
[0383] Figure 19This is a schematic diagram of the structure of an interface display device provided in an embodiment of this application. This device can be implemented as part or all of a computer device by software, hardware, or a combination of both, and is applied to an electronic device. The electronic device includes a hinge, a first body, and a second body, with the hinge connecting the first body and the second body. The computer device can be any of the electronic devices in the examples of this application. See also... Figure 19 The interface display device includes:
[0384] The first display unit 1901 is used to, at a first moment, respond to the user's screen-on operation, turn on the screen of the electronic device and display the user interface on the first display screen. At the first moment, the electronic device is in a folded state.
[0385] The second display unit 1902 is used at a second moment to display a user interface on the second display screen in response to the user unfolding the electronic device. At the second moment, the hinge angle between the first body and the second body is the first angle, and the electronic device is in a vertical state. The second moment is after the first moment.
[0386] The third display unit 1903 is used at a third moment to display a user interface on the first display screen in response to the user folding the electronic device, at which time the electronic device is in a vertical state;
[0387] The fourth display unit 1904 is used at the fourth moment. After the user unfolds the electronic device, the user interface is displayed on the first display screen. At the fourth moment, the hinge angle between the first body and the second body is the first angle. The display area of the second display screen is larger than the display area of the first display screen. The fourth moment is after the third moment.
[0388] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the above-described apparatus is further used for:
[0389] At the fifth moment, in response to the user unfolding the electronic device, the user interface is displayed on the second display screen. At the fifth moment, the hinge angle between the first body and the second body is the second angle, which is greater than the first angle. This fifth moment occurs after the first moment or the third moment.
[0390] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the above-described apparatus is further used for:
[0391] At the sixth moment, after the user unfolds the electronic device, the user interface is displayed on the first screen. At the sixth moment, the hinge angle between the first body and the second body is the first angle, and the electronic device is in a vertical state. The sixth moment is between the first moment and the second moment.
[0392] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the second display unit is further configured to:
[0393] At the second moment, in response to the user unfolding the electronic device, and based on the fact that the electronic device is in a vertical position and the duration between the second moment and the first moment is greater than a preset duration, the user interface is displayed on the second screen.
[0394] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the second display unit is further configured to:
[0395] At the second moment, in response to the user unfolding the electronic device, the voltage data detected by the Hall sensor is acquired;
[0396] Determine the deployment of electronic devices based on voltage data;
[0397] The user interface is displayed on the second screen.
[0398] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the fourth display unit is further used for:
[0399] At the fourth moment, after the user unfolds the electronic device, if it is determined that the electronic device is not in a vertical position and the first angle is less than the preset angle, the user interface is displayed on the first display screen.
[0400] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the fifth display unit is further configured to:
[0401] At the fifth moment, in response to the user unfolding the electronic device, when it is determined that the electronic device is not in a vertical position and the second angle is greater than the preset angle, the user interface is displayed on the second display screen.
[0402] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the sixth display unit is further configured to:
[0403] At the sixth moment, after the user unfolds the electronic device, if it is determined that the electronic device is in a vertical position and the time between the sixth moment and the first moment is less than a preset time, the user interface is displayed on the first display screen.
[0404] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the electronic device includes an application processor (AP) and an enhanced digital signal processor (ADSP), and the above-described apparatus is further used for:
[0405] In response to the user's screen-on operation, the AP sends a listening request to the ADSP. The listening request is used to request the ADSP to listen to the hinge angle between the first and second fuselage. The AP and ADSP communicate with each other based on the inter-core communication interface.
[0406] Upon receiving a listening request, the ADSP calculates the hinge angle between the first and second fuselages based on sensor data sent by the sensors of the electronic device.
[0407] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the ADSP includes a hinge angle algorithm module and at least one angle sensor driver; the above-described device is further used for:
[0408] Upon receiving a listening request, the hinge angle algorithm module sends a sensor data reporting request to at least one angle sensor driver.
[0409] When at least one angle sensor driver receives a sensor data reporting request, the sensor data is reported to the hinge angle algorithm module at a fixed frequency.
[0410] The hinge angle algorithm module calculates the hinge angle between the first fuselage and the second fuselage based on sensor data.
[0411] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the sensor data includes: an acceleration component in the direction of the coordinate axis and an angular velocity component in the direction about the coordinate axis; the above-described device is further used for:
[0412] The hinge angle algorithm module filters the acceleration component in the direction of the coordinate axis based on the angular velocity component around the coordinate axis to obtain the hinge angle between the first fuselage and the second fuselage.
[0413] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the above-described apparatus is further configured to: a hinge angle algorithm module, employing a Kalman filter method, filtering the acceleration components in the X-axis direction and the acceleration components in the Z-axis direction based on the angular velocity components in the Y-axis direction, to obtain the hinge angle between the first fuselage and the second fuselage.
[0414] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the sensors of the electronic device include an accelerometer sensor and a gyroscope sensor; the above-described device is further used for:
[0415] The system receives raw electrical signals reported by an accelerometer and a gyroscope sensor through at least one angle sensor.
[0416] Driven by at least one angle sensor, the raw electrical signal reported by the accelerometer is processed to obtain the acceleration component in the direction of the coordinate axis.
[0417] Driven by at least one angle sensor, the raw electrical signal reported by the gyroscope sensor is processed to obtain the angular velocity component around the coordinate axis.
[0418] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the above-described apparatus is further used for:
[0419] The hinge angle algorithm module calculates the estimated error value based on the acceleration component in the direction of the Y coordinate axis. The estimated error value is used to characterize the error between the hinge angle calculated by the hinge angle algorithm module and the actual hinge angle.
[0420] If the estimated error value is greater than or equal to the error threshold, the hinge angle algorithm module performs vertical entry detection on the electronic device based on the acceleration component in the direction of the Y coordinate axis.
[0421] When the electronic device meets the vertical entry condition, a stationary detection is performed on the electronic device to obtain the detection result;
[0422] Based on the test results, determine the exit conditions that the electronic device meets;
[0423] If the electronic device meets the exit conditions, it is determined that the electronic device has exited the vertical state, and the estimated error value is updated, wherein the updated estimated error value is less than the error threshold.
[0424] After obtaining the updated estimated error value, the hinge angle between the first fuselage and the second fuselage is calculated based on the sensor data using the hinge angle algorithm module.
[0425] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the exit condition includes: a first exit condition and a second exit condition, wherein the constraint range of the first exit condition is smaller than the constraint range of the second exit condition; the above apparatus is further used for:
[0426] Based on the test results, determine the exit conditions that the electronic device must meet, including:
[0427] If the detection result indicates that the electronic device is stationary, the electronic device is determined to meet the first exit condition based on the acceleration component in the Y-axis direction being greater than the first threshold or the acceleration component in the Y-axis direction being less than the second threshold. The stationary state includes: absolute stationary state and uniform motion state.
[0428] If the detection result indicates that the electronic device is not stationary, the electronic device is determined to meet the second exit condition based on the acceleration component in the Y-axis direction being greater than the third threshold value, or the acceleration component in the Y-axis direction being less than the fourth threshold value. The first threshold value is less than the third threshold value, the second threshold value is less than the first threshold value, and the fourth threshold value is less than the second threshold value.
[0429] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the above-described apparatus is further used for:
[0430] The hinge angle algorithm module reports the calculated hinge angle and the updated estimated error value to the AP.
[0431] AP determines the folded state flag based on the hinge angle and the updated estimated error value;
[0432] If the AP determines that the electronic device is in a folded state based on the folded state flag, then the user interface is displayed on the first display screen;
[0433] If the AP determines that the electronic device is in the unfolded state based on the folded state flag, then the user interface is displayed on the second display screen.
[0434] As an example of this application, according to the first aspect, or any implementation of the first aspect above...
[0435] The AP includes: a sensor hardware abstraction layer and a folding display management service layer; the device is also used for:
[0436] If the sensor hardware abstraction layer determines that the updated estimated error value is less than the error threshold, the hinge angle is reported to the folding display management service layer on the AP.
[0437] The folding device display management service layer determines the folding state flag of the electronic device based on the hinge angle.
[0438] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the above-described apparatus is further used for:
[0439] If the sensor hardware abstraction layer determines that the updated estimated error value is greater than or equal to the error threshold, it will not report the hinge angle to the folding machine display management service layer.
[0440] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the above-described apparatus is further used for:
[0441] The folding device display management service layer determines whether the folding state of the electronic device has changed based on the folding state flag.
[0442] When the folding state of an electronic device changes, if the folding state flag indicates that the electronic device is in a folded state, the folding device display management service layer displays the user interface on the first display screen.
[0443] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the above-described apparatus is further used for:
[0444] The folding device display management service layer determines whether the folding state of the electronic device has changed based on the folding state flag.
[0445] When the folded state of the electronic device changes, if the folded state flag indicates that the electronic device is in the unfolded state, the folding device display management service layer displays the user interface on the second display screen.
[0446] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the above-described apparatus is further used for:
[0447] If the electronic device does not meet the exit conditions, a timer is started using the hinge angle algorithm module;
[0448] When the timer exceeds the predetermined duration and the electronic device remains in a vertical position, the hinge angle algorithm module obtains voltage data from the Hall sensor driver. The voltage data is collected by the Hall sensor connected to the Hall sensor driver on the electronic device and is used to determine whether the electronic device is folded or unfolded.
[0449] The hinge angle algorithm module reports the voltage data and vertical state flag to the AP. The vertical state flag is used to indicate that the electronic device is in a vertical state.
[0450] If the AP determines that the electronic device is in a folded state based on voltage data, then the user interface is displayed on the first display screen;
[0451] If the AP determines that the electronic device is in the unfolded state based on the voltage data, then the user interface is displayed on the second display screen.
[0452] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the above-described apparatus is further used for:
[0453] Once it is determined that the electronic device has exited the vertical state, the hinge angle algorithm module stops the timer.
[0454] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the above-described apparatus is further used for:
[0455] After the timer reaches the predetermined duration, the process returns to execute based on the detection results to determine the exit conditions met by the electronic device, until the electronic device exits the vertical state or the timer exceeds the predetermined duration.
[0456] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the AP includes a folding machine display management service layer; the apparatus is also used for:
[0457] The folding device display management service layer determines that the electronic device is in a folded state based on voltage data and displays the user interface on the first display screen.
[0458] According to the first aspect, or any of the above implementations of the first aspect, the AP includes a folding machine display management service layer;
[0459] If the AP determines that the electronic device is in a folded state based on voltage data, then a user interface is displayed on the first display screen, including:
[0460] The folding display management service layer on the AP determines whether the electronic device is in the unfolded state based on voltage data and displays the user interface on the second display screen.
[0461] As an example of this application, according to the first aspect, or any implementation of the first aspect above, the above-described apparatus is further used for:
[0462] If the estimated error value is determined to be less than the error threshold, the hinge angle between the first fuselage and the second fuselage is calculated based on the sensor data by the hinge angle algorithm module.
[0463] It should be noted that the interface display device provided in the above embodiments is only illustrated by the division of the above functional modules when the foldable screen device switches the display screen. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0464] The functional units and modules in the above embodiments 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. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of the embodiments of this application.
[0465] The interface display device and interface display method provided in the above embodiments belong to the same concept. The specific working process and technical effects of the units and modules in the above embodiments can be found in the method embodiment section, and will not be repeated here.
[0466] This application also provides an electronic device, which includes one or more processors and a memory;
[0467] The memory is coupled to one or more processors. The memory is used to store computer program code, which includes computer instructions. One or more processors call the computer instructions to cause the electronic device to execute the interface display method described above.
[0468] Electronic devices can be mobile phones, smart screens, tablets, wearable electronic devices, in-vehicle electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), projectors, or communication devices such as servers, storage devices, and base stations, or smart cars, etc. This application does not impose any limitations on the specific type of electronic device.
[0469] This application also provides a computer-readable storage medium storing computer instructions; when the computer-readable storage medium is used on an electronic device, the electronic device executes the interface display method described above.
[0470] The aforementioned computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the aforementioned computer instructions may be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The aforementioned computer-readable storage medium may be any available medium that a computer can access or may include one or more data storage devices such as servers or data centers that can be integrated with media. The aforementioned available medium may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media, or semiconductor media (e.g., solid-state disks (SSDs)).
[0471] This application also provides a computer program product containing computer instructions, which, when run on an electronic device, enables the electronic device to execute the interface display method described above.
[0472] The computer storage medium and computer program product provided in the embodiments of this application are used to execute the methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects corresponding to the methods provided above, and will not be repeated here.
[0473] In the above embodiments, implementation can also be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, as a computer program product. The aforementioned computer program product includes one or more computer instructions. When these computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The aforementioned computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The aforementioned computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the aforementioned 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., coaxial cable, fiber optic cable, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The aforementioned computer-readable storage medium can be any available medium accessible to a computer, or a data storage device such as a server or data center that integrates one or more available media. The aforementioned available media can be magnetic media (such as floppy disks, hard disks, and magnetic tapes), optical media (such as Digital Versatile Discs (DVDs)), or semiconductor media (such as Solid State Disks (SSDs)).
[0474] The above-described embodiments are optional embodiments provided by this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the technical scope disclosed in this application should be included within the protection scope of this application.
[0475] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for displaying an interface, characterized in that, An electronic device with a foldable screen is provided, the electronic device comprising a hinge, a first body and a second body, the electronic device including a first display screen and a second display screen, the first display screen being disposed on the outside of the first body or the second body, the first display screen being visible to the user after the foldable screen is folded, and the first display screen and the second display screen being opposite to each other, the hinge being used to connect the first body and the second body; the method includes: At the first moment, in response to the user's screen-on operation, the electronic device lights up and displays the user interface on the first display screen. At the first moment, the electronic device is in a folded state. When in the folded state, the hinge angle between the first body and the second body is within a first specified angle range, wherein the hinge angle is determined based on sensor data measured by the sensor of the electronic device. At the second moment, in response to the user unfolding the electronic device, the user interface is displayed on the second display screen. At the second moment, the hinge angle between the first body and the second body is the first angle, and the electronic device is in a vertical state. The second moment is after the first moment. In the vertical state, the display planes of the first display screen and the second display screen are substantially perpendicular to the horizontal plane. The first angle is within a second specified angle range, and the lower limit of the second specified angle range is greater than the upper limit of the first specified angle range. At a third moment, in response to the user folding the electronic device, the user interface is displayed on the first display screen, and at the third moment, the electronic device is in a vertical state, the third moment being after the second moment; At the fourth moment, after the user unfolds the electronic device, the user interface is displayed on the first display screen. At the fourth moment, the electronic device is not in a vertical position, the hinge angle between the first body and the second body is the first angle, and the display area of the second display screen is larger than the display area of the first display screen. The fourth moment occurs after the third moment.
2. The method as described in claim 1, characterized in that, The method further includes: At the fifth moment, in response to the user unfolding the electronic device, the user interface is displayed on the second display screen. At the fifth moment, the electronic device is not in a vertical state, the hinge angle between the first body and the second body is a second angle, the second angle is greater than the first angle, and the fifth moment is after the first moment or the third moment.
3. The method as described in claim 1, characterized in that, The method further includes: At the sixth moment, after the user unfolds the electronic device, the user interface is displayed on the first display screen. At the sixth moment, the hinge angle between the first body and the second body is the first angle, the electronic device is in a vertical state, and the sixth moment is between the first moment and the second moment.
4. The method as described in claim 1, characterized in that, At the second moment, in response to the user unfolding the electronic device, displaying the user interface on the second display screen includes: At the second moment, in response to the user unfolding the electronic device, when it is determined that the electronic device is in a vertical position and the duration between the second moment and the first moment is greater than a preset duration, the user interface is displayed on the second display screen.
5. The method as described in claim 1, characterized in that, At the second moment, in response to the user unfolding the electronic device, displaying the user interface on the second display screen includes: At the second moment, in response to the user unfolding the electronic device, voltage data detected by the Hall sensor is acquired; The deployment of the electronic device is determined based on the voltage data; The user interface is displayed on the second display screen.
6. The method as described in claim 1, characterized in that, In the fourth moment, after the user unfolds the electronic device, the user interface is displayed on the first display screen, including: At the fourth moment, after the user unfolds the electronic device, if it is determined that the electronic device is not in a vertical position and the first angle is less than a preset angle, the user interface is displayed on the first display screen.
7. The method as described in claim 2, characterized in that, At the fifth moment, in response to the user unfolding the electronic device, the user interface is displayed on the second display screen, including: At the fifth moment, in response to the user unfolding the electronic device, when it is determined that the electronic device is not in a vertical state and the second angle is greater than a preset angle, the user interface is displayed on the second display screen.
8. The method as described in claim 3, characterized in that, At the sixth moment, after the user unfolds the electronic device, the user interface is displayed on the first display screen, including: At the sixth moment, after the user unfolds the electronic device, if it is determined that the electronic device is in a vertical position and the duration between the sixth moment and the first moment is less than a preset duration, the user interface is displayed on the first display screen.
9. The method according to any one of claims 1 to 8, characterized in that, The electronic device includes an application processor (AP) and an enhanced digital signal processor (ADSP), and the method further includes: In response to the user's screen-on operation, the AP sends a listening request to the ADSP. The listening request is used to request the ADSP to listen to the hinge angle between the first body and the second body. The AP and the ADSP communicate with each other based on the inter-core communication interface. Upon receiving the monitoring request, the ADSP calculates the hinge angle between the first body and the second body based on the sensor data sent by the sensors of the electronic device.
10. The method as described in claim 9, characterized in that, The ADSP includes a hinge angle algorithm module and at least one angle sensor driver; When the ADSP receives the monitoring request, the method of calculating the hinge angle between the first body and the second body based on sensor data sent by the sensors of the electronic device includes: When the hinge angle algorithm module receives the listening request, it sends a sensor data reporting request to the at least one angle sensor driver. When the at least one angle sensor driver receives the sensor data reporting request, it reports the sensor data to the hinge angle algorithm module at a fixed frequency. The hinge angle algorithm module calculates the hinge angle between the first fuselage and the second fuselage based on the sensor data.
11. The method as described in claim 10, characterized in that, The sensor data includes: acceleration components in the direction of the coordinate axis and angular velocity components around the coordinate axis. The coordinate system of the electronic device is established with the extension direction of the hinge as the Y-axis, the direction perpendicular to the Y-axis and parallel to the plane where the first body or the second body is located as the X-axis, and the direction perpendicular to the plane formed by the X-axis and the Y-axis as the Z-axis. The hinge angle algorithm module calculates the hinge angle between the first fuselage and the second fuselage based on the sensor data, including: The hinge angle algorithm module filters the acceleration component in the direction of the coordinate axis based on the angular velocity component around the coordinate axis to obtain the hinge angle between the first fuselage and the second fuselage.
12. The method as described in claim 11, characterized in that, The hinge angle algorithm module filters the acceleration component in the direction of the coordinate axis based on the angular velocity component around the coordinate axis to obtain the hinge angle between the first fuselage and the second fuselage, including: The hinge angle algorithm module uses the Kalman filter method to filter the acceleration components in the X and Z directions based on the angular velocity components around the Y-axis, thereby obtaining the hinge angle between the first fuselage and the second fuselage.
13. The method as described in claim 11, characterized in that, The sensors of the electronic device include an accelerometer and a gyroscope; the method further includes: The at least one angle sensor drives the reception of the raw electrical signal reported by the accelerometer sensor and the raw electrical signal reported by the gyroscope sensor. Driven by the at least one angle sensor, the raw electrical signal reported by the acceleration sensor is processed to obtain the acceleration component in the direction of the coordinate axis. Driven by at least one angle sensor, the raw electrical signal reported by the gyroscope sensor is processed to obtain the angular velocity component around the coordinate axis.
14. The method as described in claim 11, characterized in that, Before the hinge angle algorithm module calculates the hinge angle between the first fuselage and the second fuselage based on the sensor data, the method further includes: The hinge angle algorithm module calculates an estimated error value based on the acceleration component in the direction of the Y coordinate axis. The estimated error value is used to characterize the error between the hinge angle calculated by the hinge angle algorithm module and the actual hinge angle. If the estimated error value is greater than or equal to the error threshold, the hinge angle algorithm module performs vertical entry detection on the electronic device based on the acceleration component in the direction of the Y coordinate axis. When the electronic device meets the vertical entry condition, a stationary detection is performed on the electronic device to obtain the detection result; Based on the detection results, the exit conditions satisfied by the electronic device are determined; If the electronic device meets the exit condition, it is determined that the electronic device has exited the vertical state, and the estimated error value is updated, wherein the updated estimated error value is less than the error threshold. After obtaining the updated estimated error value, the hinge angle between the first fuselage and the second fuselage is calculated based on the sensor data by the hinge angle algorithm module.
15. The method as described in claim 14, characterized in that, The exit conditions include: a first exit condition and a second exit condition, wherein the constraint range of the first exit condition is smaller than the constraint range of the second exit condition; The step of determining the exit conditions satisfied by the electronic device based on the detection results includes: If the detection result indicates that the electronic device is stationary, the electronic device is determined to meet the first exit condition based on the acceleration component in the Y-axis direction being greater than a first threshold value, or the acceleration component in the Y-axis direction being less than a second threshold value. The stationary state includes: an absolutely stationary state and a uniform motion state. If the detection result indicates that the electronic device is not stationary, the electronic device is determined to meet the second exit condition based on the acceleration component in the Y-axis direction being greater than the third threshold or the acceleration component in the Y-axis direction being less than the fourth threshold. Wherein, the first threshold value is less than the third threshold value, the second threshold value is less than the first threshold value, and the fourth threshold value is less than the second threshold value.
16. The method as described in claim 15, characterized in that, After the hinge angle algorithm module calculates the hinge angle between the first fuselage and the second fuselage based on the sensor data, the method further includes: The hinge angle algorithm module reports the calculated hinge angle and the updated estimated error value to the AP; The AP determines the folded state flag bit based on the hinge angle and the updated estimation error value; If the AP determines that the electronic device is in a folded state based on the folded state flag, then the user interface is displayed on the first display screen; If the AP determines that the electronic device is in an unfolded state based on the folded state flag, then the user interface is displayed on the second display screen; The method further includes displaying the user interface on the second display screen in the stand state during the process of the user operating the electronic device to change from the folded state to the unfolded state, and displaying the user interface on the first display screen in the stand state during the process of the user operating the electronic device to change from the unfolded state to the folded state. In the stand state, the hinge angle is within a third specified angle range, the lower limit of the third specified angle range is greater than the upper limit of the first specified angle range, and the upper limit of the third specified angle range is less than the lower limit of the second specified angle range.
17. The method as described in claim 16, characterized in that, The AP includes: a sensor hardware abstraction layer and a folding machine display management service layer; The AP determines the folded state flag bit based on the hinge angle and the updated estimation error value, including: If the sensor hardware abstraction layer determines that the updated estimated error value is less than the error threshold, then the hinge angle is reported to the folding machine display management service layer on the AP. The folding device display management service layer determines the folding state flag of the electronic device based on the hinge angle.
18. The method as described in claim 17, characterized in that, The method further includes: If the sensor hardware abstraction layer determines that the updated estimated error value is greater than or equal to the error threshold, then it will not report the hinge angle to the folding machine display management service layer.
19. The method as described in claim 17, characterized in that, If the AP determines that the electronic device is in a folded state based on the folded state flag, then displaying the user interface on the first display screen includes: The folding device display management service layer determines whether the folding state of the electronic device has changed based on the folding state flag bit. When the folding state of the electronic device changes, if the folding state flag indicates that the electronic device is in a folded state, the folding device display management service layer displays the user interface on the first display screen.
20. The method as described in claim 17, characterized in that, If the AP determines that the electronic device is in an unfolded state based on the folded state flag, then the user interface is displayed on the second display screen, including: The folding device display management service layer determines whether the folding state of the electronic device has changed based on the folding state flag bit. When the folded state of the electronic device changes, if the folded state flag indicates that the electronic device is in the unfolded state, the folding device display management service layer displays the user interface on the second display screen.
21. The method as described in claim 14, characterized in that, The method further includes: If the electronic device does not meet the exit condition, a timer is started by the hinge angle algorithm module; When the timer exceeds a predetermined duration and the electronic device remains in a vertical position, voltage data is acquired from the Hall sensor driver via the hinge angle algorithm module; wherein, the voltage data is acquired by the Hall sensor connected to the Hall sensor driver on the electronic device, and the voltage data is used to determine whether the electronic device is folded or unfolded; The hinge angle algorithm module reports the voltage data and vertical state flag to the AP, wherein the vertical state flag is used to characterize that the electronic device is in a vertical state; If the AP determines that the electronic device is in a folded state based on the voltage data, then the user interface is displayed on the first display screen; If the AP determines that the electronic device is in an unfolded state based on the voltage data, then the user interface is displayed on the second display screen.
22. The method as described in claim 21, characterized in that, After the hinge angle algorithm module starts the timer, the method further includes: Upon determining that the electronic device has exited the vertical state, the hinge angle algorithm module stops the timer.
23. The method as described in claim 21, characterized in that, After the hinge angle algorithm module starts the timer, the method further includes: After the timer reaches the predetermined duration, the process returns to determining the exit conditions met by the electronic device based on the detection results, until the electronic device exits the vertical state or the timer exceeds the predetermined duration.
24. The method as described in claim 21, characterized in that, The AP includes a folding machine display management service layer; If the AP determines that the electronic device is in a folded state based on the voltage data, then displaying the user interface on the first display screen includes: The folding device display management service layer determines that the electronic device is in a folded state based on the voltage data and displays the user interface on the first display screen.
25. The method as described in claim 21, characterized in that, The AP includes a folding machine display management service layer; If the AP determines that the electronic device is in an unfolded state based on the voltage data, then displaying the user interface on the second display screen includes: The folding device display management service layer on the AP determines that the electronic device is in an unfolded state based on the voltage data and displays the user interface on the second display screen.
26. The method as described in claim 14, characterized in that, The method further includes: If the estimated error value is determined to be less than the error threshold, the hinge angle between the first fuselage and the second fuselage is calculated by the hinge angle algorithm module based on the sensor data.
27. An electronic device, characterized in that, The electronic device includes a hinge, a first body, and a second body, the hinge being used to connect the first body and the second body; An enhanced digital signal processor (ADSP) is used to invoke the method as described in any one of claims 1 to 26 to determine the hinge angle between the first fuselage and the second fuselage; The application processor (AP) communicates with the ADSP via an inter-core communication interface to invoke the method as described in any one of claims 1 to 26, determine that the electronic device is in a folded state based on the hinge angle, and display the user interface on the first display screen. Based on the hinge angle, the electronic device is determined to be in an unfolded state, and the user interface is displayed on the second display screen.
28. An electronic device, characterized in that, The electronic device includes: 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 method as described in any one of claims 1 to 26.
29. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1 to 26.