Screen turn-on control method and electronic equipment

CN120035986APending Publication Date: 2025-05-23HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380072010.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-11-04
Filing Date
2023-09-08
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

When controlling the opening and closing of an electronic device, it is difficult for the existing technology to respond quickly and reasonably control the lighting and extinguishing of the inner and outer screens, which affects the user experience.

Method used

It uses a combination of Hall sensors and attitude sensors to determine the device shape based on different angle ranges and attitude sensors, quickly responds to the expansion and closing of electronic devices, and controls the lighting and extinguishing of the screen.

Benefits of technology

It achieves faster and more reasonable control of the screen lighting and extinguishing when the electronic device is unfolded and closed, improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120035986A_ABST
    Figure CN120035986A_ABST
Patent Text Reader

Abstract

The invention provides a screen turn-on control method and electronic equipment. According to the technical scheme provided by the invention, the equipment form of the electronic equipment is determined when the electronic equipment is closed and unfolded through the same important scheme of the attitude sensor and the Hall sensor, so that the two display screens can be reasonably controlled to be turned on and turned off based on the equipment form. Reasonable control includes that when the initial state of the electronic equipment is unfolding and closing of the electronic equipment, the inner screen can be triggered to be extinguished and the outer screen can be triggered to be lightened as soon as possible. The initial state of the electronic equipment is closed, when the electronic equipment is unfolded, the outer screen can be triggered to be extinguished as soon as possible, and the inner screen is lightened.
Need to check novelty before this filing date? Find Prior Art

Description

Method for controlling screen brightness and electronic device

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on November 4, 2022, with application number 202211379580.0 and application name “Method and electronic device for controlling screen brightness”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of terminals, and in particular to a method for controlling screen brightness and an electronic device. Background Art

[0003] Currently, electronic devices can be folded (also called closed) and unfolded (also called opened), and may include display screens on two different sides. One of the two display screens can be called an inner screen, and the other display screen can be called an outer screen. The inner screen can be understood as: a display screen on the same side as the front camera when the electronic device is not folded. The outer screen can be understood as: a display screen on the same side as the rear camera when the electronic device is not folded. The inner screen can be a display screen with folding and unfolding functions, and when the electronic device is folded, the inner screen is also folded. When the electronic device is unfolded, the inner screen is also unfolded.

[0004] When the electronic device is closed and unfolded, a reasonable design for turning the two displays on and off includes: the initial state of the electronic device is unfolded, and when the electronic device is closed, the inner screen can be turned off as quickly as possible and the outer screen can be turned on. The initial state of the electronic device is closed, and when the electronic device is unfolded, the outer screen can be turned off as quickly as possible and the inner screen can be turned on. Generally speaking, such a design meets the user's expectation of the screen being on when the electronic device is closed and unfolded.

[0005] It is worth noting how to better control the lighting and extinguishing of the two display screens when the electronic device is closed and unfolded.

[0006] Summary of the Invention

[0007] The present application provides a method and electronic device for controlling the screen lighting, which determines the device shape based on different posture sensors in different angle ranges, quickly responds to the expansion and closing of the electronic device, controls the lighting and extinguishing of the screen, and improves the user experience.

[0008] In a first aspect, the present application provides a method for controlling a bright screen, which is applied to an electronic device with a foldable screen, the electronic device including an inner screen and an outer screen, the inner screen being foldable to form a first screen and a second screen, the method comprising: when the initial state of the electronic device is closed and both the inner screen and the outer screen are off, the electronic device is unfolded to a first angle greater than or equal to a first angle, the electronic device lights up the inner screen and keeps the outer screen off; the first angle is the angle between the first screen and the second screen, the initial state of the electronic device is closed, and the first angle increases during the process of unfolding the electronic device; in the initial state of the electronic device, The state is unfolded, and during the process of closing the electronic device, the first angle becomes smaller; when the initial state of the electronic device is closed, and at least one of the inner screen and the outer screen is lit, when the electronic device is unfolded to a point where the first angle is greater than or equal to the first angle, the electronic device is in a state where the inner screen is lit and the outer screen is off; when the initial state of the electronic device is unfolded, and at least one of the inner screen and the outer screen is lit, when the electronic device is closed to a point where the first angle is less than or equal to a second angle, the electronic device is in a state where the outer screen is lit and the inner screen is off; wherein the second angle is greater than the first angle.

[0009] In the above embodiment, the first angle may be the inner screen angle involved in the embodiment. The initial state is closed. Regardless of whether the electronic device is in the off-screen state or not when closed, when the electronic device is opened, it can be determined that the electronic device is unfolded when the inner screen angle is greater than or equal to the first angle (for example, 10°), so that the inner screen and the outer screen are illuminated. When the initial state is unfolded and the screen is not off, when the electronic device is closed, the electronic device can be determined to be closed when the inner screen angle is less than or equal to the second angle (for example, 60°), so that the inner screen can be extinguished and the outer screen can be illuminated. The second angle is greater than the first angle, so that when the electronic device is opened when closed, the screen can be triggered to light up as soon as possible at a smaller angle, and when the electronic device is closed when opened, the screen can be triggered to light up as soon as possible at a larger angle. It can quickly respond to the unfolding and closing of the electronic device, reasonably control the lighting and extinguishing of the screen, and enhance the user experience. Among them, the non-off-screen includes at least one of the inner and outer screens being illuminated, and the off-screen includes both the inner and outer screens being off. The first angle is the preset angle 5 involved in the embodiment, for example, it can be "approaching and unfolding and moving away", and the second angle can be the preset angle 2 involved in the embodiment, for example, it can be "unfolding angle + supplementary angle 2".

[0010] In combination with the first aspect, in some embodiments, when the inner screen is off and the outer screen is on, after the electronic device is unfolded to the first angle being greater than or equal to the first angle, it also includes: the electronic device lights up the inner screen and turns off the outer screen.

[0011] In the above embodiment, when the initial state is closed, with the inner screen off and the outer screen on, when the electronic device is opened to the point where the angle between the inner screen and the outer screen is greater than or equal to a first angle (e.g., 10°), the inner screen can be triggered to light up and the outer screen can be turned off. At this time, if the user wants to unfold the inner screen of the electronic device and use it, the electronic device can be put into a state where the inner screen is lit and the outer screen is off as quickly as possible at a smaller angle, which is in line with the user's usage habits.

[0012] In combination with the first aspect, in some embodiments, when both the inner screen and the outer screen are lit, after the electronic device is unfolded to the point where the first angle is greater than or equal to the first angle, the electronic device further includes: turning off the outer screen.

[0013] In the above embodiment, when the initial state is closed and both the inner and outer screens are lit, when the electronic device is opened to the point where the angle between the inner screen and the outer screen is greater than or equal to a first angle (e.g., 10°), the outer screen can be triggered to turn off while the inner screen remains lit. At this time, if the user wishes to unfold the inner screen of the electronic device and use it, the electronic device can be quickly turned to the state where the inner screen is lit and the outer screen is off at a smaller angle, which is in line with the user's usage habits.

[0014] In combination with the first aspect, in some embodiments, when the inner screen and the outer screen are lit, after the electronic device is closed to the first angle being less than or equal to the second angle, it also includes: the electronic device turning off the inner screen and keeping the outer screen off.

[0015] In the above embodiment, when the initial state is unfolded and both the inner and outer screens are lit, when the electronic device is closed so that the angle between the inner screen and the inner screen is less than or equal to the second angle (for example, 60°), the inner screen can be triggered to turn off while the inner screen remains lit. At this time, if the user wants to close the outer screen of the electronic device and use it, the electronic device can be put into a state where the outer screen is lit and the inner screen is off as quickly as possible at a larger angle, which is in line with the user's usage habits.

[0016] In combination with the first aspect, in some embodiments, when the inner screen is turned on and the outer screen is turned off, after the electronic device is closed to the first angle being less than or equal to the second angle, the electronic device further includes: turning off the inner screen and turning on the outer screen.

[0017] In the above embodiment, when the initial state is unfolded, the inner screen is on, and the outer screen is off, when the electronic device is closed so that the angle between the inner screen and the inner screen is less than or equal to the second angle (for example, 60°), the inner screen can be triggered to turn off and light up. At this time, if the user wants to close the outer screen of the electronic device and use it, the electronic device can be put into a state where the outer screen is lit and the inner screen is off as quickly as possible at a larger angle, which is in line with the user's usage habits.

[0018] In combination with the first aspect, in some embodiments, the method also includes: when the first angle is greater than or equal to the first angle and is less than the third angle, and the electronic device is in a state where the inner screen is on and the outer screen is off, the electronic device is closed to a state where the first angle is less than or equal to a fourth angle, the electronic device turns off the inner screen and lights up the outer screen; the fourth angle is less than the first angle.

[0019] In the above embodiment, the third angle may be the preset angle 3 involved in the embodiment, for example, it may be the "folding and unfolding angle + supplementary angle 1". The fourth angle may be the preset angle 5 involved in the embodiment, for example, the "away and approaching" angle. When the first angle is between the first angle (for example, 10°) and the third angle (for example, 65°), when the inner screen is lit, when the electronic device is closed to the fourth angle (for example, 5°), it indicates that the user wishes to close the electronic device, use the outer screen, and not use the inner screen. Then, when the inner screen angle is less than or equal to the fourth angle (for example, 5°), the inner screen is turned off and the outer screen is turned on, which is in line with the user's usage habits.

[0020] In combination with the first aspect, in some embodiments, when both the inner screen and the outer screen are off, the electronic device is unfolded to a first angle greater than or equal to the third angle at a first moment, the electronic device lights up the inner screen and keeps the outer screen off, the method further includes: when the electronic device is closed to a first angle less than the second angle at a second moment, the electronic device turns off the inner screen and lights up the outer screen; the second moment is later than the first moment.

[0021] In combination with the first aspect, in some embodiments, the time difference between the second moment and the first moment is less than or equal to a preset duration.

[0022] In combination with the first aspect, in some embodiments, the first form set by the first sensor of the electronic device includes the first angle being less than or equal to the first angle, and the set second form includes the first angle being greater than the first angle and less than the second angle; the first form set by the second sensor of the electronic device includes the first angle being less than the second angle; when at least one of the inner screen and the outer screen is lit, the electronic device turns on the second sensor; when the initial state of the electronic device is closed, and the inner screen is off and the outer screen is lit, after the electronic device is unfolded to the first angle being greater than or equal to the first angle, the electronic device lights up the inner screen and turns off the outer screen, specifically including: when the electronic device is unfolded to the first angle of the inner screen being greater than or equal to the first angle, when the electronic device determines, based on the first sensor, that the device form of the electronic device has changed from the first form to the second form, the electronic device lights up the inner screen and turns off the outer screen; wherein, the second form is different from the first form; the first form is used to indicate that the electronic device is folded, and the second form is used to indicate that the electronic device is unfolded.

[0023] In the above embodiment, the first sensor may be the Hall sensor in the embodiment, the second sensor may be the posture sensor in the embodiment, the first form may be the folded state involved in the embodiment, and the second form may be the unfolded state involved in the embodiment (for example, a semi-expanded state, a fully unfolded state, an unfolded state mapped away from the state).

[0024] Compared with the solution that uses Hall sensors as an auxiliary and gesture sensors as the main one. In this embodiment, the gesture sensor and the Hall sensor are equally important. When the gesture sensor is working, the electronic device can also control the screen to be bright based on the device form reported by the Hall sensor. Among them, the device form is determined based on the Hall sensor in small-angle opening and closing, and the device form is determined based on the gesture sensor in large-angle opening and closing. Therefore, when the initial state of the electronic device is closed, the inner screen is off, and the outer screen is lit, although the gesture sensor is working, because the Hall sensor also works, when the electronic device is unfolded to a smaller angle (the first angle, such as 10°), the device form of the electronic device can also be determined based on the Hall sensor as being in the unfolded state, so that the inner screen is lit and the outer screen is off. When closed, the response is faster in the process of unfolding the electronic device, which enhances the user experience. However, the solution that uses Hall sensors as an auxiliary and gesture sensors as the main one cannot achieve this effect. Because when the screen is on, the posture sensor is turned on, and the electronic device does not process the device shape reported by the Hall. Even if the electronic device is unfolded to the first angle (for example, 10°), although the Hall sensor determines that the device shape is unfolded, the electronic device will not process it. It will continue to wait for the inner screen angle of the electronic device to unfold to the device shape reported by the posture sensor (for example, unfolded to 45°) before the inner screen will light up and the outer screen will go out.

[0025] Compared with the solution of using only Hall sensors. In this embodiment, a posture sensor is introduced, and the device form is determined based on the posture sensor in large-angle opening and closing. Therefore, when the initial state of the electronic device is unfolded, the inner screen is lit, and the outer screen is off, when the electronic device is closed to a larger angle (a second angle, such as 60°), it can be determined based on the posture sensor that the device form of the electronic device is in a closed state, so that the inner screen is off and the outer screen is lit. When unfolding, the response is faster in the process of closing the electronic device, which enhances the user experience. However, the solution of using only Hall sensors cannot achieve this effect. Because the working range of the Hall sensor is in a smaller angle range (for example, 5°-10°), when the electronic device is closed to the second angle (for example, 60°), the Hall sensor will not report the device form, because it is impossible to achieve the inner screen off and the outer screen lit when the inner screen angle is closed to the second angle (for example, 60°) based on the Hall sensor.

[0026] In combination with the first aspect, in some embodiments, the initial state of the electronic device is closed, and when the first angle is less than the first angle and the inner screen and the outer screen are both off, the electronic device is unfolded to the point where the first angle is greater than or equal to the first angle, the electronic device lights up the inner screen and keeps the outer screen off, specifically including: when the electronic device is unfolded to the point where the first angle is greater than or equal to the first angle, the electronic device determines based on the first sensor that the device form of the electronic device changes from the first form to the second form, the electronic device lights up the inner screen and keeps the outer screen off; the electronic device lights up the inner screen and keeps After keeping the external screen off, the method also includes: the electronic device turning on the second sensor; the second sensor obtaining a first event, the first event being used to indicate the device form of the electronic device; when the second sensor determines that the first event is not a first-frame event, or the first event is a first-frame event and the first event indicates that the device form of the electronic device is the second form, the electronic device turns off the inner screen and lights up the external screen; when the second sensor determines that the first event is a first-frame event and the first event indicates that the device form of the electronic device is the first form, the electronic device keeps the inner screen lit and the external screen off.

[0027] In the above embodiments, in some embodiments, when the electronic device is unfolded when closed, the inner screen will be lit after the Hall sensor reports the unfolded state. At this time, the posture sensor can be turned on. If the first frame event reported by the posture sensor is a folded state, the electronic device may not process the first frame event to avoid the inner screen being lit and then triggered to turn off during the unfolding of the electronic device.

[0028] In combination with the first aspect, in some embodiments, when the second sensor determines that the first event is not a first-frame event, or when the first event is a first-frame event and the first event indicates that the device form of the electronic device is the second form, the electronic device turns off the inner screen and lights up the outer screen, specifically including: when the second sensor determines that the first event is a first-frame event, the first event indicates that the device form of the electronic device is the first form, and the first angle is less than the fifth angle, the electronic device turns off the inner screen and lights up the outer screen; when the second sensor determines that the first event is a first-frame event and the first event indicates that the device form of the electronic device is the first form, the first event is not processed, specifically including: when the second sensor determines that the first event is a first-frame event, the first event indicates that the device form of the electronic device is the first form, and the first angle is greater than the fifth angle, the electronic device keeps the inner screen lit and the outer screen turned off.

