Screen state control method, system and equipment and storage medium
By implementing the screen status control method on the terminal device, the screen brightness is automatically adjusted according to the unused time, the user's need for the continuous lighting time of the screen is solved, extending the screen life and improving the user experience.
Patent Information
- Application Number
- CN202311459497.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-02
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2043-11-02
AI Technical Summary
In different scenarios, users have requirements for the duration of lighting the terminal device screen, but the existing technology is difficult to effectively meet this demand, resulting in users needing to frequently light up the screen, reducing user experience and efficiency.
A screen state control method is provided. Through the power management service and the state determination module, for terminal devices in the target screen-rest mode, if the duration of not being used is not less than the preset time, the screen brightness will be reduced, and if it is used again, the brightness will be restored.
It achieves the ability to meet users' demand for the screen to be on, while extending the screen life and improving the user experience and efficiency of terminal devices during use.
Smart Images

Figure CN119992999A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of device control, and in particular to a screen state control method, system, device and storage medium. Background Art
[0002] In order to ensure the user experience, when users use terminal devices such as smartphones, tablet computers or laptops in different scenarios, they often have certain requirements on the duration that the screen remains on.
[0003] For example, in a computerized exam scenario, the monitoring teacher and students need to use the computer continuously to complete the monitoring and exam. If the computer screen is lit for a short time, the teacher and students will need to frequently light up the computer screen, which will reduce the computer exam experience.
[0004] For example, in a truck loading scenario, the truck driver often needs to perform related operations on the terminal device during the loading process, such as using the terminal device to report the loading progress in real time. At this time, if the terminal device screen is lit for a short time, the driver also needs to light up the screen frequently, but this will obviously reduce the loading efficiency.
[0005] Based on this, how to make the duration of the terminal device screen lighting meet user needs has become an urgent problem to be solved. Summary of the invention
[0006] In view of this, embodiments of the present invention provide a screen state control method, system, device and storage medium, so as to make the duration of lighting up the screen of a terminal device meet user needs.
[0007] In a first aspect, an embodiment of the present invention provides a screen state control method, comprising:
[0008] For a terminal device in the target non-screen-off mode, if the duration for which the terminal device has not been used is not less than a first preset duration, reducing the screen brightness of the terminal device;
[0009] If the terminal device is used after the screen brightness is reduced, the screen brightness of the terminal device is restored.
[0010] In a second aspect, an embodiment of the present invention provides a screen state control system, which is deployed in a terminal device and includes: a power management service and a state determination module;
[0011] The state determination module is used to determine, for the terminal device in the target non-screen-off mode, whether the terminal device is used and the duration for which the terminal device is not used;
[0012] The power management service is used to reduce the screen brightness of the terminal device if the terminal device has not been used for a continuous period of time that is not less than a first preset period of time; if the terminal device is used after the screen brightness is reduced, restore the screen brightness of the terminal device.
[0013] In a third aspect, an embodiment of the present invention provides a screen state control device, comprising:
[0014] The brightness reduction module is used to reduce the screen brightness of a terminal device in a target non-screen-off mode if the continuous time for which the terminal device has not been used is not less than a first preset time.
[0015] A brightness recovery module is used to restore the screen brightness of the terminal device if the terminal device is used after reducing the screen brightness.
[0016] In a fourth aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the screen state control method in the first aspect. The electronic device may also include a communication interface for communicating with other devices or communication systems.
[0017] In a fifth aspect, an embodiment of the present invention provides a non-temporary machine-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor can at least implement the screen status control method as described in the first aspect above.
[0018] In the screen state control method provided by the embodiment of the present invention, for a terminal device in the target non-off screen mode, if the terminal device has not been used for a continuous period of time not less than a preset period of time, the screen brightness of the terminal device will be reduced. Afterwards, if the terminal device is detected to be used again, the screen brightness of the terminal device can be restored so that the user can use the terminal device normally.
[0019] For a terminal device in the target non-off screen mode, it indicates that the user has a demand for the duration of the screen lighting of the terminal device, indicating that the user does not want to frequently light up the terminal device during the use of the terminal device. The use of the above control method can ensure that the screen of the terminal device is in a lit state during use, thereby meeting the needs of users. On the other hand, since the reduction in the brightness of the terminal device screen is performed when the terminal device is not in use, the reduction in the screen brightness will not affect the user's use, and the screen life can be extended while meeting the user's demand for constant lighting. And the above method is actually a non-off screen mode in which the screen brightness changes. Compared with mechanically keeping the screen on at the same brightness, the adjustment of the screen brightness can extend the life of the screen. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 A flowchart of a screen state control method provided by an embodiment of the present invention;
[0022] Figure 2 A schematic diagram of a non-off screen mode setting provided by an embodiment of the present invention;
[0023] Figure 3 A flowchart of another screen state control method provided by an embodiment of the present invention;
[0024] Figure 4 A flow chart of an interface detection method provided by an embodiment of the present invention;
[0025] Figure 5 A schematic diagram of the structure of a mobile phone provided by an embodiment of the present invention;
[0026] Figure 6 A schematic diagram of the structure of a screen status control system provided by an embodiment of the present invention;
[0027] Figure 7 A schematic diagram of the structure of another screen status control system provided by an embodiment of the present invention;
[0028] Figure 8 A software structure diagram of a mobile phone provided by an embodiment of the present invention;
[0029] Fig. 9 A schematic diagram of the structure of a screen state control device provided by an embodiment of the present invention;
[0030] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0032] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two, but does not exclude the inclusion of at least one.
[0033] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0034] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to identifying", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is identified" may be interpreted as "when determining" or "in response to determining" or "when identifying (stated condition or event)" or "in response to identifying (stated condition or event)", depending on the context.
[0035] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0036] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a product or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such a product or system. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the product or system including the elements.
[0037] Before describing in detail the methods and systems provided by the embodiments of the present invention, the concepts involved in the following embodiments of the present invention may also be described:
[0038] The screen on / off modes provided by the terminal device include two categories, namely, the first category mode and the second category mode.
[0039] Among them, in the first type of mode, the duration of the terminal device screen lighting is short, such as 30 seconds, 1 minute, 2 minutes, 5 minutes, etc. Among them, each duration of screen lighting can be considered as a screen-off mode. That is, the first type of mode contains at least one screen-off mode. When the terminal device is in this type of mode, the user needs to frequently trigger the lighting operation of the terminal device screen if he wants to keep the screen lit.
[0040] Among them, in the second type of mode, the duration of the terminal device screen lighting is longer, such as 1 hour, 2 hours, permanent, etc. Among them, each duration of screen lighting can be considered as a non-off screen mode. That is, the second type of mode contains at least one non-off screen mode. When the terminal device is in this type of mode, the user can achieve a longer screen lighting even if the terminal device screen does not frequently trigger the lighting operation.
[0041] The screen status of the terminal device includes normal lighting, screen dimming, screen lock and screen off. Among them, when the terminal device is in the screen lock state, the terminal device enters the sleep state, and the terminal device's always-on display (AOD) function and the terminal device's background programs can run normally. When the terminal device is in the screen off state, the terminal device enters the sleep state, and the terminal device's AOD and background programs will not run.
[0042] In addition, before describing in detail the methods and systems provided by the embodiments of the present invention, the application background of the following embodiments of the present invention may also be described:
[0043] Following the description in the background technology, for example, in a computerized test scenario, users have certain requirements for the duration of the terminal device screen being lit. In addition, in scenarios where users copy or imitate images or texts displayed on the terminal device, or in scenarios where it is inconvenient for users to operate the terminal device, such as rescue operations or truck loading, users also have certain requirements for the duration of keeping the screen lit.
[0044] In scenarios including but not limited to the above-mentioned ones where there are requirements for the duration of screen lighting, the methods and systems provided in the following embodiments of the present invention can be used to meet the user's needs for continuous screen lighting.
[0045] Based on the above description, some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and the features and steps in the embodiments can be combined with each other. In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.
[0046] Figure 1 The following is a flow chart of a screen state control method provided by an embodiment of the present invention. The screen state control method provided by an embodiment of the present invention can be executed by a terminal device used by a user. Figure 1 As shown, the method may include the following steps:
[0047] S101, for a terminal device in a target non-screen-off mode, if the duration for which the terminal device has not been used is not less than a first preset duration, the screen brightness of the terminal device is reduced.
[0048] For a terminal device in the target non-off screen mode, the terminal device can detect whether it is being used, and further calculate the duration of time it is not being used based on the detection result.
[0049] If the duration of non-use of the terminal device is not less than the first preset duration, indicating that the user has not triggered an operation on the terminal device for a long period of time, that is, the user has not paid attention to the interface displayed by the terminal device for a long time, then the terminal device can reduce its screen brightness. At this time, since the user has not paid attention to the interface displayed by the terminal device for a long time, even if the screen brightness is reduced, it will not affect the user's use. The reduction of the screen brightness can also improve the screen burn-in problem caused by the screen being lit at the same brightness for a long time, and can also extend the screen life.
[0050] Optionally, reducing the screen brightness may specifically include keeping the content displayed on the current screen unchanged and simply reducing the screen brightness, or may also include the terminal device using a screen saver and reducing the screen brightness. The screen saver may be a black screen saver or a picture stored in the terminal device or any preset style.
[0051] Optionally, the screen on / off mode of the terminal device can be selected by the user according to his / her own needs. The screen on / off mode can include at least one screen off mode and at least one non-screen off mode. Figure 2 A specific mode setting interface provided for a terminal device. The terminal device may also respond to a setting operation triggered by a user on the terminal device to display Figure 2 The mode setting interface shown in FIG. 1 is a mode setting interface. Further, the user can also trigger a selection operation in this mode setting interface. Then the terminal device can put itself in the selected target non-screen mode in response to this selection operation.
[0052] Figure 2 "10 seconds", "30 seconds", "1 minute" and "3 minutes" are multiple screen-off modes provided for terminal devices, and "N hours" and "Never" are multiple new non-screen-off modes provided for terminal devices, and different non-screen-off modes correspond to different screen-on time.
[0053] When the target screen-on mode selected by the user is "Never", since the target screen-on mode does not limit the length of time the screen is on, the terminal device can directly determine whether to reduce the screen brightness based on the length of time it has not been used.
[0054] When the target non-screen mode selected by the user is "N hours", the terminal device can count the duration of the terminal device screen being on while counting the duration of time it has not been used. If the lighting duration does not reach the screen lighting duration corresponding to the target non-screen mode, and the duration of time the terminal device has not been used is greater than the first preset duration, the terminal device can reduce its own screen brightness. If the lighting duration has reached the screen lighting duration corresponding to the target non-screen mode, the terminal device controls itself to lock the screen. Optionally, N hours can be set at the factory, such as specifically set to 1 hour, 2 hours, and so on.
[0055] Optionally, the interface displayed in the terminal device may be an interface displayed in response to a user operation and corresponding to the operation.
[0056] Optionally, the specific process of the terminal device detecting whether it is being used may be: detecting whether an interface displayed by the terminal device changes and whether a face is detected.
[0057] Specifically, if the terminal device detects that the interface displayed by itself has changed or the terminal device detects a face, it indicates that the interface displayed in the terminal device is being paid attention to by the user, and it can be determined that the terminal device is in use. If the terminal device detects that the interface displayed by itself has not changed and the terminal device has not detected a face, it can be determined that the terminal device is not in use.
[0058] For another case of step S101, if the duration of non-use of the terminal device is less than the first preset duration, indicating that the user triggers an operation on the terminal device, that is, indicating that the user is paying attention to the interface displayed by the terminal device, the brightness of the terminal device is kept unchanged.
[0059] S102: If the terminal device is used after the screen brightness is lowered, restore the screen brightness of the terminal device.
[0060] After the screen brightness is lowered, the terminal device can continue to detect whether it is in use. If it is detected that it is resumed, it indicates that the user has triggered an operation on the terminal device, indicating that the user has begun to pay attention to the content displayed on the terminal device, and the terminal device can further restore its screen brightness, and the user can use the terminal device normally.
[0061] Compared to a mechanical always-on mode, where the screen remains always on at the same brightness for a long time, the method provided in this embodiment is actually a non-off mode in which the screen brightness changes, which can extend the life of the screen.
[0062] In this embodiment, for a terminal device in the target non-off screen mode, if the terminal device calculates that the duration of non-use is not less than the preset duration, the screen brightness of the terminal device will be reduced. Afterwards, if the terminal device detects that the terminal device is being used by the user, the screen brightness of the terminal device can be restored, and the user can use the terminal device normally.
[0063] The above control method can be used to keep the screen of the terminal device lit while it is in use, thereby meeting the user's demand for the terminal device screen to be always on. On the other hand, in this embodiment, the screen brightness is reduced when the terminal device is not in use by the user. Therefore, lowering the screen brightness will not affect the user's demand for the screen to be always on, and it can also extend the life of the screen. And the above method is actually a non-off screen mode in which the screen brightness changes. Compared with mechanically keeping the screen always on at the same brightness, the adjustment of the screen brightness can extend the life of the screen.
[0064] In addition, the technical effect that can be achieved by the non-off screen mode with screen brightness change provided in the above embodiment can also be understood from the following aspects:
[0065] As described above, a common mode of not turning off the screen in practice is mechanical constant lighting, that is, the screen keeps the same brightness while the screen display remains unchanged. At this time, the bright and dark areas of the screen will also remain unchanged, making the long-lit areas of the screen, i.e. the bright areas, easily burned, i.e. screen burn-in.
[0066] In order to improve the above-mentioned screen burn-in problem, the bright and dark areas of the screen can be adjusted, that is, by increasing the current passing through the dark area of the screen to achieve gain compensation of the bright and dark areas of the screen, so that the bright and dark areas of the screen are displayed evenly. Although this compensation method can improve screen burn-in, it will increase the screen brightness after compensation, which in turn affects the screen life.
[0067] In the methods and systems provided in the above and following embodiments of the present solution, the screen brightness is dynamically adjusted by determining whether the terminal device is in use. This prevents the screen from being always on and the screen brightness from being increased. Therefore, while improving the screen burn-in problem, the screen life can also be extended.
[0068] exist Figure 1 In the illustrated embodiment, for a terminal device in the target non-screen-off mode, the terminal device can determine whether the continuous time for which it has not been used is greater than a first preset time, and determine whether to adjust the screen status, or more accurately, adjust the screen brightness, based on the determination result.
[0069] Optionally, in order to further ensure the accuracy of the screen status adjustment, the terminal device may further execute the following judgment process before executing the above judgment step, that is, before executing step S101, and execute step S101 when the conditions are met.
[0070] Step 1: Get the device status of the terminal device, and determine whether the terminal device is in a sleep state according to the device status. If it is in a sleep state, control the screen of the terminal device to turn off. If it is not in a sleep state, execute step 2.
[0071] The device state of the terminal device can be reflected by the variable wakefulness. When wakefulness == WAKEFULNESS_ASLEEP, it means that the terminal device is in a sleeping state.
[0072] Step 2: Get the logical value of the quiescent variable of the terminal device, and determine whether the terminal device is quietly restarting according to the logical value. If the terminal device is quietly restarting, control the screen of the terminal device to be off, and the terminal device enters a sleep state. If the terminal device is not quietly restarting, execute step 3.
[0073] Step 3: Determine whether the terminal device is in a dormant state according to the device state of the terminal device. If the terminal device is in a dormant state, execute step 4. If the terminal device is not in a dormant state, execute step 6.
[0074] Among them, when wakefulness == WAKEFULNESS_DOZING, it means that the terminal device is in a dormant state.
[0075] Step 4: Determine whether the terminal device holds the sleep lock WAKE_LOCK_DOZE. If the terminal device holds the sleep lock, the terminal device is controlled to lock the screen and the terminal device enters the sleep state. If the terminal device does not hold the sleep lock, execute step 5.
[0076] Step 5: Determine whether the terminal device enters the doze state after locking the screen according to the logic value of the dozeAfterScreenOff variable of the terminal device. If yes, control the terminal device to turn off the screen and enter the sleep state. If no, execute step 6.
[0077] Step 6: Determine whether the application running in the terminal device holds the screen lock WAKE_LOCK_SCREEN. If an application holds the screen lock, control the terminal device screen to light up normally. If no application holds the screen lock, execute step 7.
[0078] Step 7: Determine whether the terminal device has completed booting according to the logic value of the bootCompleted variable of the terminal device. If the booting is completed, execute step 8. If the booting is not completed, control the terminal device screen to light up normally.
[0079] Step 8: Determine whether the user has performed any operation on the terminal device according to the mUser Activity Summary variable of the terminal device. If the user has performed any operation on the terminal device, control the terminal device screen to light up normally. If the user has not performed any operation on the terminal device, execute step 9.
[0080] When mUser Activity Summary == User_Activity_SCREEN_BRIGHT, the user performs an operation on the terminal device.
[0081] Step 9: Determine whether the user triggers the operation of brightening the screen brightness of the terminal device according to the logic value of the screenBrightnessBoostInProgress variable of the terminal device. If the user generates the screen brightness adjustment operation, control the terminal device screen to light up normally. If the user does not generate the screen brightness adjustment operation, execute step 10.
[0082] Step 10: Determine whether the duration of the terminal device not being used is greater than a first preset duration. If the duration is greater than the first preset duration, reduce the screen brightness of the terminal device (i.e., execute step S101). If the duration is less than the first preset duration, control the terminal device screen to light up normally.
[0083] The above judgment process can also be combined with Figure 3 The flowchart shown is understood.
[0084] according to Figure 1 It can be seen from the description of the illustrated embodiment that whether the terminal device is used can be determined by detecting whether the interface displayed by the terminal device changes and whether a face is detected. In addition, the above embodiment does not limit the execution sequence of the two detections.
[0085] Alternatively, the detection of interface changes and face detection may be performed simultaneously.
[0086] Specifically, the terminal device may periodically perform face detection to obtain first detection results corresponding to different detection cycles. At the same time, the terminal device may also periodically detect whether the interface displayed by the terminal device has changed to obtain second detection results corresponding to different detection cycles. For the sake of simplicity in subsequent descriptions, the process of determining whether the interface displayed by the terminal device has changed may be referred to as interface detection. And interface detection and face detection may have the same or different detection cycles.
[0087] In this embodiment, the terminal device can accurately determine whether the terminal device is used by the user by performing interface detection and face detection simultaneously.
[0088] In practice, compared with face detection, interface detection consumes more computing resources of the terminal device. In order to save computing resources of the terminal device, another optional method is that face detection and interface detection can be performed asynchronously.
[0089] Specifically, the terminal device can periodically perform face detection to obtain first detection results corresponding to different detection cycles. Then, according to the first detection results corresponding to different detection cycles, the duration during which the terminal device fails to detect a face is counted. If the duration is not less than the second preset duration, it indicates that the user has not paid attention to the interface content displayed by the terminal device for some time. Although it can be considered with a high probability that the terminal device is not used by the user at this time, in order to more accurately determine whether the user is using the terminal device, after determining that the duration is not less than the second preset duration, the terminal device can further start interface detection. And face detection is also performed during the execution of interface detection. Among them, the second preset duration is less than Figure 1 The first preset duration mentioned in the illustrated embodiment. In practice, optionally, the second preset duration may be 30 minutes.
[0090] In this embodiment, the terminal device can determine whether to turn on interface detection based on the detection result of face detection, so compared with performing two detections at the same time, the duration of interface detection will be shortened, thereby saving computing resources of the terminal device.
[0091] Regardless of the execution sequence of the two detections, the terminal device can respectively count the first duration during which the terminal device does not detect a face, and the second duration during which the interface displayed by the terminal device does not change. Finally, the duration of the overlap between the two durations can be determined as the duration during which the terminal device is not used.
[0092] It should be noted here that when interface detection and face detection are performed asynchronously, the first duration may include a third duration during which no face is detected during the face detection process performed before the start of interface detection, and a fourth duration during which no face is detected during the face detection process performed after the start of interface detection.
[0093] In addition, the technical effects that can be achieved by using the two detections synchronously or asynchronously in the above two embodiments can also be understood in combination with the following contents:
[0094] Using any single detection method to determine whether a terminal device is in use can easily lead to misjudgment. For example, in practice, a user may operate a terminal device but his face is not facing the terminal device. In this case, if a single face detection method is used to determine whether the terminal device is in use, a misjudgment may occur. For another example, in a computer test scenario, a user may be thinking about the displayed questions in the interface without operating the terminal device. In this case, if a single interface detection method is used to determine whether the terminal device is in use, a misjudgment may also occur. In the above embodiments, the above-mentioned misjudgment problem can be improved by using multiple detection methods at the same time.
[0095] The above embodiments have described in detail the roles of face detection and interface detection in the screen state control process. On this basis, the interface detection process may be described in detail below.
[0096] Figure 4 Flow chart of an interface detection method provided by an embodiment of the present invention. Figure 4 As shown, the following steps may be included:
[0097] S201, determining the number of changed controls in the interface displayed by the terminal device by traversing the control tree corresponding to the interface displayed by the terminal device.
[0098] S202: Determine the size of a changed region of interest in the interface displayed by the terminal device by traversing a control tree corresponding to the interface displayed by the terminal device.
[0099] S203, if the number of controls that have changed in the interface displayed by the terminal device is greater than the preset number and the size of the area of interest that has changed in the interface displayed by the terminal device is greater than the preset size, a second detection result reflecting the change in the interface is obtained, and the area of interest includes the display area of the controls.
[0100] The terminal device can perform interface detection by traversing the control tree. The control tree corresponding to the interface can reflect the type and quantity of controls contained in the interface, and can also reflect the display areas of different controls in the interface. The display area of the control in the interface can be considered as the region of interest (ROI) of the interface.
[0101] In order to simplify the subsequent description, the interface displayed by the terminal device in the current detection cycle can be called the current interface, and the interface displayed by the terminal device in the previous detection cycle can be called the historical interface. Based on this, the process of interface detection can be described as:
[0102] By traversing the control tree corresponding to the current interface, the terminal device can determine the number of controls that have changed in the current interface compared to the historical interface. By traversing the control tree corresponding to the current interface, the terminal device also determines the ROI that has changed in the current interface compared to the historical interface, and further calculates the size of the changed ROI. Finally, if the number of controls that have changed is greater than the preset number and the size of the ROI that has changed is also greater than the preset size, the terminal device can obtain a second detection result, which reflects that the current interface has changed.
[0103] Optionally, the controls included in the interface may be at least one type such as text, picture, video, etc. Optionally, the interface displayed in the terminal device may include at least one layer, and each layer may include at least one control. The ownership relationship between the control and the layer may be preset when the interface is created. In the process of traversing the control tree, the terminal device may determine the change in the number of controls in each layer and the size of the changed ROI area in turn according to the level of the layer.
[0104] In this embodiment, the terminal device can implement interface detection by traversing the control tree.
[0105] In practice, optionally, the terminal device may also implement interface detection based solely on the number of changed controls or the size of changed ROI.
[0106] The screen state control method provided by the above embodiments of the present invention can be specifically applied to a terminal device. The terminal device may include but is not limited to a mobile phone, a personal computer (PC), a tablet computer, an AR device, a VR device, a car computer, a wearable device, a smart home device, etc. Assuming that the terminal device is specifically a mobile phone, then Figure 5 A schematic structural diagram of a mobile phone 100 provided in an embodiment of the present invention.
[0107] The mobile phone 100 may include a main 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 (Subscriber Identification Module, SIM) card interface 195, etc.
[0108] The main processor 110 in the mobile phone 100 is specifically used to execute the screen state control methods provided in the above embodiments. The function of the main processor 110 can be first introduced below.
[0109] The main processor 110 may include one or more processing units, for example, the main processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), and / or a baseband processor, etc. Different processing units may be independent devices or integrated into one or more processors.
[0110] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0111] The main processor 110 may also be provided with a memory for storing instructions and data.
[0112] In some embodiments, the main processor 110 may include one or more interfaces. The interface may include an Inter-integrated Circuit (I2C) interface, an Inter-integrated Circuit Sound (I2S) interface, a pulse code modulation (PCM) interface, a Universal Asynchronous Receiver / Transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a General-purpose Input / Output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and / or a Universal Serial Bus (USB) interface, etc.
[0113] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the mobile phone 100 .
[0114] The functions of other components in the mobile phone 100 may be further introduced below.
[0115] The charging management module 140 is used to receive charging input from a wireless charger or a wired charger. While the charging management module 140 is charging the battery 142 , it can also provide power to the mobile phone 100 through the power management module 141 .
[0116] The wireless communication function of the mobile phone 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0117] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization rate of the antennas.
[0118] The mobile communication module 150 can provide wireless communication solutions including 2G / 3G / 4G / 5G etc. applied on the mobile phone 100 .
[0119] The wireless communication module 160 can provide wireless communication solutions including wireless local area network (WLAN), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) and the like applied to the mobile phone 100. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the main processor 110. The wireless communication module 160 can also receive the signal to be sent from the main processor 110, modulate the frequency of the signal, amplify the signal, and convert it into electromagnetic waves for radiation through the antenna 2.
[0120] In some embodiments, the antenna 1 of the mobile phone 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the mobile phone 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), etc.
[0121] The mobile phone 100 implements the display function through a GPU, a display screen 194, and an application processor, etc. The GPU is a graphics processor, which connects the display screen 194 and the application processor.
[0122] 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), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), etc. In some embodiments, the mobile phone 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0123] The mobile phone 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor, etc. The ISP is used to process the data fed back by the camera 193.
[0124] The camera 193 is used to capture still images or videos. In some embodiments, the mobile phone 100 may include N cameras 193, where N is a positive integer greater than or equal to 1.
[0125] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100. The external memory card communicates with the main processor 110 through the external memory interface 120 to implement a data storage function.
[0126] The internal memory 121 may be used to store computer executable program codes, which include instructions. The main processor 110 executes various functional applications and data processing of the mobile phone 100 by running the instructions stored in the internal memory 121 and / or the instructions stored in the memory provided in the processor.
[0127] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The module may specifically include a speaker 170A, a receiver 170B, a microphone 170C, and an earphone interface 170D. With the help of this module, the mobile phone 100 can realize audio functions, such as calls, music playback, recording, etc.
[0128] The sensor module 180 in the mobile phone 100 may include at least one of the following sensors: an image 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.
[0129] These sensors can be used alone or in combination to ensure different functions of the mobile phone. For example, the gyroscope sensor 180B can be used to determine the movement posture of the mobile phone 100. The mobile phone 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation. The mobile phone 100 can detect the opening and closing of the flip cover based on the magnetic sensor 180D. The mobile phone 100 can use the distance sensor 180F to measure the distance to achieve fast focus. The mobile phone 100 can use the fingerprint characteristics collected by the fingerprint sensor 180H to achieve fingerprint unlocking, access application lock, fingerprint photography, fingerprint answering calls, etc.
[0130] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. Indicator 192 can be an indicator light, which can be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0131] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the mobile phone 100 by inserting the SIM card interface 195 or pulling the SIM card interface 195 out. The mobile phone 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
[0132] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the mobile phone 100. In other embodiments of the present invention, the mobile phone 100 may include more or fewer components than those shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0133] The above embodiments have described in detail the process of controlling the screen state of the terminal device from the perspective of process method and hardware equipment. And the above method embodiments can be more accurately executed by the screen state control system deployed by the terminal device. Figure 6 Schematic diagram of the structure of a screen status control system provided by an embodiment of the present invention. Figure 6 As shown, the control system may specifically include: a state determination module and a power management service (Power Manager Service, referred to as PMS).
[0134] The working process of the system can be summarized as follows: for a terminal device in the target non-off screen mode, the state determination module determines the use state of the terminal device. The use state may include being used or not being used. The PMS service is used to determine whether to adjust the screen brightness of the terminal device according to the use state of the terminal device.
[0135] Specifically, the state determination module can determine whether the terminal device is used, and further count the duration of the terminal device not being used, which can be notified to the PMS service.
[0136] Optionally, the basis for determining whether the terminal device is in use may be: whether the interface displayed by the terminal device changes and whether the terminal device detects a face. If the interface displayed by the terminal device does not change and no face is detected, the state determination module determines that the terminal device is not in use.
[0137] The terminal device can be in the target non-off screen mode in response to the user's selection operation, and the terminal device can also display the interface in response to the user's operation. Figure 1 The relevant description in the illustrated embodiment will not be repeated here.
[0138] In addition, the meaning of the target non-stop mode selected by the user can also be seen Figure 1 The relevant description in the illustrated embodiment will not be repeated here.
[0139] Further, after obtaining the duration determined by the state determination module, the PMS compares the duration with the first preset duration. If the duration that the terminal device is not used is not less than the first preset duration, the PMS service controls the screen brightness of the terminal device to decrease. If the duration that the terminal device is not used is less than the first preset duration, indicating that the user triggers an operation on the terminal device, the PMS service controls the brightness of the terminal device to remain unchanged.
[0140] Furthermore, after the PMS service reduces the screen brightness, if the state determination module determines that the terminal device is used again, the PMS service may also restore the screen brightness of the terminal device.
[0141] In this embodiment, for a terminal device in the target non-screen-off mode, the status determination module in the control system can first determine whether it is being used, and further determine the duration for which the terminal device has not been used. The duration can be notified to the PMS service in the control system. The PMS service can then further determine whether the screen brightness needs to be adjusted based on the duration sent by the status determination module. Specifically, if the duration for which the terminal device has not been used is not less than a first preset duration, the PMS service can control the screen brightness of the terminal device to decrease. Afterwards, when the status determination module detects that it is being used by the user again, the PMS service can also restore the screen brightness of the terminal device, at which point the user can use the terminal device normally.
[0142] The control of the screen brightness of the terminal device by the above system can ensure that the screen of the terminal device is in a lit state while it is in use, thereby meeting the demand. On the other hand, in this embodiment, the screen brightness is reduced when the terminal device is not in use by the user. Therefore, lowering the screen brightness will not affect the user's demand for the screen to be always on, and it can also extend the life of the screen. And the above method is actually a non-off screen mode in which the screen brightness changes. Compared with mechanically keeping the screen always on at the same brightness, the adjustment of the screen brightness can extend the life of the screen.
[0143] In addition, for the contents not described in detail in this embodiment and the technical effects that can be achieved, please refer to the relevant descriptions in the above embodiments, and will not be repeated here.
[0144] Figure 7 Another screen status control system provided by an embodiment of the present invention. Figure 6 Based on the system shown, the control system also includes: face detection service and interface detection service.
[0145] Optionally, the face detection service can be performed periodically to obtain first detection results corresponding to different detection cycles, thereby realizing face detection. The state determination module can obtain this first detection result by means of the calling relationship between itself and the face detection service. The interface detection service can also be performed periodically to obtain second detection results corresponding to different detection cycles, thereby realizing interface detection. The state determination module can also obtain second detection results corresponding to different detection cycles by means of the calling relationship between itself and the interface detection service.
[0146] Optionally, face detection and interface detection may be executed synchronously or asynchronously, and the specific execution sequence and the technical effects that can be achieved may be referred to the above-mentioned related embodiments, which will not be described in detail here.
[0147] When face detection and interface detection are performed asynchronously, the state determination module can control the start of the interface detection service by calling the service. Specifically, the state determination module can first count the duration of the face not being detected according to the first detection results corresponding to different detection cycles. If the duration is not less than the second preset duration, the state determination module can call the interface detection service, that is, start the interface detection service.
[0148] Combination Figure 4 It can be seen from the illustrated embodiment that the process of interface detection can be:
[0149] 1. By traversing the control tree corresponding to the current interface of the terminal device, the number of controls that have changed in the current interface compared to the historical interface can be determined. By traversing the control tree corresponding to the current interface, the ROI that has changed in the current interface compared to the historical interface can also be determined. Among them, the ROI includes the display area of the control.
[0150] 2. Further, the size of the changed RIO is calculated.
[0151] 3. Determine whether the number of changed controls is greater than a preset number, and also determine whether the size of the changed ROI is greater than a preset size. If the number of changed controls is greater than the preset number and the size of the changed ROI is also greater than the preset size, the terminal device can obtain a second detection result, which reflects that the current interface has changed.
[0152] Optionally, the interface detection service may specifically include a change detection module and a calculation module, and the two modules may cooperate to implement the above process. The two modules cooperate specifically in that step 1 may be executed by the interface detection service, and steps 2 and 3 may be executed by the calculation module.
[0153] It should also be noted that compared with step 1 and step 2, the computational complexity of step 3 is greater, that is, more computing resources are required. Therefore, the asynchronous execution of the face detection service and the interface detection service, or more accurately, the face detection service and the interface detection process, steps 1 and 2 can be executed continuously with the same or different cycles. When the duration for which no face is detected is not less than a second preset time length, the state determination module can further call the calculation module to enable the calculation module to execute step 3.
[0154] In this embodiment, the control system can use the face detection service and the interface detection service for detection, so that the state determination module determines whether to adjust the screen brightness of the terminal device according to the detection result. In addition, the contents not described in detail in this embodiment and the technical effects that can be achieved can be referred to the relevant descriptions in the above embodiments, and will not be repeated here.
[0155] Above Figure 6 and Figure 7 The screen status control system shown can be deployed in a terminal device, and the system can be specifically considered as a subsystem in the software architecture of the terminal device. Figure 4 When the mobile phone shown in FIG. 1 is used, the mobile phone system software architecture including the above screen state control system can be as follows: Figure 8 shown. Figure 8 A schematic diagram of the software architecture of a mobile phone system provided by an embodiment of the present invention.
[0156] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom: application layer, application framework layer, hardware abstraction layer, kernel layer, and hardware layer.
[0157] To realize the above screen state control, it is necessary to use different components in the application framework layer, the hardware abstraction layer, the kernel layer and the hardware layer in coordination. The components used in the process of controlling the screen state can be described in detail below.
[0158] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0159] like Figure 8 As shown, the application framework layer may include a state determination module and may also include multiple services, such as power management service, face detection service, interface detection service, and camera service. The interface detection service specifically includes a change detection module and a calculation module.
[0160] The camera service is used to capture images, so that the face detection service performs periodic face detection based on the captured images to obtain first detection results corresponding to different detection cycles.
[0161] The state determination module is used to sense the use state of the mobile phone 100. The use state may include being used or not used. There is also a calling relationship between the face detection service and the state determination module, by means of which the state determination module can obtain the above-mentioned first detection result. The state determination module can determine the use state of the mobile phone 100 according to the first detection result.
[0162] The change detection module in the interface detection service is used to traverse the control tree corresponding to the current interface of the mobile phone 100, and can determine the number of controls that have changed in the current interface compared to the historical interface. By traversing the control tree corresponding to the current interface, the ROI that has changed in the current interface compared to the historical interface is also determined. Among them, the ROI includes the display area of the control.
[0163] The calculation module in the interface detection service is used to calculate the size of the changed RIO, and to determine whether the number of changed controls is greater than a preset number, and also to determine whether the size of the changed ROI is greater than a preset size. If the number of changed controls is greater than the preset number and the size of the changed ROI is also greater than the preset size, the mobile phone 100 can obtain a second detection result, which reflects that the current interface has changed.
[0164] There is also a calling relationship between the calculation module and the change detection module, so that the calculation module performs calculations according to the detection results of the change detection module.
[0165] like Figure 8 As shown, the hardware abstraction layer (HAL) may include a camera HAL and a hardware renderer, such as HWC (hwcomposer).
[0166] Among them, the camera HAL is used to ensure the normal operation of camera services and camera hardware.
[0167] The hardware renderer is used to cooperate with the calculation module in the application framework layer to calculate the size of the changed RIO.
[0168] The HAL layer can be located at the interface layer between the operating system kernel and the hardware circuit, and its purpose is to abstract the hardware. The HAL contains multiple library modules, each of which implements an interface for a specific type of hardware component, such as a camera or Bluetooth module. When the framework API requires access to the device hardware, the Android system will load the library module for the hardware component.
[0169] like Figure 8 As shown, the kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, and image sensor driver.
[0170] Camera driver: Used to drive the camera to capture images.
[0171] Image sensor driver, used to drive the image sensor to work.
[0172] Display driver, used to drive the screen to display content.
[0173] like Figure 8 As shown, the hardware layer may include: a camera, an image sensor, and a screen. Optionally, the image sensor may be an always-on image sensor (Always ON sensor). The screen may be a liquid crystal display (LCD), an organic electroluminescence display (OLED), or the like.
[0174] In addition, based on the above mentioned components, Figure 8 As shown, the application layer in the software architecture may include a series of application packages, which may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
[0175] The application framework layer in the software architecture can also include the view system and its interface, the graphics system and its interface, the window manager, the content provider, the phone manager, the resource manager, the notification manager, etc. These contents are not included in Figure 8 Shown in.
[0176] The view system includes visual controls, such as controls for displaying text and controls for displaying pictures. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying pictures.
[0177] The graphics system and its interface include: paint, buffer queue, render node, initialization component, and graphics API. The initialization component is used to complete the initialization of the buffer queue. The graphics API can be, for example, Canvas, which is a 2D graphics API, and the initialization component can be, for example, Blast BufferQueue.
[0178] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0179] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0180] The phone manager is used to provide communication functions of the mobile phone 100, such as management of call status (including answering, hanging up, etc.).
[0181] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0182] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in the status bar, a prompt sound is emitted, the phone 100 vibrates, the indicator light flashes, etc.
[0183] The kernel layer in the software architecture may also include: audio drivers and other sensor drivers. The audio driver is used to ensure the audio playback and call functions of the mobile phone 100. Other sensor drivers are used to drive other sensors in the hardware layer. Figure 8 Shown in.
[0184] Optionally, each type of sensor in the hardware layer may be provided with a sensor driver corresponding to the type of sensor to ensure that the type of sensor works.
[0185] The hardware layer in the software architecture can also include: pressure sensors, gyroscope sensors, air pressure sensors, magnetic sensors, acceleration sensors, distance sensors, proximity light sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc. These are not included in Figure 8 Shown in.
[0186] The working process of the methods and systems provided in the above embodiments can be described below by taking a truck loading scenario as an example.
[0187] The user can be a truck driver who is loading goods. At this time, during the loading process, the truck driver needs to constantly operate the mobile phone to report the loading progress to the freight platform in real time. At the same time, he also needs to see the feedback given by the freight platform after reporting the loading progress in real time.
[0188] In this scenario, the truck driver can Figure 2 Set the phone to "Never" screen-off mode as shown in the following method. Figure 3 The flowchart shown makes judgments in sequence to determine how to adjust the brightness of the mobile phone screen.
[0189] When the last judgment logic is executed, if it is determined that the mobile phone has not been used for a period longer than the first preset period, the screen brightness of the mobile phone can be reduced. Since the duration longer than the first preset period indicates that the truck driver is loading goods, at this time, even if the screen brightness is reduced, it will not affect the loading of goods, progress reporting, and feedback viewing, and the reduction of the screen brightness can also extend the screen life and improve the screen burn-in problem.
[0190] After the screen brightness is lowered, when the truck driver needs to report the loading progress or check feedback, the user can trigger an operation on the phone. At this time, the phone is used, and the screen brightness of the phone will be restored. After the brightness is restored, the truck driver can report the loading progress normally.
[0191] In addition, for the contents not described in detail in this embodiment, reference can be made to the relevant descriptions in the above embodiments, and they will not be repeated here.
[0192] The following will describe in detail the screen state control device of one or more embodiments of the present invention. Those skilled in the art will appreciate that these screen state control devices can be configured using commercially available hardware components through the steps taught in this solution.
[0193] Fig. 9 A schematic diagram of the structure of a screen state control device provided by an embodiment of the present invention is shown in FIG. Fig. 9 As shown, the device comprises:
[0194] The brightness reduction module 11 is used to reduce the screen brightness of a terminal device in a target non-screen-off mode if the continuous time for which the terminal device has not been used is not less than a first preset time.
[0195] The brightness recovery module 12 is used to restore the screen brightness of the terminal device if the terminal device is used after reducing the screen brightness.
[0196] Optionally, the device further includes: a display module 13 and a control module 14 .
[0197] The display module 13 is used to display a mode setting interface in response to a setting operation triggered by a user on the terminal device.
[0198] The control module 14 is used to control the terminal device to be in the target non-screen-off mode in response to the user's selection operation of the target non-screen-off mode in the mode setting interface.
[0199] Optionally, the mode setting interface includes at least one non-screen-off mode, and different non-screen-off modes correspond to different screen lighting durations.
[0200] The brightness reduction module 11 is used to reduce the screen brightness of the terminal device if the lighting time of the terminal device screen does not reach the screen lighting time corresponding to the target non-screen mode, and the continuous time when the terminal device is not used is not less than the first preset time.
[0201] Optionally, the device further includes: a state determination module 15.
[0202] The control module 14 is used to control the display interface of the terminal device in response to the user's operation on the terminal device.
[0203] The state determination module 15 is used to determine that the terminal device is not in use if the interface displayed by the terminal device has not changed and the terminal device has not detected a face.
[0204] Optionally, the state determination module 15 is used to determine that the terminal device is in use if an interface displayed by the terminal device changes and / or the terminal device detects a face.
[0205] Optionally, the device also includes: a detection module 16, which is used to perform face detection to obtain a first detection result reflecting whether the terminal device detects a face; and detect an interface displayed by the terminal device to obtain a second detection result reflecting whether the interface changes.
[0206] Optionally, the device also includes: a duration determination module 17, which is used to determine a first continuous period during which the terminal device does not detect a face according to a first detection result corresponding to different detection cycles; determine a second continuous period during which the interface displayed by the terminal device does not change according to a second detection result corresponding to a different detection cycle; and determine the continuous duration during which the terminal device is not used according to the overlapping period between the first continuous period and the second continuous period.
[0207] Optionally, the detection module 16 is used to determine a third continuous period during which the terminal device does not detect a face based on the first detection results corresponding to different detection cycles; if the duration corresponding to the third continuous period is not less than the second preset duration, then while performing face detection, detect whether the interface displayed by the terminal device changes.
[0208] Optionally, the detection module 16 is used to obtain a second detection result reflecting the change in the interface if the number of controls that have changed in the interface displayed by the terminal device is greater than a preset number and / or the size of the area of interest that has changed in the interface displayed by the terminal device is greater than a preset size, and the area of interest includes the display area of the controls.
[0209] Optionally, the detection module 16 is used to determine the number of changed controls in the interface displayed by the terminal device by traversing a control tree corresponding to the interface displayed by the terminal device;
[0210] And / or, by traversing a control tree corresponding to the interface displayed by the terminal device, the size of the changed region of interest in the interface displayed by the terminal device is determined.
[0211] Fig. 9 The device shown can perform Figures 1 to 5 For the method of the embodiment shown in the figure, the part not described in detail in this embodiment can be referred to Figures 1 to 5 The implementation process and technical effects of this technical solution refer to Figures 1 to 5 The description in the illustrated embodiment will not be repeated here.
[0212] In a possible design, the screen state control method provided in the above embodiments can be applied in an electronic device, such as Fig.10 As shown, the electronic device may include: a processor 21 and a memory 22. The memory 22 is used to store the electronic device to perform the above Figure 1 to Figure 5 The program of the screen state control method provided in the illustrated embodiment, the processor 21 is configured to execute the program stored in the memory 22 .
[0213] The program includes one or more computer instructions, wherein when the one or more computer instructions are executed by the processor 21, the following steps can be implemented:
[0214] For a terminal device in the target non-screen-off mode, if the duration for which the terminal device has not been used is not less than a first preset duration, reducing the screen brightness of the terminal device;
[0215] If the terminal device is used after the screen brightness is reduced, the screen brightness of the terminal device is restored.
[0216] Optionally, the processor 21 is further configured to execute the aforementioned Figure 1 to Figure 5 All or part of the steps in the illustrated embodiments.
[0217] The structure of the electronic device may further include a communication interface 23 for the electronic device to communicate with other devices or communication systems.
[0218] In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by the above electronic device, which includes instructions for executing the above Figure 1 to Figure 5 The procedures involved in the screen status control method shown.
[0219] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A screen state control method, characterized in that: include: For a terminal device in the target non-screen-off mode, if the duration for which the terminal device has not been used is not less than a first preset duration, reducing the screen brightness of the terminal device; If the terminal device is used after the screen brightness is reduced, the screen brightness of the terminal device is restored.
2. The method according to claim 1, characterized in that The method further comprises: In response to a setting operation triggered by a user on the terminal device, a mode setting interface is displayed; In response to the user's selection operation of the target non-screen-off mode in the mode setting interface, the terminal device is controlled to be in the target non-screen-off mode.
3. The method according to claim 2, characterized in that The mode setting interface includes at least one non-off screen mode, and different non-off screen modes correspond to different screen lighting durations; If the duration of time during which the terminal device is not used is not less than a first preset duration, reducing the screen brightness of the terminal device includes: If the lighting duration of the terminal device screen does not reach the screen lighting duration corresponding to the target non-screen mode, and the continuous time when the terminal device is not used is not less than the first preset time, the screen brightness of the terminal device is reduced.
4. The method according to claim 1, characterized in that: The method further comprises: In response to a user's operation on the terminal device, controlling the terminal device to display an interface; If the interface displayed by the terminal device does not change and the terminal device does not detect a face, it is determined that the terminal device is not in use.
5. The method according to claim 4, characterized in that The method further comprises: If the interface displayed by the terminal device changes and / or the terminal device detects a face, it is determined that the terminal device is in use.
6. The method according to claim 4, characterized in that The method further comprises: Performing face detection to obtain a first detection result reflecting whether the terminal device detects a face; The interface displayed by the terminal device is detected to obtain a second detection result reflecting whether the interface has changed.
7. The method according to claim 6, characterized in that The method further comprises: Determine, according to the first detection results corresponding to the different detection cycles, a first continuous period during which the terminal device does not detect a face; Determining, according to the second detection results corresponding to the different detection cycles, a second continuous period during which the interface displayed by the terminal device does not change; The duration during which the terminal device is not used is determined according to the overlapping period between the first duration and the second duration.
8. The method according to claim 6, characterized in that The detecting the interface displayed by the terminal device includes: Determining, according to the first detection results corresponding to the different detection cycles, a third continuous period during which the terminal device does not detect a face; If the duration corresponding to the third duration is not less than the second preset duration, then while performing face detection, it is detected whether the interface displayed on the terminal device changes.
9. The method according to claim 6, characterized in that The detecting the interface displayed by the terminal device to obtain a second detection result reflecting whether the interface has changed includes: If the number of controls that have changed in the interface displayed by the terminal device is greater than a preset number and / or the size of the area of interest that has changed in the interface displayed by the terminal device is greater than a preset size, a second detection result reflecting the change in the interface is obtained, and the area of interest includes the display area of the controls.
10. The method according to claim 9, characterized in that The detecting the interface displayed by the terminal device includes: Determining the number of changed controls in the interface displayed by the terminal device by traversing the control tree corresponding to the interface displayed by the terminal device; and / or, By traversing the control tree corresponding to the interface displayed by the terminal device, the size of the changed region of interest in the interface displayed by the terminal device is determined.
11. A screen status control system, characterized in that: Deployed in terminal devices, including: power management services and status determination modules; The state determination module is used to determine, for the terminal device in the target non-screen-off mode, whether the terminal device is used and the duration for which the terminal device is not used; The power management service is used to reduce the screen brightness of the terminal device if the terminal device has not been used for a continuous period of time that is not less than a first preset period of time; if the terminal device is used after the screen brightness is reduced, restore the screen brightness of the terminal device.
12. The system according to claim 11, characterized in that The state determination module is used to determine that the terminal device is not in use if the interface displayed by the terminal device has not changed and the terminal device has not detected a face.
13. The system according to claim 12, characterized in that The system also includes: a face detection service and an interface detection service; The face detection service is used to perform face detection to obtain a first detection result reflecting whether the terminal device detects a face; The state determination module is used to obtain the first detection result according to the calling relationship between the state determination module and the face detection service; determine the duration of time during which the terminal device fails to detect a face according to the first detection results obtained in different detection cycles; and call the interface detection service if the duration during which the terminal device fails to detect a face is not less than a second preset duration; The interface detection service is used to detect the interface displayed by the terminal device in response to the call of the state determination module.
14. The system according to claim 13, characterized in that The interface detection service specifically includes: a change detection module and a calculation module; The change detection module is used to traverse the control tree corresponding to the interface displayed by the terminal device to determine the number of controls that have changed in the interface displayed by the terminal device and / or the area of interest that has changed in the interface displayed by the terminal device, wherein the area of interest includes the display area of the control; and obtain a second detection result reflecting the change of the interface from the calculation module; The calculation module is used to calculate the size domain of the region of interest that has changed in the interface displayed by the terminal device; if the number of controls that have changed in the interface displayed by the terminal device is greater than a preset number and / or the size of the region of interest that has changed in the interface displayed by the terminal device is greater than a preset size, the second detection result is obtained; The state determination module is used to obtain the second detection result according to the calling relationship between the state determination module and the interface detection service.
15. An electronic device, characterized in that: include: A memory and a processor; wherein the memory stores executable codes, and when the executable codes are executed by the processor, the processor executes the screen state control method according to any one of claims 1 to 10.
16. A non-transitory machine-readable storage medium, characterized in that: The non-transitory machine-readable storage medium stores executable codes, and when the executable codes are executed by a processor of an electronic device, the processor is caused to execute the screen state control method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Screen locking method and terminal
CN106020428A
Screen brightness adjustment method and apparatus, and terminal
CN106101434A
Screen control method and device, terminal and storage medium
CN109788138A
Method for adjusting screen of intelligent terminal, intelligent terminal and storage device
CN111212181A
Screen-off control method and device and storage medium
CN115175279A