Screen control method, device, electronic device and storage medium
By generating transition content of light and dark gradients when the screen is turned on and off, the problem of abrupt effect when the screen is turned on and off is solved, and the display effect and user experience are improved.
Patent Information
- Application Number
- CN202211214458.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-30
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-09-30
AI Technical Summary
The existing electronic devices have a sudden effect when the screen is on and off, and the user experience is not good.
By generating transition content of the light and dark gradient of each pixel point, the brightness change when the screen is turned on and off is controlled to ensure that the brightness of each pixel point changes the same at the same time.
It improves the display effect when the screen is turned on and off, provides an experience of interaction with users, and enhances the user experience.
Smart Images

Figure CN115512637B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic devices, and more specifically, to a screen control method, device, electronic device, and storage medium. Background Art
[0002] With the rapid advancement of technology and living standards, electronic devices (such as smartphones and tablets) have become commonplace in people's lives. The screen is the part of an electronic device that displays the user interface. Controlling the screen's on and off is often done directly, resulting in a rather abrupt effect. Summary of the Invention
[0003] The present application proposes a screen control method, device, electronic device and storage medium, which can generate transition content with gradual changes in brightness of each pixel in the image when the screen is turned on or off.
[0004] In a first aspect, an embodiment of the present application provides a screen control method, which is applied to an electronic device, wherein the electronic device includes a screen, and the method includes: acquiring a first image in response to a screen-on event for controlling the screen to light up; based on the first image, controlling the screen to display screen-on transition content; wherein the luminance of each first pixel in the screen-on transition content gradually increases from the lowest luminance to the luminance of the second pixel corresponding to each first pixel in the first image within a target time period, and the luminance of each first pixel has the same change amplitude at the same time, and the change amplitude is a first ratio of the degree of change of the luminance of each first pixel to the luminance of the second pixel corresponding to each first pixel.
[0005] In a second aspect, an embodiment of the present application provides a screen control method, which is applied to an electronic device, wherein the electronic device includes a screen, and the method includes: acquiring a second image in response to a screen-off event for controlling the screen to turn off; based on the second image, controlling the screen to display screen-off transition content; wherein the luminance of each third pixel in the screen-off transition content gradually decreases from the target luminance to the minimum luminance within the target time period, and the luminance change amplitude of each third pixel at the same moment is the same, the target luminance is the luminance of the fourth pixel corresponding to each third pixel in the second image, and the change amplitude is the second ratio of the degree of change of the luminance of each third pixel to the luminance of the fourth pixel corresponding to each third pixel.
[0006] In a third aspect, an embodiment of the present application provides a screen control device, comprising: a first image acquisition module and a first image display module, wherein the first image acquisition module is used to acquire a first image in response to a screen-lighting event for controlling the screen to light up; the first image display module is used to control the screen to display screen-lighting transition content based on the first image, wherein the luminance of each first pixel in the screen-lighting transition content gradually increases from the lowest luminance to the luminance of the second pixel corresponding to each first pixel in the first image within a target time period, and the luminance of each first pixel has the same change amplitude at the same time, and the change amplitude is a first ratio of the degree of change in the luminance of each first pixel to the luminance of the second pixel corresponding to each first pixel.
[0007] In a fourth aspect, an embodiment of the present application provides a screen control device, comprising: a second image acquisition module and a second image display module, wherein the second image acquisition module is used to acquire a second image in response to a screen off event for controlling the screen to turn off; the second image display module is used to control the screen to display screen off transition content based on the second image, wherein the luminance of each third pixel in the screen off transition content gradually decreases from the target luminance to the minimum luminance within the target time period, and the luminance change amplitude of each third pixel at the same time is the same, the target luminance is the luminance of the fourth pixel corresponding to each third pixel in the second image, and the change amplitude is the second ratio of the luminance change degree value of each third pixel to the luminance of the fourth pixel corresponding to each third pixel.
[0008] In a fifth aspect, an embodiment of the present application provides an electronic device comprising: one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the screen control method provided in the first aspect or the screen control method provided in the second aspect.
[0009] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, in which program code is stored. The program code can be called by a processor to execute the screen control method provided in the first aspect or the screen control method provided in the second aspect.
[0010] The solution provided by this application acquires a first image in response to a screen-on event for controlling screen-on; based on the first image, controls the screen to display screen-on transition content, wherein the brightness of each first pixel in the screen-on transition content gradually increases from a minimum brightness to the brightness of a second pixel corresponding to each first pixel in the first image within a target time period, and the brightness of each first pixel changes by the same magnitude at the same time, the magnitude being a first ratio of the brightness change value of each first pixel to the brightness of the second pixel corresponding to each first pixel. Thus, when controlling the screen-on, transition content with gradually increasing brightness is generated for each pixel in the image, thereby improving the display effect of the screen-on transition.
[0011] In addition, by responding to a screen-off event for controlling the screen to turn off, a second image is obtained, and based on the second image, the screen is controlled to display screen-off transition content, wherein the brightness of each third pixel in the screen-off transition content gradually decreases from the target brightness to the minimum brightness within the target time period, and the brightness of each third pixel changes at the same time with the same amplitude, the target brightness is the brightness of the fourth pixel corresponding to each third pixel in the second image, and the amplitude of change is the second ratio of the brightness change value of each third pixel to the brightness of the fourth pixel corresponding to each third pixel. In this way, when controlling the screen to turn off, transition content with gradually decreasing brightness of each pixel in the image can be generated, thereby improving the display effect of the screen turning off. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0013] Figure 1 A flow chart of a screen control method according to an embodiment of the present application is shown.
[0014] Figure 2 A flow chart of a screen control method according to another embodiment of the present application is shown.
[0015] Figure 3 A schematic diagram showing a first change relationship provided in an embodiment of the present application.
[0016] Figure 4 Another schematic diagram showing the first change relationship provided in an embodiment of the present application.
[0017] Figure 5Another schematic diagram showing the first change relationship provided in an embodiment of the present application.
[0018] Figure 6 A flow chart of a screen control method according to another embodiment of the present application is shown.
[0019] Figure 7 A flow chart of a screen control method according to another embodiment of the present application is shown.
[0020] Figure 8 A schematic diagram showing the principle of the screen control method provided in an embodiment of the present application is shown.
[0021] Figure 9 A block diagram of a screen control device according to an embodiment of the present application is shown.
[0022] Figure 10 A block diagram of a screen control device according to another embodiment of the present application is shown.
[0023] Figure 11 4 is a block diagram of an electronic device for executing a screen control method according to an embodiment of the present application.
[0024] Figure 12 It is a storage unit in an embodiment of the present application for storing or carrying program codes for implementing the screen control method in accordance with an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0026] In the related art, when electronic devices control the screen to light up or turn off, they usually directly control the screen to light up or turn off, so the effect presented is abrupt, resulting in a poor user experience.
[0027] To address the above issues, the inventors have proposed the screen control method, device, electronic device, and storage medium provided in the embodiments of this application. These methods can generate transition content that gradually changes between bright and dark for each pixel in an image when the screen is turned on and off, based on the brightness of each pixel in the image, thereby improving the display effect when the screen is turned on and off. The specific screen control method will be described in detail in the subsequent embodiments.
[0028] The screen control method provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings.
[0029] See also Figure 2 , Figure 2A flow chart of a screen control method provided by an embodiment of the present application is shown. In a specific embodiment, the screen control method is applied to Figure 10 The screen control device 400 and the electronic device 100 equipped with the screen control device 400 ( Figure 11 ). The electronic device includes a screen. The following will take the electronic device as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the electronic device used in this embodiment can be a smart phone, a tablet computer, a smart watch, an e-book, etc., which is not limited here. Figure 2 The process shown in FIG. 1 is described in detail. Specifically, the screen control method may include the following steps:
[0030] Step S110: In response to a screen-on event for controlling the screen to be turned on, acquiring a first image.
[0031] In an embodiment of the present application, when the screen of the electronic device is in an off state, a screen-on event for controlling the screen to light up can be detected, so that when the screen-on event is detected, the screen can be controlled to present screen-on transition content when the screen is lit.
[0032] Among them, the electronic device can read the corresponding parameter value through the operating system to determine the screen status of the electronic device according to the parameter value read. As an embodiment, when the system installed in the electronic device is an Android system, the screen status can be obtained through the isScreenOn method of PowerManager, that is, by obtaining the value of isScreenOn, if the value of isScreenOn is true, the screen of the electronic device is in a bright screen state, and if the value of isScreenOn is false, the screen of the electronic device is in an off-screen state. As another embodiment, the electronic device can also obtain the brightness value of the screen and determine the screen status of the electronic device according to the brightness value of the screen. For example, if the brightness value of the screen is 0, it means that the screen is in an off-screen state, and if the brightness value of the screen is greater than 0, the screen is in a bright screen state.
[0033] In some embodiments, the above screen-lighting event can be generated when the screen is in the off state based on the control operation for controlling the screen lighting. For example, when the screen of the electronic device is in the off state, the screen-lighting event is triggered by detecting the user's operation on the power button; for another example, when the screen of the electronic device is in the off state, it is detected that the user lifts the phone, thereby triggering the screen-lighting event; for another example, when the screen of the electronic device is in the off state, it is detected that the touch screen is touched, thereby triggering the screen-lighting event. Of course, in the application embodiment, the specific control operation for controlling the screen lighting is not limited.
[0034] In one possible implementation, when the electronic device detects the above-mentioned screen-on event, it responds to the screen-on event by obtaining the first frame image to be displayed on the screen after the screen-on event is detected, and using the first frame image as the first image to display the screen-on transition content based on the first image. The first frame image to be displayed on the screen after the screen-on event is detected can be understood as the first frame image presented when the electronic device changes from an off-screen state to a screen-on state without displaying the screen-on transition content. For example, if the last frame image displayed by the electronic device before entering the screen-off state is the main interface image, then the first frame image presented when the electronic device changes from the screen-off state to the screen-on state without displaying the screen-on transition content is the main interface image. Therefore, the main interface image can be obtained as the above first image; for example, if the first frame image presented when the electronic device changes from the screen-off state to the screen-on state without displaying the screen-on transition content is the image of the lock screen interface displayed when the electronic device is in the lock screen state, then the image of the lock screen interface can be obtained as the above first image; for another example, if the last frame image displayed by the electronic device before entering the screen-off state is the interface image of application A, then the first frame image presented when the electronic device changes from the screen-off state to the screen-on state without displaying the screen-on transition content is the interface image of application A. Therefore, the interface image of application A can be obtained as the above first image.
[0035] In another possible implementation, the first image may be a pre-stored image used to generate screen-lighting transition content. When the screen-lighting event is detected, the first image may be read in response to the screen-lighting event.
[0036] Step S120: Based on the first image, control the screen to display screen-bright transition content.
[0037] In an embodiment of the present application, after the electronic device acquires the first image, it can control the screen to display the bright screen transition content based on the first image. The brightness of each first pixel in the bright screen transition content gradually increases from the lowest brightness to the brightness of the second pixel corresponding to each first pixel in the first image within the target time period, and the brightness of each first pixel changes at the same time, and the change amplitude is the first ratio of the brightness change value of each first pixel to the brightness of the second pixel corresponding to each first pixel. The above minimum brightness can be 0, which corresponds to the state where no content is displayed when the screen is off; the bright screen transition content is generated based on the first image, and each pixel in the bright screen transition content has a corresponding second pixel in the first image; the above brightness refers to the brightness and darkness of the content, and the brightness is positively correlated with the brightness value and saturation of the pixel.
[0038] In some embodiments, the screen-lighting transition content may include multiple frames of transition images displayed within the target time period, wherein the brightness of each first pixel in the multiple frames of transition images gradually increases over time, and each first pixel gradually increases from a minimum brightness to the brightness of the second pixel in the first image corresponding to each first pixel. The second pixel corresponding to the first pixel can be a pixel at each position in the transition image that corresponds to a pixel at the same position in the first image.
[0039] The above variation range (i.e., the above first ratio) can be understood as the percentage of the brightness change of each first pixel point increasing to the brightness of the second pixel point corresponding to each first pixel point. In other words, the range of the above variation range (i.e., the above first ratio) is 0-100%. For example, if the brightness of the second pixel point corresponding to a first pixel point is m, the variation range corresponding to the first pixel point can be understood as the ratio of the variation from the lowest brightness to the current brightness to m, that is, the percentage of the brightness of the first pixel point increasing to m.
[0040] It can be understood that the brightness of different pixels in the first image is different. In the process of the brightness of each first pixel point increasing to the brightness of the corresponding second pixel point, since the change amplitude corresponding to each first pixel point is the same at the same time, if the brightness of the second pixel point corresponding to the first pixel point in the first image is higher, then under the same change amplitude, the actual increase in brightness is also higher; conversely, if the brightness of the second pixel point corresponding to the first pixel point in the first image is lower, then under the same change amplitude, the actual increase in brightness is also lower. For example, if the luminance of the second pixel corresponding to first pixel A in the first image is n1, and the luminance of the second pixel corresponding to first pixel B in the first image is n2, and n1 is greater than n2, since the luminance changes of first pixel A and first pixel B at the same moment are the same, if the change at the current moment is 50%, then the actual increase in luminance of first pixel A is 50%*n1, and the actual increase in luminance of first pixel B is 50%*n2. It can be seen that 50%*n1>50%*n2, that is, the actual increase in luminance of first pixel A is greater than the actual increase in luminance of first pixel B. Therefore, the luminance of first pixel A will increase faster than that of first pixel B to reach the luminance at which the user perceives that the position is illuminated. Therefore, in the bright screen transition content displayed based on the first image, the first pixel corresponding to the second pixel with higher luminance in the first image will illuminate first, while the first pixel corresponding to the second pixel with lower luminance in the first image will illuminate later in the bright screen transition content.
[0041] In some embodiments, the above target time period may be a time period within a preset duration after the moment when the electronic device responds to the above screen-on event. The preset duration is the duration used to display the screen-on transition content, that is, the duration of transition from the screen-off state to the final screen-on state. The specific value of the preset duration may not be limited. For example, the preset duration may be 1 second. If the moment when the electronic device responds to the above screen-on event is 9:10:44, the target time period is from 9:10:44 to 9:10:45. The final screen-on state refers to the brightness of each first pixel point on the screen increasing to the brightness of the second pixel point corresponding to each first pixel point.
[0042] In some embodiments, since the brightness of each first pixel point gradually increases, the above change amplitude of the brightness of each first pixel point also gradually increases. The increase rate of the above change amplitude can be fixed, that is, the change amplitude increases linearly; the above change amplitude can also be non-fixed, that is, the change amplitude increases nonlinearly, which is not limited here.
[0043] The screen control method provided in the embodiments of the present application can achieve, when controlling the screen to brighten, the generation of transitional content in which the brightness of each pixel in the first image gradually increases, thereby improving the display effect of the brightened screen. Furthermore, the first pixel corresponding to the second pixel with a higher brightness in the first image will be brightened first, while the first pixel corresponding to the second pixel with a lower brightness in the first image will be brightened later in the brightened screen transition content. Therefore, when brightening the screen, a sense of interaction with the user can be generated, thereby improving the user experience.
[0044] See also Figure 2 , Figure 2 A flow chart of a screen control method provided by another embodiment of the present application is shown. The screen control method is applied to the above electronic device. Figure 2 The process shown in FIG. 1 is described in detail. Specifically, the screen control method may include the following steps:
[0045] Step S210: In response to a screen-on event for controlling the screen to be turned on, a first image is acquired.
[0046] In the embodiment of the present application, step S210 can refer to the content of the aforementioned embodiment and will not be repeated here.
[0047] Step S220: Based on the first change relationship and the first image, generate a multi-frame transition image corresponding to multiple moments in the target time period, wherein the first change relationship includes the first ratio corresponding to each of the multiple moments, and the multi-frame transition image corresponds one-to-one to the multiple moments.
[0048] In an embodiment of the present application, when the electronic device controls the screen to display the screen-on transition content based on the first image, it can generate multiple frames of transition images corresponding to each moment within the above target time period based on the first change relationship and the first image, that is, the multiple frames of transition images constitute the screen-on transition content that transitions from the off state to the screen-on state. The magnitude of the change in brightness of each first pixel in the same frame of the transition image (i.e., the above first ratio) is the same. The above first change relationship includes the first ratio corresponding to each of the multiple moments. Therefore, based on the first ratio corresponding to each moment in the first change relationship and the brightness of the first pixel to the second pixel corresponding to the first image, the brightness of each first pixel in the transition image corresponding to each moment can be determined. Thus, after the multiple frames of transition images are displayed sequentially in chronological order, the brightness of each first pixel in the screen-on transition content can be gradually increased from the lowest brightness to the brightness of the second pixel corresponding to each first pixel within the target time period, and the brightness of each first pixel has the same magnitude of change at the same moment.
[0049] In one possible implementation, the rate of increase of the first ratio in the first change relationship gradually decreases within the target time period, that is, the rate of increase of the change amplitude in the target time period gradually decreases. Since the first ratio can be understood as the percentage of the degree of change of the brightness of each first pixel point to the brightness of the second pixel point corresponding to each first pixel point, its range is 0 to 100%. Therefore, the first change relationship can be a curve increasing from 0% to 100% within the target time period. For example, please refer to Figure 3 The first change relationship may be a change curve A, which represents a change relationship in which the first ratio gradually increases to 100% within the target time period t1, and the change curve A satisfies that the increase rate of the first ratio gradually decreases.
[0050] In another possible embodiment, the first ratio in the first change relationship increases gradually in the target time period, that is, the change amplitude increases gradually in the target time period. Optionally, the first change relationship can be a curve that increases from 0% to 100% in the target time period. For example, see Figure 4 The first change relationship may be a change curve B, which represents a change relationship in which the first ratio gradually increases to 100% within the target time period t1, and the change curve B satisfies that the increase rate of the first ratio gradually increases.
[0051] In the above embodiment, since the first ratio, that is, the above change amplitude, gradually increases or decreases in the target time period, the change of the first ratio over time is first fast and then slow, or first slow and then fast. Therefore, after the above multi-frame transition image is displayed, the brightness of each first pixel point also increases first fast and then slow, or first fast and then slow, so that the presented bright screen transition content is more coordinated, and a more realistic interactive experience is generated with the user.
[0052] Optionally, when the first change relationship is a change curve, the change curve may be determined based on a third-order Bezier curve. The third-order Bezier curve has control points, and the control points may be adjusted in advance to allow the third-order Bezier curve to satisfy the time-varying relationship of the first ratio, for example, a gradually increasing or decreasing rate of increase of the first ratio within a target time period, thereby obtaining the first change relationship.
[0053] Of course, in another possible embodiment, the increasing speed of the first ratio in the first change relationship remains unchanged within the target time period, that is, the first ratio increases uniformly over time. Optionally, the first change relationship can be a straight line increasing from 0% to 100% within the target time period. For example, see Figure 5 The first change relationship may be a straight line C, which represents the change relationship of the first ratio gradually increasing to 100% within the target time period t1, and the straight line C satisfies the constant increase speed of the first ratio.
[0054] In some embodiments, the electronic device generates multiple frames of transition images corresponding to multiple moments within the target time period based on the first change relationship and the first image, which may include: based on the first change relationship, adjusting the brightness of each of the second pixel points in the first image multiple times to obtain the multiple frames of transition images, and the multiple adjustments correspond one-to-one to the multiple moments. It can be understood that the above first change relationship includes a first ratio corresponding to each of the multiple moments, so based on the first ratio corresponding to each moment in the first change relationship, and the brightness of the first pixel point to the second pixel point corresponding to the first image, the brightness of each first pixel point in the transition image corresponding to each moment can be determined, and then each frame of transition image can be obtained by adjusting the brightness of the second pixel point in the first image each time to the brightness corresponding to each moment.
[0055] In one possible implementation, the electronic device may, based on the first variation relationship, perform multiple adjustments to at least one of the brightness value and saturation of each second pixel in the first image, thereby obtaining multiple frames of transitional images. It will be appreciated that the brightness value and saturation of a pixel may determine the luminance of that pixel. By adjusting at least one of the brightness value and saturation of each second pixel in the first image, the luminance of the second pixel may be varied, thereby obtaining the above transitional images.
[0056] Optionally, the color space of the first image can be an RGB color space or an RGBA color space, where R represents red, G represents green, B represents blue, and A represents transparency. Since the relationship between the three color components R, G, and B and the generated color is not intuitive, the color space of the first image can be converted into an HSL color space or an HSV color space, where H represents hue, which is the basic attribute of color, namely red, green, blue, etc.; S represents saturation, which refers to the purity of the color. The higher the hue, the purer the color, and the lower the saturation, the grayer it is; L represents brightness, and V represents lightness, with values ranging from 0 to 100%. According to the adjustment formula of S and L in the HSL color space and the above first change relationship, the brightness and saturation of the second pixel in the first image are adjusted to obtain the above transition image; alternatively, according to the adjustment formula of S and V in the HSV color space and the above first change relationship, the lightness and saturation of the second pixel in the first image are adjusted to obtain the above transition image.
[0057] Step S230: displaying each transition image in the plurality of transition images.
[0058] In some embodiments, to ensure that the electronic device can quickly respond to the screen-on event, the generated transition image can be displayed each time a transition image frame is generated. That is, the electronic device can generate the transition image while displaying the transition image, so that the electronic device can quickly complete the display of the screen-on transition content and transition to the screen-on state.
[0059] The screen control method provided in the embodiment of the present application generates multiple frames of transition images corresponding to each moment in the above target time period based on the first change relationship and the first image, that is, the multiple frames of transition images constitute the bright screen transition content that transitions from the off screen state to the bright screen state. Therefore, after the multiple frames of transition images are displayed in chronological order, the brightness of each first pixel point in the bright screen transition content can be gradually increased from the lowest brightness to the brightness of the second pixel point corresponding to each first pixel point within the target time period, and the brightness of each first pixel point has the same change amplitude at the same moment. Therefore, the first pixel point corresponding to the second pixel point with higher brightness in the first image will light up first, and the first pixel point corresponding to the second pixel point with darker brightness in the first image will light up later in the bright screen transition content, thereby generating an experience of interaction with the user when the bright screen is realized.
[0060] See also Figure 6 , Figure 6 A flow chart of a screen control method according to another embodiment of the present application is shown. The screen control method is applied to the above electronic device. Figure 6 The process shown in FIG. 1 is described in detail. Specifically, the screen control method may include the following steps:
[0061] Step S310: In response to a screen-on event for controlling the screen to be turned on, a first image is acquired.
[0062] In the embodiment of the present application, step S310 can refer to the content of the aforementioned embodiment and will not be repeated here.
[0063] Step S320: Based on the first image, controlling different areas of the screen to gradually display the screen-brightening transition content within the target time period.
[0064] Among them, the brightness of each first pixel point in the bright screen transition content gradually increases from the lowest brightness to the brightness of the second pixel point corresponding to each first pixel point in the first image within the target time period, and the brightness of each first pixel point changes at the same time with the same amplitude, and the amplitude of change is the first ratio of the degree of change value of the brightness of each first pixel point to the brightness of the second pixel point corresponding to each first pixel point.
[0065] In an embodiment of the present application, when presenting the screen-bright transition content, the electronic device can control multiple areas of the screen to gradually display the screen-bright transition content. The multiple areas correspond to different areas of the screen-bright transition content, that is, each area of the screen is controlled to gradually display the content area corresponding to each area in the screen-bright transition content. In this way, different areas of the screen can start to display the screen-bright transition content at different times, thereby better presenting the transition effect from the screen-off state to the screen-on state.
[0066] In some embodiments, the electronic device controls multiple areas of the screen to gradually display bright screen transition content based on a first image, which may include: based on the first image, controlling the screen to begin displaying the bright screen transition content in a target area within a target time period, and controlling the display area of the screen displaying the bright screen transition content to extend from the target area to other areas within the target time period. In other words, when the bright screen transition content begins to be displayed, only the target area displays the bright screen transition content, while other areas do not display content, and the display area displaying the bright screen transition content gradually extends to other areas of the screen other than the target area over time, thereby presenting a trajectory animation effect of the bright screen transition content gradually extending from the target area to other areas.
[0067] In one possible embodiment, the extension speed of the above display area gradually decreases within the target time period, and the extension speed represents the area size of the display area extended within a unit time period. Optionally, the change relationship of the completion percentage of the display area extending from the target area to the entire screen area within the target time period can also be represented by a change curve, and the completion percentage in the change curve also satisfies the gradually decreasing increase speed. It can be understood that since the first change relationship in the aforementioned embodiment also represents the change relationship of the completion percentage, the change relationship of the completion percentage of the display area extending from the target area to the entire screen area within the target time period can be the same as the first change relationship in the aforementioned embodiment.
[0068] In another possible embodiment, the extension speed of the display area gradually increases within the target time period. Optionally, the change relationship of the completion percentage of the display area extending from the target area to the entire screen area within the target time period can also be represented by a change curve, and the completion percentage in the change curve also satisfies the gradually increasing extension speed.
[0069] Of course, the extension speed of the display area within the target time period may also remain unchanged, that is, the display area extends at a uniform speed within the target time period.
[0070] In one possible embodiment, the screen lighting event is generated based on a control operation for controlling the screen lighting. Before the electronic device controls the screen to display the screen lighting transition content from the target area within the target time period based on the first image, and controls the display area of the screen displaying the screen lighting transition content to extend from the target area to other areas within the target time period, it can also determine the area corresponding to the control operation from the screen as the target area. For example, if the above control operation is an operation for the power button, the screen area of a preset size adjacent to the power button can be used as the target area; for another example, if the above control operation is an operation for inserting a Universal Serial Bus (USB) plug, the screen area of a preset size adjacent to the USB port can be used as the target area; for another example, if the above control operation is an operation for clicking the screen, the click area can be used as the target area. Of course, the above is only an example, and the actual method of selecting the area corresponding to the control operation is not limited. Through this embodiment, the display of the screen lighting transition content can be related to the user's actual control operation, thereby better creating a sense of experience of interaction with the user.
[0071] In some embodiments, when controlling different areas of the screen to gradually display the bright screen transition content within a target time period, the brightness of the first pixel in the content initially displayed in each area is the brightness corresponding to the moment when the bright screen transition content is initially displayed in that area. In other words, the bright screen transition content mentioned above refers to the content displayed corresponding to the entire screen area, except that the moments when the bright screen transition content begins to be displayed in different areas are different. Therefore, when each bright screen transition content begins to be displayed, the display does not start from the lowest brightness. Instead, the brightness of the second pixel in the content displayed in that area at that moment is directly determined based on the moment when the bright screen transition content begins to be displayed in that area, and the corresponding content is displayed. As a result, the above-mentioned change amplitudes in the content displayed in each area of the screen at the same moment are the same.
[0072] The screen control method provided in the embodiment of the present application can achieve, when controlling the screen to light up, generating transition content with gradually increasing brightness of each pixel point in the first image, so that the first pixel point corresponding to the second pixel point with higher brightness in the first image will light up first, and the first pixel point corresponding to the second pixel point with darker brightness in the first image will light up later in the screen-lighting transition content. Therefore, when the screen is lit up, a sense of interaction with the user can be generated, thereby improving the user's usage experience; in addition, in the process of displaying the screen-lighting transition content, different areas of the screen are controlled to gradually display the screen-lighting transition content, so that different areas of the screen start displaying the screen-lighting transition content at different times, thereby better presenting the transition effect from the off screen state to the screen-lighting state.
[0073] See also Figure 7 , Figure 7 A flow chart of a screen control method provided by another embodiment of the present application is shown. The screen control method is applied to the above electronic device. Figure 7 The process shown in FIG. 1 is described in detail. Specifically, the screen control method may include the following steps:
[0074] Step S410: In response to a screen-off event for controlling the screen to be turned off, acquiring a second image.
[0075] In an embodiment of the present application, when the screen of the electronic device is in a screen-on state, a screen-off event for controlling the screen to turn off can be detected, so that when the screen-off event is detected, the screen can be controlled to present screen-off transition content when the screen is turned off.
[0076] In one possible implementation, when the electronic device detects the above screen-off event, it responds to the screen-off event by acquiring the image displayed when the screen-off event is detected and using it as the second image to display the screen-off transition content according to the second image. For example, if the image displayed when the electronic device detects the screen-off event is the main interface image, the main interface image can be acquired as the above second image; for another example, if the image displayed when the electronic device detects the screen-off event is the interface image of application B, the interface image of application B can be acquired as the above second image.
[0077] In another possible implementation, the second image may also be a pre-stored image used to generate screen-off transition content. When the screen-off event is detected, the second image may be read in response to the screen-on / off event.
[0078] Step S420: Based on the second image, control the screen to display screen-off transition content.
[0079] Among them, the brightness of each third pixel point in the screen-off transition content gradually decreases from the target brightness to the minimum brightness within the target time period, and the brightness of each third pixel point changes at the same time. The target brightness is the brightness of the fourth pixel point corresponding to each third pixel point in the second image, and the change amplitude is the second ratio of the degree of change of the brightness of each third pixel point to the brightness of the fourth pixel point corresponding to each third pixel point.
[0080] In an embodiment of the present application, the principle of an electronic device displaying screen-off transition content may be similar to the principle of displaying screen-on transition content in the aforementioned embodiment. The difference is that the brightness of each third pixel point gradually decreases from the target brightness to the minimum brightness within the target time period, until all pixels are reduced to the minimum brightness, and the screen is controlled to power off and enter the screen-off state.
[0081] It can be understood that the brightness of the third pixel point is reduced from the above target brightness to the minimum brightness, which is also a dynamic process. Therefore, the above second ratio can also be regarded as the completion percentage in the process of reducing the above target brightness to the minimum brightness. Therefore, the method of controlling the screen to display the screen-off transition content based on the second image can refer to the method of controlling the screen to display the screen-on transition content based on the first image in the aforementioned embodiment, which will not be repeated here.
[0082] It should be noted that when implementing the control of the screen displaying the screen-off transition content based on the second image, the second image can also be used to control different screen areas to gradually replace the image area corresponding to the screen area in the second image with the content area corresponding to the screen area in the screen-off transition content within the target time period. In this way, when the screen displays the second image, different areas of the screen start to display the screen-off transition content at different times (that is, the brightness of the content displayed in different areas starts to decrease at different times), thereby better presenting the transition effect from the screen-on state to the screen-off state. It can be understood that this implementation is similar to the method of gradually displaying the screen-on transition content in multiple areas of the screen based on the first image in the aforementioned embodiment. The difference is that the initial state of the screen in this embodiment is the state of displaying the second image, while the initial state of the screen when displaying the screen-on transition content in the aforementioned embodiment is the state of not displaying content. Its specific implementation method can also refer to the content of the aforementioned embodiment and will not be repeated here.
[0083] The screen control method provided in the embodiments of the present application can achieve, when controlling the screen off, generating transition content in which the brightness of each pixel in the second image gradually decreases, based on the brightness of each pixel, thereby improving the display effect of the screen off. In addition, the fourth pixel corresponding to the third pixel with a relatively dark brightness in the second image will darken first in the screen off transition content, while the fourth pixel corresponding to the third pixel with a relatively high brightness in the second image will darken later. Therefore, when the screen is off, a sense of interaction with the user can be generated, thereby improving the user experience.
[0084] Next, pass Figure 8 This article introduces how to display transitional content when the screen of an electronic device is on and off.
[0085] like Figure 8 As shown, when a screen-on event is detected, the screen is powered on and triggers the drawing of the first image, and then the screen-on transition content is generated by the synthesizer, and then the screen is displayed. After the display of the screen-on transition content is completed, the screen enters the final screen-on state from the screen-off state (that is, the screen does not display the screen-on transition content when the screen is not on). When a screen-off event is detected, the drawing of the second image is triggered, and then the screen-off transition content is generated by the synthesizer, and then the screen is displayed. After the display of the screen-off transition content is completed, the screen is controlled to power off, and the screen enters the screen-off state from the screen-on state.
[0086] See also Figure 9 , which shows a structural block diagram of a screen control device 600 provided by an embodiment of the present application. The screen control device 600 applies the above-mentioned electronic device, and the screen control device 600 includes: a first image acquisition module 610 and a first image display module 620. The first image acquisition module 610 is used to acquire a first image in response to a screen-lighting event for controlling the screen to light up; the first image display module 620 is used to control the screen to display screen-lighting transition content based on the first image, wherein the brightness of each first pixel in the screen-lighting transition content gradually increases from the lowest brightness to the brightness of the second pixel corresponding to each first pixel in the first image within a target time period, and the brightness of each first pixel at the same time has the same change amplitude, and the change amplitude is a first ratio of the change degree value of the brightness of each first pixel to the brightness of the second pixel corresponding to each first pixel.
[0087] In some embodiments, the first image display module 720 can be specifically used to: generate a multi-frame transition image corresponding to multiple moments within the target time period based on the first change relationship and the first image, the first change relationship including the first ratio corresponding to each of the multiple moments, and the multi-frame transition image corresponding one-to-one to the multiple moments; and display each frame of the multi-frame transition image.
[0088] In a possible embodiment, the first image display module 720 can also be used to: based on the first change relationship, adjust the brightness of each of the second pixel points in the first image multiple times to obtain the multi-frame transition image, and the multiple adjustments correspond one-to-one to the multiple moments.
[0089] Optionally, the first image display module 720 may also be configured to: based on the first change relationship, adjust at least one of the brightness value and the saturation of each of the second pixel points in the first image multiple times to obtain the multi-frame transition image.
[0090] Optionally, in the first change relationship, an increasing speed of the first ratio within the target time period gradually decreases; or
[0091] In the first changing relationship, an increasing speed of the first ratio within the target time period gradually increases.
[0092] In some embodiments, the first image display module 720 may be specifically configured to: based on the first image, control different areas of the screen to gradually display the screen-brightening transition content within the target time period.
[0093] In a possible embodiment, the first image display module 720 can also be specifically used to: based on the first image, control the screen to display the bright screen transition content starting from the target area within the target time period, and control the display area of the screen displaying the bright screen transition content to extend from the target area to other areas within the target time period.
[0094] Optionally, the extension speed of the display area within the target time period gradually decreases; or
[0095] The extension speed of the display area gradually increases within the target time period.
[0096] Optionally, the screen-lighting event is generated based on a control operation for controlling screen lighting, and the screen control device 600 further includes a region determination module. The region determination module is configured to determine, from the screen, a region corresponding to the control operation as the target region before controlling the screen to display the screen-lighting transition content starting from a target region within the target time period based on the first image, and controlling the display region of the screen displaying the screen-lighting transition content to extend from the target region to other regions within the target time period.
[0097] In some embodiments, the first image acquisition module 710 may be specifically configured to: in response to a screen-lighting event for controlling the screen to light up, acquire a first frame of image to be displayed on the screen after the screen-lighting event is detected as the first image.
[0098] See also Figure 10 , which shows a structural block diagram of a screen control device 700 provided by another embodiment of the present application. The screen control device 700 applies the above-mentioned electronic device, and the screen control device 700 includes: a second image acquisition module 710 and a second image display module 720. The second image acquisition module 710 is used to acquire a second image in response to a screen-off event for controlling the screen to turn off; the second image display module 720 is used to control the screen to display screen-off transition content based on the second image, wherein the brightness of each third pixel in the screen-off transition content gradually decreases from the target brightness to the minimum brightness within the target time period, and the brightness of each third pixel at the same time has the same change amplitude, the target brightness is the brightness of the fourth pixel corresponding to each third pixel in the second image, and the change amplitude is the second ratio of the brightness change degree value of each third pixel to the brightness of the fourth pixel corresponding to each third pixel.
[0099] In some embodiments, the second image acquisition module 710 may be specifically configured to: in response to a screen-off event for controlling the screen to be turned off, acquire an image displayed when the screen-off event is detected as the second image.
[0100] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0101] In several embodiments provided in this application, the coupling between modules may be electrical, mechanical or other forms of coupling.
[0102] In addition, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The above-mentioned integrated modules may be implemented in the form of hardware or software functional modules.
[0103] In summary, the solution provided by this application acquires a first image in response to a screen-on event for controlling the screen to light up; based on the first image, controls the screen to display screen-on transition content, wherein the brightness of each first pixel in the screen-on transition content gradually increases from a minimum brightness to the brightness of a second pixel corresponding to each first pixel in the first image within a target time period, and the brightness of each first pixel changes by the same magnitude at the same time, the magnitude being a first ratio of the brightness change value of each first pixel to the brightness of the second pixel corresponding to each first pixel. Thus, when controlling the screen to light up, transition content can be generated in which the brightness of each pixel in the image gradually increases, thereby improving the display effect of the screen.
[0104] In addition, by responding to a screen-off event for controlling the screen to turn off, a second image is obtained, and based on the second image, the screen is controlled to display screen-off transition content, wherein the brightness of each third pixel in the screen-off transition content gradually decreases from the target brightness to the minimum brightness within the target time period, and the brightness of each third pixel changes at the same time with the same amplitude, the target brightness is the brightness of the fourth pixel corresponding to each third pixel in the second image, and the amplitude of change is the second ratio of the brightness change value of each third pixel to the brightness of the fourth pixel corresponding to each third pixel. In this way, when controlling the screen to turn off, transition content with gradually decreasing brightness of each pixel in the image can be generated, thereby improving the display effect of the screen turning off.
[0105] Please refer to Figure 11, which shows a structural block diagram of an electronic device provided in an embodiment of the present application. The electronic device 100 can be an electronic device capable of running applications, such as a smartphone, a tablet computer, a smart watch, an e-book, etc. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by one or more processors 110, and the one or more applications are configured to execute the method described in the aforementioned method embodiment.
[0106] The processor 110 may include one or more processing cores. The processor 110 utilizes various interfaces and circuits to connect various components within the electronic device 100. It executes instructions, programs, code sets, or instruction sets stored in the memory 120, and accesses data stored in the memory 120 to perform various functions and process data within the electronic device 100. Optionally, the processor 110 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 110 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem handles wireless communications. It is understood that the modem may not be integrated into the processor 110 and may be implemented separately via a communications chip.
[0107] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). The memory 120 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data created by the electronic device 100 during use (such as a phone book, audio and video data, chat history data), etc.
[0108] Please refer to Figure 12 , which shows a block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 800 stores program code, which can be called by a processor to execute the method described in the above method embodiment.
[0109] The computer-readable storage medium 800 can be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 800 has storage space for program code 810 for executing any of the method steps described above. These program codes can be read from or written to one or more computer program products. The program code 810 can be compressed, for example, in a suitable form.
[0110] Finally, it should be noted that 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 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 cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A screen control method, characterized in that: Applied to an electronic device, the electronic device includes a screen, and the method includes: In response to a screen-lighting event for controlling the screen to light up, acquiring a first image; Based on the first image, controlling the screen to display screen-brightness transition content; The brightness of each first pixel in the bright screen transition content gradually increases from the lowest brightness to the brightness of the second pixel corresponding to each first pixel in the first image within a target time period, and the brightness of each first pixel changes by the same magnitude at the same time, the magnitude of which is a first ratio of the brightness change value of each first pixel to the brightness of the second pixel corresponding to each first pixel. The brightness is the brightness or darkness of the content, and is determined by the brightness value and saturation of the pixel. The controlling the screen to display screen-bright transition content based on the first image includes: generating, based on a first change relationship and the first image, a plurality of transition images corresponding to a plurality of moments within the target time period, wherein the first change relationship includes the first ratio corresponding to each of the plurality of moments, and the plurality of transition images correspond one-to-one to the plurality of moments; Each time a frame of the transition image is generated, the generated transition image is displayed.
2. The method according to claim 1, characterized in that The step of generating a plurality of transition images corresponding to a plurality of moments within the target time period based on the first change relationship and the first image includes: Based on the first change relationship, the brightness of each of the second pixels in the first image is adjusted multiple times to obtain the multiple frames of transition images, and the multiple adjustments correspond one-to-one to the multiple moments.
3. The method according to claim 2, characterized in that The step of adjusting the brightness of each of the second pixels in the first image multiple times based on the first change relationship to obtain the multi-frame transition image includes: Based on the first change relationship, at least one of the brightness value and the saturation of each of the second pixel points in the first image is adjusted multiple times to obtain the multi-frame transition image.
4. The method according to any one of claims 1 to 3, characterized in that The controlling the screen to display screen-bright transition content based on the first image includes: Based on the first image, different areas of the screen are controlled to gradually display the screen-brightening transition content within the target time period.
5. The method according to claim 4, characterized in that The step of controlling the plurality of areas of the screen to gradually display the screen-brightening transition content based on the first image includes: Based on the first image, the screen is controlled to display the screen-brightening transition content starting from a target area within the target time period, and the display area of the screen displaying the screen-brightening transition content is controlled to extend from the target area to other areas within the target time period.
6. The method according to claim 5, characterized in that The extension speed of the display area gradually decreases within the target time period; or The extension speed of the display area gradually increases within the target time period.
7. The method according to claim 5, characterized in that The screen-lighting event is generated based on a control operation for controlling screen lighting. Before controlling the screen to display the screen-lighting transition content starting from a target area within the target time period based on the first image, and controlling the display area of the screen displaying the screen-lighting transition content to extend from the target area to other areas within the target time period, the method further includes: An area corresponding to the control operation is determined from the screen as the target area.
8. The method according to any one of claims 1 to 3, characterized in that The acquiring a first image in response to a screen-on event for controlling the screen to be turned on includes: In response to a screen-lighting event for controlling the screen to light up, a first frame image to be displayed on the screen after the screen-lighting event is detected is acquired as the first image.
9. A screen control method, characterized in that: Applied to an electronic device, the electronic device includes a screen, and the method includes: acquiring a second image in response to a screen-off event for controlling the screen to be turned off; Based on the second image, controlling the screen to display screen-off transition content; The brightness of each third pixel in the screen-off transition content gradually decreases from the target brightness to the minimum brightness within the target time period, and the brightness of each third pixel has the same change amplitude at the same time. The target brightness is the brightness of the fourth pixel corresponding to each third pixel in the second image. The change amplitude is a second ratio of the change degree value of the brightness of each third pixel to the brightness of the fourth pixel corresponding to each third pixel. The brightness is the brightness and darkness of the content, and is determined by the brightness value and saturation of the pixel. The controlling the screen to display screen-off transition content based on the second image includes: generating, based on the second change relationship and the second image, a plurality of transition images corresponding to a plurality of moments within the target time period, wherein the second change relationship includes the second ratio corresponding to each of the plurality of moments, and the plurality of transition images correspond one-to-one to the plurality of moments; Each time a frame of the transition image is generated, the generated transition image is displayed.
10. The method according to claim 9, characterized in that The acquiring a second image in response to a screen-off event for controlling the screen to be turned off includes: In response to a screen-off event for controlling the screen to be turned off, an image displayed when the screen-off event is detected is acquired as the second image.
11. A screen control device, characterized in that: The device includes: a first image acquisition module and a first image display module, wherein: The first image acquisition module is used to acquire a first image in response to a screen-on event for controlling the screen to turn on; The first image display module is configured to control the screen to display bright screen transition content based on the first image, wherein the brightness of each first pixel in the bright screen transition content gradually increases from a minimum brightness to the brightness of a second pixel corresponding to each first pixel in the first image within a target time period, and the brightness of each first pixel changes by the same magnitude at the same time, the magnitude of the change being a first ratio of a value of a degree of brightness change of each first pixel to a brightness of the second pixel corresponding to each first pixel, the brightness being the brightness or darkness of the content, and being determined by a luminance value and a saturation of the pixel; The first image display module is specifically used to generate multiple frames of transition images corresponding to multiple moments within the target time period based on the first change relationship and the first image, the first change relationship including the first ratio corresponding to each of the multiple moments, and the multiple frames of transition images correspond one-to-one to the multiple moments; each time a frame of the transition image is generated, the generated transition image is displayed.
12. A screen control device, characterized in that: The device includes: a second image acquisition module and a second image display module, wherein: The second image acquisition module is configured to acquire a second image in response to a screen-off event for controlling the screen to be turned off; The second image display module is used to control the screen to display screen-off transition content based on the second image, wherein the brightness of each third pixel in the screen-off transition content gradually decreases from the target brightness to the minimum brightness within the target time period, and the brightness of each third pixel at the same time has the same change amplitude, the target brightness is the brightness of the fourth pixel corresponding to each third pixel in the second image, the change amplitude is the second ratio of the change degree value of the brightness of each third pixel to the brightness of the fourth pixel corresponding to each third pixel, the brightness is the brightness and darkness of the content, and the brightness is determined by the brightness value and saturation of the pixel; The second image display module is specifically used to generate multiple frames of transition images corresponding to multiple moments within the target time period based on the second change relationship and the second image, the second change relationship including the second ratio corresponding to each of the multiple moments, and the multiple frames of transition images correspond one-to-one to the multiple moments; each time a frame of the transition image is generated, the generated transition image is displayed.
13. An electronic device, characterized in that: include: one or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to perform the method according to any one of claims 1 to 10.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, which can be called by a processor to execute the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Control method and device
CN106227425A
Control method and control device
CN106228946A
Intelligent fingerprint unlocking method, mobile terminal and computer readable storage medium
CN109375844A
Screen control method and device, terminal and storage medium
CN112256220A