[0029] In the above embodiment, the fifth angle can be the preset angle 5 (for example, 4°) involved in the embodiment. In the case of unfolding the electronic device when closed, if it is actually closed, but the Hall sensor reports the away state (that is, the Hall considers the electronic device as a reference), it can be considered that the Hall has failed. At this time, the posture sensor can process the first frame event when it determines that the angle is less than the preset angle 7, triggering the inner screen to turn off and the outer screen to light up. In this way, when the Hall fails at a small angle, the device form of the electronic device can still be judged based on the posture sensor to control the screen to light up.

[0030] In combination with the first aspect, in some embodiments, the method also includes: when the first angle is greater than or equal to the first angle and is less than the third angle, and the electronic device is in a state where the inner screen is on and the outer screen is off, the electronic device is closed to the state where the first angle is less than or equal to the fourth angle, and the electronic device determines based on the first sensor that the device form of the electronic device has changed from the second form to the first form, the electronic device turns off the inner screen and lights up the outer screen.

[0031] In combination with the first aspect, in some embodiments, the initial state of the electronic device is unfolded, and when the inner screen and the outer screen are both off, the electronic device is closed to an angle less than the fourth angle, and the electronic device keeps the outer screen and the inner screen off, wherein the fourth angle is smaller than the first angle.

[0032] In the above embodiment, when the initial state is unfolded, and the inner screen is off and the outer screen is off, when the electronic device is closed to the angle between the inner screen and the outer screen is less than or equal to the fourth angle (for example, 5°), the inner screen and the outer screen can be kept off. At this time, if the user closes the electronic device when the inner screen and the outer screen are both off, it means that the user does not want to use the electronic device at this time, and keeping the outer screen and the inner screen off when closing is in line with the user's usage habits.

[0033] In combination with the first aspect, in some embodiments, the first sensor is a Hall sensor, and the second sensor is a posture sensor.

[0034] In combination with the first aspect, in some embodiments, the initial state of the electronic device is unfolded, and when the inner screen and the outer screen are both off, the electronic device is closed to an angle less than the fourth angle, and the electronic device keeps the outer screen and the inner screen off, wherein the fourth angle is smaller than the first angle.

[0035] In the above embodiment, when the initial state is unfolded, and the inner screen is off and the outer screen is off, when the electronic device is closed to the angle between the inner screen and the outer screen is less than or equal to the fourth angle (for example, 5°), the inner screen and the outer screen can be kept off. At this time, if the user closes the electronic device when the inner screen and the outer screen are both off, it means that the user does not want to use the electronic device at this time, and keeping the outer screen and the inner screen off when closing is in line with the user's usage habits.

[0036] In combination with the first aspect, in some embodiments, when the inner screen is lit and the outer screen is off, after the electronic device is unfolded to the first angle being greater than or equal to the first angle, it also includes: the electronic device keeps the inner screen lit and the outer screen off.

[0037] In the above embodiment, when the initial state is closed, with the inner screen on and the outer screen off, when the electronic device is opened to the inner screen angle greater than or equal to the first angle (for example, 10°), the inner screen can remain on and the outer screen can be off. At this time, if the user wants to unfold the inner screen of the electronic device to use it, the electronic device can be quickly turned to the state where the inner screen is on and the outer screen is off at a smaller angle, which is in line with the user's usage habits.

[0038] In combination with the first aspect, in some embodiments, when the inner screen is off and the outer screen is on, after the electronic device is closed to the first angle being less than or equal to the second angle, it also includes: the electronic device keeps the inner screen on and keeps the outer screen off.

[0039] In the above embodiment, when the initial state is unfolded, the inner screen is off, and the outer screen is lit, when the electronic device is closed to the angle between the inner screen and the inner screen is less than or equal to the second angle (for example, 60°), the inner screen can be kept off and the inner screen can be lit. At this time, if the user wants to close the outer screen of the electronic device and use it, the electronic device can be put into a state where the outer screen is lit and the inner screen is off as soon as possible at a larger angle, which is in line with the user's usage habits.

[0040] In a second aspect, the present application provides an electronic device, comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method described in the first aspect or any one of the embodiments of the first aspect.

[0041] In the above embodiment, the first angle may be the inner screen angle involved in the embodiment. The initial state is closed. Regardless of whether the electronic device is in the off-screen state or not when closed, when the electronic device is opened, it can be determined that the electronic device is unfolded when the inner screen angle is greater than or equal to the first angle (for example, 10°), so that the inner screen and the outer screen are illuminated. When the initial state is unfolded and the screen is not off, when the electronic device is closed, the electronic device can be determined to be closed when the inner screen angle is less than or equal to the second angle (for example, 60°), so that the inner screen can be extinguished and the outer screen can be illuminated. The second angle is greater than the first angle, so that when the electronic device is opened when closed, the screen can be triggered to light up as soon as possible at a smaller angle, and when the electronic device is closed when opened, the screen can be triggered to light up as soon as possible at a larger angle. It can quickly respond to the unfolding and closing of the electronic device, reasonably control the lighting and extinguishing of the screen, and enhance the user experience. Among them, the non-off-screen includes at least one of the inner and outer screens being illuminated, and the off-screen includes both the inner and outer screens being off. The first angle is the preset angle 5 involved in the embodiment, for example, it can be "approaching and unfolding and moving away", and the second angle can be the preset angle 2 involved in the embodiment, for example, it can be "unfolding angle + supplementary angle 2".

[0042] In a third aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device. The chip system includes one or more processors, which are used to call computer instructions to enable the electronic device to execute the method described in the first aspect or any one of the embodiments of the first aspect.

[0043] In the above embodiment, the first angle may be the inner screen angle involved in the embodiment. When the initial state is closed, regardless of whether the electronic device is in the off state or not when closed, when the electronic device is opened, it can be determined that the electronic device is unfolded when the inner screen angle is greater than or equal to the first angle (for example, 10°), so that the inner screen and the outer screen are illuminated. When the initial state is unfolded and the screen is not off, when the electronic device is closed, the electronic device can be determined to be closed when the inner screen angle is less than or equal to the second angle (for example, 60°), so that the inner screen can be extinguished and the outer screen can be illuminated. The second angle is greater than the first angle. In this way, when the electronic device is opened when closed, the screen can be triggered to light up as soon as possible at a smaller angle, and when the electronic device is closed when opened, the screen can be triggered to light up as soon as possible at a larger angle. It can quickly respond to the unfolding and closing of the electronic device, reasonably control the lighting and extinguishing of the screen, and enhance the user experience. Among them, the non-off screen includes at least one of the inner and outer screens being illuminated, and the off screen includes both the inner and outer screens being off. The first angle is the preset angle 5 involved in the embodiment, for example, it can be "approaching and unfolding and moving away", and the second angle can be the preset angle 2 involved in the embodiment, for example, it can be "unfolding angle + supplementary angle 2".

[0044] In a fourth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect or any one of the embodiments of the first aspect.

[0045] In the above embodiment, the first angle may be the inner screen angle involved in the embodiment. The initial state is closed. Regardless of whether the electronic device is in the off-screen state or not when closed, when the electronic device is opened, it can be determined that the electronic device is unfolded when the inner screen angle is greater than or equal to the first angle (for example, 10°), so that the inner screen and the outer screen are illuminated. When the initial state is unfolded and the screen is not off, when the electronic device is closed, the electronic device can be determined to be closed when the inner screen angle is less than or equal to the second angle (for example, 60°), so that the inner screen can be extinguished and the outer screen can be illuminated. The second angle is greater than the first angle, so that when the electronic device is opened when closed, the screen can be triggered to light up as soon as possible at a smaller angle, and when the electronic device is closed when opened, the screen can be triggered to light up as soon as possible at a larger angle. It can quickly respond to the unfolding and closing of the electronic device, reasonably control the lighting and extinguishing of the screen, and enhance the user experience. Among them, the non-off-screen includes at least one of the inner and outer screens being illuminated, and the off-screen includes both the inner and outer screens being off. The first angle is the preset angle 5 involved in the embodiment, for example, it can be "approaching and unfolding and moving away", and the second angle can be the preset angle 2 involved in the embodiment, for example, it can be "unfolding angle + supplementary angle 2".

[0046] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect or any one of the embodiments of the first aspect.

[0047] In the above embodiment, the first angle may be the inner screen angle involved in the embodiment. The initial state is closed. Regardless of whether the electronic device is in the off-screen state or not when closed, when the electronic device is opened, it can be determined that the electronic device is unfolded when the inner screen angle is greater than or equal to the first angle (for example, 10°), so that the inner screen and the outer screen are illuminated. When the initial state is unfolded and the screen is not off, when the electronic device is closed, the electronic device can be determined to be closed when the inner screen angle is less than or equal to the second angle (for example, 60°), so that the inner screen can be extinguished and the outer screen can be illuminated. The second angle is greater than the first angle, so that when the electronic device is opened when closed, the screen can be triggered to light up as soon as possible at a smaller angle, and when the electronic device is closed when opened, the screen can be triggered to light up as soon as possible at a larger angle. It can quickly respond to the unfolding and closing of the electronic device, reasonably control the lighting and extinguishing of the screen, and enhance the user experience. Among them, the non-off-screen includes at least one of the inner and outer screens being illuminated, and the off-screen includes both the inner and outer screens being off. The first angle is the preset angle 5 involved in the embodiment, for example, it can be "approaching and unfolding and moving away", and the second angle can be the preset angle 2 involved in the embodiment, for example, it can be "unfolding angle + supplementary angle 2". BRIEF DESCRIPTION OF THE DRAWINGS

[0048] 1A-1D are schematic diagrams showing the device configuration of an electronic device with a longitudinal folding feature provided by an embodiment of the present application;

[0049] FIG2 shows a schematic diagram of an electronic device with a horizontally foldable feature provided by an embodiment of the present application;

[0050] Figure 3 shows the process of the gesture sensor reporting gesture events;

[0051] Figure 4 shows the process of the Hall sensor reporting a Hall event;

[0052] FIG5 shows an exemplary software structure block diagram of an electronic device controlling the screen to light up;

[0053] 6A-6D are schematic diagrams showing how to control the screen to be bright according to preset rule 1;

[0054] FIG7 shows the interaction process between various modules when the electronic device controls the screen to turn on in situation 11;

[0055] FIG8 shows the interaction process between various modules when the electronic device controls the screen to turn on in situation 12;

[0056] 9A and 9B are schematic diagrams showing a method of controlling the screen to be bright according to preset rule 2;

[0057] FIG10 shows the interaction process between various modules when the electronic device controls the screen to light up in situation 21;

[0058] FIG11 shows the interaction process between various modules when the electronic device controls the screen to light up in situation 22;

[0059] FIG12 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] The terms used in the following examples of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. As used in the specification and appended claims of the present application, the singular expressions "a," "an," "said," "above," "the," and "this" are intended to include plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in the present application refers to and encompasses any or all possible combinations of one or more of the listed items.

[0061] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.

[0062] In the existing solution, the unfolding and folding status of the electronic device is determined by a Hall sensor. When the electronic device is unfolded to unfolded, the Hall sensor can determine that the electronic device is unfolded when the angle of the inner screen (also called the inner screen angle) is unfolded to angle 1 (for example, 10°), and the electronic device can trigger the outer screen to turn off and the inner screen to light up. However, due to the limitations of the Hall sensor design: in the process of closing the electronic device when the electronic device is unfolded, the Hall sensor can only determine that the electronic device is folded when the inner screen angle is closed to less than or equal to angle 2 (for example, 5°). At this time, it is "too late" for the electronic device to trigger the inner screen to turn off and the outer screen to light up, which does not meet the user's expectation of triggering the inner screen to turn off and the outer screen to light up as soon as possible when closing the electronic device.

[0063] In this existing solution, a single Hall sensor is used to control the lighting and extinguishing of the screen. Since the working range of the Hall sensor is in a relatively small angle range, the angle range is usually when the inner screen angle is between 5° and 10°. Among them, the working range refers to the angle range in which the Hall sensor can report the device shape. Therefore, when the electronic device is opened and closed at a small angle, the Hall sensor performs well, and when it is opened and closed at a large angle, it performs poorly: although only using the Hall sensor can make the inner screen light up and the outer screen extinguish quickly (for example, unfold to 10°) when the initial state of the electronic device is closed, during the process of opening the electronic device. However, when the initial state of the electronic device is unfolded, during the process of closing the electronic device, it is not possible to quickly extinguish the inner screen and light up the outer screen. For example, when closing the electronic device, the inner screen can only be extinguished and the outer screen can be lit when the inner screen angle is closed to 5°. That is, when unfolding and closing the electronic device, the Hall sensor performs poorly and reacts slowly, affecting the user experience.

[0064] In an embodiment of the present application, a method for controlling the screen is provided. A Hall sensor and a posture sensor can be used in combination to determine the device form based on different posture sensors in different angle ranges, quickly respond to the expansion and closing of the electronic device, control the lighting and extinguishing of the screen, and improve the user experience. In this method, when the electronic device is opened and closed at a small angle, the screen is still controlled to be lit and extinguished based on the Hall sensor, retaining the advantages of the Hall sensor. However, when opening and closing at a large angle, a posture sensor is introduced, and the electronic device can control the lighting and extinguishing of the screen based on the posture sensor, so that the electronic device responds to closing faster (for example, closing to 40° or 60°), so that the inner screen is extinguished and the outer screen is lit. This can make up for the defects of the Hall sensor. The reason is that the working range of the posture sensor can be larger than that of the Hall sensor. It can determine the device form of the electronic device in a larger angle range (for example, 40° to 65°), so that the electronic device controls the lighting and extinguishing of the screen based on the device form.

[0065] This method can be applied to electronic devices with vertical or horizontal folding characteristics, and the electronic device includes two display screens on different sides. One of the two display screens can be called the inner screen, and the other can be called the outer screen. The electronic device can determine the device shape change of the electronic device through the Hall sensor and the posture sensor according to preset rules, so that the electronic device can achieve reasonable screen lighting when unfolded or folded in more scenarios.

[0066] In some possible cases, the device form of the electronic device may include an unfolded state and a folded state, wherein the unfolded state may further include a semi-folded state and a fully unfolded state.

[0067] The following introduces the device form of an electronic device equipped with a longitudinal folding feature.

[0068] For example, Figures 1A-1D show schematic diagrams of the device shape of an electronic device with a longitudinal folding feature provided in an embodiment of the present application, where the folding edge of the longitudinal fold is perpendicular to the top edge line of the electronic device (for ease of description, the top edge line is referred to as the top edge) and the bottom edge line (for ease of description, the bottom edge line is referred to as the bottom edge).

[0069] Figure 1A is a schematic diagram of a longitudinally foldable electronic device in an unfolded form. As shown in Figure 1A, the electronic device is not folded. The inner screen is the display screen on the same side as the front camera when the electronic device is unfolded. In this case, the inner screen angle can be considered to be 180°. The inner screen angle can be considered as: dividing the inner screen into screen A and screen B along the folding edge, and the angle formed between screen A and screen B can be called the inner screen angle.

[0070] When folded in direction 11a and / or direction 11b as shown in FIG1A , the device form with an inner screen angle ranging from 180° to a preset angle 1 (eg, 145°) can be referred to as a fully unfolded state of the electronic device.

