Display method and electronic device
By dynamically adjusting the sampling frequency of the sensor according to the opening and closing state in the folding mobile phone, the problem of increasing power consumption caused by high-frequency data acquisition is solved, and the effect of reducing power consumption while ensuring the accuracy of the display method is achieved.
Patent Information
- Application Number
- CN202311197017.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-15
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2043-09-15
AI Technical Summary
When determining the angle of the folding angle, existing folding phones require gyroscope sensors and acceleration sensors to acquire data at high frequencies simultaneously to ensure the accuracy of the display, but this leads to increased power consumption.
By providing the first sensor and the second sensor in the electronic device, the sampling frequency of the sensor is adjusted separately according to the opening and closing state of the electronic device. In the non-closed state, the sensor sampling frequency is set to the high frequency 400Hz and in the closed state, the low frequency 100Hz.
While ensuring the accuracy of the display method, the power consumption of electronic devices is reduced. By dynamically adjusting the sampling frequency, the increase in power consumption when data acquisition is collected at high frequency is avoided.
Smart Images

Figure CN118509511B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of display technology, and in particular to a display method and electronic equipment. Background Art
[0002] In a foldable phone, the display mode is determined according to the folding angle of the foldable phone, so that the corresponding display mode is used for display at different folding angles to improve the user experience. For example, when the folding angle is 180° (that is, when the foldable phone is fully unfolded), the full screen is used for display. For another example, when the folding angle is 0° (that is, when the foldable phone is fully closed), the half screen is used for display.
[0003] At present, the angle of the folding angle can be determined based on the data collected by the gyro sensors and accelerometers in the two bodies of the folding mobile phone. In order to make the sampling time difference of the gyro sensors and accelerometers in the two bodies of the folding mobile phone meet the accuracy requirements, so that the angle of the determined folding angle meets the accuracy requirements, and then ensure the accuracy of the display mode, the gyro sensors and accelerometers in the two bodies need to collect data based on a higher frequency (for example, 400Hz) at the same time. Obviously, collecting data based on a higher frequency at the same time will cause the power consumption of the folding mobile phone to increase. Summary of the invention
[0004] In view of this, the present application provides a display method, an electronic device, a computer-readable storage medium and a chip system, which can reduce power consumption while ensuring the accuracy of the display method.
[0005] In a first aspect, the present application provides a display method, which is applied to an electronic device, wherein the electronic device includes a first display screen, a second display screen, a first body and a second body, wherein the first display screen is a flexible screen, the display area of the first display screen is larger than the display area of the second display screen, and the first body and the second body respectively correspond to different display areas of the first display screen; a first sensor is provided in both the first body and the second body, and the opening and closing state of the electronic device includes a closed state and a non-closed state; the method may include: at a first moment, the electronic device displays a first interface on the first display screen, and controls the first sensor to collect data based on a first frequency; wherein, at the first moment, the electronic device is in an unfolded state; at a second moment, based on the electronic device becoming the closed state, the electronic device controls the first sensor to collect data based on a second frequency rate to collect data; wherein, the first frequency is greater than the second frequency, and the second moment is after the first moment; after the electronic device becomes the closed state, the electronic device displays a second interface on the second display screen based on the data collected by the first sensor (that is, the data collected by the first sensor at the current time point); wherein, the second interface contains the same content as the first interface; at a third moment, the electronic device controls the first sensor to collect data based on the first frequency based on the electronic device becoming the non-closed state; wherein, the third moment is after the second moment; when the electronic device is in the expanded state, the electronic device displays the first interface on the first display screen based on the data collected by the first sensor (which may be the data collected by the first sensor at the current time point), wherein the non-closed state includes the expanded state.
[0006] It should be noted that the second display screen may be a part of the display area of the first display screen, or the second display screen and the first display screen may be two independent display screens. For example, in one implementation, the electronic device is an outward folding screen device, and the second display screen may be a part of the first display screen. In another implementation, the electronic device is an inward folding screen device, and the second display screen and the first display screen may be two independent display screens, the second display screen may be an outer screen (small screen), and the first display screen may be an inner screen (large screen).
[0007] As can be seen from the above, when the electronic device becomes closed, the first sensor is controlled to collect data based on the second frequency, and when the electronic device becomes open, the first sensor is controlled to collect data based on the first frequency, and the first frequency is greater than the second frequency. Compared with the method of collecting data based on higher frequencies at the same time, the power consumption of the electronic device is reduced. In addition, after the electronic device becomes closed, the second interface is displayed on the second display screen, and when the electronic device is in the expanded state, the first interface is displayed on the first display screen, and the first interface and the second interface contain the same content, ensuring the accuracy of the display method.
[0008] In a possible implementation manner, the electronic device further includes a second sensor, and the second sensor determines the opening and closing state of the electronic device based on a magnetic field signal.
[0009] Since the electronic device further includes a second sensor, and the second sensor can determine the open or closed state of the electronic device based on the magnetic field signal, a method for determining the open or closed state of the electronic device is provided.
[0010] In a possible implementation, before the second moment, the electronic device changes to the closed state based on detection by the second sensor. That is, it can be understood that the above display method may also include: before the second moment, the electronic device detects that the electronic device changes to the closed state based on the second sensor.
[0011] In a possible implementation, before the third moment, the electronic device changes to the non-closed state based on detection by the second sensor. That is, it can be understood that the above display method may also include: before the third moment, the electronic device detects that the electronic device changes to the non-closed state based on the second sensor.
[0012] In a possible implementation, the method may further include: between the second moment and the third moment, the folding angle of the electronic device is a first angle, and the electronic device obtains the first angle. The first angle may be used to determine a display mode. When the electronic device is in a closed state, the first display screen may include a first display area and a second display area. The angle formed by the plane where the first display area is located and the plane where the second display area is located is the folding angle.
[0013] Between the second moment and the third moment, the folding angle of the electronic device is the second angle, and the electronic device detects that the electronic device is in the closed state based on the second sensor, and obtains a third angle, wherein the third angle is smaller than the second angle and larger than the first angle. The third angle can be used to determine the display mode.
[0014] In one possible implementation, based on the electronic device becoming the closed state, controlling the first sensor to collect data based on the second frequency may include: detecting that the electronic device is in the closed state through the second sensor; and based on detecting that the electronic device is in the closed state and the current sampling frequency of the first sensor is the first frequency (i.e., based on the electronic device changing from a non-closed state to a closed state), setting the sampling frequency of the first sensor to the second frequency, so that the first sensor collects data based on the second frequency.
[0015] In one possible implementation, based on the electronic device becoming the non-closed state, controlling the first sensor to collect data based on the first frequency may include: detecting that the electronic device is in the non-closed state through the second sensor; and based on detecting that the electronic device is in the non-closed state and the current sampling frequency of the first sensor is the second frequency (i.e., based on the electronic device changing from a closed state to a non-closed state), setting the sampling frequency of the first sensor to the first frequency, so that the first sensor collects data based on the first frequency.
[0016] In a possible implementation, after the electronic device changes to the closed state, based on the data collected by the first sensor, displaying the second interface on the second display screen may include: after the electronic device changes to the closed state, detecting that the electronic device is in the closed state through the second sensor; calculating a fourth angle based on the data collected by the first sensor; determining a fifth angle based on the detection that the electronic device is in the closed state based on the fourth angle and the first preset angle; wherein the fifth angle is the smaller value of the fourth angle and the first preset angle; and displaying the second interface on the second display screen based on the fifth angle. The fifth angle may be used to determine the display mode.
[0017] From the above, it can be seen that when the electronic device is detected to be in a closed state, by calculating the fourth angle and determining the smaller value of the fourth angle and the first preset angle as the fifth angle, it can be ensured that in the closed state, the angle used to determine the display mode (i.e., the fifth angle) will not be too large, thereby avoiding the problem of display errors caused by the angle used to determine the display mode being too large in the closed state.
[0018] In a possible implementation, when the electronic device is in the unfolded state, displaying the first interface on the first display screen based on data collected by the first sensor may include: when the electronic device is in the unfolded state, detecting by the second sensor that the electronic device is in the non-closed state; calculating a sixth angle based on the data collected by the first sensor; and displaying the first interface on the first display screen based on the sixth angle based on detecting that the electronic device is in the non-closed state.
[0019] In one possible implementation, setting the sampling frequency of the first sensor to the second frequency based on detecting that the electronic device is in the closed state and the current sampling frequency of the first sensor is the first frequency may include: calculating a seventh angle based on data collected by the first sensor based on detecting that the electronic device is in the closed state; comparing the seventh angle with a second preset angle to determine that the seventh angle is less than the second preset angle; and setting the sampling frequency of the first sensor to the second frequency based on the seventh angle being less than the second preset angle and the current sampling frequency of the first sensor being the first frequency.
[0020] Since the angle of the folding angle will not be a large value when the electronic device is in a closed state, during the use of the electronic device, there may be a situation where the closed state of the electronic device is falsely reported due to interference from an external magnetic field. Therefore, in order to determine whether the detected closed state is a false alarm and to eliminate the influence of the false alarm of the closed state on controlling the sampling frequency of the first sensor, the seventh angle can be determined when the electronic device is detected to be in a closed state, and the seventh angle can be compared with the second preset angle, so that when the seventh angle is less than the second preset angle (that is, the seventh angle is not a large value, in other words, the detected closed state is not a false alarm), the sampling frequency of the first sensor is set to the second frequency in combination with the current sampling frequency of the first sensor being the first frequency.
[0021] In a possible implementation, based on detecting that the electronic device is in the closed state, determining the fifth angle according to the fourth angle and the first preset angle may include: based on detecting that the electronic device is in the closed state, comparing the fourth angle with the second preset angle to determine that the fourth angle is less than the second preset angle; based on the fourth angle being less than the second preset angle, determining the fifth angle according to the fourth angle and the first preset angle. The second preset angle is greater than the first preset angle.
[0022] Since the angle of the folding angle will not be a large value when the electronic device is in a closed state, during the use of the electronic device, there may be a situation where the closed state of the electronic device is falsely reported due to interference from an external magnetic field. Therefore, in order to determine whether the detected closed state is a false alarm and to eliminate the influence of the false alarm of the closed state on the determination of the fifth angle, the fourth angle may be compared with the second preset angle when the electronic device is detected to be in a closed state, so that when the fourth angle is less than the second preset angle (that is, the fourth angle is not a large value, in other words, the detected closed state is not a false alarm), the fifth angle is determined according to the fourth angle and the first preset angle.
[0023] In a possible implementation manner, the first sensor may include an acceleration sensor and a gyroscope sensor.
[0024] In a second aspect, the present application provides an electronic device, comprising at least a first display screen, a second display screen, a first body, a second body, a processor and a memory; wherein, the first display screen is a flexible screen, a display area of the first display screen is larger than a display area of the second display screen, the first body and the second body respectively correspond to different display areas of the first display screen, and a first sensor is provided in both the first body and the second body; the opening and closing state of the electronic device includes a closed state and a non-closed state; the memory is used to store a computer program, and when the computer program is executed by the processor, the electronic device executes any one of the methods described in the first aspect.
[0025] In a third aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor performs the method described in any one of the first aspects.
[0026] In a fourth aspect, the present application provides a chip system comprising at least two processors. When the at least two processors execute instructions, the chip system executes any one of the methods described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A schematic diagram of the angle range of the folding angle of a foldable mobile phone;
[0028] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0029] Figure 3 A schematic diagram of a frequency control process provided in an embodiment of the present application;
[0030] Figure 4A schematic diagram of a display mode determination process provided in an embodiment of the present application;
[0031] Figure 5 A schematic diagram of an inwardly folded foldable mobile phone in an unfolded state;
[0032] Figure 6 A schematic diagram of a foldable mobile phone in a stand state;
[0033] Figure 7 A schematic diagram of a foldable mobile phone in a folded state;
[0034] Figure 8 A schematic diagram of an unfolded state of a foldable mobile phone that is folded outward;
[0035] Fig. 9 A schematic diagram of a foldable mobile phone in a stand state when folded outward;
[0036] Fig.10 A schematic diagram of a foldable mobile phone in a folded state;
[0037] Fig.11 A schematic diagram of a layered structure of an electronic device provided in an embodiment of the present application;
[0038] Fig.12 A schematic diagram of another frequency control process provided in an embodiment of the present application;
[0039] Fig.13 A schematic diagram of another display method determination process provided in an embodiment of the present application;
[0040] Fig.14 A flowchart of a display method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0042] In the embodiments of the present application, unless otherwise specified, "plurality" may mean two or more. In the embodiments of the present application, unless otherwise specified, "first", "second" and "third" are used to distinguish different objects, rather than to limit a specific order.
[0043] A foldable mobile phone may include at least a flexible screen, a first body, and a second body. The middle frames of the first body and the second body are connected by a hinge, and the first body and the second body correspond to different display areas of the flexible screen respectively. When the user folds or unfolds the foldable mobile phone, the flexible screen is folded or unfolded based on the folding edge. In the case of a foldable mobile phone, the flexible screen may include a first display area and a second display area (that is, based on the folding edge, the flexible screen includes two display areas, namely, a first display area and a second display area). The display area of the flexible screen corresponding to the first body is the first display area, and the display area of the flexible screen corresponding to the second body is the second display area. The angle formed by the plane where the first display area is located and the plane where the second display area is located is the folding angle of the foldable mobile phone. The angle formed by the plane where the first display area is located and the plane where the second display area is located (i.e., the folding angle) refers to the minimum positive angle formed by the plane where the first display area is located and the plane where the second display area is located. The angle range of the folding angle is [0°, 180°]. It should be noted that, in the full text, "angle" may refer to the degree of the folding angle.
[0044] The angle range of the folding angle can be divided into multiple angle intervals, and different postures can be set for each angle interval, and then different display modes can be set for different postures. Based on this, the process of determining the display mode can be: first determine the angle of the folding angle, then determine the posture of the folding phone according to the angle interval to which the folding angle belongs, and finally determine the display mode of the folding phone according to the posture of the folding phone.
[0045] Below, the posture, display mode and angle range of the foldable mobile phone are exemplified.
[0046] like Figure 1 As shown, the solid lines indicate the position of the first body of the foldable mobile phone, and the dotted lines indicate three positions of the second body of the foldable mobile phone. Figure 1 As shown, the angle range of the folding angle can be divided into three angle intervals, namely: [0°, 60°], (60°, 150°], (150°, 180°]. The foldable mobile phone can have three postures, namely: folded state, bracket state and unfolded state. The foldable mobile phone can have three display modes, namely: half-screen display, full-screen display / half-screen display, full-screen display. Table 1 shows the correspondence between the three angle intervals, the three postures and the three display modes.
[0047] Angle range attitude Display Mode [0°,60°] Folded Half screen display (60°,150°] Bracket state Full screen display / half screen display (150°,180°] Expanded Full Screen Display
[0048] Table 1
[0049] Obviously, when the folding angle is [0°, 60°], the posture of the foldable phone is folded, and the display mode of the foldable phone is half-screen display. When the folding angle is (60°, 150°], the posture of the foldable phone is stand, and the display mode of the foldable phone is full-screen display / half-screen display. When the folding angle is (150°, 180°], the posture of the foldable phone is unfolded, and the display mode of the foldable phone is full-screen display.
[0050] As can be seen from the above, the folding phone can determine the display mode according to the angle of the folding angle. In the related art, the angle of the folding angle can be determined according to the data collected by the acceleration sensor and gyroscope sensor set in the first body and the second body of the folding phone. In order to make the sampling time difference between the acceleration sensor and gyroscope sensor in the first body of the folding phone and the acceleration sensor and gyroscope sensor in the second body meet the accuracy requirements, so that the determined angle of the folding angle meets the accuracy requirements, and then ensure the accuracy of the display mode, the acceleration sensor and gyroscope sensor in the first body and the acceleration sensor and gyroscope sensor in the second body need to collect data based on a higher frequency (for example, 400HZ) at the same time. Obviously, collecting data based on a higher frequency at the same time will cause the power consumption of the folding phone to increase.
[0051] In order to solve the above technical problems, the embodiments of the present application provide a frequency control process and a display mode determination process. Both the frequency control process and the display mode determination process are applied to electronic devices (also referred to as folding electronic devices). The electronic device may include at least a flexible screen, a first body and a second body. Among them, the middle frames of the first body and the second body are connected by a hinge, and the first body and the second body correspond to different display areas of the flexible screen respectively. A first sensor is provided in both the first body and the second body. A second sensor may also be provided in the first body, and a magnetic field generator may also be provided in the second body.
[0052] When the user folds or unfolds the electronic device, the flexible screen will fold or unfold based on the folding edge. When the electronic device is in a closed state, the flexible screen includes a first display area and a second display area (that is, based on the folding edge, the flexible screen includes two display areas, namely the first display area and the second display area). The display area of the flexible screen corresponding to the first body is the first display area, and the display area of the flexible screen corresponding to the second body is the second display area. The angle formed by the plane where the first display area is located and the plane where the second display area is located is the folding angle of the electronic device. The angle formed by the plane where the first display area is located and the plane where the second display area is located (that is, the folding angle) refers to the minimum positive angle formed by the plane where the first display area is located and the plane where the second display area is located. The angle range of the folding angle is [0°, 180°].
[0053] The first sensor may include an acceleration sensor and a gyroscope sensor. The data collected by the first sensor may be used to determine the angle of the folding angle. The data collected by the first sensor may include the acceleration and angular velocity of the first body, and the acceleration and angular velocity of the second body. The acceleration of the first body is collected by the acceleration sensor in the first body, the angular velocity of the first body is collected by the gyroscope sensor in the first body, the acceleration of the second body is collected by the acceleration sensor in the second body, and the angular velocity of the second body is collected by the gyroscope sensor in the second body.
[0054] The second sensor is used to determine the opening and closing state of the electronic device based on the magnetic field signal.
[0055] The second sensor may be, for example, a Hall sensor, a Hall switch, or a reed switch, etc., which is not particularly limited in the embodiment of the present application.
[0056] The magnetic field generator may include a magnet and a current-carrying conductor. A magnet refers to a substance or material that can generate a magnetic field, such as a magnet. Magnets can generally be divided into permanent magnets and soft magnets. Permanent magnets are magnets that can maintain their magnetism for a long time. Permanent magnets are hard magnets that are not easy to lose magnetism or be magnetized. The polarity of a soft magnet changes with the change of the polarity of the applied magnetic field.
[0057] The opening and closing state of the electronic device may include a closed state and a non-closed state. Wherein, when the angle of the folding angle is less than or equal to the first preset angle, the electronic device is determined to be in a closed state. When the angle of the folding angle is greater than the first preset angle, the electronic device is determined to be in a non-closed state. The first preset angle refers to the maximum angle of the folding angle when the electronic device is in a closed state. The first preset angle may be, for example, 5° or 8°, etc., and the embodiments of the present application do not specifically limit this.
[0058] Below, taking the magnetic field generator as a magnet and the second sensors as a Hall sensor, a Hall switch, and a reed switch as examples, the operating principle of the second sensor is explained.
[0059] In case the second sensor is a Hall sensor:
[0060] The Hall sensor can detect the intensity of the magnetic field signal generated by the magnet. If the magnet gradually approaches the Hall sensor, the intensity of the magnetic field signal detected by the Hall sensor gradually increases, and if the magnet gradually moves away from the Hall sensor, the intensity of the magnetic field signal detected by the Hall sensor gradually decreases. Based on this, since the Hall sensor is arranged in the first body of the electronic device, and the magnet is arranged in the second body of the electronic device, and since the magnet gradually approaches the Hall sensor during the process from unfolding to closing of the electronic device, and the magnet gradually moves away from the Hall sensor during the process from closing to unfolding of the electronic device. Therefore, a preset intensity can be determined according to the first preset angle. In this way, when the intensity of the magnetic field signal detected by the Hall sensor is greater than or equal to the preset intensity (that is, when the angle of the folding angle is determined to be less than or equal to the first preset angle), it is determined that the electronic device is in a closed state. When the intensity of the magnetic field signal detected by the Hall sensor is less than the preset intensity (that is, when the angle of the folding angle is determined to be greater than the first preset angle), it is determined that the electronic device is in a non-closed state.
[0061] In case the second sensor is a Hall switch:
[0062] The operating principle of the Hall switch is as follows: as the magnet gradually approaches the Hall switch, the intensity of the magnetic field signal applied to the Hall switch gradually increases. When the intensity of the magnetic field signal applied to the Hall switch is greater than or equal to the preset intensity, the Hall switch is turned on. As the magnet gradually moves away from the Hall switch, the intensity of the magnetic field signal applied to the Hall switch gradually weakens, and when the intensity of the magnetic field signal applied to the Hall switch is less than the preset intensity, the Hall switch is turned off. Based on this, since the Hall switch is arranged in the first body of the electronic device and the magnet is arranged in the second body of the electronic device, and since the magnet gradually approaches the Hall switch during the process from unfolding to closing of the electronic device, and gradually moves away from the Hall switch during the process from closing to unfolding of the electronic device. Therefore, a Hall switch and a magnet of suitable specifications can be selected according to the first preset angle. In this way, when the Hall switch is turned on under the action of the magnetic field signal applied thereto (i.e., when the angle of the folding angle is determined to be less than or equal to the first preset angle), it is determined that the electronic device is in a closed state, and when the Hall switch is turned off under the action of the magnetic field signal applied thereto (i.e., when the angle of the folding angle is determined to be greater than the first preset angle), it is determined that the electronic device is in a non-closed state.
[0063] When the second sensor is a reed switch:
[0064] Two magnetizable springs are arranged in the reed switch. When the magnet gradually approaches the reed switch, the magnetic force generated by the magnetic field signal generated by the magnet on the two springs gradually increases. When the magnetic force is greater than the elastic force of the two springs themselves, the two springs will attract each other, making the reed switch conductive. When the magnet gradually moves away from the reed switch, the magnetic force generated by the magnetic field signal generated by the magnet on the two springs gradually weakens. When the magnetic force is less than or equal to the elastic force of the two springs themselves, the two springs separate, turning off the reed switch. Based on this, since the reed switch is arranged in the first body of the electronic device and the magnet is arranged in the second body of the electronic device, and since the magnet gradually approaches the reed switch during the process from unfolding to closing of the electronic device, and gradually moves away from the reed switch during the process from closing to unfolding of the electronic device. Therefore, a reed switch and a magnet of suitable specifications can be selected according to the first preset angle. In this way, when the magnetic force generated by the two springs of the reed switch under the action of the magnetic field signal (i.e., the magnetic field signal generated by the magnet) is greater than the elastic force of the two springs themselves to turn on the reed switch (i.e., when the angle of the folding angle is determined to be less than or equal to the first preset angle), the electronic device is determined to be in a closed state; when the magnetic force generated by the two springs of the reed switch under the action of the magnetic field signal is less than or equal to the elastic force of the two springs themselves to turn off the reed switch (i.e., when the angle of the folding angle is determined to be greater than the first preset angle), the electronic device is determined to be in a non-closed state.
[0065] The angle range of the folding angle can be divided into multiple angle intervals, and different postures can be set for each angle interval, and different display modes can be set for different postures.
[0066] It should be noted that the angle range, posture and display mode can be found in the above description of the folding mobile phone, which will not be repeated here. It should be noted that when the electronic device is in a closed state, the electronic device uses a half-screen display. The non-closed state at least includes the unfolded state.
[0067] The folding modes of the electronic device can be divided into inward folding and outward folding. It should be noted that the inward folding electronic device may also include a display screen, the display area of which is smaller than the display area of the flexible screen. The display screen is arranged on the first body or the second body and is opposite to the flexible screen.
[0068] The specific types of electronic devices may be mobile phones, tablet computers, wearable electronic devices, enhanced display devices, virtual display devices, laptop computers, ultra-mobile personal computers, netbooks, personal digital assistants, game consoles, etc. The embodiments of the present application do not specifically limit the specific types of electronic devices.
[0069] The structure of the electronic device is described below by taking the example that the type of the electronic device is a mobile phone, the first sensor includes an acceleration sensor and a gyroscope sensor, the second sensor is a Hall sensor, and the magnetic field generator is a magnet. Figure 2A schematic diagram of the structure of an electronic device provided in an embodiment of the present application
[0070] like Figure 2 As shown, the electronic device 200 may include at least one processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295, etc. Among them, the sensor module 280 may include a pressure sensor 280A, two gyroscope sensors 280B, an air pressure sensor 280C, a Hall sensor 280D, two acceleration sensors 280E, a distance sensor 280F, a proximity light sensor 280G, a fingerprint sensor 280H, a temperature sensor 280J, a touch sensor 280K, an ambient light sensor 280L, a bone conduction sensor 280M, a magnet 280L, etc.
[0071] It should be noted that one of the two gyro sensors 280B is disposed in the first body of the electronic device 200, and the other of the two gyro sensors 280B is disposed in the second body of the electronic device 200. One of the two acceleration sensors 280E is disposed in the first body of the electronic device 200, and the other of the two acceleration sensors 280E is disposed in the second body of the electronic device 200. The Hall sensor 280D is disposed in the first body of the electronic device 200, and the magnet 280L is disposed in the second body of the electronic device 200.
[0072] It should be noted that, except for the two gyro sensors 280B, the two acceleration sensors 280E, the Hall sensor 280D and the magnet 280L, other components in the electronic device 200 can be arranged in the first body and the second body of the electronic device 200 according to design requirements.
[0073] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0074] At least one processor 210 may include, for example, an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, an audio digital signal processor (ADSP), a baseband processor (BP), and / or a neural-network processing unit (NPU), etc. Different processors may be independently configured or integrated.
[0075] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0076] A memory may also be provided in at least one processor 210 for storing instructions and data. In some embodiments, the memory in at least one processor 210 is a cache memory. The memory may store instructions or data that have just been used or are cyclically used by at least one processor 210. If at least one processor 210 needs to use the instruction or data again, it may be directly called from the memory, thereby avoiding repeated access and reducing the waiting time of at least one processor 210, thereby improving the efficiency of the system. In an embodiment of the present application, at least one processor 210 may also execute a computer program stored in the internal memory 221, so that the electronic device 200 executes the frequency control process and display mode determination process provided in the embodiment of the present application.
[0077] In some embodiments, at least one processor 210 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0078] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0079] The wireless communication function of the electronic device 200 can be implemented through the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor and the baseband processor.
[0080] In some embodiments, antenna 1 of electronic device 200 is coupled to mobile communication module 250, and antenna 2 is coupled to wireless communication module 260, so that electronic device 200 can communicate with the network and other devices through wireless communication technology.
[0081] The electronic device 200 implements the display function through a GPU, a display screen 294, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The at least one processor 210 may include one or more GPUs that execute program instructions to generate or change display information.
[0082] The display screen 294 is used to display images, videos, etc. The display screen 294 includes a flexible screen. In some embodiments, the electronic device 200 may include 1 or N display screens 294, where N is a positive integer greater than 1. It should be noted that the first body and the second body correspond to different display areas of the first display screen, respectively.
[0083] The electronic device 200 can realize the shooting function through ISP, camera 293, video codec, GPU, display screen 294 and application processor.
[0084] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200. The external memory card communicates with at least one processor 210 through the external memory interface 220 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0085] The internal memory 221 may be used to store computer executable program codes, which include instructions. In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. At least one processor 210 executes various functional applications and data processing of the electronic device 200 by running instructions stored in the internal memory 221 and / or instructions stored in a memory provided in the processor.
[0086] The electronic device 200 can implement audio functions such as music playing and recording through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the headphone jack 270D, and the application processor.
[0087] The two gyro sensors 280B can be used to determine the motion posture of the electronic device 200. In some embodiments, the angular velocity of the electronic device 200 around three axes (i.e., x, y, and z axes) can be determined by two gyro sensors 280B. The two gyro sensors 280B can be used for anti-shake shooting. Exemplarily, when the shutter is pressed, the two gyro sensors 280B detect the angle of the electronic device 200 shaking, calculate the distance that the lens module needs to compensate according to the angle, and let the lens offset the shaking of the electronic device 200 through reverse movement to achieve anti-shake. The two gyro sensors 280B can also be used for navigation and somatosensory game scenes. The two gyro sensors 280B can also be used to collect the angular velocity of the first body and the angular velocity of the second body to provide data basis for determining the angle of the folding angle of the electronic device 200.
[0088] The electronic device 200 can use the Hall sensor 280D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 200 is a flip phone, the electronic device 200 can detect the opening and closing of the flip cover according to the Hall sensor 280D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.
[0089] The Hall sensor 280D can also detect the opening and closing state of the electronic device 200 by detecting the strength of the magnetic field signal generated by the magnet 280L. The opening and closing state of the electronic device 200 has been described above and will not be repeated here.
[0090] The two acceleration sensors 280E can detect the magnitude of the acceleration of the electronic device 200 in all directions (generally three axes). When the electronic device 200 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device 200, and is applied to applications such as horizontal and vertical screen switching and pedometers. The two acceleration sensors 280E can also be used to collect the acceleration of the first body and the acceleration of the second body to provide data basis for determining the angle of the folding angle of the electronic device 200.
[0091] As can be seen from the above, since the second sensor is provided in the first body, the magnetic field generator is provided in the second body, and the second sensor is used to determine the opening and closing state of the electronic device based on the magnetic field signal. Therefore, in order to reduce the power consumption of the electronic device while ensuring the accuracy of the display mode, in the frequency control process provided in the embodiment of the present application, the opening and closing state of the electronic device can be detected by the second sensor, and when the electronic device is in a non-closed state, the first sensor is controlled to collect data based on the first frequency, and when the electronic device is in a closed state, the first sensor is controlled to collect data based on the second frequency. And, in the display mode determination process provided in the embodiment of the present application, the display mode is determined according to the data collected by the first sensor and the opening and closing state of the electronic device, and displayed in the determined display mode. Among them, the first frequency is greater than the second frequency.
[0092] Obviously, since the first sensor collects data based on the first frequency when the electronic device is in a non-closed state, and collects data based on the second frequency when the electronic device is in a closed state, and the first frequency is greater than the second frequency, the power consumption of the electronic device is reduced compared to the method of collecting data based on a higher frequency at the same time. In addition, since the opening and closing state of the electronic device is introduced in the process of determining the display mode, the accuracy of the display mode is ensured.
[0093] Below, the first frequency is 400 Hz, the second frequency is 100 Hz, and the electronic device is Figure 2 Taking the electronic device in as an example, the frequency control process and display mode determination process provided in the embodiment of the present application are explained.
[0094] Figure 3 A schematic diagram of a frequency control process provided in an embodiment of the present application. Figure 3 As shown, the frequency control process may include the following steps:
[0095] 301. The electronic device detects that the screen is on.
[0096] 302. The electronic device periodically detects the opening and closing status of the electronic device.
[0097] In the embodiment of the present application, after the electronic device is turned on, the Hall sensor periodically detects the opening and closing state of the electronic device. Based on this, the electronic device can periodically detect the opening and closing state of the electronic device through the Hall sensor.
[0098] 303. The electronic device determines whether the opening and closing state has changed. If so, step 304 is executed; if not, step 302 is executed.
[0099] In the embodiment of the present application, since the sampling frequency of the first sensor is 100 Hz when the electronic device is in a closed state, and the sampling frequency of the first sensor is 400 Hz when the electronic device is in an open state, each time the opening and closing state of the electronic device is detected, the detected opening and closing state can be matched with the current sampling frequency of the first sensor. If they match, it is determined that the opening and closing state has not changed, and if they do not match, it is determined that the opening and closing state has changed.
[0100] Specifically, when the detected opening and closing state is a non-closed state and the current sampling frequency of the first sensor is 400Hz, it is determined that the detected opening and closing state matches the current sampling frequency. When the detected opening and closing state is a closed state and the current sampling frequency of the first sensor is 100Hz, it is determined that the detected opening and closing state matches the current sampling frequency. When the detected opening and closing state is a non-closed state and the current sampling frequency of the first sensor is 100Hz, it is determined that the detected opening and closing state does not match the current sampling frequency. When the detected opening and closing state is a closed state and the current sampling frequency of the first sensor is 400Hz, it is determined that the detected opening and closing state does not match the current sampling frequency.
[0101] 304. The electronic device determines whether the changed opening and closing state is a closed state. If yes (i.e. the changed opening and closing state is a closed state), execute 305. If no (i.e. the changed opening and closing state is a non-closed state), execute 306.
[0102] It should be noted that the changed opening and closing state here may refer to the opening and closing state detected in 303 .
[0103] 305. The electronic device controls the first sensor to collect data based on 100 Hz.
[0104] 306. The electronic device controls the first sensor to collect data based on 400 Hz.
[0105] From the above, it can be seen that when the electronic device is in a closed state, the first sensor is controlled to collect data based on 100 Hz, and when the electronic device is in a non-closed state, the first sensor is controlled to collect data based on 400 Hz. Compared with the method of collecting data based on a higher frequency at the same time, the power consumption of the electronic device is reduced.
[0106] Figure 4 A schematic diagram of a display mode determination process provided in an embodiment of the present application. Figure 4 As shown, the display mode determination process may include the following steps:
[0107] 401. The electronic device determines the angle of the folding angle based on the data collected by the first sensor at the current time point.
[0108] 402. The electronic device determines whether the electronic device is in a closed state at a current time point.
[0109] In the embodiment of the present application, the electronic device detects the opening and closing state of the electronic device at the current time point through the Hall sensor. When the Hall sensor detects that the electronic device is in a closed state at the current time point, it is determined that the electronic device is currently in a closed state, and 403 is executed. When the Hall sensor detects that the electronic device is in a non-closed state at the current time point, it is determined that the electronic device is in a non-closed state at the current time point (that is, it is determined that the electronic device is not currently in a closed state), and 405 is executed.
[0110] 403. The electronic device corrects the angle of the folding angle.
[0111] Optionally, the electronic device corrects the folding angle, which can be considered as a process of determining the reported angle based on the folding angle. The corrected folding angle is the reported angle, and the reported angle can be used to determine the display mode.
[0112] Since the first sensor collects data based on 100Hz when the electronic device is in a closed state, and since the sampling time difference between the first sensor in the first body and the first sensor in the second body is large when the first sensor collects data based on 100Hz, it does not meet the accuracy requirement of the sampling time difference, and the accuracy of the folding angle determined based on the data collected by the first sensor based on 100Hz does not meet the accuracy requirement. Therefore, it is necessary to correct the angle of the folding angle determined based on the data collected by the first sensor based on 100Hz so that the corrected angle meets the accuracy requirement, and determine the display mode based on the corrected angle to ensure the accuracy of the display mode.
[0113] In view of this, after determining the angle of the folding angle through 401, it is necessary to determine whether the electronic device is currently in a closed state. If the electronic device is currently in a closed state, it means that the data collected by the first sensor in 401 at the current time point is the data collected by the first sensor based on 100Hz. Therefore, the angle of the folding angle determined in 401 needs to be corrected.
[0114] Since the first preset angle is the maximum angle of the folding angle when the electronic device is in the closed state, it can be understood that when the electronic device is in the closed state, the determined folding angle cannot be greater than the first preset angle. Therefore, the folding angle can be corrected by the first preset angle.
[0115] Exemplarily, the correction process is described by taking the first preset angle of 5° as an example. The specific process of correcting the angle of the folding angle may be: if the angle of the folding angle is greater than 5°, the angle of the folding angle is corrected to 5°, that is, the angle of the corrected folding angle is 5° (that is, the reported angle is determined to be 5°). If the angle of the folding angle is less than or equal to 5°, the angle of the folding angle is determined as the angle of the corrected folding angle, that is, the angle of the folding angle is not corrected (that is, the reported angle 401 is determined as the angle of the folding angle).
[0116] 404. The electronic device determines the display mode according to the corrected folding angle.
[0117] 405. The electronic device determines the display mode according to the folding angle.
[0118] Since the first sensor collects data based on 400Hz when the electronic device is in a non-closed state. Since the sampling time difference between the first sensor in the first body and the first sensor in the second body meets the accuracy requirements when the first sensor collects data based on 400Hz, the accuracy of the folding angle determined based on the data collected by the first sensor based on 400Hz also meets the accuracy requirements, and the display mode determined by the folding angle is also accurate. Therefore, after determining the angle of the folding angle, it is necessary to determine whether the electronic device is currently in a closed state. If the electronic device is not currently in a closed state (that is, it is currently in a non-closed state), it means that the latest data collected by the first sensor in 401 is the data collected by the first sensor based on 400Hz. Therefore, the display mode can be determined according to the angle of the folding angle determined in 401.
[0119] It should be noted that the angle range of the folding angle can be divided into multiple angle intervals, and different postures can be set for each of the multiple angle intervals, and different display modes can be set for different postures. In this way, the specific implementation process of 404 can be: determine the posture of the electronic device according to the angle interval to which the angle of the corrected folding angle belongs, and determine the display mode according to the determined posture. The specific implementation process of 405 can be: determine the posture of the electronic device according to the angle interval to which the angle of the folding angle determined in 401 belongs, and determine the display mode according to the determined posture.
[0120] It should be noted that the above display mode determination process can be performed periodically.
[0121] As can be seen from the above, after the angle of the folding angle is determined according to the data collected by the first sensor at the current time point, it is determined whether to correct the angle of the folding angle according to the opening and closing state of the electronic device at the current time point. If correction is required, the angle of the folding angle is corrected, and the display mode is determined according to the corrected angle. If correction is not required, the display mode is determined according to the angle of the folding angle, thereby ensuring the accuracy of the display mode.
[0122] During the use of the electronic device, there may be a problem that the second sensor falsely reports the closed state of the electronic device under the influence of factors such as an external magnetic field. Therefore, in order to determine whether the detected closed state is a false alarm, a second preset angle may be set, and the second preset angle may refer to the maximum angle of the folding angle allowed when the electronic device is detected to be in a closed state and the detected closed state is not a false alarm. In this way, when the electronic device is detected to be in a closed state, it can be determined by determining the angle of the folding angle and determining whether the detected closed state of the electronic device is a false alarm based on the relative size of the angle of the folding angle and the second preset angle. Specifically, when the angle of the folding angle is greater than or equal to the second preset angle, it is determined that the detected closed state of the electronic device is a false alarm. When the angle of the folding angle is less than the second preset angle, it is determined that the detected closed state of the electronic device is not a false alarm.
[0123] The second preset angle can be measured according to an experiment. The second preset angle is greater than the first preset angle. The second preset angle can be, for example, 135°, etc., and the embodiment of the present application does not make any special limitation on this.
[0124] Based on this, in order to eliminate the influence of the false alarm of the closed state of the electronic device on the sampling frequency of the first sensor, the accuracy of the sampling frequency of the first sensor is improved. In another possible implementation of the present application, another frequency control process is also provided. Figure 3The difference between the frequency control flow in 303 and 304 is that the implementation process of 303 and the determination method of the changed opening and closing state in 304 are different. Below, taking the second preset angle of 135° as an example, the implementation process of 303 in the frequency control flow and the determination of the changed opening and closing state in 304 are exemplarily described.
[0125] 303. Each time the electronic device detects the opening and closing state of the electronic device, if the detected opening and closing state is a non-closed state, the detected non-closed state is matched with the current sampling frequency of the first sensor to determine whether the opening and closing state has changed. If the detected opening and closing state is a closed state, the angle of the folding angle is determined based on the data collected by the first sensor at the current time point. If the angle of the folding angle is less than 135° (that is, the detected closed state is not a false alarm), the detected closed state is matched with the current sampling frequency of the first sensor to determine whether the opening and closing state has changed. If the angle of the folding angle is greater than or equal to 135° (that is, the detected closed state is a false alarm, and the electronic device is in a non-closed state at this time), the non-closed state is matched with the current sampling frequency of the first sensor to determine whether the opening and closing state has changed.
[0126] It should be noted that the process of matching the opening and closing state (ie, closed state or non-closed state) with the current sampling frequency of the first sensor to determine whether the opening and closing state has changed has been described above and will not be repeated here.
[0127] The process of determining the changed opening and closing state in 304 can be as follows: if the opening and closing state detected in 303 is a non-closed state and it is determined that the opening and closing state has changed, the opening and closing state after changing in 304 is a non-closed state. If the opening and closing state detected in 303 is a closed state and the angle of the folding angle is less than 135° and it is determined that the opening and closing state has changed, the opening and closing state after changing in 304 is a closed state. If the opening and closing state detected in 303 is a closed state and the angle of the folding angle is greater than or equal to 135° and it is determined that the opening and closing state has changed, the opening and closing state after changing in 304 is a non-closed state.
[0128] As can be seen from the above, when a closed state is detected, by calculating the angle of the folding angle and determining whether there is a false alarm in the detected closed state according to the relative size of the angle of the folding angle and the second preset angle, if there is a false alarm, it means that the electronic device is currently in a non-closed state, and the first sensor is controlled to collect data based on 400Hz. If there is no false alarm, it means that the electronic device is currently in a closed state, and the first sensor is controlled to collect data based on 100Hz, eliminating the influence of the false alarm of the closed state of the electronic device on the sampling frequency of controlling the first sensor, and improving the accuracy of controlling the sampling frequency of the first sensor.
[0129] Similarly, in order to eliminate the influence of the false alarm of the closed state of the electronic device on the determination of the display mode, the accuracy of the determination of the display mode is further improved. In another possible implementation of the present application, another display mode determination process is also provided. Figure 4 The difference between the display mode determination process in FIG. 4 and FIG. 5 is that the implementation process of 402 is different. Below, taking the second preset angle of 135° as an example, the implementation process of 402 in the display mode determination process is exemplarily described.
[0130] 402. The electronic device detects the current opening and closing state of the electronic device through the Hall sensor. When it is detected through the Hall sensor that the electronic device is currently in a non-closed state, it is determined that the electronic device is currently in a non-closed state (that is, it is determined that the electronic device is currently not in a closed state), and 405 is executed. When it is detected through the Hall sensor that the electronic device is currently in a closed state, it is determined whether the angle of the folding angle is less than 135°. If the angle of the folding angle is less than 135°, it is determined that the electronic device is currently in a closed state (that is, the detected closed state is not a false alarm), and 403 is executed. If the angle of the folding angle is greater than or equal to 135°, it is determined that the electronic device is currently not in a closed state (that is, it is currently in a non-closed state, and the detected closed state is a false alarm), and 405 is executed.
[0131] As can be seen from the above, when the Hall sensor detects that the electronic device is currently in a closed state, the relative size of the folding angle and the second preset angle is used to determine whether the closed state detected by the Hall sensor is a false alarm. If it is determined that the detected closed state is a false alarm, it is determined that the electronic device is currently in a non-closed state. If it is determined that the detected closed state is not a false alarm, it is determined that the electronic device is currently in a closed state. The accuracy of determining whether the electronic device is currently in a closed state is improved, thereby eliminating the influence of the false alarm of the closed state on the determination of the display mode, and further improving the accuracy of determining the display mode.
[0132] Below, taking the electronic device as a folding mobile phone, the first frequency is 400 Hz, the second frequency is 100 Hz, the second sensor is a Hall sensor, the magnetic field generator is a magnet, and the first preset angle is 5° as an example, and combined with the posture, display mode and angle range of the folding mobile phone indicated in Table 1, the process of frequency control and display mode determination of the inward-folding folding mobile phone is exemplified.
[0133] like Figure 5 to Figure 7As shown, the foldable mobile phone may include a first body 501, a second body 502, a first display screen 504 and a second display screen 505. Among them, the first display screen 504 is a flexible screen. The middle frames of the first body 501 and the second body 502 are connected by a hinge. The first body 501 and the second body 502 correspond to different display areas of the first display screen 504 respectively. The second display screen 505 is arranged on the first body 501, and the second display screen 505 is opposite to the first display screen 504. The display area of the first display screen 504 is larger than the display area of the second display screen 505. When the foldable mobile phone is folded or unfolded, the first display screen 504 is folded or unfolded based on the folding edge 503. In the case of folding the foldable mobile phone, the first display screen 504 includes a first display area 506 and a second display area 507 (that is, based on the folding edge 503, the first display screen 504 includes two display areas, namely the first display area 506 and the second display area 507). The first body 501 corresponds to the first display area 506 of the first display screen 504, and the second body 502 corresponds to the second display area 507 of the first display screen 504. The angle formed by the plane where the first display area 506 is located and the plane where the second display area 507 is located is the folding angle α. The first body 501 and the second body 502 are both provided with a first sensor, and the first sensor includes an acceleration sensor and a gyroscope sensor. The first body 501 is also provided with a Hall sensor, and the second body 502 is also provided with a magnet.
[0134] Next, combine Figure 5 to Figure 7 , the process of frequency control and display mode determination of a foldable mobile phone is explained.
[0135] First, if Figure 5 As shown, the foldable phone is in an unfolded state, the Hall sensor detects that the foldable phone is in a non-closed state, the first sensor collects data based on 400 Hz, and the foldable phone displays a first interface (i.e., full-screen display) on the first display screen 504.
[0136] Next, the user passes Figure 5 In the direction indicated by the arrow in the figure, the foldable mobile phone is folded so that the foldable mobile phone is in the following position: Figure 6 The posture shown. Figure 5 The expanded state shown is switched to Figure 6 After the posture shown, the foldable phone detects that the foldable phone is in an unclosed state through the Hall sensor, and the current sampling frequency of the first sensor is 400 Hz.
[0137] The foldable phone determines that the opening and closing state of the foldable phone has not changed by detecting the non-closed state and 400 Hz. Based on this, the foldable phone does not change the sampling frequency of the first sensor, that is, the first sensor still collects data based on 400 Hz.
[0138] Folding phones in Figure 6 In the posture shown, the foldable phone determines the angle of the folding angle α according to the data collected by the first sensor at the current time point, and detects through the Hall sensor that the foldable phone is in a non-closed state at the current time point. Based on the non-closed state, the foldable phone determines the display mode according to the angle of the folding angle α.
[0139] For example, the folding angle α is 120°. Combined with Table 1, it can be seen that the posture of the foldable mobile phone is a stand posture, and the display mode is half-screen display / full-screen display. Figure 6 As shown, the first interface is displayed on the first display screen 504 (ie, full screen display).
[0140] Next, the user can Figure 6 In the direction indicated by the arrow in the figure, the foldable mobile phone is folded so that the foldable mobile phone is in the following position: Figure 7 The posture shown (i.e. closed state). Figure 6 The posture shown is switched to Figure 7 After the posture shown, the foldable phone detects that the foldable phone is in a closed state through the Hall sensor, and the current sampling frequency of the first sensor is 400 Hz.
[0141] The foldable phone determines that the opening and closing state of the foldable phone has changed through the detected closed state and 400Hz, and the changed opening and closing state is the closed state. Based on this, the foldable phone controls the first sensor to collect data based on 100Hz.
[0142] Folding phones in Figure 7 In the posture shown, the folding phone determines the angle of the folding angle α according to the data collected by the first sensor at the current time point, and detects through the Hall sensor that the folding phone is in a closed state at the current time point. Based on the closed state, the folding phone corrects the angle of the folding angle α and determines the display mode according to the corrected angle.
[0143] Exemplarily, if the folding angle α is less than or equal to 5°, the folding angle α is determined as the corrected angle. If the folding angle α is greater than 5°, 5° is determined as the corrected angle.
[0144] The process of determining the display mode according to the corrected angle can be as follows: Since the corrected angle is less than or equal to 5°, it can be seen from Table 1 that the posture of the foldable mobile phone is the folded state, and the display mode is half-screen display. Figure 6 As shown, the second interface is displayed on the second display screen 505 (ie, half-screen display), wherein the first interface and the second interface contain the same content.
[0145] Below, taking the electronic device as a folding mobile phone, the first frequency is 400 Hz, the second frequency is 100 Hz, the second sensor is a Hall sensor, the magnetic field generator is a magnet, and the first preset angle is 5° as an example, and combined with the posture, display mode and angle range of the folding mobile phone indicated in Table 1, the process of frequency control and display mode determination of the outward-folding folding mobile phone is exemplified.
[0146] like Figure 8 to Figure 10 As shown, the folding mobile phone may include a first body 801, a second body 802, and a flexible screen 804. Among them, the middle frame of the first body 801 and the second body 802 is connected by a hinge. The first body 801 and the second body 802 correspond to different display areas of the flexible screen 804 respectively. When the folding mobile phone is folded or unfolded, the flexible screen 804 is folded or unfolded based on the folding edge 803. In the case of a folding folding mobile phone, the flexible screen 804 includes a first display area 805 and a second display area 806 (that is, based on the folding edge 803, the flexible screen 804 includes two display areas, namely the first display area 805 and the second display area 806). The first body 801 corresponds to the first display area 805 of the flexible screen 804, and the second body 802 corresponds to the second display area 806 of the flexible screen 804. The angle formed by the plane where the first display area 805 is located and the plane where the second display area 806 is located is the folding angle α. The first body 801 and the second body 802 are both provided with a first sensor, the first sensor including an acceleration sensor and a gyroscope sensor. The first body 801 is also provided with a Hall sensor, and the second body 802 is also provided with a magnet.
[0147] Next, combine Figure 8 to Figure 10 , the process of frequency control and display mode determination of a foldable mobile phone is explained.
[0148] First, if Figure 8 As shown, the foldable phone is in the unfolded state, the Hall sensor detects that the foldable phone is in the non-closed state, the first sensor collects data based on 400Hz, and the foldable phone displays the first interface (i.e., full-screen display) on the flexible screen 804.
[0149] Next, the user passes Figure 8 Fold the foldable phone in the direction indicated by the arrow in the figure so that the foldable phone is in the following position: Fig. 9 The posture shown. Figure 8 The fully expanded state shown is switched to Fig. 9 After the posture shown, the foldable phone detects that the foldable phone is in an unclosed state through the Hall sensor, and the current sampling frequency of the first sensor is 400 Hz.
[0150] The foldable phone determines that the opening and closing state of the foldable phone has not changed by detecting the non-closed state and 400 Hz. Based on this, the foldable phone does not change the sampling frequency of the first sensor, that is, the first sensor still collects data based on 400 Hz.
[0151] Folding phones in Fig. 9 In the posture shown, the foldable phone determines the angle of the folding angle α according to the data collected by the first sensor at the current time point, and detects through the Hall sensor that the foldable phone is in a non-closed state at the current time point. Based on the non-closed state, the foldable phone determines the display mode according to the angle of the folding angle α.
[0152] For example, the determined folding angle α is 120°. Combining Table 1, it can be seen that the posture of the foldable mobile phone is the stand posture, and the display mode is half-screen display / full-screen display. Fig. 9 As shown, the first interface is displayed on the flexible screen 804 (ie, full screen display).
[0153] Next, the user can Fig. 9 In the direction indicated by the arrow in the figure, the foldable mobile phone is folded so that the foldable mobile phone is in the following position: Fig.10 The posture shown (i.e. fully closed state). Fig. 9 The posture shown is switched to Fig.10 After the posture shown, the foldable phone detects that the foldable phone is in a closed state through the Hall sensor, and the current sampling frequency of the first sensor is 400 Hz.
[0154] The foldable phone determines that the opening and closing state of the foldable phone has changed through the detected closed state and 400Hz, and the changed opening and closing state is the closed state. Based on this, the foldable phone controls the first sensor to collect data based on 100Hz.
[0155] Folding phones in Fig.10 In the posture shown, the folding phone determines the angle of the folding angle α according to the data collected by the first sensor at the current time point, and detects through the Hall sensor that the folding phone is in a closed state at the current time point. Based on the closed state, the folding phone corrects the angle of the folding angle α and determines the display mode according to the corrected angle.
[0156] The process of correcting the folding angle α and determining the display mode according to the corrected angle can be found in Figure 5 to Figure 7 The relevant parts of the above will not be repeated here. Fig.10 As shown, in the folding phone Fig.10 In the posture shown, the second interface is displayed on the first display area 805 (ie, half-screen display). The first interface and the second interface contain the same content.
[0157] The hierarchical structure of the electronic device 200 may include several layers, each of which has a clear role and division of labor. The layers communicate with each other through software interfaces. Below, the hierarchical structure of the electronic device 200 is described by taking the example that at least one processor 210 in the electronic device 200 includes an application processor (AP) and an audio digital signal processor (ADSP).
[0158] Fig.11 Schematic diagram of the hierarchical structure of the electronic device 200 provided in the embodiment of the present application. Fig.11 As shown, the electronic device 200 may include an application processor and an audio digital signal processor. The hierarchical structure of the application processor may include three layers, from top to bottom: application layer (application, APP), framework layer (FrameWork, FWK) and hardware abstraction layer (HAL). The audio digital signal processor may include an audio digital signal processing framework, a folding angle management service, a folding angle virtual sensor driver and a Hall sensor driver.
[0159] Next, each layer of the application processor is described.
[0160] The application layer may include a series of application packages. Fig.11 As shown, the application package may include a window display component (android.hardware.policy.devicestateproviderimpl).
[0161] The window display component may determine a display mode according to the reported folding angle, and display in the determined display mode.
[0162] It should be noted that the application package may also include other applications, such as calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, browser, etc.
[0163] The framework layer provides an application programming interface (API) and a programming framework for the application programs of the application layer. The framework layer may include some predefined functions.
[0164] like Fig.11 As shown, the framework layer may include machine status management services and sensor management services.
[0165] The whole device state management service can be used to register the folding angle management service in the audio digital signal processor after the electronic device turns on the screen. The whole device state management service can also be used to report the angle of the folding angle reported by the folding angle management service to the window management display component.
[0166] The sensor management service can be used to uniformly manage the functions of sensors in electronic devices and provide sensor services to applications in the application layer. In other words, applications in the application layer can request services from sensors in electronic devices through the sensor management service.
[0167] It should be noted that the framework layer may also include a window manager, a content provider, a view system, a phone manager, a notification manager, and the like. The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, and the like. The content provider is used to store and obtain data and make the data accessible to the application. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, and the like. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and the like. The view system can be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text notification icon may include a view for displaying text and a view for displaying pictures. The phone manager is used to provide communication functions for electronic devices. For example, the management of call status (including connected, hung up, etc.). The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, and the like. The notification manager can also be a notification that appears in the top status bar of the system in the form of an icon or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0168] The hardware abstraction layer is an interface layer between the operating system kernel and the hardware circuit, and its purpose is to abstract the hardware. It hides the hardware interface details of a specific platform and provides a virtual hardware platform for the operating system, making it hardware-independent and portable on multiple platforms.
[0169] The hardware abstraction layer may include a folding angle virtual sensor hardware abstraction layer, a Hall sensor hardware abstraction layer and an information interface framework.
[0170] The folding angle virtual sensor hardware abstraction layer provides an interface for the sensor management service, so that the sensor management service can handle matters related to the folding angle through the interface.
[0171] The Hall sensor hardware abstraction layer provides an interface for the sensor management service, so that the sensor management service can interact with the Hall sensor through the interface.
[0172] The information interface framework is a communication interface that specifies how the application processor and the audio digital signal processor communicate.
[0173] Next, the modules involved in the audio digital signal processor are described.
[0174] The audio digital signal processing framework can realize the modulation and demodulation of signals related to the application. For example, when the folding angle management service reports the angle of the folding angle to the whole machine status management service, the encoding and compression of the angle of the folding angle are realized by the audio digital signal processing framework.
[0175] The folding angle management service can control the two acceleration sensors 880E (i.e. Fig.11 The acceleration sensor 1 and the acceleration sensor 2 in the embodiment of the present invention) and the two gyro sensors 280B (i.e. Fig.11 Exemplarily, a sampling frequency control module may be provided in the folding angle management service to control the sampling frequencies of the two acceleration sensors 880E and the two gyro sensors 280B through the sampling frequency control module.
[0176] The folding angle management service can also determine the angle of the folding angle based on the data collected by the two acceleration sensors 880E and the two gyroscope sensors 880B, and report the angle of the folding angle to the whole machine status management service based on the angle of the folding angle and the opening and closing state of the electronic device 200 detected by the Hall sensor.
[0177] The folding angle virtual sensor driver is mainly responsible for interacting with the two acceleration sensors 880E and the two gyroscope sensors 280.
[0178] The Hall sensor driver is the driver layer of the Hall sensor and is mainly responsible for interacting with the Hall sensor.
[0179] Next, combine Fig.11 The modules in the embodiment of the present application are described by taking the first frequency of 400 Hz, the second frequency of 100 Hz, and the first preset angle of 5° as an example to illustrate the modules and the interactions between the modules involved in the frequency control process and the display mode determination process provided in the embodiment of the present application.
[0180] like Fig.12 As shown, the frequency control process may include:
[0181] 1201. After the electronic device is turned on, the Hall sensor periodically detects the opening and closing status of the electronic device 200.
[0182] 1202. The Hall sensor updates the detected opening and closing status to the first cache area.
[0183] It should be noted that, since the Hall sensor periodically detects the opening and closing state of the electronic device 200 , the first cache area is also periodically updated, and the first cache area always stores the latest detected opening and closing state.
[0184] 1203. After the electronic device 200 turns on the screen, the whole device status management service registers the folding angle management service.
[0185] In the embodiment of the present application, registering the folding angle management service means that the whole machine status management service notifies the folding angle management service to start working through the sensor management service and the folding angle virtual sensor abstraction layer in turn.
[0186] It should be noted that there is no restriction on the order of 1203 and 1201.
[0187] 1204. The folding angle management service periodically detects the opening and closing status stored in the first cache area.
[0188] By periodically detecting the opening and closing states stored in the first cache area, periodic detection of the opening and closing states of the electronic device 200 can be achieved.
[0189] It should be noted that 1201 to 1204 can be understood as the specific implementation process of the module interaction involved in 301 to 302.
[0190] 1205. The folding angle management service determines whether the opening and closing state has changed. For the specific implementation process, please refer to the description in 303.
[0191] 1206. When the folding angle management service determines that the opening and closing state has changed and the changed opening and closing state is the closed state, it sends a 100 Hz control instruction to acceleration sensor 1, acceleration sensor 2, gyroscope sensor 1 and gyroscope sensor 2.
[0192] 1207. Acceleration sensor 1, acceleration sensor 2, gyro sensor 1 and gyro sensor 2 respond to the control instruction of 100 Hz and collect data based on 100 Hz.
[0193] 1208. When the folding angle management service determines that the opening and closing state has changed and the changed opening and closing state is a non-closed state, it sends a 400 Hz control instruction to acceleration sensor 1, acceleration sensor 2, gyroscope sensor 1 and gyroscope sensor 2.
[0194] 1209. Acceleration sensor 1, acceleration sensor 2, gyro sensor 1 and gyro sensor 2 respond to the 400 Hz control instruction and collect data based on 400 Hz.
[0195] It should be noted that 1205 to 1209 can be understood as the specific implementation process of the module interaction involved in 303 to 306.
[0196] like Fig.13 As shown, the display mode determination process may include:
[0197] 1301. Acceleration sensor 1, acceleration sensor 2, gyroscope sensor 1 and gyroscope sensor 2 update the collected data to the second cache area.
[0198] It should be noted that the acceleration sensor and gyroscope sensor collect data at a frequency (ie, 100 Hz or 400 Hz), and therefore, the second cache area is also updated at this frequency, and the second cache area always stores the latest collected data.
[0199] It should be noted that in order to ensure that the sampling frequency of the acceleration sensor and the gyroscope sensor matches the opening and closing state in the first cache area when collecting data stored in the second cache area, when the folding angle management service determines that the opening and closing state has changed, the folding angle management service also needs to clear the data stored in the second cache area.
[0200] 1302. The folding angle management service obtains the data collected by acceleration sensor 1, acceleration sensor 2, gyroscope sensor 1 and gyroscope sensor 2 at the current time point (ie, the latest collected data) from the second cache area.
[0201] 1303. The folding angle management service determines the angle of the folding angle based on the data collected at the current time point.
[0202] It should be noted that 1302 to 1303 can be understood as the specific implementation process of the module interaction involved in 401 above.
[0203] 1304. The folding angle management service obtains the opening and closing status of the electronic device at the current time point from the first cache area.
[0204] It should be noted that there is no difference in the execution order of 1304 and 1302.
[0205] 1305. When the folding angle management service determines that the electronic device is currently in a closed state based on the opening and closing state at the current time point, the folding angle is corrected according to 5°.
[0206] It should be noted that the specific implementation method of the correction can be found above and will not be repeated here.
[0207] 1306. The folding angle management service reports the corrected folding angle to the whole machine status management service.
[0208] 1307. The whole machine status management service reports the corrected folding angle to the window display component.
[0209] 1308. The window display component determines the display mode according to the angle of the corrected folding angle (ie the angle of the reported folding angle), and displays in this display mode.
[0210] 1309. When the folding angle management service determines that the electronic device is currently in a non-closed state based on the opening and closing state at the current time point, the folding angle management service reports the angle of the folding angle to the whole device status management service.
[0211] 1310. The whole machine status management service reports the folding angle to the window display component.
[0212] 1311. The window display component determines the display mode according to the angle of the folding angle (i.e. the angle of the reported folding angle) and displays in this display mode.
[0213] It should be noted that 1304 to 1311 can be understood as the specific implementation process of the module interaction involved in 402 to 405.
[0214] It should be noted that 1302 to 1311 are performed periodically.
[0215] Based on this, in order to eliminate the influence of the false alarm of the closed state of the electronic device on the sampling frequency of the first sensor, the accuracy of the sampling frequency of the first sensor is improved. In another possible implementation of the present application, a frequency control process is also provided. The frequency control process is similar to Fig.12 The difference between the frequency control flow in 1205 and the method for determining the opening and closing state after the change is different. Below, taking the second preset angle of 135° as an example, the implementation process of 1205 in the frequency control flow and the implementation process of determining the opening and closing state after the change are exemplified.
[0216] 1205. After each detection of the opening and closing state of the electronic device, the folding angle management service matches the detected non-closed state with the current sampling frequency of the acceleration sensor and the gyroscope sensor to determine whether the opening and closing state has changed. When the detected opening and closing state is a closed state, the angle of the folding angle is determined according to the data collected by the acceleration sensor and the gyroscope sensor at the current time point. If the angle of the folding angle is less than 135° (that is, the detected closed state is not a false alarm), the detected closed state is matched with the current sampling frequency of the acceleration sensor and the gyroscope sensor to determine whether the opening and closing state has changed. If the angle of the folding angle is greater than or equal to 135° (that is, the detected closed state is a false alarm, and the electronic device is in a non-closed state at this time), the non-closed state is matched with the current sampling frequency of the acceleration sensor and the gyroscope sensor to determine whether the opening and closing state has changed.
[0217] The method for determining the changed opening and closing state can be as follows: when the detected opening and closing state is a non-closed state and it is determined that the opening and closing state has changed, the changed opening and closing state is a non-closed state. When the detected opening and closing state is a closed state and the angle of the folding angle is less than 135° and it is determined that the opening and closing state has changed, the changed opening and closing state is a closed state. When the detected opening and closing state is a closed state and the angle of the folding angle is greater than or equal to 135° and it is determined that the opening and closing state has changed, the changed opening and closing state is a non-closed state.
[0218] Similarly, in order to eliminate the influence of the false alarm of the closed state of the electronic device on the display mode determination process, the accuracy of determining the display mode is further improved. In another possible implementation of the present application, a display mode determination process is also provided. Fig.13 The difference between the display mode determination process in FIG. 1 and FIG. 2 is that the implementation process of 1305 is different. Below, taking the second preset angle of 135° as an example, the implementation process of 1305 in the display mode determination process is exemplarily described.
[0219] 1305. When the folding angle management service determines that the electronic device is currently in a closed state based on the current opening and closing state, it determines whether the angle of the folding angle is less than 135°. When the angle of the folding angle is less than 135° (i.e., the detected closed state is not a false alarm), the folding angle management service determines that the electronic device is currently in a closed state, and corrects the angle of the folding angle according to 5°, and executes subsequent steps such as 1306. When the angle of the folding angle is greater than or equal to 135° (i.e., the detected closed state is a false alarm), the folding angle management service determines that the electronic device is currently in a non-closed state, and reports the angle of the folding angle to the whole machine status management service, so that the whole machine status management service reports the angle of the folding angle to the window display component, and then the window display component determines the display mode according to the angle of the folding angle, and displays in this display mode.
[0220] Based on the above frequency control process and display mode determination process, an embodiment of the present application provides a display method. The display method can be applied to an electronic device. The electronic device may include a first display screen, a second display screen, a first body and a second body, wherein the first display screen is a flexible screen, the display area of the first display screen is larger than the display area of the second display screen, and the first body and the second body correspond to different display areas of the first display screen respectively. A first sensor is provided in both the first body and the second body.
[0221] In the case of a foldable electronic device, the first display screen is folded based on the folding edge. The opening and closing state of the electronic device may include a closed state and a non-closed state, and the non-closed state may at least include an unfolded state. The closed state, the non-closed state, and the unfolded state have been described above and will not be repeated here.
[0222] When the electronic device is in an open state, the first sensor may collect data based on a first frequency. When the electronic device is in a closed state, the first sensor may collect data based on a second frequency. The first frequency is greater than the second frequency.
[0223] Exemplarily, the first frequency may refer to a frequency that can meet the accuracy requirements of the sampling time difference. In other words, when the first sensor in the first body and the second body collects data based on the first frequency, the sampling time difference between the first sensor in the first body and the first sensor in the second body meets the accuracy requirements. The first frequency may be, for example, 400 Hz, 410 Hz, or 450 Hz, etc., and the embodiments of the present application do not specifically limit this. The second frequency may be, for example, 100 Hz or 150 Hz, etc., and the embodiments of the present application do not specifically limit this.
[0224] When the electronic device is in a closed state, the first display screen may include a first display area and a second display area (i.e., based on the folding edge, the first display screen may include two display areas, namely, the first display area and the second display area). The first body may correspond to the first display area of the first display screen, and the second body may correspond to the second display area of the second display screen. The angle formed by the plane where the first display area is located and the plane where the second display area is located is the folding angle.
[0225] For an electronic device that folds inward, the first display screen and the second display screen are two independent display screens. The second display screen can be set on the first body or the second body, and the second display screen is opposite to the first display screen. For an electronic device that folds outward, the second display screen is a part of the first display screen. Exemplarily, the second display screen can be the first display area or the second display area, and the embodiments of the present application do not specifically limit this.
[0226] It should be noted that the first sensor, electronic equipment, etc. can be found in the above description and will not be described again here.
[0227] Based on this, Fig.14 As shown, the display method may include:
[0228] 1401. At a first moment, the electronic device displays a first interface on a first display screen (ie, full screen display), and controls a first sensor to collect data based on a first frequency. At the first moment, the electronic device is in an unfolded state.
[0229] 1402. At the second moment, the electronic device controls the first sensor to collect data based on the second frequency based on the electronic device becoming a closed state, wherein the first frequency is greater than the second frequency, and the second moment is after the first moment.
[0230] In the embodiment of the present application, the electronic device becoming a closed state may refer to the electronic device changing from a non-closed state to a closed state, that is, the opening and closing state of the electronic device changes, and the changed opening and closing state is a closed state.
[0231] 1403. After the electronic device becomes closed, the electronic device displays a second interface (i.e., half-screen display) on the second display screen based on the data collected by the first sensor (i.e., the data collected by the first sensor at the current time point). The second interface contains the same content as the first interface.
[0232] 1404. At a third moment, the electronic device controls the first sensor to collect data based on the first frequency based on the electronic device becoming a non-closed state. The third moment is after the second moment.
[0233] In the embodiment of the present application, the electronic device becoming a non-closed state may refer to the electronic device changing from a closed state to a non-closed state, that is, the opening and closing state of the electronic device changes, and the changed opening and closing state is a non-closed state.
[0234] 1405. When the electronic device is in the unfolded state, the electronic device displays the first interface (ie, full-screen display) on the first display screen based on the data collected by the first sensor (ie, the data collected by the first sensor at the current time point).
[0235] As can be seen from the above, when the electronic device becomes closed, the first sensor is controlled to collect data based on the second frequency, and when the electronic device becomes open, the first sensor is controlled to collect data based on the first frequency, and the first frequency is greater than the second frequency. Compared with the method of collecting data based on higher frequencies at the same time, the power consumption of the electronic device is reduced. In addition, after the electronic device becomes closed, the second interface is displayed on the second display screen, and when the electronic device is in the expanded state, the first interface is displayed on the first display screen, and the first interface and the second interface contain the same content, ensuring the accuracy of the display method.
[0236] In a possible implementation, the electronic device may further include a second sensor, and the second sensor determines the opening and closing state of the electronic device based on the magnetic field signal.
[0237] Exemplarily, the second sensor may be disposed in the first body of the electronic device, or in the second body of the electronic device, which is not particularly limited in the embodiments of the present application.
[0238] The electronic device may further include a magnetic field generator. The body in which the magnetic field generator is disposed is different from the body in which the second sensor is disposed. That is, the magnetic field generator is disposed in the first body, and the second sensor is disposed in the second body. Alternatively, the magnetic field generator is disposed in the second body, and the second sensor is disposed in the first body. The magnetic field generator and the second sensor have been described above and will not be repeated here.
[0239] Since the electronic device further includes a second sensor, and the second sensor can determine the open or closed state of the electronic device based on the magnetic field signal, a method for determining the open or closed state of the electronic device is provided.
[0240] In a possible implementation, before the second moment, the electronic device changes to the closed state based on detection by the second sensor. That is, it can be understood that the above display method may also include: before the second moment, the electronic device detects that the electronic device changes to the closed state based on the second sensor.
[0241] In a possible implementation, before the third moment, the electronic device changes to the non-closed state based on detection by the second sensor. That is, it can be understood that the above display method may also include: before the third moment, the electronic device detects that the electronic device changes to the non-closed state based on the second sensor.
[0242] In a possible implementation, the display method may further include:
[0243] Between the second moment and the third moment, the folding angle of the electronic device is the first angle, and the electronic device obtains the first angle. Specifically, between the second moment and the third moment, the electronic device detects that the electronic device is in a closed state based on the second sensor, and calculates the angle of the folding angle according to the data collected by the first sensor at the current time point, and based on the detection that the electronic device is in a closed state, the angle of the calculated folding angle is corrected by the first preset angle to obtain the first angle. It should be noted that in this embodiment, the angle of the calculated folding angle is less than the first preset angle, so the first angle can be the angle of the calculated folding angle. That is, the first angle can be understood as the angle corrected in 404 and the angle is less than the first preset angle. In other words, the first angle can be the angle in the above text when the electronic device is detected to be in a closed state and the angle of the determined folding angle is less than the first preset angle. Exemplarily, the first angle can be, for example, 0°, etc. The first preset angle has been described above and will not be repeated here.
[0244] Between the second moment and the third moment, the folding angle of the electronic device is the second angle. Based on the second sensor detecting that the electronic device is in a closed state, a third angle is obtained. The third angle is smaller than the second angle and greater than the first angle.
[0245] The description of the folding angle and the first angle can be found above and will not be repeated here. The third angle can be understood as the angle corrected in 404 and the angle is equal to the first preset angle. Exemplarily, the third angle can be 5°. The second angle can be understood as the actual opening angle of the folding angle of the electronic device. The second angle may be less than the second preset angle, and the second preset angle has been described above and will not be repeated here. The second preset angle is greater than the first preset angle. The second angle may be 6°, 7°, 20°, etc., and the embodiments of the present application do not specifically limit this.
[0246] Exemplarily, between the second moment and the third moment, the folding angle of the electronic device is opened to a second angle, and the second sensor is interfered with by an external magnetic field, so that the second sensor detects that the electronic device is in a closed state. According to the data collected by the first sensor at the current time point, the angle of the folding angle is calculated, and based on the detection that the electronic device is in a closed state, the angle of the calculated folding angle is compared with the second preset angle to determine that the angle of the calculated folding angle is less than the second preset angle (that is, the detected closed state is not a false alarm), and based on the fact that the angle of the calculated folding angle is less than the second preset angle, the angle of the calculated folding angle is corrected by the first preset angle to obtain a third angle. It should be noted that, in this embodiment, the angle of the calculated folding angle is greater than the first preset angle and less than the second preset angle, so the third angle is the first preset angle. The third angle can be understood as the angle corrected in 404 and the angle is equal to the first preset angle, that is, it can be understood that the third angle can be the angle less than the second preset angle and greater than the first preset angle calculated above when the electronic device is detected to be in a closed state.
[0247] In a possible implementation, the electronic device controlling the first sensor to collect data based on the second frequency based on the electronic device becoming a closed state may include: the electronic device detects that the electronic device is in a closed state through the second sensor. The electronic device sets the sampling frequency of the first sensor to the second frequency based on detecting that the electronic device is in a closed state and the current sampling frequency of the first sensor is the first frequency (i.e., based on the opening and closing state of the electronic device changing and the changed opening and closing state being a closed state).
[0248] It should be noted that the implementation of the above process can refer to the relevant descriptions in steps 302 to 305 above.
[0249] In a possible implementation, the electronic device controlling the first sensor to collect data based on the first frequency based on the electronic device becoming a non-closed state may include: the electronic device detects that the electronic device is in a non-closed state through the second sensor. The electronic device sets the sampling frequency of the first sensor to the first frequency based on detecting that the electronic device is in a non-closed state and the current sampling frequency of the first sensor is the second frequency (i.e., based on the opening and closing state of the electronic device changing and the opening and closing state after the change is a non-closed state).
[0250] It should be noted that the implementation of the above process can refer to the relevant descriptions in steps 302 to 304 and 306 above.
[0251] In a possible implementation, after the electronic device becomes in a closed state, the electronic device displaying the second interface on the second display screen based on the data collected by the first sensor may include:
[0252] After the electronic device becomes a closed state, the electronic device detects that the electronic device is in a closed state through the second sensor. The electronic device calculates the fourth angle (which can be understood as the angle of the folding angle determined in 401) based on the data collected by the first sensor. The electronic device determines the fifth angle (which can be understood as the angle of the folding angle corrected in 404) based on the fourth angle and the first preset angle based on the detection that the electronic device is in a closed state. Among them, the fifth angle is the smaller value of the fourth angle and the first preset angle. The electronic device displays the second interface on the second display screen according to the fifth angle (that is, the display mode is determined according to the fifth angle).
[0253] It should be noted that the first preset angle has been described above and will not be described again here. The implementation of the above process can refer to the relevant descriptions in steps 401 to 404 above.
[0254] In a possible implementation, when the electronic device is in the unfolded state, the electronic device displaying the first interface on the first display screen based on data collected by the first sensor may include:
[0255] When the electronic device is in the unfolded state, the electronic device detects through the second sensor that the electronic device is in the non-closed state. The electronic device calculates the sixth angle (which can be understood as the angle of the folding angle determined in 401) based on the data collected by the first sensor. Based on the detection that the electronic device is in the non-closed state, the electronic device displays the first interface on the first display screen according to the sixth angle (i.e., determines the display mode according to the sixth angle).
[0256] It should be noted that the implementation of the above process can refer to the relevant descriptions in steps 401, 402 and 405 above.
[0257] In a possible implementation, the electronic device, based on detecting that the electronic device is in a closed state and the current sampling frequency of the first sensor is the first frequency, setting the sampling frequency of the first sensor to the second frequency may include:
[0258] Based on detecting that the electronic device is in a closed state, the electronic device calculates the seventh angle (which can be understood as the angle less than the second preset angle calculated in 303 when the electronic device is detected to be in a closed state in order to eliminate the false alarm of the closed state) according to the data collected by the first sensor. The electronic device compares the seventh angle with the second preset angle to determine that the seventh angle is less than the second preset angle. Based on the fact that the seventh angle is less than the second preset angle (that is, the detected closed state is not a false alarm) and the current sampling frequency of the first sensor is the first frequency, the electronic device sets the sampling frequency of the first sensor to the second frequency.
[0259] It should be noted that the second preset angle has been explained above and will not be repeated here.
[0260] Since the angle of the folding angle will not be a large value when the electronic device is in a closed state, during the use of the electronic device, there may be a situation where the closed state of the electronic device is falsely reported due to interference from an external magnetic field. Therefore, in order to determine whether the detected closed state is a false alarm and to eliminate the influence of the false alarm of the closed state on controlling the sampling frequency of the first sensor, the seventh angle can be determined when the electronic device is detected to be in a closed state, and the seventh angle can be compared with the second preset angle, so that when the seventh angle is less than the second preset angle (that is, the seventh angle is not a large value, in other words, the detected closed state is not a false alarm), the sampling frequency of the first sensor is set to the second frequency in combination with the current sampling frequency of the first sensor being the first frequency.
[0261] In a possible implementation, the electronic device, based on detecting that the electronic device is in a closed state, determining the fifth angle according to the fourth angle and the first preset angle may include:
[0262] The electronic device compares the fourth angle with the second preset angle based on detecting that the electronic device is in a closed state to determine that the fourth angle is less than the second preset angle. The electronic device determines the fifth angle according to the fourth angle and the first preset angle based on that the fourth angle is less than the second preset angle. The second preset angle is greater than the first preset angle.
[0263] Since the angle of the folding angle will not be a large value when the electronic device is in a closed state, during the use of the electronic device, there may be a situation where the closed state of the electronic device is falsely reported due to interference from an external magnetic field. Therefore, in order to determine whether the detected closed state is a false alarm and to eliminate the influence of the false alarm of the closed state on the determination of the fifth angle, the fourth angle may be compared with the second preset angle when the electronic device is detected to be in a closed state, so that when the fourth angle is less than the second preset angle (that is, the fourth angle is not a large value, in other words, the detected closed state is not a false alarm), the fifth angle is determined according to the fourth angle and the first preset angle.
[0264] In a possible implementation manner, the first sensor includes an acceleration sensor and a gyroscope sensor.
[0265] It is understandable that, in order to implement the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. In combination with the steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of the present application.
[0266] In this embodiment, the electronic device can be divided into functional modules according to the above method example. For example, each functional module can be divided according to each function, such as a first control module, a second control module, a first display module, a third control module, a second display module, etc., or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0267] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0268] An electronic device provided in an embodiment of the present application may include at least a first display screen, a second display screen, a first body, a second body, a processor and a memory. The first display screen is a flexible screen, the display area of the first display screen is larger than the display area of the second display screen, the first body and the second body correspond to different display areas of the first display screen respectively, and a first sensor is provided in both the first body and the second body. The opening and closing state of the electronic device may include a closed state and a non-closed state.
[0269] The memory is used to store a computer program. When the computer program is executed by the processor, the electronic device executes the above display method to achieve the same effect as the above implementation method.
[0270] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the processor executes the above-mentioned related method implementation steps to realize the display method in the above-mentioned embodiment.
[0271] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the display method in the above-mentioned embodiment.
[0272] In addition, an embodiment of the present application also provides a device, which may specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer execution instructions, and when the device is running, the processor may execute the computer execution instructions stored in the memory so that the device executes the display method in the above-mentioned method embodiments.
[0273] An embodiment of the present application also provides a chip system, which may include at least two processors. When the at least two processors execute instructions, the chip system executes the above-mentioned display method to achieve the same effect as the above-mentioned implementation method.
[0274] Among them, the electronic device, computer-readable storage medium, computer program product or chip system provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above and will not be repeated here.
[0275] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0276] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0277] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0278] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0279] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0280] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A display method, characterized in that: Applied to an electronic device, the electronic device comprises a first display screen, a second display screen, a first body, a second body, and a second sensor, wherein the first display screen is a flexible screen, the display area of the first display screen is larger than the display area of the second display screen, the first body and the second body respectively correspond to different display areas of the first display screen, and the second display screen corresponds to the first body; the first display screen includes the second display screen, or the second display screen and the first display screen are two independent display screens; in the case where the second display screen and the first display screen are two independent display screens, the second display screen and the first display screen are respectively arranged on both sides of the first body; the first body and the second body are both provided with a first sensor, and the opening and closing state of the electronic device includes a closed state and a non-closed state; The method comprises: At a first moment, a first interface is displayed on the first display screen, and the first sensor collects data based on a first frequency; wherein the data collected by the first sensor is used to calculate an angle, and at the first moment, the electronic device is in an unfolded state; At a second moment, based on the second sensor detecting that the electronic device has changed to the closed state, controlling the first sensor to collect data based on a second frequency; wherein the first frequency is greater than the second frequency, and the second moment is after the first moment; After the electronic device changes to the closed state, a second interface is displayed on the second display screen based on the data collected by the first sensor; wherein the second interface contains the same content as the first interface; At a third moment, based on the second sensor detecting that the electronic device has changed to the non-closed state, controlling the first sensor to collect data based on the first frequency; wherein the third moment is after the second moment; When the electronic device is in the unfolded state, the first interface is displayed on the first display screen based on data collected by the first sensor, wherein the non-closed state includes the unfolded state.
2. The display method according to claim 1, characterized in that: The second sensor determines an open or closed state of the electronic device based on the magnetic field signal.
3. The display method according to claim 2, characterized in that: Before the second moment, the electronic device becomes the closed state based on detection by the second sensor.
4. The display method according to claim 2, characterized in that: Before the third moment, the electronic device becomes the non-closed state based on detection by the second sensor.
5. The display method according to any one of claims 1 to 4, characterized in that: The method further comprises: Between the second moment and the third moment, the folding angle of the electronic device is a first angle, and the electronic device obtains the first angle; Between the second moment and the third moment, the folding angle of the electronic device is a second angle, and based on the second sensor detecting that the electronic device is in the closed state, a third angle is obtained, and the third angle is smaller than the second angle and larger than the first angle.
6. The display method according to claim 2, characterized in that: The controlling the first sensor to collect data based on the second frequency based on the electronic device becoming the closed state includes: Detecting, by the second sensor, that the electronic device is in the closed state; Based on detecting that the electronic device is in the closed state and the current sampling frequency of the first sensor is the first frequency, the sampling frequency of the first sensor is set to the second frequency.
7. The method according to claim 2, characterized in that The controlling the first sensor to collect data based on the first frequency based on the electronic device becoming the non-closed state comprises: Detecting, by the second sensor, that the electronic device is in the non-closed state; Based on detecting that the electronic device is in the non-closed state and the current sampling frequency of the first sensor is the second frequency, the sampling frequency of the first sensor is set to the first frequency.
8. The method according to claim 2, characterized in that: After the electronic device changes to the closed state, displaying a second interface on the second display screen based on the data collected by the first sensor includes: After the electronic device changes to the closed state, detecting that the electronic device is in the closed state by the second sensor; Calculate a fourth angle based on the data collected by the first sensor; Based on detecting that the electronic device is in the closed state, determining a fifth angle according to the fourth angle and the first preset angle; wherein the fifth angle is a smaller value between the fourth angle and the first preset angle; and the first preset angle refers to a maximum angle of a folding angle of the electronic device when the electronic device is in the closed state; According to the fifth angle, the second interface is displayed on the second display screen.
9. The method according to claim 2, characterized in that: The step of displaying the first interface on the first display screen based on data collected by the first sensor when the electronic device is in the unfolded state includes: When the electronic device is in the unfolded state, detecting by the second sensor that the electronic device is in the non-closed state; Calculate a sixth angle based on the data collected by the first sensor; Based on detecting that the electronic device is in the non-closed state, the first interface is displayed on the first display screen according to the sixth angle.
10. The display method according to claim 6, characterized in that: The step of setting the sampling frequency of the first sensor to the second frequency based on detecting that the electronic device is in the closed state and the current sampling frequency of the first sensor is the first frequency comprises: Based on detecting that the electronic device is in the closed state, a seventh angle is calculated according to the data collected by the first sensor; Comparing the seventh angle with a second preset angle, where the second preset angle refers to a maximum angle of the folding angle allowed when the electronic device is detected to be in a closed state and the detected closed state is not a false alarm; Based on the fact that the seventh angle is smaller than the second preset angle and the current sampling frequency of the first sensor is the first frequency, the sampling frequency of the first sensor is set to the second frequency.
11. An electronic device, characterized in that: At least comprises a first display screen, a second display screen, a first body, a second body, a processor and a memory; The first display screen is a flexible screen, the display area of the first display screen is larger than the display area of the second display screen, the first body and the second body correspond to different display areas of the first display screen respectively, and the first body and the second body are both provided with a first sensor; the opening and closing state of the electronic device includes a closed state and a non-closed state; The memory is used to store a computer program. When the computer program is executed by the processor, the electronic device executes the method according to any one of claims 1 to 10.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to execute the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Electronic device and control method thereof
CN107148601A
Folding angle detection method and electronic equipment
CN116055597A