[0071] When folded in direction 11a and / or direction 11b as shown in FIG1A , the inner screen angle ranging from a preset angle 1 (e.g., 145°) to a preset angle 2 (e.g., 40°) can be regarded as a semi-unfolded state of the electronic device. A schematic diagram of one of the semi-unfolded states can be shown in FIG1B . The inner screen angle (α) can be any angle between the preset angle 1 and the preset angle 2. The preset angle 1 is greater than the preset angle 2.

[0072] Fold in direction 11a and / or direction 11b as shown in FIG1B . An inner screen angle ranging from a preset angle 2 (e.g., 40°) to 0° can be regarded as a folded state of the electronic device. A schematic diagram of one of the folding states can be shown in FIG1C . The inner screen angle (α) can take any angle between the preset angle 2 and 0. When the electronic device is in the folded state, the inner screen can be triggered to turn off and the outer screen can be turned on. Among them, the outer screen can be regarded as a display screen on the same side as the rear camera when the electronic device is not folded.

[0073] Fold in direction 11a and / or direction 11b as shown in Figure 1C. The inner screen angle is 0°, and the sub-device is completely closed as shown in Figure 1D. At this point, the device configuration of the electronic device can also be referred to as the folded state. In Figure 1D, screens A and B are facing each other and are not visible to the user.

[0074] It should be understood that FIG. 1A to FIG. 1D illustrate the electronic device in an initial state of unfolding (eg, an angle equal to or close to 180° in the unfolded state) and closing the electronic device as an example.

[0075] Among them, closing the electronic device means making the inner screen angle of the electronic device gradually smaller. For example, making the inner screen angle gradually approach 0° or equal to 0°. The initial state of unfolding means that before the electronic device is closed, the device form of the electronic device is unfolded. Generally speaking, the inner screen angle is greater than a preset angle 2 (for example, 40°). For example, when the inner screen angle is 180°, it can be regarded as an unfolded state.

[0076] Referring to the contents and descriptions of Figures 1A to 1D, for the case where the initial state of the electronic device is closed (equal to 0° or close to 0°), and the electronic device is unfolded, the device form of the electronic device includes: when the inner screen angle is between 0° and preset angle 3 (for example, 45°), the device form of the electronic device can be a folded state. When the inner screen angle is between preset angle 3 (for example, 45°) and preset angle 4 (for example, 150°), the device form of the electronic device can be a semi-expanded state. When the inner screen angle is between preset angle 4 (for example, 150°) and 180°, the device form of the electronic device can be a fully unfolded state. Among them, the preset angle 3 is smaller than the preset angle 4. The preset angle 3 can be equal to the preset angle 2, or it can be unequal to the preset angle 2. The preset angle 1 can be equal to the preset angle 4, or it can be unequal to the preset angle 4. The embodiments of the present application are not limited to this.

[0077] Here, unfolding the electronic device means gradually increasing the inner screen angle of the electronic device. For example, the inner screen angle gradually approaches or is equal to 180°. The initial state of closed means that before the electronic device is unfolded, the inner screen angle of the electronic device is close to or equal to 0°, usually less than 10°.

[0078] The following introduces the device form of an electronic device equipped with horizontal folding characteristics.

[0079] For example, Figure 2 shows a schematic diagram of an electronic device with a horizontal folding feature provided by an embodiment of the present application. The inner screen is a display screen on the same side as the front camera when the electronic device is not folded. The outer screen (not shown) can be regarded as a display screen on the same side as the rear camera when the electronic device is not folded. When not folded, it can be regarded as an inner screen angle of 180°. Among them, the inner screen angle (α) can be regarded as: the inner screen is divided into screen A and screen B along the folding edge, and the angle formed between screen A and screen B can be called the inner screen angle. The difference from the longitudinally folding electronic device is that the folding edge of the horizontally folding screen is parallel to the top and bottom edges of the electronic device. Other descriptions of the device form of the horizontally folding electronic device are the same as those in Figures 1A to 1D above, and reference can be made to the description of Figures 1A to 1D above, which will not be repeated here.

[0080] In some possible cases, the device form of the electronic device includes an approaching state and a distant state in addition to the folded state, semi-expanded state and fully expanded state mentioned above.

[0081] Taking the initial state of the electronic device as closed, the approach state and the distance state are explained as an example when the electronic device is unfolded. At this time, the approach state includes the shape of the electronic device when the inner screen angle is between 0° and a preset angle 5 (for example, 10°). The distance state includes the shape of the electronic device when the inner screen angle is between a preset angle 5 (for example, 10°) and 180°. Among them, the preset angle 5 is smaller than the preset angle 2.

[0082] Taking the initial form of the electronic device as the unfolded and closed electronic devices as examples, the approach state and the distance state are explained. At this time, the distance state includes the form of the electronic device when the inner screen angle is between 180° and the preset angle 6 (for example, 5°). The approach state includes the form of the electronic device when the inner screen angle is between the preset angle 6 (for example, 5°) and 0°. Among them, the preset angle 6 is smaller than the preset angle 2. The size relationship between the preset angle 5 and the preset angle 6 may not be limited, but generally speaking, the preset angle 5 may be larger than the preset angle 6.

[0083] In some possible cases, the electronic device can determine the device form of the electronic device through the Hall sensor and the posture sensor. For example, the posture sensor and the Hall sensor can both determine the device form based on data such as the inner screen angle. Generally speaking, the Hall sensor can report the device form when the inner screen angle is small (for example, less than or equal to 10°), and the posture sensor can report the device form when the inner screen angle is large (for example, greater than or equal to 45°). The electronic device can only determine the device form when the Hall sensor and the posture sensor report the device form, and subsequently control the lighting and extinguishing of the screen (including the inner screen and the outer screen) based on the device form. The timing for the Hall sensor and the posture sensor to report the device form includes: the first frame after startup can be reported (one frame is one device form), and starting from the second frame, it can be reported when it is detected that the device form of the electronic device has changed compared to the previous frame.

[0084] Based on the physical characteristics of the Hall effect sensor and the attitude sensor described above, in some possible cases, the attitude sensor can be used to determine whether the device configuration of the electronic device is one of: a folded state, a semi-expanded state, and a fully expanded state. The Hall effect sensor can also be used to determine whether the device configuration of the electronic device is one of: an approaching state or a distanced state.

[0085] For ease of description, the device state reported by the attitude sensor may be referred to as an attitude event, and the device state reported by the Hall sensor may be referred to as a Hall event.

[0086] FIG3 shows the process of the gesture sensor reporting a gesture event.

[0087] The following is an exemplary description of the process of the posture sensor reporting a posture event with reference to FIG3 .

[0088] As shown in (1) of FIG3 , when the inner screen angle is between 0° and a preset angle 2 (e.g., 40°), the posture sensor can determine that the device form of the electronic device is in a folded state. When the inner screen angle is between a preset angle 3 (e.g., 45°) and a preset angle 1 (e.g., 145°), the posture sensor can determine that the device form of the electronic device is in a semi-expanded state. When the inner screen angle is between a preset angle 4 (e.g., 150°) and 180°, the posture sensor can determine that the device form of the electronic device is in a fully expanded state.

[0089] Among them, when the inner screen angle is between the preset angle 2 (for example, 40°) and the preset angle 3 (for example, 45°), the device form of the electronic device can also be called the following state 1. Following state 1 is used to indicate that: if the previous frame is in the folded state, when the inner screen angle is between the preset angle 2 (for example, 40°) and the preset angle 3 (for example, 45°), the current frame acquired by the attitude sensor is also in the folded state. If the previous frame is in the semi-expanded state, when the inner screen angle is between the preset angle 2 (for example, 40°) and the preset angle 3 (for example, 45°), the current frame acquired by the attitude sensor is also in the semi-expanded state. That is, it can be understood that, as shown in (2) in Figure 3, when the initial state of the electronic device is closed, when the electronic device is unfolded, when the inner screen angle is between the preset angle 2 (for example, 40°) and the preset angle 3 (for example, 45°), the attitude sensor can determine that the device form of the electronic device is the folded state. As shown in (3) in Figure 3, when the initial state of the electronic device is unfolded, when the electronic device is closed, when the inner screen angle is between preset angle 2 (for example, 40°) and preset angle 3 (for example, 45°), the posture sensor can determine that the device form of the electronic device is a semi-expanded state.

[0090] When the inner screen angle is between a preset angle 1 (e.g., 145°) and a preset angle 4 (e.g., 150°), the device state of the electronic device can also be referred to as a follow-up state 2. Follow-up state 2 is used to indicate that if the previous frame is in a semi-expanded state, when the inner screen angle is between a preset angle 1 (e.g., 145°) and a preset angle 4 (e.g., 150°), the current frame acquired by the attitude sensor is also in a semi-expanded state. If the previous frame is in a fully expanded state, when the inner screen angle is between a preset angle 1 (e.g., 145°) and a preset angle 4 (e.g., 150°), the current frame acquired by the attitude sensor is also in a fully expanded state. That is, it can be understood that, as shown in (2) in FIG3 , when the initial state of the electronic device is closed, when the electronic device is expanded, when the inner screen angle is between a preset angle 1 (e.g., 145°) and a preset angle 4 (e.g., 150°), the attitude sensor can determine that the device state of the electronic device is in a semi-expanded state. As shown in (3) in Figure 3, when the initial state of the electronic device is unfolded, when the electronic device is closed, when the inner screen angle is between a preset angle 1 (for example, 145°) and a preset angle 4 (for example, 150°), the posture sensor can determine that the device form of the electronic device is in a fully unfolded state.

[0091] The timing for the attitude sensor to report the device state includes: the first frame after startup (one frame is one device state) can be reported, starting from the second frame, when it detects that the device state of the electronic device has changed compared to the previous frame.

[0092] For example, as shown in (2) in FIG3 , the position of the black triangle symbol can be an exemplary time for the posture sensor to report a posture event. In the case of unfolding the electronic device when closed, in the process of the inner screen angle changing from less than the preset angle 3 to greater than the preset angle 3, the device form of the electronic device changes from the folded state to the semi-expanded state, then the posture sensor can report a frame of device form (at this time, it is the semi-expanded state). In the process of the inner screen angle changing from the angle between the preset angle 3 and the preset angle 4 to greater than the preset angle 4, the device form of the electronic device changes from the semi-expanded state to the fully expanded state, then the posture sensor can report a frame of device form (at this time, it is the fully expanded state). It should be understood that the posture sensor is activated only when the inner screen angle is less than the preset angle 3, then the first frame of device form after activation (at this time, it is the folded state) can also be reported, and one of the reporting times can be at the white square shown in (2) in FIG3 .

[0093] For another example, as shown in (3) in FIG3 , the position of the triangle symbol can be an exemplary time for the posture sensor to report a posture event. In the case of closing the electronic device when unfolding, when the inner screen angle changes from greater than the preset angle 1 to less than the preset angle 1, the device form of the electronic device changes from the fully unfolded state to the semi-expanded state, and the posture sensor can report a frame of device form (at this time, it is the semi-expanded state). In the process of changing the inner screen angle from the angle between the preset angle 1 and the preset angle 2 to less than the preset angle 2, the device form of the electronic device changes from the semi-expanded state to the folded state, and the posture sensor can report a frame of device form (at this time, it is the folded state). It should be understood that the posture sensor is activated only when the inner screen angle is greater than the preset angle 1, and the first frame of device form after activation (at this time, it is the fully unfolded state) can also be reported, and one of the reporting times can be at the white square shown in (3) in FIG3 .

[0094] Here, unfolding the electronic device when closed refers to the process of closing the electronic device when the initial state of the electronic device is unfolded. Closing the electronic device when unfolded refers to the process of unfolding the electronic device when the initial state of the electronic device is closed.

[0095] FIG4 shows the process of a Hall sensor reporting a Hall event.

[0096] The process of the Hall sensor reporting a Hall event is described below with reference to FIG. 4 .

[0097] As shown in (1) of FIG4 , when the inner screen angle is between 0° and a preset angle of 6 (e.g., 5°), the Hall sensor can determine that the device configuration of the electronic device is in the approaching state. When the inner screen angle is between a preset angle of 5 (e.g., 10°) and 180°, the Hall sensor can determine that the device configuration of the electronic device is in the moving-away state.

[0098] When the inner screen angle is between a preset angle of 6 (e.g., 5°) and a preset angle of 5 (e.g., 10°), the device state of the electronic device can also be referred to as a following state 3. The following state 3 is used to indicate that if the previous frame is in an approaching state, when the inner screen angle is between a preset angle of 6 (e.g., 5°) and a preset angle of 5 (e.g., 10°), the current frame acquired by the Hall sensor is also in an approaching state. That is, it can be understood that, as shown in (2) in FIG4 , when the initial state of the electronic device is closed, when the electronic device is unfolded, when the inner screen angle is between a preset angle of 6 (e.g., 5°) and a preset angle of 5 (e.g., 10°), the Hall sensor can determine that the device state of the electronic device is in an approaching state. If the previous frame is in a moving away state, when the inner screen angle is between a preset angle of 6 (e.g., 5°) and a preset angle of 5 (e.g., 10°), the current frame acquired by the Hall sensor is also in a moving away state. That is, it can be understood that, as shown in (3) in FIG4 , when the initial state of the electronic device is unfolded and the electronic device is closed, when the inner screen angle is between a preset angle 6 (e.g., 5°) and a preset angle 5 (e.g., 10°), the Hall sensor can determine that the device form of the electronic device is in the away state.

[0099] In some possible cases, the electronic device may map the reported approaching state into a folded state, and map the reported distant state into an unfolded state (a semi-expanded state or a fully unfolded state).

[0100] The Hall sensor reports the device state in the first frame after startup (one frame is one device state) and, starting from the second frame, when it detects that the device state of the electronic device has changed compared to the previous frame.

[0101] For example, as shown in (2) in FIG4 , the position of the black triangle symbol may be an exemplary timing for the Hall sensor to report a Hall event. When the electronic device is unfolded while closed, during the process of the inner screen angle changing from less than a preset angle 5 to greater than a preset angle 5, the device form of the electronic device changes from an approaching state to a distant state, and the Hall sensor may report a frame of device form (at this time, the distant state).

[0102] For another example, as shown in (3) in FIG4 , the location of the black triangle symbol may be an exemplary timing for the Hall sensor to report a Hall event. When the electronic device is closed during unfolding, and the inner screen angle changes from greater than a preset angle 6 to less than a preset angle 6, the device form of the electronic device changes from a distant state to an approaching state, and the Hall sensor may report a frame of device form (at this time, the approaching state).

[0103] In an embodiment of the present application, according to preset rules, the Hall sensor and the posture sensor can obtain and report the device form, and the electronic device can be integrated based on the device form reported by the Hall sensor and the posture sensor to determine the final device form of the electronic device. In the process of closing the electronic device, when the device form of the electronic device is switched from the unfolded state to the folded state, the inner screen is turned off and the outer screen is turned on. In the process of unfolding the electronic device, when the device form of the electronic device is switched from the folded state to the unfolded state, the outer screen is turned off and the inner screen is turned on. Among them, the preset rules include but are not limited to the following rules:

[0104] Preset rule 1: The posture sensor is the main one, and the Hall sensor is the auxiliary one. Specifically, when the electronic device is off (both the inner and outer screens are off), the posture sensor is turned off. When the screen is not off (the inner screen is on and / or the outer screen is on), the posture sensor is turned on. Regardless of whether the screen is off or not, the electronic device turns on the Hall sensor after it is turned on. However, when the screen is not off, the Hall event reported by the Hall sensor is not processed. The electronic device determines the device form of the electronic device based on the most recent posture event reported by the posture sensor, and controls the screen to be lit based on the device form. When the screen is off, the electronic device determines the device form of the electronic device based on the Hall event reported by the Hall sensor, and controls the screen to be lit based on the device form. When the screen is off, the electronic device may not obtain posture events through the posture sensor.

[0105] The preset rule 1 also includes a special case (special case 1): when the initial state of the electronic device is closed and the screen is off, when the angle between the electronic device and the inner screen is greater than or equal to the preset angle 5 (for example, 10 degrees), the Hall sensor can determine that the device form of the electronic device is in the away state and report the away state. Based on the away state, the electronic device determines that the device form of the electronic device is in the unfolded state, triggers the inner screen to light up, and keeps the outer screen off. After the inner screen lights up, the posture sensor is turned on, and then the posture sensor can obtain the posture event and report it. Between the preset angle 5 (for example, 10 degrees) and the preset angle 3 (for example, 45 degrees), the posture sensor can report the first frame (first frame) posture event (gesture event A). Among them, when the posture event A is a frame of folded state, it conflicts with the unfolded state mapped by the away state reported by the Hall sensor. For this special case 2, the way the electronic device handles the conflict may include: in special case 1, within a preset time T (for example, 1 second) after the posture sensor reports the posture event A, the electronic device does not process based on the posture event.

[0106] Preset rule 2: The posture sensor and the Hall sensor are equally important. Specifically, when the electronic device is off (both the inner and outer screens are off), the posture sensor is turned off. When the screen is not off (the inner screen is on and / or the outer screen is on), the posture sensor is turned on. Electronic devices all turn on the Hall sensor after they are turned on. When the posture sensor reports a posture event, the electronic device can determine the device form of the electronic device based on the posture event when it is closed and unfolded, and control the screen to be lit based on the device form. When the Hall sensor reports a Hall event, the electronic device can determine the device form of the electronic device based on the Hall event when it is closed and unfolded, and control the screen to be lit based on the device form.

[0107] The preset rule 2 also includes a special case (special case 2): when the initial state of the electronic device is closed and the screen is off, when the angle between the electronic device and the inner screen is greater than or equal to the preset angle 5 (for example, 10°), the Hall sensor can determine that the device form of the electronic device is in the away state, and report the away state. Based on the away state, the electronic device determines that the device form of the electronic device is in the unfolded state, triggers the inner screen to light up, and keeps the outer screen off. After the inner screen lights up, the posture sensor is turned on to obtain the posture event and report it. Between the preset angle 5 (for example, 10°) and the preset angle 3 (for example, 45°), the posture sensor can obtain the first frame posture event (gesture event B). Among them, when the posture event B is a frame of folded state, it conflicts with the unfolded state mapped by the away state reported by the Hall sensor. For this special case 2, the way in which the electronic device handles the conflict includes but is not limited to the following methods.

[0108] Method 1: In special case 2, after the gesture sensor determines that the gesture event B is in the folded state, the gesture event B may not be reported, and the electronic device may not control the screen to light up based on the gesture event B. In this way, the following problem 1 can be avoided: when the inner screen angle is unfolded to a preset angle of 5 (for example, 10°), the electronic device triggers the inner screen to light up and the outer screen to turn off. Then, between the preset angle 5 (for example, 10°) and the preset angle 3 (for example, 45°), the electronic device is triggered to turn off the inner screen and light up the outer screen based on the folded state. This causes the user to see the screen being cut for a short period of time, but the user's original intention is to unfold the electronic device, so the inner screen is turned off and the outer screen is turned on, which does not meet the user's expectations. Among them, screen cutting refers to controlling the screen to light up based on the device form when the screen is not turned off. For example, when the inner screen is lit and the outer screen is off, when the electronic device is closed to the device form in the folded state, the operation of controlling the inner screen to turn off and the outer screen to light up can be called screen cutting. For another example, when the inner screen is off and the outer screen is on, when the electronic device is unfolded to the unfolded state, the operation of controlling the inner screen to light up and the outer screen to turn off can be called screen switching.

[0109] Method 2: In special case 2, after the gesture sensor determines that gesture event B is in the folded state, if it is determined that the inner screen angle in the folded state is less than a preset angle of 7 (e.g., 4°), the gesture sensor may report gesture event B. The electronic device may determine the device configuration based on gesture event B and control the screen lighting based on the device configuration (the inner screen turns off and the outer screen turns on). If it is determined that the inner screen angle in the folded state is greater than or equal to a preset angle of 7 (e.g., 4°), gesture event B may not be reported, and the electronic device may not control the screen lighting based on gesture event B. The preset angle 7 is less than or equal to a preset angle of 5 (e.g., 5°). This not only solves the aforementioned problem 1, but also solves problem 2: when the Hall sensor fails, the false alarm is now a distance state (actually an approach state, and the user may not intend to unfold the electronic device), causing the electronic device to trigger the inner screen to turn on. After the outer screen turns off, the folded state reported by the gesture sensor can be promptly triggered to turn off the inner screen and turn on the outer screen. The preset angle 7 (e.g., 4°) is obtained based on the gesture sensor.

[0110] Based on the aforementioned preset rule 1 and preset rule 2, compared to the solution of using only the Hall sensor to control the screen to light up, in some scenarios, the electronic device in the embodiment of the present application can achieve more reasonable control of the screen to light up.

[0111] In some possible situations, the reasonable lighting of the screen when the electronic device is unfolded or folded involved in this application includes but is not limited to the following scenarios.

[0112] Scenario 1: The initial state of the electronic device is closed, and when both the inner screen and the outer screen are off, when the electronic device is unfolded (from the folded state to the unfolded state), the inner screen is triggered to light up and the outer screen is turned off as soon as possible (for example, unfolded to 10°). This scenario 1 can be implemented in the following way: In scenario 1, when both the inner screen and the outer screen are off, when the angle between the electronic device and the inner screen is greater than or equal to the preset angle 5 (for example, 10°) when the electronic device is unfolded when closed, the Hall sensor can determine that the device form of the electronic device is in the away state, and report the away state. Based on the away state, the electronic device determines that the device form of the electronic device is in the unfolded state, triggers the inner screen to light up, and keeps the outer screen off.

[0113] Scenario 2: The initial state of the electronic device is unfolded, and when the inner screen or outer screen is on, when the electronic device is closed (from unfolded state to folded state), the inner screen is triggered to turn off and the outer screen is lit as soon as possible (folded to more than 10°, for example, 40°). Scenario 2 can be implemented in the following way: In scenario 2, when the inner screen or outer screen is lit, the posture sensor is turned on. When the electronic device is unfolded and closed until the angle between the inner screen and the outer screen is less than or equal to the preset angle 2 (for example, 40°), the posture sensor can determine that the device form of the electronic device is a folded state, and report the folded state. Based on the folded state, the electronic device triggers the inner screen to turn off and the outer screen to turn on. Compared with the solution of using a Hall sensor to detect the change in the form of the electronic device in scenario 2, it can detect that the electronic device is in a folded state about 35° (40° minus 5°) in advance, and then the inner screen can be triggered to turn off and the outer screen to turn on 35° in advance. This is more in line with the user's expectation that the inner screen will turn on and the outer screen will turn off when the electronic device is closed.

[0114] FIG5 shows an exemplary software structure block diagram of an electronic device controlling the screen to light up.

[0115] The following describes the process of interaction between some modules when the electronic device controls the screen to light up based on the device state reported by the Hall sensor and the posture sensor in conjunction with Figure 5.

[0116] As shown in Figure 5, the software architecture includes at least one subsystem. For example, this may include an application subsystem and a system control subsystem. Different subsystems can be divided into several layers, each with clear roles and divisions of labor. Layers communicate with each other through software interfaces.

[0117] In some embodiments, the application subsystem may include an application layer, an application framework layer, a hardware abstraction layer, and a kernel layer. The system control subsystem may include a framework layer and a kernel layer. For ease of distinction, the framework layer in the system control subsystem may be referred to as a co-framework layer, and the kernel layer in the system control subsystem may be referred to as a co-kernel layer. It should be understood that in actual applications, in addition to the layers shown in FIG5 , the application subsystem and the system control subsystem may also include more or fewer layers. This embodiment of the present application is not limited to this.

[0118] The application layer in the application subsystem may include a series of application packages, such as camera, calendar, WLAN, music, gallery, call, navigation, and Bluetooth application packages.

[0119] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0120] The application framework layer in the application subsystem may include a system server, which may include a screen management module, a device status management server, a sensor service, and the like.

[0121] The screen management module may include a power management server, a window management server, and other components. Each module in the screen management module can receive screen-lighting notifications from the device status management server. This notification triggers the screen management module to initiate the screen-lighting process. In some cases, the power management server can control the screen's power on and off. The window management server can draw a display window and, after the screen is powered on, place the display window on the screen for the user to view.

[0122] After registering the gesture sensor and Hall effect sensor with the sensor service, the device state management server can receive gesture events and Hall effect events reported by the gesture sensor. Based on these gesture and Hall effect events, the server determines the final device state of the electronic device. Based on this state, it makes a decision to control the screen to turn on, triggering the screen management module to initiate the screen turn-on process.

[0123] The sensor service can be used to report received gesture events and Hall events to the device status management server.

[0124] The hardware abstraction layer is an interface layer located between the kernel layer and the hardware layer (not shown). Its purpose is to abstract the hardware and provide a virtual hardware platform for the operating system.

[0125] The hardware abstraction layer may include sensor interface services, inter-core communication module A, etc.

[0126] The sensor interface service can be used to register various sensors and receive data from each sensor after registration. For example, the sensor interface service may include a posture sensor interface and a Hall sensor interface. The posture sensor interface can be used to manage registered posture sensors, receive posture events uploaded by the posture sensor, and send the posture events to the sensor service. The Hall sensor interface can be used to manage registered Hall sensors, receive Hall events uploaded by the Hall sensor, and send the Hall events to the sensor service.

[0127] The inter-core communication module A can be used to manage the communication between the application subsystem and the system control subsystem, allowing the system control subsystem and the application subsystem to transmit data to each other, such as receiving gesture events and Hall events transmitted by the system control subsystem.

[0128] The cooperation framework layer in the system control subsystem may include an event distribution manager, a sensor client manager, an inter-core communication module B, and the like.

[0129] The event distribution manager can be used to receive data uploaded by the core layer and distribute it to other modules registered with it. For example, the event distribution manager can be used to receive gesture events reported by a gesture sensor and then transmit these gesture events to the sensor client manager. The event distribution manager can also be used to receive Hall events reported by a Hall sensor and then transmit these Hall events to the sensor client manager.

[0130] The sensor client manager can be used to register with the event distribution manager and obtain data uploaded by the event distribution manager, such as gesture events and Hall events.

[0131] Inter-core communication module B can be used to manage communication between the application subsystem and the system control subsystem, enabling data transmission between the system control subsystem and the application subsystem. For example, inter-core communication module B can be used to receive gesture events, Hall effect events, and other data transmitted by the sensor client manager and transmit these gesture event and Hall effect events to inter-core communication module A.

[0132] The sensor driver can be used to start sensors, such as gesture sensors, Hall sensors, etc. After starting, the gesture sensor can obtain gesture events and report the gesture events. For example, the first frame gesture event is reported to the event distribution manager. Subsequently, if the current frame gesture event is different from the previous frame gesture event, the current frame gesture event can also be reported to the event distribution manager. After starting, the Hall sensor can obtain Hall events and report the Hall events. For example, the first frame Hall event is reported to the event distribution manager. Subsequently, if the current frame Hall event is different from the previous frame Hall event, the current frame Hall event can also be reported to the event distribution manager.

[0133] In some possible cases, the gesture sensor and the Hall sensor may report data further including: the gesture sensor and the Hall sensor may transmit the gesture event and the Hall event, respectively, through the transmission path of steps 1 to 4 in FIG5 (i.e., the path indicated by white circles 1 to 4), and report the gesture event and the Hall event to the device state management server. Then, the device state management server executes step 5 (white circle 5 in the figure): based on the gesture event and the Hall event, the final device state of the electronic device is determined, and then a decision is made to control the screen to turn on based on the device state, triggering the screen management module to start the screen turn on process.

[0134] It should be understood that FIG5 shows an exemplary software block diagram of an electronic device and should not constitute a limitation on the embodiments of the present application. For example, the position of each module (such as the level to which it belongs) may be different in actual applications. Here, the attitude sensor is used as an example for illustration. When the attitude sensor is a virtual sensor based on a software algorithm, the attitude sensor can run on the application subsystem side or on the system control subsystem side. Among them, the system control subsystem can also be referred to as a coprocessor subsystem.

[0135] In some possible embodiments (embodiment 1), the electronic device can determine the device form change of the electronic device through the Hall sensor and the posture sensor according to the preset rule 1 mentioned above, and then realize the reasonable screen lighting based on the device form. In this embodiment, the posture sensor is mainly used and the Hall sensor is auxiliary: except for the special case 1 mentioned above, in this embodiment, when the screen is not off (the inner screen is lit and / or the outer screen is lit), the device form of the electronic device is determined by the posture event reported by the posture sensor. When the screen is off (both the inner screen and the outer screen are off), the device form of the electronic device is determined by the posture event reported by the Hall sensor. Special case 1 includes: when the electronic device is unfolded when closed (the screen is off), when the electronic device is unfolded to the inner screen angle greater than or equal to the preset angle 5 (for example, 10°), the inner screen is lit based on the Hall sensor, and then the posture sensor is started, but when the first frame posture event reported by the posture sensor is a folded state, within the preset time T (for example, 1s), the electronic device does not process based on the first frame posture event. After the preset time T is reached, the device form of the electronic device is determined based on the posture event most recently reported by the posture sensor.

[0136] In this embodiment, the electronic device turns off the gesture sensor when the screen is off (both the inner and outer screens are off). The gesture sensor is turned on when the screen is on (the inner and / or outer screens are on). The electronic device turns on the Hall effect sensor after it is turned on.

[0137] For a detailed description of preset rule 1, please refer to the above content and will not be repeated here.

[0138] 6A-6D are schematic diagrams showing controlling the screen to be bright according to preset rule 1. FIG.

[0139] In Figures 6A-6D, the "fully expanded / half expanded" angle (e.g., 145°) can be considered as a preset angle 1. The "expanded / folded" angle (e.g., 40°) can be considered as a preset angle 2. The "folded / expanded" angle (e.g., 45°) can be considered as a preset angle 3. The "half expanded / fully expanded" angle (e.g., 150°) can be considered as a preset angle 4. The "approaching / farther-away" angle (e.g., 10°) can be considered as a preset angle 5. The "farther-away / approaching" angle (e.g., 5°) can be considered as a preset angle 6.

[0140] 6A to 6D , the following exemplary description of the contents related to controlling the screen to be lit in different situations in Example 1 is given. Specific descriptions are given based on the following situations.

[0141] Case 11: The initial state is closed and the screen is off, and the electronic device is unfolded when closed (screen off). The initial state of the electronic device being closed includes: before the electronic device is unfolded, the inner screen angle is less than the "approach-to-away" angle (for example, 10°), for example, the inner screen angle is close to or equal to 0°. Screen off means that both the inner and outer screens of the electronic device are turned off.

[0142] As shown in Figure 6A, in this situation 11, the initial state of the electronic device is the screen off, the posture sensor is not turned on, and therefore the posture sensor does not work. At this time, in the process of unfolding the electronic device, the first device form involved is determined based on the Hall sensor. For example, referring to the Hall working axis in Figure 6A, it can be seen that: in the process of unfolding the electronic device, when the inner screen angle is between 0° and the "approach-to-away" angle, the Hall sensor can obtain the device form of the electronic device (at this time, it is the approaching state).

[0143] Subsequently, the electronic device continues to unfold. When the inner screen angle reaches (is greater than or equal to) the "approach-to-away" angle (for example, the black triangle in the Hall effect axis), the Hall effect sensor can determine that the device configuration of the electronic device is in the away state and report the away state as a Hall effect event. The electronic device then maps the away state to the unfolded state, triggering the inner screen to light up and the outer screen to turn off. At this time, the electronic device can also turn on the gesture sensor. Referring to the gesture effect axis, the gesture sensor turns on after the inner screen angle reaches the "approach-to-away" angle. During the process of the inner screen angle being between the "approach-to-away" angle and the "fold-to-unfold" angle, the gesture event obtained by the gesture sensor is the folded state, which conflicts with the unfolded state mapped to the away state reported by the Hall effect sensor. Therefore, the angle between the inner screen angle and the "fold-to-unfold" angle can also be referred to as the conflict zone (conflict zone 1). When the electronic device is unfolded to the point where the inner screen angle is in conflict zone 1, if the gesture sensor reports a gesture event (gesture event A), and at this time, gesture event A is the folded state, the electronic device can not process based on gesture event A within a preset time T. After the preset time T is reached, the device state of the electronic device is determined based on the most recent gesture event reported by the gesture sensor. An exemplary position where the gesture sensor reports the gesture event A may be the white square in the gesture working axis.

[0144] The most recently reported gesture event may have several possible outcomes, and different outcomes may result in different ways for the electronic device to control the screen to light up. For details, please refer to the following description:

[0145] Result 11: The most recently reported gesture event is still gesture event A. The electronic device determines that the electronic device is in a folded state based on gesture event A, and can trigger the inner screen to turn off and the outer screen to light up. In this result 11, in the process of unfolding the electronic device, the electronic device triggers the inner screen to light up when the inner screen angle is unfolded to an angle greater than or equal to the "approach-to-away" angle (for example, 10°), and then switches to lighting up the outer screen when it is unfolded to the "fold-to-unfold" angle (for example, 45°). There is a possibility that it does not meet user expectations. The subsequent preset rule 2 can avoid the occurrence of this result 11. For details, please refer to the description of the relevant content below, which will not be repeated here.

[0146] Result 12: The most recently reported gesture event is not gesture event A, but may be other gesture events, and the other gesture events may be the unfolded state (including the semi-expanded state and the fully unfolded state). For example, when the inner screen angle is unfolded to a value greater than or equal to the "folded and unfolded" angle (for example, 45°), the other gesture events reported by the gesture sensor may be the semi-expanded state. An exemplary position for reporting one of the other gesture events may be the black triangle in the gesture working axis. For another example, when the inner screen angle is unfolded to a value greater than or equal to the "semi-expanded and fully unfolded" angle (for example, 150°), the other gesture events reported by the gesture sensor may be the fully unfolded state. An exemplary position for reporting one of the other gesture events may be the white triangle in the gesture working axis. In this result 12, in the process of unfolding the electronic device, after the electronic device triggers the inner screen to light up when the inner screen angle is unfolded to a value greater than or equal to the "approaching and moving away" angle (for example, 10°), it will not trigger the switch to the outer screen to light up while continuing to unfold the electronic device, which meets user expectations.

[0147] Regarding the process involved in controlling the screen of the electronic device to light up in situation 11, please refer to the following description of Figure 7, which will not be repeated here.

[0148] Case 12: The initial state is closed (not off), and the electronic device is unfolded when closed (not off). The initial state of the electronic device is closed, which includes: before the electronic device is unfolded, the inner screen angle is less than the "approach-to-away" angle (for example, 10°), for example, the inner screen angle is close to 0° or equal to 0°. Non-off screen means that at least one of the inner screen and the outer screen of the electronic device is lit.

[0149] As shown in Figure 6B, in case 12, the initial state of the electronic device is not off, then the posture sensor is turned on, and the device form of the electronic device is determined by the posture event reported by the posture sensor. When the posture sensor is turned on, the electronic device does not process based on the Hall event reported by the Hall sensor (so the Hall working axis in Figure 6B is represented by a dotted line). At this time, referring to the posture working axis, when the electronic device is unfolded, when the inner screen angle is unfolded to be greater than or equal to the "folded and unfolded" angle (for example, 45°), the posture sensor can report a frame of semi-expanded state, and the electronic device turns on the inner screen and turns off the outer screen based on the semi-expanded state. One exemplary position for reporting the semi-expanded state can be the black triangle in the posture working axis. Subsequently, when the electronic device continues to unfold, when the inner screen angle is unfolded to be greater than or equal to the "half-expanded and fully expanded" angle (for example, 150°), the posture sensor can report a frame of fully expanded state, and the electronic device keeps the inner screen lit and the outer screen off based on the fully expanded state. One exemplary position for reporting the fully expanded state can be the white triangle in the posture working axis.

[0150] Regarding the process involved in controlling the screen of the electronic device to light up in situation 12, please refer to the following description of Figure 8 and will not be repeated here.

[0151] Case 13: The initial state is unfolded (not off), and the electronic device is closed when unfolded (not off). The initial state of the electronic device is unfolded, which includes: before the electronic device is closed, the device shape of the electronic device is unfolded, which is generally greater than the "unfolding and folding" angle. For example, when the inner screen angle is 180° or close to 180 degrees, it can be unfolded. Non-off screen means that at least one of the inner screen and the outer screen of the electronic device is lit.

[0152] As shown in FIG6C , in case 13, the initial state of the electronic device is not off, then the posture sensor is turned on, and the device state of the electronic device is determined by the posture event reported by the posture sensor. When the posture sensor is turned on, the electronic device does not process based on the Hall event reported by the Hall sensor (so the Hall working axis in FIG6C is represented by a dotted line). At this time, referring to the posture working axis, when the electronic device is closed, when the inner screen angle is closed to less than or equal to the "fully extended and half extended" angle (for example, 145°), the posture sensor can report a frame of half-extended state, and the electronic device determines that the electronic device is still in the extended state based on the half-extended state. One exemplary position for reporting the fully extended state can be the black triangle in the posture working axis. Subsequently, when the electronic device continues to be closed, when the inner screen angle is closed to less than or equal to the "extended and folded" angle (for example, 40°), the posture sensor can report a frame of folded state, and the electronic device turns off the inner screen and lights up the outer screen based on the folded state. One exemplary position for reporting the folded state can be the white triangle in the posture working axis.

[0153] It should be understood that, referring to Figures 6B and 6C, the "folded-unfolded" angle (e.g., 45°) and the "unfolded-unfolded" angle (e.g., 40°) should be as close as possible, and the difference between the two is usually no more than 10°, for example, 5°. This ensures that when the electronic device is unfolded when the screen is not off or closed when the screen is not off, the electronic device can obtain the same device form at the close inner screen angle through the posture sensor, which facilitates the implementation of other functions.

[0154] Case 14: The initial state is unfolded (screen off), and the electronic device is closed when unfolded (screen off). The initial state of the electronic device is unfolded, which includes: before the electronic device is closed, the device shape of the electronic device is in the unfolded state, generally greater than 45 degrees. For example, when the inner screen angle is 180 degrees or close to 180 degrees, it can be in the unfolded state. Screen off means that both the inner and outer screens of the electronic device are turned off.

[0155] As shown in Figure 6D, in case 14, the initial state of the electronic device is off, and the posture sensor is not turned on, so the posture sensor does not work. Therefore, in the process of closing the electronic device, the first device state involved is determined based on the Hall sensor. For example, referring to the Hall operating axis in Figure 6D, it can be seen that: when the inner screen angle is between 180° and the "away-to-approach" angle, the Hall sensor can obtain the device state of the electronic device (at this time, it is away), but does not report the away state. When the electronic device is subsequently closed to the inner screen angle less than or equal to the "away-to-approach" angle, the Hall sensor can obtain the device state of the electronic device (at this time, it is approaching) and report the approaching state. The electronic device then maps the approaching state into a folded state, keeping the inner and outer screens off. When both the inner and outer screens are off, the electronic device can turn on the screen in response to an operation to turn on the screen. And after the screen is turned on, the posture sensor is turned on. Among them, the operation to turn on the screen includes operations on the power button, unlocking operations, etc.

[0156] In other possible cases, in case 14, when the inner screen angle is closed to an angle less than or equal to the "away-to-approach" angle (for example, 5°), the Hall sensor reports a Hall event. At this time, the Hall event is in the approaching state. After the electronic device maps the approaching state into the folding state, it can also trigger the outer screen to light up and keep the inner screen off. In addition, the electronic device can also turn on the posture sensor. After the posture sensor is turned on, the position of the first frame posture event reported can be the position of the white square in the figure. The first frame posture event is the folding state, which is the same as the device state after folding the approaching state reported by the Hall sensor. The electronic device keeps the inner screen off and the outer screen lit. Among them, the position where the Hall sensor reports the folding state can be the position of the black triangle in the figure.

[0157] FIG7 shows the interaction process between various modules when the electronic device controls the screen to light up in situation 11.

[0158] The following describes in detail the process of controlling the screen to light up when the electronic device is initially closed (screen off) and unfolded, using Figure 7. The main modules involved in this process include the Hall sensor, attitude sensor, sensor service, device state management server, and screen management module. For more information about this process, refer to the description of steps S11 to S21b below.

[0159] S11. The Hall sensor obtains a Hall event, which includes one of the device states, such as the approach state and the distance state. When a change in the device state is detected, the Hall event is reported to the sensor service. Among them, the approach state can be mapped to the folded state, and the distance state can be mapped to the unfolded state.

[0160] S12. When the inner screen angle expands from angle A0 (close to 0°) to the "close to away" angle (for example, 10°), the Hall sensor determines that the device state is away and reports the away state as a Hall event to the sensor service.

[0161] S13. Report the Hall event to the device state management server, so that the device state management server determines that the device state is the expanded state.

[0162] S14a. The device status management server notifies the screen management module to control the lighting of the internal screen.

[0163] Thus, as shown in FIG6A , when the electronic device is unfolded to the "approach-to-cut-away" angle (e.g., 10°), the screen management module can control the inner screen to light up through modules such as the power management server and the window management server, while the outer screen remains off. The position of the "approach-to-cut-away" angle (e.g., 10°) can be referenced to the position of the black triangle in the Hall effect axis.

[0164] S14b. The device state management server initiates a request to register the posture sensor to the sensor service.

[0165] It should be understood that steps S14a and S14b may be operations initiated after the device state management server determines that the device state is the expanded state. There is no particular order in which steps S14a and S14b are executed. Generally speaking, they can be executed concurrently.

[0166] S15. The sensor server notifies the gesture sensor to start.

[0167] S16. The posture sensor obtains a posture event, which includes one of the device states such as folded state, semi-expanded state, and fully expanded state. When a change in the device state is detected, the posture event is reported to the sensor service.

[0168] S17. When the inner screen angle is expanded from angle A1 (between 10°-45°) to the "folded and expanded" angle (for example, 45°), the posture sensor determines that the device is in a semi-expanded state and reports the semi-expanded state as a posture event to the sensor service.

[0169] S18. The sensor service reports the gesture event to the device status management server.

[0170] S19. The device status management server determines whether the gesture event is the first frame gesture event uploaded.

[0171] The gesture event being a first-frame gesture event indicates that the gesture event is the first-frame gesture event acquired after the gesture sensor is turned on.

[0172] In the case that the gesture event is not the first frame gesture event uploaded, the following step S20a is executed.

[0173] In the case that the gesture event is the first frame gesture event uploaded, the following step S20b is executed.

[0174] S20a. The device status management server notifies the screen management module to control the screen to light up based on the gesture event.

[0175] When the gesture event is in the folding state, the device state management server can control the screen switching: triggering the inner screen to go out and the outer screen to light up. An example of this situation can refer to the aforementioned description of result 11: at this time, the gesture event is in the folding state and is a first-frame gesture event, which means that the user unfolds the electronic device slowly, so after the inner screen lights up, it triggers the inner screen to go out and the outer screen to light up. Another example of this situation includes: after the user unfolds the electronic device to the point where the angle between the inner screen and the outer screen is greater than or equal to the "folding-to-unfolding" angle (for example, 45°), the user begins to close the electronic device to the point where the angle between the inner screen and the outer screen is less than or equal to the "unfolding-to-folding" angle (for example, 40°).

[0176] If the gesture event is in the expanded state, it means that the events reported by the gesture sensor and the Hall sensor do not conflict. The device state management server can not process the gesture event and continue to keep the inner screen lit and the outer screen off. For this situation, please refer to the description of result 12 above.

[0177] S20b. The device state management server determines whether the gesture event is a folded state.

[0178] When the gesture event is not the folding state, the following step S21a is executed.

[0179] When the gesture event is the folding state, the following step S21b is executed.

[0180] S21a. The device state management server does not process the gesture event.

[0181] If the gesture event is in the expanded state, it means that the events reported by the gesture sensor and the Hall sensor do not conflict. The device state management server can not process the gesture event and continue to keep the inner screen lit and the outer screen off. For this situation, please refer to the description of result 12 above.

[0182] S21b. The device status management server does not process the gesture event A within the preset time T. After the preset time T is reached, it determines whether the most recently received gesture event is a folded state.

[0183] If the most recently received gesture event is not the folding state, step S21a is executed.

[0184] When the most recently received gesture event is the folding state, step S20a is executed.

[0185] FIG8 shows the interaction process between various modules when the electronic device controls the screen to light up in situation 12.

[0186] The following is a detailed description of the process of controlling the screen to light up when the electronic device is unfolded when the initial state is closed (not off) in conjunction with Figure 8. The main modules involved in this process include a posture sensor, a sensor service, a device status management server, and a screen management module. Among them, steps S30a, S31a, S32a, and S33a are placed in a dotted box, indicating that when the screen is not off, the posture sensor is turned on. Although the Hall sensor will report a Hall event, the device status management server will not process it based on the Hall event. This process can refer to the following description of steps S30a-S33b.

[0187] S30a. The Hall sensor obtains a Hall event, which includes one of the device states, such as the approach state and the distance state. When a change in the device state is detected, the Hall event is reported to the sensor service.

[0188] S31a. When the inner screen angle expands from angle A0 (close to 0°) to the "close to away" angle (for example, 10°), the Hall sensor determines that the device state is away and reports the away state as a Hall event to the sensor service.

[0189] S32a. Report the Hall event to the device status management server.

[0190] S33a. When the attitude sensor is activated, no processing is performed based on the Hall event.

[0191] S30b. The posture sensor obtains a posture event, which includes one of the device states such as folded state, semi-expanded state, and fully expanded state. When a change in the device state is detected, the posture event is reported to the sensor service.

[0192] It should be understood that there is no particular order in which step S30b and step S30a are executed.

[0193] S31b. When the inner screen angle is expanded from angle A1 (close to 0°) to the "folded and expanded" angle (for example, 45°), the posture sensor determines that the device is in the expanded state and reports the expanded state as a posture event to the sensor service.

[0194] S32b. Report the gesture event to the device state management server, so that the device state management server determines that the device state is the expanded state.

[0195] S33b. Notify the screen management module to control screen switching so that the inner screen is lit and the outer screen is turned off.

[0196] It should be understood that when the electronic device controls the screen to light up in situation 13, the interaction process between the modules is similar to the interaction process between the modules when the electronic device controls the screen to light up in situation 12. The difference is that the timing of the attitude sensor reporting the attitude event is different. Please refer to the aforementioned description of the relevant content in Figure 8, which will not be repeated here. When the electronic device controls the screen to light up in situation 14, the interaction process between the modules is similar to the interaction process between the modules when the electronic device controls the screen to light up in situation 12. The difference is that when the screen is off, the attitude sensor is not turned on, and the content about the attitude sensor is not involved. In situation 14, the device form can be determined based on the Hall event reported by the Hall sensor. For other similarities, please refer to the aforementioned description of the relevant content in Figure 8, which will not be repeated here.

[0197] In some other possible embodiments (embodiment 2), the electronic device can determine the change in the device form of the electronic device through the Hall sensor and the posture sensor according to the preset rule 2, and then realize the reasonable screen lighting based on the device form. In this embodiment, the posture sensor and the Hall sensor are not divided into primary and secondary, and are equally important: except for the special case 2 mentioned above, in this embodiment, when the posture sensor reports a posture event, the electronic device can determine the device form of the electronic device based on the posture event, and control the screen lighting based on the device form. When the Hall sensor reports a Hall event, the electronic device can determine the device form of the electronic device based on the Hall event, and control the screen lighting based on the device form. Special case 2 includes: when the electronic device is unfolded when closed (screen off), when the electronic device is unfolded to an angle greater than or equal to a preset angle of 5 (for example, 10°), the inner screen is lit based on the Hall sensor, and then the posture sensor is started, but when the first frame posture event obtained by the posture sensor is a folded state, the posture event may not be reported, so that the electronic device can keep the inner screen lit and the outer screen off. Alternatively, when the first-frame posture event is in a folded state and it is determined that the inner screen angle is less than a preset angle of 7 (for example, 4°), the posture event can be reported. In this way, the electronic device can correct the outer screen to light up and the inner screen to turn off when the Hall sensor falsely reports a distant state (actually an approaching state).

[0198] In this embodiment, the electronic device turns off the gesture sensor when the screen is off (both the inner and outer screens are off). The gesture sensor is turned on when the screen is on (the inner and / or outer screens are on). The electronic device turns on the Hall effect sensor after it is turned on.

[0199] For a detailed description of preset rule 2, please refer to the above content and will not be repeated here.

[0200] FIG. 9A and FIG. 9B are schematic diagrams showing how to control the screen to be bright according to preset rule 2. FIG.

[0201] In Figures 9A and 9B, the "fully expanded / half expanded" angle (e.g., 145°) can be considered as a preset angle 1. The "expanded / folded angle + supplementary angle 2" (e.g., 60°) can be considered as a preset angle 2. The "folded / expanded angle + supplementary angle 1" (e.g., 65°) can be considered as a preset angle 3. The "half expanded / fully expanded" angle (e.g., 150°) can be considered as a preset angle 4. The "approaching / farther-away" angle (e.g., 10°) can be considered as a preset angle 5. The "farther-away / approaching" angle (e.g., 5°) can be considered as a preset angle 6.

[0202] The "folding / unfolding angle + supplementary angle 1" is the sum of the "folding / unfolding" angle and supplementary angle 1 involved in the aforementioned embodiment 1. The "unfolding / folding angle + supplementary angle 2" is the sum of the "unfolding / folding" angle and supplementary angle 2 involved in the aforementioned embodiment 1. Supplementary angles 1 and 2 can be angles greater than 0, such as 20° or 30°, and can be adjusted according to actual needs, and are not limited in this embodiment of the present application.

[0203] It should be understood here that the preset angle 3 involved in Example 2 is larger than the preset angle 3 involved in Example 1 (the difference is a supplementary angle 1). The reason is that in Example 1, since the away state reported by the Hall sensor will be ignored when the screen is not turned off, it is necessary to continue to unfold to the "folding and unfolding" angle (for example, 45°) before the inner screen can be triggered to light up and the outer screen can be turned off based on the semi-expanded state reported by the posture sensor. Therefore, the "folding and unfolding" angle should not be too large, otherwise it will affect the rationality of the screen turning on when the electronic device is unfolded when closed. At the same time, the "folding and unfolding" angle should not be too small, otherwise it will affect the rationality of the screen turning on when the electronic device is closed when unfolded (not turned off). Because in the process of closing the electronic device when unfolding (not turning off the screen), the inner screen can be triggered to turn off and the outer screen can be lit only when the angle between the closing electronic device and the inner screen reaches the "expanding and folding" angle (for example, 40°). The "folding and unfolding" angle (for example, 45°) and the "folding and unfolding" angle (for example, 40°) should be as close as possible, so as to ensure that when the electronic device is unfolded when the screen is not turned off and when the electronic device is closed when the screen is not turned off, the electronic device can obtain the same device form at the close inner screen angle through the posture sensor, which is convenient for the implementation of other functions. Therefore, the "folding and unfolding" angle can be taken to be about 45°. However, in this embodiment 2, when the electronic device is closed and the screen is not turned off, and then unfolded, when the electronic device is unfolded to the inner screen angle reaching the "close-to-away" angle (for example, 10°), the inner screen can be triggered to light up and the outer screen can be turned off based on the away state reported by the Hall sensor in embodiment 2. There is no need to trigger the inner screen to light up and the outer screen to turn off based on the semi-expanded state reported by the posture sensor. Therefore, the preset angle 3 ("folding and unfolding angle + supplementary angle 1") in this embodiment 2 can be set to be larger than the preset angle 3 ("folding and unfolding" angle) of embodiment 1. Since the preset angle 2 and the preset angle 3 should be as close as possible, the preset angle 2 in Example 2 can also be larger than the preset angle 2 in Example 1 (e.g., the "unfolding and folding" angle). For example, the preset angle 2 in Example 2 can be set to "unfolding and folding angle + supplementary angle 2". The supplementary angle 2 is close in size to the supplementary angle 1. Generally speaking, the supplementary angle 2 can be the same as the supplementary angle 1. The supplementary angle 1 can be an angle greater than 0, such as 20°, 30°, etc., which is not limited in the present embodiment.

[0204] 9A and 9B , the following exemplary description of the contents related to controlling the screen to be brightened in different situations in Example 2 is given.

[0205] Case 21: The initial state is closed (screen off or not), and the electronic device is unfolded when closed (screen off or not). The initial state of the electronic device is closed, which includes: before the electronic device is unfolded, the inner screen angle is less than the "approaching cut-off" angle (for example, 10°), for example, the inner screen angle is close to 0° or equal to 0°. Regardless of the state of the screen when closed, when the electronic device is unfolded, the inner screen can be turned on and the outer screen can be turned off when the inner screen angle reaches the "approaching cut-off" angle (for example, 10°).

[0206] It should be understood that the initial state is closed (screen off or not), and when the electronic device is unfolded until the inner screen angle reaches the "close to cut away" angle (for example, 10 degrees), the inner screen is lit and the outer screen is off. The content involved includes but is not limited to some or all of the following:

[0207] Content 11: When the initial state is closed and both the inner and outer screens are off, when the electronic device is unfolded to the point where the angle between the inner screen and the screen reaches the "approaching and cutting away" angle (for example, 10°), the inner screen is triggered to light up and the outer screen remains off.

[0208] Content 12: When the initial state is closed, and the inner screen is off and the outer screen is on, when the electronic device is unfolded and the angle between the inner screen and the inner screen reaches the "approach-to-away" angle (for example, 10°), the inner screen is triggered to light up and the outer screen is turned off.

[0209] Content 13: When the initial state is closed, and the inner screen is on and the outer screen is off, when the electronic device is unfolded to the point where the angle between the inner screen and the screen reaches the "approach-to-away" angle (for example, 10°), the inner screen remains on and the outer screen remains off.

[0210] Content 14: When the initial state is closed and both the inner and outer screens are illuminated, when the electronic device is unfolded until the angle between the inner screen and the outer screen reaches the "approaching and separating" angle (for example, 10°), the inner screen remains illuminated, triggering the outer screen to turn off. In some embodiments, the inner screen turns off when closed.

[0211] As shown in Figure 9A, the initial state of the electronic device is closed (screen off or not). Regardless of whether the posture sensor is not working when the screen is off or is working when the screen is not off, when the electronic device is unfolded to the inner screen, the angle reaches the "approaching and away" angle (for example, 10°), the electronic device can map the away state reported by the Hall sensor to the unfolded state, so that the inner screen is lit and the outer screen is off.

[0212] Referring to the Hall working axis of Figure 9A, it can be seen that: in the process of unfolding the electronic device when the screen is off or not, when the inner screen angle is between 0° and the "approaching and cutting away" angle, the Hall sensor can obtain the device form of the electronic device (at this time it is the approaching state). Subsequently, the electronic device continues to be unfolded. When the inner screen angle reaches (greater than or equal to) the "approaching and cutting away" angle (for example, the black triangle in the Hall working axis), the Hall sensor can determine that the device form of the electronic device is the away state, and report the away state as a Hall event. The electronic device maps the Hall event (away state) into an unfolded state, triggering the inner screen to light up and keeping the outer screen off. Among them, an exemplary position where the Hall sensor reports the Hall event (away state) can be the black triangle in the Hall working axis. At this time, if the initial state is closed and the screen is off, the inner screen is triggered to light up, and the outer screen is kept off, and the attitude sensor can also be turned on. Referring to the attitude working axis, the attitude sensor is turned on after the inner screen angle reaches the "approaching and cutting away" angle. In the process of the inner screen angle being in the "approach and distance" angle to the "folding and unfolding angle + supplementary angle 1", the posture event obtained by the posture sensor is the folding state, which is inconsistent with the unfolding state mapped by the distance state reported by the Hall sensor. Therefore, the angle between the inner screen angle of "approach and distance" and "folding and unfolding angle + supplementary angle 1" can also be called the conflict area (conflict area 2). When the electronic device is unfolded to the point where the inner screen angle is in conflict area 2, the posture sensor can obtain the first frame posture event (gesture event B).

[0213] At this time, if the gesture event B is in a semi-expanded state or an expanded state, the gesture sensor may report the gesture event B. The electronic device may not process the gesture event B (semi-expanded state or expanded state), and still keep the inner screen lit and the outer screen off. Among them, an exemplary position for the gesture sensor to report the semi-expanded state may be the black triangle in the gesture working axis. An exemplary position for the gesture sensor to report the fully expanded state may be the white triangle in the gesture working axis, for example, when the inner screen angle is expanded to the "semi-expanded to fully expanded" angle.

[0214] If the gesture event B is the folded state, it conflicts with the unfolded state mapped to the distance state reported by the Hall sensor. The electronic device may handle the conflict in the manners 1 and 2 mentioned above.

[0215] Method 1: After the posture sensor determines that the posture event B is a folded state, the posture event B may not be reported, and the electronic device may not control the screen to light up based on the posture event B. The inner screen remains lit and the outer screen is off. For a detailed description of Method 1, please refer to the above description of Method 1 and will not be repeated here. Among them, an exemplary position where the posture sensor obtains the posture event B but does not report it can be the white square in the posture working axis.

[0216] Method 2: After the posture sensor determines that the posture event B is a folded state, if it is determined that the inner screen angle in the folded state is less than a preset angle 7 (for example, 4°), the posture sensor can report the posture event B. The electronic device can determine that the device form of the electronic device is a folded state based on the posture event B, triggering the inner screen to turn off and the outer screen to light up. For a detailed description of Method 2, please refer to the above description of Method 2 and will not be repeated here.

[0217] Subsequently, the gesture sensor can continue to acquire gesture events (e.g., the gesture event of the second frame) and report the gesture events acquired subsequently. Furthermore, the Hall effect sensor can also report Hall effect events. The electronic device controls the screen to light up based on the reported events (gesture events or Hall effect events).

[0218] Regarding the process involved in controlling the screen of the electronic device to light up in situation 21, please refer to the following description of Figure 10 and will not be repeated here.

[0219] Case 22: The initial state is unfolded (not screen off), and the electronic device is closed when unfolded (not screen off). The initial state of the electronic device is unfolded, which includes: before the electronic device is closed, the device form of the electronic device is unfolded, which is generally greater than the "unfolding angle + supplementary angle 2". For example, the inner screen angle is 180° or close to 180°, which means that the device form of the electronic device can be unfolded. Non-screen off means that at least one of the inner screen and the outer screen of the electronic device is lit.

[0220] As shown in Figure 9B, in case 22, the initial state of the electronic device is not off, and the posture sensor is turned on. In the process of closing the electronic device, when the inner screen angle is closed from a value greater than the "full expansion and half expansion" angle, such as 180°, to a value less than or equal to the "full expansion and half expansion" angle (for example, 145°), the posture sensor reports a posture event. At this time, the posture event is a semi-expanded state. The position where the posture sensor reports the semi-expanded state can be such as the white triangle in the posture working axis.

[0221] Subsequently, when the inner screen angle closes from the "fully unfolded and half unfolded" angle (e.g., 145°) to less than or equal to the "unfolded and folded angle + supplementary angle 2" (e.g., 60°), the attitude sensor reports an attitude event. At this time, the attitude event is a folded state, and the electronic device turns off the inner screen and lights up the outer screen based on the folded state. The position where the attitude sensor reports the folded state can be the black triangle in the attitude working axis.

[0222] It should be understood that the initial state is unfolded (not off), and when the electronic device is closed to the inner screen angle of "less than or equal to the "unfolding angle + supplementary angle 2" (for example, 60°), the inner screen is turned off and the outer screen is turned on. The content involved includes but is not limited to part or all of the following:

[0223] Content 21: When the initial state is unfolded, and the inner screen is off and the outer screen is on, when it is closed to "less than or equal to "unfolding angle + supplementary angle 2" (for example, 60°), the inner screen remains off and the outer screen remains on.

[0224] Content 22: When the initial state is unfolded, and the inner screen is on and the outer screen is off, when it is closed to "less than or equal to "unfolding angle + supplementary angle 2" (for example, 60°), the inner screen is triggered to turn off and the outer screen is lit.

[0225] Content 23: When the initial state is unfolded, and the inner screen and outer screen are lit, when they are closed to "less than or equal to "unfolding angle + supplementary angle 2" (for example, 60°), the inner screen is triggered to turn off and the outer screen remains lit.

[0226] Subsequently, when the inner screen angle is closed from the "unfolding angle + supplementary angle 2" (for example, 60°) to less than or equal to the "far-away-approaching" angle (for example, 5°), the Hall sensor reports a Hall event. At this time, the Hall event is an approaching state, and the electronic device maps the approaching state into a folding state, which is the same as the folding state reported by the posture sensor. The electronic device does not process the Hall event, and continues to keep the inner screen off and the outer screen lit. Among them, the position where the Hall sensor reports the folding state can be such as the white triangle in the Hall working axis.

[0227] In this case 22, when the electronic device is closed when unfolded (not turned off), compared with the aforementioned implementation 1, in this case, the electronic device can trigger the inner screen to turn off and the outer screen to light up earlier.

[0228] Regarding the process involved in controlling the screen of the electronic device to light up in situation 22, please refer to the following description of Figure 11 and will not be repeated here.

[0229] Case 23: The initial state is unfolded (screen off), and the electronic device is closed when unfolded (screen off). At this time, the posture sensor does not work when the screen is off. Therefore, in the process of closing the electronic device, the first device form involved is determined based on the Hall sensor. When the inner screen angle is closed to less than or equal to the "away-to-approach" angle (for example, 5°), the Hall sensor reports a Hall event. At this time, the Hall event is an approaching state, and the electronic device maps the approaching state into a folded state, keeping the inner and outer screens off. The schematic diagram of the operation of the Hall sensor and the posture sensor in Case 23 is similar to the aforementioned Figure 6D. You can refer to the aforementioned description of Figure 6D and replace the "unfolding-to-folding" angle with the "unfolding-to-folding angle + supplementary angle 2". We will not go into details here.

[0230] In other possible cases, such as situation 23, when the inner screen angle is closed to a value less than or equal to the "away-to-approach" angle (e.g., 5°), the Hall sensor reports a Hall event. In this case, the Hall event is a proximity state, and the electronic device can map the proximity state to a folded state, and can also trigger the outer screen to light up while keeping the inner screen off.

[0231] FIG10 shows the interaction process between various modules when the electronic device controls the screen to light up in situation 21.

[0232] The following describes in detail the process of controlling the screen to light up when the electronic device is unfolded, with reference to Figures 9A and 10, when the initial state is closed (screen off or not). The main modules involved in this process include the Hall sensor, attitude sensor, sensor service, device status management server, and screen management module. This process can be referred to the description of steps S101 to S113 below.

[0233] S101. The Hall sensor obtains a Hall event, which includes one of the device states, such as the approach state and the distance state. When a change in the device state is detected, the Hall event is reported to the sensor service. The approach state can be mapped to the folded state, and the distance state can be mapped to the unfolded state.

[0234] Referring to the Hall working axis in the aforementioned Figure 9A, when the electronic device is unfolded when closed (screen off or not), when the inner screen angle is between 0° and the "approaching and cutting away" angle (for example, 10°), the Hall event obtained by the Hall sensor is the approaching state. The approaching state can be mapped into a folded state. When the inner screen angle is greater than or equal to the "approaching and cutting away" angle, the Hall event obtained by the Hall sensor is the away state. The away state can be mapped into an unfolded state. Among them, the unfolded state can be a semi-expanded state or a fully unfolded state, which is not limited in the embodiments of the present application.

[0235] S102. When the inner screen angle expands from angle A0 (close to 0°) to the "close to away" angle (for example, 10°), the Hall sensor determines that the device state is away and reports the away state as a Hall event to the sensor service.

[0236] In step S102 , an exemplary position where the Hall sensor reports a Hall event (away state) may be the black triangle in the Hall operating axis shown in FIG9A .

[0237] S103 . Report the Hall event to the device state management server, so that the device state management server determines that the device state is the expanded state.

[0238] The device state management server may map the Hall event (away state) into an expanded state.

[0239] S104: Check whether the external screen is off.

[0240] When the outer screen is lit (not turned off), the device status management server may execute the following step S105a to turn off the outer screen and turn on the inner screen.

[0241] When the outer screen is off, the device status management server may execute the following step S105b to light up the inner screen while the outer screen remains off.

[0242] S105a. Notify the screen management module to switch the screen so that the inner screen is lit and the outer screen is turned off.

[0243] In some possible implementations, the screen management module may utilize the power management server to power on the inner screen and power off the outer screen so that the outer screen is turned off.

[0244] The window management server may draw display content, and after the inner screen is powered on, display the display content on the inner screen so that the inner screen is lit.

[0245] S105b. Notify the screen management module to control the lighting of the inner screen.

[0246] In some possible implementations, the screen management module may utilize a power management server to power on the internal screen.

[0247] The window management server may draw display content, and after the inner screen is powered on, display the display content on the inner screen so that the inner screen is lit.

[0248] It should be understood here that when the screen is off, the posture sensor is not turned on. After the device status management server determines that the device state is in the unfolded state, the posture sensor can be triggered to turn on.

[0249] S105c. The device state management server initiates a request to the sensor service to register the gesture sensor. After registering the gesture sensor, the device state management server can obtain gesture events reported by the gesture sensor if the gesture sensor is enabled. Step S105c is executed at the same time as steps S105a and S105b.

[0250] S106. The sensor server notifies the gesture sensor to start.

[0251] S107. The posture sensor determines a posture event based on the inner screen angle α, where the posture event includes one of the device states such as folded state, semi-expanded state, and fully expanded state.

[0252] Refer to the posture working axis in Figure 9A above. When the electronic device is unfolded when closed (screen off or not), when the inner screen angle is between 0° and "folding and unfolding angle + supplementary angle 1", the posture event obtained by the posture sensor is a folded state. When the inner screen angle is between "folding and unfolding angle + supplementary angle 1" and "half-expanded and fully unfolded" angles, the posture event obtained by the posture sensor is a semi-expanded state. When the inner screen angle is between "half-expanded and fully unfolded" angles and 180°, the posture event obtained by the posture sensor is a fully unfolded state.

[0253] S108. The gesture sensor determines whether the gesture event is the first frame gesture event uploaded by the gesture sensor.

[0254] When it is determined that the gesture event is a first-frame gesture event, in order to handle the situation where the first-frame gesture event is a folded state, which conflicts with the unfolded state mapped by the away state reported by the Hall sensor, the following step S109b can be executed, or step S109b and step S110 can be executed to determine whether to report the folded state.

[0255] When it is determined that the gesture event is not a first-frame gesture event, the following step S109a may be executed.

[0256] S109a. When the posture event changes compared to the previous frame, the posture sensor reports the posture event to the sensor service.

[0257] It should be understood here that the timing for the posture sensor to report a posture event includes: when the posture event is the first frame, it can be reported after condition 1 is met, that is, the first frame posture event has changed compared to the previous frame by default. Alternatively, a non-first frame posture event can be reported when it changes compared to the previous frame, and it will not be reported if there is no change. Among them, condition 1 includes: the first frame posture event is not in a folded state, or the posture sensor determines that the inner screen angle is less than a threshold angle. For the description of the threshold angle, please refer to the description of the threshold angle in step S110 below, which will not be repeated here.

[0258] S109b. The posture sensor determines whether the first frame posture event is a folding state.

[0259] When it is determined that the first-frame gesture event is not the folding state, the gesture sensor may execute the following step S109a to report the first-frame gesture event.

[0260] When it is determined that the first-frame posture event is in the folded state, in some possible cases, the posture sensor may execute the following step S110 to further determine whether the inner screen angle is less than the threshold angle, which is the preset angle 7 mentioned above, for example, it can be taken as 4°. When the inner screen angle is greater than the threshold angle, execute step S109a to report the first-frame posture event. When the inner screen angle is greater than the threshold angle, execute step S111 and do not report the first-frame posture event. In other possible cases, the posture sensor may not execute the following step S110 and directly execute the following step S111. Do not report the first-frame posture event.

[0261] S110. The attitude sensor determines whether the inner screen angle α is less than a threshold angle.

[0262] The threshold angle is the aforementioned preset angle 7, which can be, for example, 4°. For the description of the preset angle 7, please refer to the above content and will not be repeated here.

[0263] When the posture sensor determines that the inner screen angle α is less than the threshold angle, the following step S109a may be executed to report the first frame posture event to the sensor service.

[0264] When the posture sensor determines that the inner screen angle α is greater than the threshold angle, the following step S111 is executed, and the first frame posture event may not be reported to the sensor service, so that the inner screen remains on and the outer screen remains off.

[0265] S111. The gesture sensor does not report the first-frame gesture event to the sensor service, so that the inner screen remains on and the outer screen remains off.

[0266] S112. The gesture sensor reports the gesture event to the device status management server.

[0267] S113. When the gesture event is the folding state, the device state management server controls the screen switching through the screen management module, so that the inner screen is turned off and the outer screen is turned on.

[0268] The gesture event in step S113 can be divided into the following types of results for description.

[0269] Result 21: When the posture event is in the folding state and is the first-frame posture event, it means that the Hall sensor fails at this time, and the false alarm is now in the away state (actually the approaching state, the user may not expect to unfold the electronic device). Executing step S113 can correct the false alarm of the Hall sensor based on the posture sensor, so that the electronic device triggers the inner screen to turn off and the outer screen to light up.

[0270] Result 22: If the gesture event is in the folded state and is not the first-frame gesture event, this indicates that the user has unfolded the electronic device until the inner screen angle is greater than or equal to "the unfolding-folding angle + the supplementary angle 2" and then reclosed the electronic device. This causes the electronic device to transition from the unfolded state to the folded state. At this point, the electronic device can trigger the inner screen to turn off and the outer screen to turn on.

[0271] What should be understood here is that when the posture event is not a folded state, it can be a semi-expanded state or a fully expanded state, which is consistent with the expanded state mapped by the away state reported by the Hall sensor. The device status management server may not process the expanded state, keep the inner screen lit, and keep the outer screen off.

[0272] FIG11 shows the interaction process between various modules when the electronic device controls the screen to light up in situation 22.

[0273] The following describes in detail the process of controlling the screen to light up when the electronic device is closed, with the initial state being expanded (not off), in conjunction with Figures 9B and 11. The main modules involved in this process include the Hall sensor, attitude sensor, sensor service, device state management server, and screen management module. For details on this process, refer to the description of steps S201 to S205 below.

[0274] S201. The Hall sensor obtains a Hall event, which includes one of the device states such as the approach state and the distance state. When a change in the device state is detected, the Hall event is reported to the sensor service. Among them, the approach state can be mapped to the folded state, and the distance state can be mapped to the unfolded state.

[0275] Referring to the Hall working axis in Figure 9B, when the electronic device is closed when unfolded (not screen off), when the inner screen angle is between 180° and the "away-from-approach" angle (for example, 5°), the Hall event obtained by the Hall sensor is a away state. The away state can be mapped to the unfolded state. When the inner screen angle is less than or equal to the "away-from-approach" angle, the Hall event obtained by the Hall sensor is an approaching state. The approaching state can be mapped to a folded state. Among them, the unfolded state can be a semi-expanded state or a fully unfolded state, which is not limited in the embodiments of the present application.

[0276] It should be understood that although the Hall sensor can work, when the electronic device is closed when unfolded (not off), what the device status management server receives is the folded state of the posture sensor when the inner screen angle is closed to the "unfolding and folding angle + supplementary angle 2" (for example, 60°). That is, when the inner screen angle is closed to the "unfolding and folding angle + supplementary angle 2" (for example, 60°), the device status management server can trigger the inner screen to turn off and the outer screen to light up. In the case that the posture sensor is damaged or fails due to damage to the device on which the posture sensor depends, the device status management server can trigger the inner screen to turn off and the outer screen to light up when the inner screen angle is closed to the "away and approaching" angle (for example, 5°) based on the Hall sensor. Among them, regarding the process of the device status management server triggering the inner screen to turn off and the outer screen to light up based on the posture sensor, please refer to the following description of steps S202-step S205.

[0277] S202. The posture sensor obtains a posture event, which includes one of the device states such as folded state, semi-expanded state, and fully expanded state. When a change in the device state is detected, the posture event is reported to the sensor service.

[0278] Refer to the posture working axis in the aforementioned Figure 9B. When the electronic device is closed when unfolded (not screen off), when the inner screen angle is between 180° and the "full unfolded and half unfolded" (for example, 145°), the posture event obtained by the posture sensor is the fully unfolded state. When the inner screen angle is between the "full unfolded and half unfolded" angle and the "unfolded and folded angle + supplementary angle 2" (for example, 60°), the posture event obtained by the posture sensor is the semi-expanded state. When the inner screen angle is between the "unfolded and folded angle + supplementary angle 2" and 0°, the posture event obtained by the posture sensor is the folded state.

[0279] It should be understood that the timing for the gesture sensor to report a gesture event includes: reporting when the gesture event is the first frame, or reporting when a gesture event in a non-first frame changes compared to the previous frame, and not reporting if there is no change.

[0280] S203. When the inner screen angle is folded from angle A3 (less than 180° and greater than 60°) to "unfolding and folding angle + supplementary angle 2" (for example, 60°), the posture sensor determines that the device is in a folded state and reports the folded state as a posture event to the sensor service.

[0281] In step S203 , an exemplary position where the posture sensor reports the posture event (folded state) may be the black triangle in the posture working axis shown in FIG9B .

[0282] S204. Report the gesture event to the device state management server, so that the device state management server determines that the device state is the folded state.

[0283] S205. Notify the screen management module to control screen switching so that the inner screen turns off and the outer screen turns on.

[0284] In some possible implementations, the screen management module may utilize the power management server to power on the external screen and power off the internal screen so that the internal screen is turned off.

[0285] The window management server may draw display content, and after the external screen is powered on, display the display content on the external screen so that the external screen is lit.

[0286] It should be understood that the interaction process between the various modules when the electronic device controls the screen to turn on in scenario 23 is similar to the interaction process between the various modules when the electronic device controls the screen to turn on in scenario 22. The difference is that the posture sensor is not enabled, and the Hall events reported by the Hall sensor are used to determine the device state. Please refer to the previous description of the relevant content in Figure 11, and will not be repeated here.

[0287] It should be understood that the scenarios involved in this application for reasonably lighting the screen of an electronic device when it is unfolded or closed may include the aforementioned scenarios 1 and 2. Scenario 1 corresponds to the content described in scenario 11 of Example 1 and scenario 21 of Example 2. Scenario 2 corresponds to the content described in scenario 13 of Example 1 and scenario 22 of Example 2.

[0288] In addition to scenario 1 and scenario 2, scenarios in which the screen of the electronic device is properly lit when it is unfolded or closed may also include other scenarios, such as scenario 3 to scenario 6 described below. Scenario 3 to scenario 6 may be implemented in embodiment 2.

[0289] Scenario 3: The initial state of the electronic device is closed, and both the inner screen and the outer screen are off, and the electronic device is unfolded. When the electronic device unfolds the inner screen to an angle greater than or equal to the "approach and distance" angle (for example, 10°), the Hall sensor reports that the device state is the distance state, and the electronic device maps the distance state to the unfolded state, triggering the inner screen to light up, the outer screen to turn off, and turning on the posture sensor. Subsequently, after continuing to unfold the electronic device to an angle between the "approach and distance" angle and the "folding and unfolding angle + supplementary angle 1" (for example, 65°), the unfolding is stopped, and the electronic device is not closed. The electronic device can always keep the inner screen on and the outer screen off. The inner screen will not be triggered to turn off and the outer screen will not be lit after the preset time T (for example, 1s). Because in Example 2, when the first frame posture event uploaded by the posture sensor is the folded state and the inner screen angle is greater than the preset angle 7 (for example, 4°), the electronic device will not obtain the first frame posture event reported by the posture sensor. Therefore, the electronic device can continue to light up the inner screen and turn off the outer screen based on the distance state reported by the Hall sensor.

[0290] Scenario 4: The initial state of the electronic device is closed, and both the inner screen and the outer screen are off. When the electronic device is unfolded, the Hall sensor reports that the device is in the away state. The electronic device maps the away state into the unfolded state, triggering the inner screen to light up, keeping the outer screen off, and turning on the gesture sensor. Subsequently, the electronic device continues to unfold. At time A, when the inner screen angle is greater than or equal to the "folding and unfolding angle + supplementary angle 1", the gesture sensor reports that the device is in the unfolded state. The electronic device keeps the inner screen on and turns off the outer screen. At time B, the electronic device stops unfolding and is closed until the inner screen angle is less than or equal to the "unfolding and folding angle + supplementary angle 2" (for example, 60°). Based on the gesture sensor, the electronic device determines that the device is in the folded state, triggering the inner screen to turn off and the outer screen to light up. The time difference between time A and time B can be less than the preset time T. Because in Example 2, the non-first frame gesture event acquired by the gesture sensor can be reported when it is different from the previous frame gesture event, and is not subject to the constraint of reporting after the preset time T (involved in Example 1).

[0291] Scenario 5: The initial state of the electronic device is closed (for example, the inner screen angle is equal to 0° or close to 0°), and whether the screen is turned off or not, the electronic device is unfolded. When the electronic device unfolds the inner screen angle to a value greater than or equal to the "approaching-distancing" angle, the Hall sensor reports that the device state is the distance state. The electronic device maps the distance state to the unfolded state, triggering the inner screen to light up, keeping the outer screen off, and turning on the gesture sensor. Subsequently, the electronic device continues to unfold. When the inner screen angle is greater than or equal to the "approaching-distancing" angle (for example, 10°) and less than the "folding-unfolding angle + supplementary angle 1" (for example, 65°), the electronic device keeps the inner screen on and the outer screen off. Subsequently, the electronic device stops unfolding and starts to close. At time C, when the electronic device is closed to a value less than or equal to the "distancing-approaching" angle (for example, 5°), the electronic device determines that the device state is the approach state based on the Hall sensor. The electronic device maps the approach state to the folded state, triggering the inner screen to turn off and the outer screen to light up. Scenario 5 can be realized in Example 2, but cannot be realized in Example 1. The reason is that in Example 1, when the screen is not off, the posture sensor is turned on, and the electronic device does not process based on the Hall event reported by the Hall sensor. Therefore, at time C, when the angle between the closed electronic device and the inner screen is less than or equal to the "away-to-approach" angle (for example, 5°), the Hall sensor detects the approaching state and reports the approaching state, but the electronic device does not process based on the approaching state, so it cannot trigger the inner screen to turn off and the outer screen to light up. Among them, when the initial state of the electronic device is closed and the screen is off, the reason why Scenario 5 cannot be realized in Example 1 also includes that the posture event reported by the posture sensor will not be processed by the electronic device until after time T.

[0292] Scenario 6: The initial state of the electronic device is unfolded (for example, the inner screen angle is equal to 180° or close to 180°), and, in the case where the screen is not turned off, when the electronic device is closed to the point where the inner screen angle is less than the "unfolding and folding angle + supplementary angle 2" (for example, 60°) and greater than the "unfolding and folding angle" (for example, 40°), the posture sensor determines that the device is in a folded state at this time, and the electronic device keeps the inner screen off and the outer screen lit. At this time, at time D, the electronic device stops closing and then starts to unfold. When the inner screen angle is unfolded to be greater than or equal to the "folding and unfolding angle + supplementary angle 1" (for example, 65°), the posture sensor determines that the device has changed to a semi-expanded state, and the electronic device initially triggers the inner screen to light up and the outer screen to turn off based on the semi-expanded state. This scenario 6 can be realized in Example 2, but cannot be realized in Example 1. The reason is that in Example 1, when the electronic device stops closing at time D, because the inner screen angle is greater than the "unfolding and folding angle" (for example, 40°) and less than the "unfolding and folding angle + supplementary angle 2" (for example, 60°), in Example 1, it is determined that the device form of the electronic device at this time is a semi-unfolded state rather than a folded state. After this moment D, when the electronic device is unfolded to a value greater than or equal to the "folding and unfolding angle + supplementary angle 1" (for example, 65°), it is still in a semi-unfolded state. Since the device form has not changed, the posture sensor will not report the semi-unfolded state. Therefore, the electronic device cannot determine that it is in a folded state based on the posture sensor, and the inner screen continues to be lit and the outer screen is off. It cannot switch to the outer screen being lit and the inner screen being off.

[0293] In some possible embodiments, the Hall sensor may not be used, and the screen may be controlled based on the posture sensor. When the initial state of the electronic device is closed (screen off or not), during the process of unfolding the electronic device, when the inner screen angle is greater than or equal to the preset angle 3 (for example, the aforementioned "folding and unfolding angle" or "folding and unfolding angle + supplementary angle 1"), the posture sensor can determine that the device form of the electronic device is updated from the folded state to the unfolded state (semi-expanded state or fully unfolded state), and the electronic device can be in a state where the inner screen is lit and the outer screen is off. When the initial state of the electronic device is unfolded (screen off or not), during the process of closing the electronic device, when the inner screen angle is greater than or equal to the preset angle 2 (for example, the aforementioned "expanding and folding angle" or "expanding and folding angle + supplementary angle 2"), the posture sensor can determine that the device form of the electronic device is updated from the unfolded state to the folded state, and the electronic device can be in a state where the inner screen is off and the outer screen is lit.

[0294] It should be understood that the unfolding electronic device involved in the embodiments of the present application can indicate that the electronic device is unfolded under user operation. It can also indicate that the electronic device is unfolded until the inner screen angle is at a certain angle. The closing electronic device involved in the embodiments of the present application can indicate that the electronic device is closed under user operation. It can also indicate that the electronic device is closed until the inner screen angle is at a certain angle.

[0295] The following first introduces an exemplary electronic device provided by an embodiment of the present application.

[0296] FIG12 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0297] The following embodiments are described in detail using an electronic device as an example. It should be understood that the electronic device may have more or fewer components than shown in the figures, may combine two or more components, or may have different component configurations. The various components shown in the figures may be implemented in hardware, including one or more signal processing and / or application-specific integrated circuits, software, or a combination of hardware and software.

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

[0299] It is understood that the structures illustrated in the embodiments of the present application do not constitute specific limitations on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0300] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0301] The controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals based on instruction operation codes and timing signals to complete the control of instruction fetching and execution.

[0302] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0303] In some embodiments, the processor 110 may include one or more interfaces, such as an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, and the like.

[0304] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only for illustrative purposes and does not constitute a structural limitation on the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0305] The charging management module 140 is configured to receive charging input from a charger.

[0306] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to provide power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160.

[0307] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.

[0308] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.

[0309] The mobile communication module 150 can provide wireless communication solutions including 2G / 3G / 4G / 5G applied in electronic devices.

[0310] A modem processor may include a modulator and a demodulator.

[0311] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), etc. applied to electronic devices.

[0312] In some embodiments, antenna 1 of the electronic device is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that the electronic device can communicate with a network and other devices via wireless communication technologies. The wireless communication technologies may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), etc.

[0313] The electronic device implements display functions through a GPU, a display screen 194, and an application processor.

[0314] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display panel can also be made of an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniLED, a microLED, a micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1. The electronic device in the embodiment of the present application includes display screens on two different sides. One of the two display screens can be called an inner screen, and the other display screen can be called an outer screen. The inner screen can be a display screen with folding and unfolding functions. When the electronic device is folded, the inner screen is also folded. When the electronic device is unfolded, the inner screen is also unfolded.

[0315] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

[0316] Non-volatile memory may include disk storage devices and flash memory.

[0317] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle, and can be divided into single-level cell (SLC), etc. according to the potential level of the storage cell.

[0318] The electronic device can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0319] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device. In some embodiments, the angular velocity of the electronic device around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device's shake, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shake of the electronic device through reverse motion to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.

[0320] The magnetic sensor 180D includes a Hall sensor. The electronic device can use the magnetic sensor 180D to detect the opening and closing of a flip case. In some embodiments, when the electronic device is a flip phone, the electronic device can detect the opening and closing of the flip cover based on the magnetic sensor 180D. Based on the detected opening and closing status of the case or flip cover, features such as automatic unlocking of the flip cover can be configured.

[0321] In some possible cases, the Hall effect sensor can be directly implemented based on a physical Hall effect, or a virtual Hall effect sensor implemented based on a magnetometer, and there is no restriction here. The Hall effect event reported by the Hall effect sensor is an onchange event.

[0322] The accelerometer 180E can detect the magnitude of an electronic device's acceleration in all directions (generally three axes). When the electronic device is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.

[0323] In some possible cases, the electronic device may also include a posture sensor (not shown in the figure). This posture sensor can be a physical sensor. It can also be a virtual posture sensor implemented using a fusion algorithm by combining sensor data such as angle and acceleration, or combining virtual angle sensor data. The posture sensor can provide richer and more accurate posture data, such as folded state, semi-expanded state, fully expanded state, and notebook state. The posture event reported by the posture sensor is an onchange event.

[0324] In the embodiment of the present application, the processor 110 can call the computer instructions stored in the internal memory 121 to enable the terminal to execute the method for controlling the screen to be lit in the embodiment of the present application.

[0325] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0326] As used in the above embodiments, the term “when…” may be interpreted to mean “if…” or “after…” or “in response to determining…” or “in response to detecting…”, depending on the context. Similarly, the phrases “upon determining…” or “if (stated condition or event) is detected” may be interpreted to mean “if determining…” or “in response to determining…” or “upon detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.

[0327] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk).

[0328] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A method for controlling a bright screen, characterized in that: Applicable to an electronic device with a foldable screen, the electronic device includes an inner screen and an outer screen, the inner screen is foldable to form a first screen and a second screen, the method includes: When the initial state of the electronic device is closed and the inner screen and the outer screen are both off, when the electronic device is unfolded to the point where the first angle is greater than or equal to the first angle, the electronic device lights up the inner screen and keeps the outer screen off; the first angle is the angle between the first screen and the second screen, and when the initial state of the electronic device is closed, the first angle increases during the process of unfolding the electronic device; when the initial state of the electronic device is unfolded, the first angle decreases during the process of closing the electronic device; When the electronic device is initially closed and at least one of the inner screen and the outer screen is on, and the electronic device is unfolded to a point where the first angle is greater than or equal to the first angle, the inner screen of the electronic device is on and the outer screen is off; When the initial state of the electronic device is unfolded and at least one of the inner screen and the outer screen is lit, and the electronic device is closed so that the first angle is less than or equal to the second angle, the electronic device is in a state where the outer screen is lit and the inner screen is off; wherein the second angle is greater than the first angle.

2. The method according to claim 1, characterized in that When the inner screen is off and the outer screen is on, after the electronic device is unfolded to the point where the first angle is greater than or equal to the first angle, the electronic device further includes: The electronic device lights up the inner screen and turns off the outer screen.

3. The method according to claim 1 or 2, characterized in that When both the inner screen and the outer screen are lit, after the electronic device is unfolded to the point where the first angle is greater than or equal to the first angle, the electronic device further includes: The electronic device turns off the external screen.

4. The method according to any one of claims 1 to 3, characterized in that When the inner screen and the outer screen are both lit, after the electronic device is closed until the first angle is less than or equal to a second angle, the electronic device further includes: The electronic device turns off the inner screen and keeps the outer screen off.

5. The method according to any one of claims 1 to 3, characterized in that When the inner screen is on and the outer screen is off, after the electronic device is closed until the first angle is less than or equal to a second angle, the electronic device further includes: The electronic device turns off the inner screen and lights up the outer screen.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: When the first angle is greater than or equal to the first angle and is less than the third angle, and the electronic device is in a state where the inner screen is on and the outer screen is off, when the electronic device is closed to a state where the first angle is less than or equal to a fourth angle, the electronic device turns off the inner screen and lights up the outer screen; the fourth angle is less than the first angle.

7. The method according to any one of claims 1 to 6, characterized in that When both the inner screen and the outer screen are off, the electronic device is unfolded to a point where the first angle is greater than or equal to the third angle at a first moment, and the electronic device lights up the inner screen while keeping the outer screen off, the method further includes: When the electronic device is closed so that the first angle is smaller than the second angle at a second moment, the electronic device turns off the inner screen and turns on the outer screen; the second moment is later than the first moment.

8. The method according to claim 7, characterized in that The time difference between the second moment and the first moment is less than or equal to a preset duration.

9. The method according to any one of claims 5 to 8, characterized in that The first state of the first sensor of the electronic device includes that the first angle is less than or equal to the first angle, and the second state of the first angle includes that the first angle is greater than the first angle and less than the second angle; the first state of the second sensor of the electronic device includes that the first angle is less than the second angle; when at least one of the inner screen and the outer screen is turned on, the electronic device activates the second sensor; When the electronic device is initially closed, the inner screen is off, and the outer screen is on, after the electronic device is unfolded to a first angle greater than or equal to the first angle, the electronic device lights up the inner screen and turns off the outer screen, specifically including: When the electronic device is unfolded to the point where the first included angle of the inner screen is greater than or equal to the first angle, and when the electronic device determines, based on the first sensor, that the device form of the electronic device has changed from the first form to the second form, the electronic device lights up the inner screen and turns off the outer screen; wherein the second form is different from the first form; the first form is used to indicate that the electronic device is folded, and the second form is used to indicate that the electronic device is unfolded; The electronic device is initially in an unfolded state, and when the inner screen is on and the outer screen is off, after the electronic device is closed until the first angle is less than or equal to a second angle, the electronic device turns off the inner screen and turns on the outer screen, specifically including: When the electronic device is unfolded to the point where the first angle of the inner screen is less than or equal to the second angle, and the electronic device determines based on the second sensor that the device form of the electronic device is the first form, the electronic device turns off the inner screen and lights up the outer screen.

10. The method according to claim 9, characterized in that The electronic device is initially in a closed state, and when the first angle is less than a first angle and both the inner screen and the outer screen are off, the electronic device is unfolded until the first angle is greater than or equal to the first angle, and the electronic device lights up the inner screen and keeps the outer screen off, specifically including: When the electronic device is unfolded to a point where the first angle is greater than or equal to the first angle, and the electronic device determines, based on the first sensor, that the device form of the electronic device has changed from the first form to the second form, the electronic device lights up the inner screen and keeps the outer screen off; after the electronic device lights up the inner screen and keeps the outer screen off, the method further includes: The electronic device turns on the second sensor; The second sensor acquires a first event, where the first event is used to indicate a device form of the electronic device; When the second sensor determines that the first event is not a first-frame event, or when the first event is a first-frame event and the first event indicates that the device form of the electronic device is the second form, the electronic device turns off the inner screen and turns on the outer screen; When the second sensor determines that the first event is a first-frame event and the first event indicates that the device form of the electronic device is the first form, the electronic device keeps the inner screen lit and turns off the outer screen.

11. The method according to claim 10, characterized in that When the second sensor determines that the first event is not a first-frame event, or when the first event is a first-frame event and the first event indicates that the device form of the electronic device is the second form, the electronic device turns off the inner screen and turns on the outer screen, specifically including: When the second sensor determines that the first event is a first-frame event, the first event indicates that the device form of the electronic device is the first form, and the first angle is less than a fifth angle, the electronic device turns off the inner screen and turns on the outer screen; When the second sensor determines that the first event is a first-frame event and the first event indicates that the device form of the electronic device is the first form, not processing the first event specifically includes: The second sensor determines that the first event is a first-frame event, and the first event indicates that the device form of the electronic device is the first form, and when the first angle is greater than the fifth angle, the electronic device keeps the inner screen lit and the outer screen off.

12. The method according to any one of claims 9 to 11, characterized in that The method further comprises: When the first angle is greater than or equal to the first angle and is less than the third angle, and the electronic device is in a state where the inner screen is on and the outer screen is off, when the electronic device is closed to the state where the first angle is less than or equal to the fourth angle, and the electronic device determines based on the first sensor that the device form of the electronic device has changed from the second form to the first form, the electronic device turns off the inner screen and lights up the outer screen.

13. The method according to any one of claims 1 to 12, characterized in that The first sensor is a Hall sensor, and the second sensor is a posture sensor.

14. A computer storage medium, characterized in that The storage medium stores a computer program, wherein the computer program includes executable instructions. When the executable instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 13.

15. An electronic device, characterized in that: The electronic device includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method as described in any one of claims 1 to 13.

16. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the processor is used to call computer instructions to enable the electronic device to execute the method as described in any one of claims 1 to 13.