Wallpaper display method and electronic device

By converting the wallpaper to a dark image when switching screen modes, the problem of eye irritation caused by changes in screen light is solved, thereby improving user experience and reducing power consumption.

CN116225582BActive Publication Date: 2025-10-28HONOR DEVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111482292.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2025-10-28
Estimated Expiration
2041-12-06

AI Technical Summary

Technical Problem

When returning to the desktop from an application interface while the screen is in dark mode, the significant change in screen light intensity can irritate the user's eyes and negatively impact the user experience.

Method used

When receiving an operation to set a wallpaper, the target image is converted into a dark image with lower brightness, and the dark or target image is adaptively displayed as the wallpaper according to the screen mode to ensure that the wallpaper color is adapted to the screen mode.

Benefits of technology

It reduces the stimulation of light to the eyes, improves the user's screen usage experience in different scenarios, and reduces device power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116225582B_ABST
    Figure CN116225582B_ABST
Patent Text Reader

Abstract

This application provides a wallpaper display method and an electronic device, relating to the field of display technology. In this solution, when a request to set a target image as wallpaper is received, the electronic device marks the target image as wallpaper and converts it to a darker image with lower brightness. Then, it detects whether the electronic device's screen mode is dark or light. If the screen mode is dark, the dark image is displayed as wallpaper; otherwise, if the screen mode is light, the target image is displayed as wallpaper. This allows the wallpaper color to adapt to the screen mode in different situations. Especially when the screen is in dark mode, returning to the desktop from an application interface allows the use of a dark image as wallpaper, reducing eye strain and thus meeting the user's screen usage needs in different scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of display technology, and in particular to a wallpaper display method and electronic device. Background Technology

[0002] Currently, mobile phones and other electronic devices offer light and dark modes.

[0003] For example, if a user is reading an ebook in a browser during the day or in a bright environment and the screen brightness is too low, making it difficult to see the content, the screen can be set to a light mode. Conversely, if a user is reading an ebook in a browser at night or in a dim environment and the screen brightness is too high, causing eye discomfort, the screen can be set to a dark mode.

[0004] However, if a user returns to the home screen while the phone is displaying a dark mode interface, and the wallpaper is lighter or brighter, the screen's light intensity will change significantly, causing strong eye strain and negatively impacting the user experience. Summary of the Invention

[0005] This application provides a wallpaper display method and an electronic device that solves the problem of significant changes in screen brightness when returning to the desktop from an application interface while the screen is in dark mode.

[0006] To achieve the above objectives, this application adopts the following technical solution:

[0007] In a first aspect, embodiments of this application provide a wallpaper display method, the method comprising:

[0008] Receive a first operation, the first operation being used to request the electronic device to set the target image as wallpaper;

[0009] In response to the first operation, the target image is marked as wallpaper and converted into a dark image. The target image and the dark image have the same screen elements and the same arrangement of screen elements. The brightness of the target image is greater than that of the dark image.

[0010] The dark image will be displayed as wallpaper if the electronic device's screen mode is dark; or the target image will be displayed as wallpaper if the electronic device's screen mode is light.

[0011] According to the solution proposed in this application, when a request is received to set a target image as wallpaper, the electronic device marks the target image as wallpaper and converts it to a darker image with lower brightness. Then, the screen mode of the electronic device is detected. If the screen mode is dark mode, the dark image is displayed as wallpaper; otherwise, if the screen mode is light mode, the target image is displayed as wallpaper. This allows the wallpaper color to adapt to the screen mode in different situations. Especially when the screen is in dark mode, returning to the desktop from the application interface allows for the use of a dark image as wallpaper, thereby reducing eye strain from light and meeting the user's screen usage needs in different scenarios, thus improving the user experience.

[0012] In some embodiments, the brightness of the target image is greater than the brightness of the dark image, including at least one of the following:

[0013] The color value of the target image is greater than the color value of the dark image;

[0014] The contrast of the target image is greater than that of the dark image;

[0015] The illuminance of the target image is greater than that of the dark image;

[0016] The grayscale of the target image is smaller than that of the dark image.

[0017] In some embodiments, after converting the target image to a dark image, the method further includes:

[0018] Establish a relationship between the target image and the dark image, and store the dark image;

[0019] Displaying dark-colored images as wallpapers includes:

[0020] Based on the association, colored images are displayed as wallpapers.

[0021] In some embodiments, the method further includes:

[0022] If a selection operation for dark mode is received, the screen mode of the electronic device is set to dark mode; or, if a selection operation for light mode is received, the screen mode of the electronic device is set to light mode.

[0023] In some embodiments, the method further includes:

[0024] If the preset conditions are met, the screen mode of the electronic device will be set to dark mode; or if the preset conditions are not met, the screen mode of the electronic device will be set to light mode.

[0025] The preset conditions include at least one of the following:

[0026] The system time of the electronic device is within a preset time period;

[0027] Electronic devices are located at a preset geographical location;

[0028] The intensity of the detected external light is less than or equal to the preset intensity;

[0029] The application currently running is the default application.

[0030] In some embodiments, dark mode and light mode are provided by the electronic device's system; or, dark mode and light mode are provided by third-party applications.

[0031] In some embodiments, wallpaper includes desktop wallpaper;

[0032] When the electronic device's screen mode is dark, display a dark image as wallpaper; or, when the electronic device's screen mode is light, display the target image as wallpaper, including:

[0033] When the target application's interface is displayed, receive an operation that triggers a return to the desktop from the target application's interface;

[0034] In response to this operation, if the electronic device's screen mode is dark, a dark image is displayed as the desktop wallpaper; or, if the electronic device's screen mode is light, the target image is displayed as the desktop wallpaper.

[0035] In some embodiments, wallpaper includes desktop wallpaper;

[0036] When the electronic device's screen mode is dark, display a dark image as wallpaper; or, when the electronic device's screen mode is light, display the target image as wallpaper, including:

[0037] When the screen of an electronic device is locked, it receives the operation to unlock the screen;

[0038] In response to this operation, if the electronic device's screen mode is dark, a dark image is displayed as the desktop wallpaper; or if the electronic device's screen mode is light, the target image is displayed as the desktop wallpaper.

[0039] In some embodiments, wallpapers include lock screen wallpapers;

[0040] When the electronic device's screen mode is dark, display a dark image as wallpaper; or, when the electronic device's screen mode is light, display the target image as wallpaper, including:

[0041] When the screen of the electronic device is in a screen-off state, it receives an operation to trigger the screen to light up;

[0042] In response to this operation, if the electronic device's screen mode is dark, a dark image is displayed as the lock screen wallpaper; or, if the electronic device's screen mode is light, the target image is displayed as the lock screen wallpaper.

[0043] In some embodiments, converting the target image to a dark image includes:

[0044] Convert the target image into a bitmap;

[0045] Determine the wallpaper type to which this bitmap belongs;

[0046] The bitmap is set with color filter parameters corresponding to the wallpaper type to which it belongs, resulting in a dark image;

[0047] Different wallpaper types have different color filter parameters.

[0048] In some embodiments, determining the wallpaper type to which the bitmap belongs includes:

[0049] Get the contrast of each pixel in the bitmap;

[0050] Calculate the average contrast of the bitmap using the contrast of all pixels in the bitmap;

[0051] Based on the average contrast, determine the wallpaper type to which the bitmap belongs.

[0052] In some embodiments, determining the wallpaper type to which the bitmap belongs includes:

[0053] Get the contrast and illuminance of each pixel in the bitmap;

[0054] Calculate the average contrast of the bitmap using the contrast of all pixels in the bitmap;

[0055] Calculate the differential illuminance of the bitmap using the illuminance of all pixels;

[0056] Based on the average contrast and the differential illuminance, the wallpaper type to which the bitmap belongs is determined.

[0057] In some embodiments, determining the wallpaper type to which the bitmap belongs based on average contrast and differential illuminance includes:

[0058] If the average contrast is less than the first value, the wallpaper type of the bitmap is determined according to the value range to which the average contrast belongs.

[0059] If the average contrast is greater than or equal to the first value, the wallpaper type to which the bitmap belongs is determined according to the numerical range to which the differential illuminance belongs.

[0060] Secondly, this application provides a wallpaper display method, the method comprising:

[0061] If the desktop wallpaper is the target image, and a dark mode selection is received, or if preset conditions are met, the desktop wallpaper will be updated to display as a dark image. The target image and the dark image have the same screen elements and the same arrangement of screen elements, and the brightness of the target image is greater than that of the dark image.

[0062] According to the solution proposed in this application, when the screen mode of the electronic device is in light mode, the desktop wallpaper is a target image corresponding to the light mode. Subsequently, if a selection action for dark mode is received, or if the preset conditions for enabling dark mode are met, the electronic device will update the desktop wallpaper to display a darker image with lower brightness. In this way, the wallpaper color adapts to the screen mode, thus meeting the user's screen usage needs in different scenarios and improving the user experience.

[0063] In some embodiments, the brightness of the target image is greater than the brightness of the dark image, including at least one of the following:

[0064] The color value of the target image is greater than the color value of the dark image;

[0065] The contrast of the target image is greater than that of the dark image;

[0066] The illuminance of the target image is greater than that of the dark image;

[0067] The grayscale of the target image is smaller than that of the dark image.

[0068] In some embodiments, the method further includes:

[0069] If the desktop wallpaper is a dark image, and a selection action to a light mode is received, or if the preset conditions are not met, the desktop wallpaper will be updated to display the target image.

[0070] In some embodiments, the method further includes, before displaying the target image and the dark image as desktop wallpaper:

[0071] Receive a first operation, which is used to request that the target image be set as the desktop wallpaper;

[0072] In response to the first operation, the target image is marked as the desktop wallpaper, the target image is converted to a dark image, and an association is established between the target image and the dark image.

[0073] In some embodiments, the preset conditions include at least one of the following:

[0074] The system time of the electronic device is within a preset time period;

[0075] Electronic devices are located at a preset geographical location;

[0076] The intensity of the detected external light is less than or equal to the preset intensity;

[0077] The application currently running is the default application.

[0078] In some embodiments, converting the target image to a dark image includes:

[0079] Convert the target image into a bitmap;

[0080] Determine the wallpaper type to which this bitmap belongs;

[0081] The bitmap is set with color filter parameters corresponding to the wallpaper type to which it belongs, resulting in a dark image;

[0082] Different wallpaper types have different color filter parameters.

[0083] In some embodiments, determining the wallpaper type to which the bitmap belongs includes:

[0084] Get the contrast of each pixel in the bitmap;

[0085] Calculate the average contrast of the bitmap using the contrast of all pixels in the bitmap;

[0086] Based on the average contrast, determine the wallpaper type to which the bitmap belongs.

[0087] In some embodiments, determining the wallpaper type to which the bitmap belongs includes:

[0088] Get the contrast and illuminance of each pixel in the bitmap;

[0089] Calculate the average contrast of the bitmap using the contrast of all pixels in the bitmap;

[0090] Calculate the differential illuminance of the bitmap using the illuminance of all pixels;

[0091] Based on the average contrast and the differential illuminance, the wallpaper type to which the bitmap belongs is determined.

[0092] In some embodiments, determining the wallpaper type to which the bitmap belongs based on average contrast and differential illuminance includes:

[0093] If the average contrast is less than the first value, the wallpaper type of the bitmap is determined according to the value range to which the average contrast belongs.

[0094] If the average contrast is greater than or equal to the first value, the wallpaper type to which the bitmap belongs is determined according to the numerical range to which the differential illuminance belongs.

[0095] Thirdly, this application provides a wallpaper display method, the method comprising:

[0096] Receive a first operation, the first operation being used to request the electronic device to set the target image as wallpaper;

[0097] In response to this first operation, the target image is marked as wallpaper;

[0098] If the screen mode of the electronic device is dark mode, convert the target image to a dark image and display it as wallpaper; or, if the screen mode of the electronic device is light mode, display the target image as wallpaper.

[0099] The target image and the dark image have the same image elements and the same arrangement of image elements, and the brightness of the target image is greater than that of the dark image.

[0100] The solution proposed in this application allows for temporary suspension of the target image conversion after receiving the first operation. This means that if a different image is used as the wallpaper before the conditions for displaying a dark wallpaper are met, the device's power consumption is reduced to some extent because no unnecessary conversion operation was performed on the target image beforehand.

[0101] In some embodiments, the brightness of the target image is greater than the brightness of the dark image, including at least one of the following:

[0102] The color value of the target image is greater than the color value of the dark image;

[0103] The contrast of the target image is greater than that of the dark image;

[0104] The illuminance of the target image is greater than that of the dark image;

[0105] The grayscale of the target image is smaller than that of the dark image.

[0106] In some embodiments, after converting the target image to a dark image, the method further includes:

[0107] Establish a relationship between the target image and the dark image, and store the dark image.

[0108] In some embodiments, the method further includes:

[0109] If a selection operation for dark mode is received, the screen mode of the electronic device is set to dark mode; or, if a selection operation for light mode is received, the screen mode of the electronic device is set to light mode.

[0110] In some embodiments, the method further includes:

[0111] If the preset conditions are met, the screen mode of the electronic device will be set to dark mode; or if the preset conditions are not met, the screen mode of the electronic device will be set to light mode.

[0112] The preset conditions include at least one of the following:

[0113] The system time of the electronic device is within a preset time period;

[0114] Electronic devices are located at a preset geographical location;

[0115] The intensity of the detected external light is less than or equal to the preset intensity;

[0116] The application currently running is the default application.

[0117] In some embodiments, dark mode and light mode are provided by the electronic device's system; or, dark mode and light mode are provided by third-party applications.

[0118] In some embodiments, wallpaper includes desktop wallpaper;

[0119] When the electronic device's screen mode is dark, display a dark image as wallpaper; or, when the electronic device's screen mode is light, display the target image as wallpaper, including:

[0120] When the target application's interface is displayed, receive an operation that triggers a return to the desktop from the target application's interface;

[0121] In response to this operation, if the electronic device's screen mode is dark, a dark image is displayed as the desktop wallpaper; or, if the electronic device's screen mode is light, the target image is displayed as the desktop wallpaper.

[0122] In some embodiments, wallpaper includes desktop wallpaper;

[0123] When the electronic device's screen mode is dark, display a dark image as wallpaper; or, when the electronic device's screen mode is light, display the target image as wallpaper, including:

[0124] When the screen of an electronic device is locked, it receives the operation to unlock the screen;

[0125] In response to this operation, if the electronic device's screen mode is dark, a dark image is displayed as the desktop wallpaper; or if the electronic device's screen mode is light, the target image is displayed as the desktop wallpaper.

[0126] In some embodiments, wallpapers include lock screen wallpapers;

[0127] When the electronic device's screen mode is dark, display a dark image as wallpaper; or, when the electronic device's screen mode is light, display the target image as wallpaper, including:

[0128] When the screen of the electronic device is in a screen-off state, it receives an operation to trigger the screen to light up;

[0129] In response to this operation, if the electronic device's screen mode is dark, a dark image is displayed as the lock screen wallpaper; or, if the electronic device's screen mode is light, the target image is displayed as the lock screen wallpaper.

[0130] In some embodiments, converting the target image to a dark image includes:

[0131] Convert the target image into a bitmap;

[0132] Determine the wallpaper type to which this bitmap belongs;

[0133] The bitmap is set with color filter parameters corresponding to the wallpaper type to which it belongs, resulting in a dark image;

[0134] Different wallpaper types have different color filter parameters.

[0135] In some embodiments, determining the wallpaper type to which the bitmap belongs includes:

[0136] Get the contrast of each pixel in the bitmap;

[0137] Calculate the average contrast of the bitmap using the contrast of all pixels in the bitmap;

[0138] Based on the average contrast, determine the wallpaper type to which the bitmap belongs.

[0139] In some embodiments, determining the wallpaper type to which the bitmap belongs includes:

[0140] Get the contrast and illuminance of each pixel in the bitmap;

[0141] Calculate the average contrast of the bitmap using the contrast of all pixels in the bitmap;

[0142] Calculate the differential illuminance of the bitmap using the illuminance of all pixels;

[0143] Based on the average contrast and the differential illuminance, the wallpaper type to which the bitmap belongs is determined.

[0144] In some embodiments, determining the wallpaper type to which the bitmap belongs based on average contrast and differential illuminance includes:

[0145] If the average contrast is less than the first value, the wallpaper type of the bitmap is determined according to the value range to which the average contrast belongs.

[0146] If the average contrast is greater than or equal to the first value, the wallpaper type to which the bitmap belongs is determined according to the numerical range to which the differential illuminance belongs.

[0147] Fourthly, this application provides a wallpaper display device, which includes units for performing the methods described in the first to third aspects above. This device can correspond to performing the methods described in the first to third aspects above. For a detailed description of the units within this device, please refer to the descriptions in the first to third aspects above; for brevity, they will not be repeated here.

[0148] Fifthly, embodiments of this application provide an electronic device including a processor coupled to a memory for storing computer programs or instructions. The processor executes the computer programs or instructions stored in the memory, causing the methods of the first to third aspects to be performed. For example, the processor executes the computer programs or instructions stored in the memory, causing the device to perform the methods of the first to third aspects.

[0149] Sixthly, embodiments of this application provide a computer-readable storage medium having a computer program (also referred to as instructions or code) stored thereon for implementing the methods of the first to third aspects. For example, when the computer program is executed by a computer, the computer can perform the methods of the first to third aspects.

[0150] In a seventh aspect, embodiments of this application provide a chip including a processor. The processor is used to read and execute a computer program stored in a memory to perform the methods of the first to third aspects and any possible implementation thereof. Optionally, the chip further includes a memory connected to the processor via a circuit or wire.

[0151] Eighthly, embodiments of this application provide a computer program product, the computer program product including a computer program (also referred to as instructions or code), which, when executed by a computer, causes the computer to implement the methods of the first to third aspects.

[0152] It is understood that the beneficial effects of aspects four through eight above can be found in the relevant descriptions of aspects one through three above, and will not be repeated here. Attached Figure Description

[0153] Figure 1 A schematic diagram illustrating wallpapers displayed in different modes according to embodiments of this application;

[0154] Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;

[0155] Figure 3 This is a schematic diagram of the technical architecture of the electronic device provided in the embodiments of this application;

[0156] Figure 4 A schematic flowchart illustrating a wallpaper display method provided in an embodiment of this application;

[0157] Figure 5 A schematic diagram illustrating the operation of setting a time period for switching wallpapers, provided in an embodiment of this application;

[0158] Figure 6 This is an operational diagram illustrating the setting of a time period for switching wallpapers, provided in another embodiment of this application.

[0159] Figure 7 A schematic diagram illustrating the operation of setting the location for switching wallpapers according to an embodiment of this application;

[0160] Figure 8 A schematic diagram illustrating the operation of setting the location for switching wallpapers, provided for another embodiment of this application;

[0161] Figure 9 This is an operational diagram of an app for switching wallpapers provided in an embodiment of this application;

[0162] Figure 10 This is a schematic diagram of the wallpaper after enabling dark mode, provided in one embodiment of this application;

[0163] Figure 11 This is a schematic diagram of the wallpaper after enabling dark mode, provided in another embodiment of this application;

[0164] Figure 12 This is a schematic diagram of the wallpaper after enabling light-color mode, provided in an embodiment of this application.

[0165] Figure 13 A schematic flowchart illustrating a wallpaper display method provided in another embodiment of this application;

[0166] Figure 14 This is a schematic diagram of the wallpaper after enabling dark mode, provided in yet another embodiment of this application;

[0167] Figure 15 A schematic flowchart illustrating a wallpaper display method provided in yet another embodiment of this application;

[0168] Figure 16 This is a schematic diagram illustrating the wallpaper switching process under the condition of displaying a dark wallpaper, according to an embodiment of this application.

[0169] Figure 17 A schematic flowchart of the darkening algorithm provided in the embodiments of this application;

[0170] Figure 18 A schematic flowchart illustrating the calculation of the average contrast of a bitmap provided in an embodiment of this application;

[0171] Figure 19 A schematic block diagram of a wallpaper display device provided in an embodiment of this application. Detailed Implementation

[0172] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0173] In the description of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of this application, unless otherwise stated, "multiple" refers to two or more. Additionally, for the sake of clear description of the technical solutions of the embodiments of this application, "first" and "second," etc., in the embodiments of this application are used to distinguish different objects or to distinguish different processing of the same object, rather than to describe a specific order of objects.

[0174] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0175] The following section will first explain some of the terms or concepts used in this application.

[0176] Light mode, also known as daytime mode or bright mode, is a screen display mode suitable for use in environments with strong light. In this mode, images, text, and videos on the screen are typically displayed in their normal form without any changes.

[0177] Dark mode, also known as night mode or dark mode, is a color-inverted display mode compared to light mode. There are two main types of dark mode: one directly inverts the colors of application interfaces, notification bars, status bars, search boxes, widgets, etc. For example, changing the traditional white background with black text to black background with white text. Another example is changing the background color of the status bar from pure white to pure black, which makes the overall brightness of the screen closer to the nighttime environment, thereby reducing light stimulation to the user's eyes, alleviating eye fatigue, and making it easier to read. The other type, in addition to setting black background with white text, also provides grayscale mode, black background with yellow text mode, and optimizes the display of images and videos. For example, it adjusts the screen's color tone to a warmer tone.

[0178] A bitmap image, also known as a raster image or pixel image, is an image composed of multiple dots, each a pixel. Patterns are created by arranging and coloring these dots differently. When a bitmap image is magnified, multiple squares can be seen that make up the entire image; each square is a pixel. Increasing the area of ​​a single pixel can enlarge the size of a bitmap, but this can cause the lines and shapes of the bitmap image to appear jagged.

[0179] RGB color model is an industry-standard color model. By changing the brightness of the three color channels—red (R), green (G), and blue (B)—and layering them, various colors are obtained. Typically, each RGB color channel has 256 levels of brightness, represented numerically from 0, 1, 2, ..., 255. It's important to note that the higher the sum of the color values ​​of the three channels, the higher the brightness level and the lighter the corresponding color; conversely, the lower the sum of the color values, the lower the brightness level and the darker the corresponding color. For example, white has color values ​​of (255, 255, 255), making it the brightest color; black has color values ​​of (0, 0, 0), making it the darkest color.

[0180] Pixel contrast is the ratio of the color value of each pixel to its brightest color value. Since a pixel's brightest state is white, its contrast can be obtained by comparing its color value to the color value corresponding to white. The color value of each pixel is represented using RGB.

[0181] Average contrast ratio refers to the average contrast ratio of all pixels in an image. For the entire image, a higher average contrast ratio indicates stronger contrast, resulting in a clearer, more striking image with more vivid and vibrant colors; conversely, a lower average contrast ratio indicates less color variation, leading to a hazy or muted visual effect. Therefore, high contrast ratio plays a crucial role in image clarity, detail reproduction, and grayscale representation.

[0182] Pixel luminance, also known as pixel brightness, is used to represent the lightness or darkness of a pixel. The higher the luminance value of a pixel, the brighter the light perceived by the human eye, and the more obvious the stimulus; the lower the luminance value of a pixel, the darker the light perceived by the human eye, and the less obvious the stimulus.

[0183] Grayscale uses black as a base color and employs different saturations of black to display images. The lower the grayscale value, the brighter the light perceived by the human eye; the higher the grayscale value, the darker the light perceived by the human eye. Typically, white corresponds to a grayscale value of 0%, and black corresponds to a grayscale value of 100%.

[0184] A color filler is a processing method used to modify the color value, saturation, hue, and brightness of pixels. By setting the parameters of a color filler, the display effect of an image can be changed, such as converting a color photograph to a black and white photograph. Generally, the smaller the value of the color filler parameter, the smaller the color value of the pixels in the image, and the darker the image becomes; conversely, the larger the value of the color filler parameter, the larger the color value of the pixels in the image, and the darker the image becomes.

[0185] Currently, mobile phone operating systems offer light and dark modes. Typically, these modes apply to the notification bar, status bar, search box, widgets, and most application interfaces. For example, if the dark mode is enabled, switching from application A to application B will result in both applications displaying a dark interface.

[0186] In addition, third-party applications such as browser applications, map applications, e-book applications, notepad applications, music player applications, and video player applications also offer light and dark modes. Typically, the light and dark modes provided by third-party applications are only applicable to that specific application. For example, if application A enables dark mode, its interface will be dark. If you switch from application A to application B, and application B does not enable dark mode, then application B's interface will be light.

[0187] Whether it's a dark mode provided by the phone's operating system or a dark mode provided by a third-party application, it will take effect within the application's interface. However, if the desktop wallpaper is not adapted for dark mode, the brightness of the wallpaper area on the screen will noticeably change from weak to strong when switching from the application's interface to the desktop.

[0188] For example, suppose the phone is currently in light mode, but the surrounding environment is dimly lit, such as at night. The screen brightness might be too high for the user, causing eye discomfort. The user can then switch the screen from light mode to dark mode. However, if the user then switches from an application's interface to the home screen, the application's dark interface contrasts with the lighter or brighter wallpaper, causing a sudden change in screen brightness that can severely strain the user's eyes.

[0189] To address the issue of a noticeable change in screen light intensity when returning to the desktop from an application in dark mode, where the desktop wallpaper is lighter in color or brighter, the following solutions are typically used:

[0190] In the first relevant solution, the screen brightness is reduced manually.

[0191] If the phone's automatic dark and light modes are turned off, and the dark mode of an app you're using is enabled, and the phone returns to the home screen from that app's dark interface in response to user interaction, but the home screen wallpaper is light in color or bright in brightness, causing a drastic change in screen brightness, then the user can manually adjust the screen brightness. For example, the user can swipe down from the top of the screen or up from the bottom of the screen to trigger the status bar, which includes brightness adjustment controls. Then, the user can slide the brightness adjustment controls up / down or left / right to reduce the screen brightness.

[0192] This approach has the following problems: the eyes are already strongly stimulated by the screen's light before the user can manually adjust the brightness. Furthermore, this method requires multiple manual adjustments, making the process cumbersome and reducing the user experience.

[0193] In the second related solution, the screen brightness is automatically reduced.

[0194] The phone pre-configures the relationship between ambient light and screen brightness. When the phone's dark mode is enabled, if the phone detects a return to the home screen from an application's dark interface, it uses a light sensor to convert the collected ambient light into a light signal and detects the magnitude of the signal to determine the intensity of the ambient light. Then, it automatically adjusts the screen brightness based on the detected ambient light intensity. For example, if the ambient light intensity is at its highest, the corresponding screen brightness should be adjusted to the highest; if the ambient light intensity is at its lowest, the corresponding screen brightness should be adjusted to the lowest.

[0195] However, regardless of the color and brightness of the wallpaper used on the desktop, the phone will adjust the screen brightness according to the intensity of the ambient light. This solution has the following problems: if the desktop wallpaper is a dark image and the ambient light is very weak, if the screen brightness is adjusted to the lowest level, the entire screen will appear black, even darker than the interface of the application before returning to the desktop, making it impossible for the user to see the wallpaper clearly.

[0196] The third related solution uses an automatic wallpaper changing method.

[0197] In this approach, the phone's system comes with multiple sets of wallpaper images, each set consisting of one light-colored image and one dark-colored image. Assume the user selects one set of wallpaper images from these sets, which includes light-colored image 'a' and dark-colored image 'b'. When the phone is in light mode, the wallpaper displayed on the home screen is light-colored image 'a'; when the phone is in dark mode, the wallpaper displayed on the home screen is dark-colored image 'b'.

[0198] Typically, each set of wallpapers includes two images that contain different content or depict different scenes. For example... Figure 1 As shown in (a), when the phone is in light mode, the wallpaper presents a daytime scene with brighter colors, including elements such as the sun. Figure 1 As shown in (b), when the phone is in dark mode, the wallpaper presents a night scene with darker colors, including elements such as the moon.

[0199] However, this approach has the following problems: Since these wallpaper sets are preset, they require storage space, thus reducing available storage. Furthermore, each set of wallpaper images is actually two completely different images with a binding relationship. If a user wants to use the automatic wallpaper changing mode in different modes, they must use both images from a particular set. However, the multiple sets of wallpaper images provided by the system may not meet the user's expectations. Alternatively, in some cases, a user may only like one image from a set and dislike the other. Or, a user may prefer to set a single wallpaper image and not multiple images, let alone change the wallpaper frequently.

[0200] To address the problems of the three aforementioned solutions, this application proposes a wallpaper display method and an electronic device. In this solution, when a user sets a selected image or theme as wallpaper, the electronic device converts the image or theme to a darker, lower-brightness image or theme. Then, the electronic device detects the screen mode. If the screen mode is dark, the dark image or theme is displayed as wallpaper; otherwise, if the screen mode is light, the target image or theme is displayed as wallpaper. This allows the wallpaper color to adapt to the screen mode under different conditions. Specifically, when the screen is in dark mode, returning to the desktop from an application interface allows the use of a dark image or theme as wallpaper, reducing eye strain and thus meeting the user's screen usage needs in different scenarios.

[0201] Figure 2 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Figure 2As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, 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, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity 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.

[0202] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0203] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0204] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0205] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0206] In some embodiments, the processor 110 may include one or more interfaces. Interfaces 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.

[0207] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0208] The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger.

[0209] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance).

[0210] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0211] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Figure 2 The structures of antennas 1 and 2 shown are merely one example. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.

[0212] The mobile communication module 150 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for use on the electronic device 100. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1.

[0213] The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signal, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0214] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0215] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.

[0216] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.

[0217] Camera 193 is used to capture still images or videos. An object passes through the lens to generate an optical image that is projected onto a photosensitive element.

[0218] The external memory interface 120 can be used to connect an external memory card, thereby expanding the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to perform data storage.

[0219] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

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

[0221] Audio module 170 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. Audio module 170 can also be used for encoding and decoding audio signals.

[0222] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or make hands-free calls through the speaker 170A.

[0223] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.

[0224] The microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals.

[0225] The 170D headphone jack is used to connect wired headphones.

[0226] Button 190 includes the power button, volume buttons, etc. Button 190 can be a mechanical button or a touch button.

[0227] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. Motor 191 can also provide different vibration feedback effects depending on the touch operation applied to different areas of the display screen 194.

[0228] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.

[0229] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with or separate from the electronic device 100.

[0230] Figure 3This is a schematic diagram of the technical architecture of an electronic device according to an embodiment of this application. The technical architecture is divided into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the hardware abstraction layer (HAL), and the kernel layer. The technical architecture of the electronic device may also include other layers, such as a hardware layer.

[0231] It should be noted that, Figure 3 Only content relevant to the embodiments of this application is shown. Specifically, the application layer includes applications such as gallery, theme, and photo album; the application framework layer includes sensor service modules, window service modules, wallpaper service modules, and graphics service modules; the hardware abstraction layer includes sensor HAL, display HAL, etc.; the kernel layer includes display drivers, etc.; and the hardware layer includes sensors and displays, etc. Each layer may also include other modules. Additionally, for ease of explanation, Figure 3 The diagrams are used to illustrate the business logic relationships, without strictly representing the specific location of each business within the technical architecture.

[0232] In this embodiment, applications such as gallery, theme, and photo album provide wallpaper setting services, allowing users to set or change wallpapers for their electronic devices through operations on at least one of these applications. The following example, using a theme application, illustrates the role of each component or module in the wallpaper display method.

[0233] A monitor can be used to display the interface of a theme application, which includes multiple themes and theme selection controls.

[0234] Sensors can be used to detect the physical parameters of the touchscreen in real time, and then send touch operation information, such as touch location, touch duration, and touch pressure, to the theme application via the sensor HAL and sensor service module. For example, if a user is interested in a particular theme in the theme application interface, they can click on the selection control corresponding to that theme on the touchscreen. The sensors on the touchscreen will then acquire the touch location, touch duration, touch pressure, etc., and send this touch operation information to the theme application.

[0235] The theme application can be used to send a notification message to the window service module based on the received touch operation information, indicating that a theme in the theme application's interface will be set as the wallpaper.

[0236] The window service module can be used to forward received notification messages to the wallpaper service module.

[0237] The wallpaper service module can mark a target image as wallpaper upon receiving a notification message. Additionally, the wallpaper service module can call the graphics service module to convert a user-selected theme (referred to as a light theme) to a dark theme, and then establish an association between the light and dark themes. Furthermore, either the wallpaper service module or the graphics service module can be used to store the dark theme.

[0238] Upon receiving an operation to trigger the display of the lock screen, unlock the screen, or return to the desktop from an application interface, the wallpaper service module detects the screen mode. In light mode, the wallpaper service module notifies the display driver via the display HAL to drive the display to display a light theme as the wallpaper. In dark mode, the wallpaper service module, based on the association between the light and dark themes, notifies the display driver via the display HAL to drive the display to display a dark theme as the wallpaper. Because different wallpaper colors can be displayed in different screen modes, the wallpaper color adapts to the screen mode. For example, when the screen is in dark mode and the user returns to the desktop from an application interface, a dark image can be used as the wallpaper, reducing eye strain and thus meeting the user's screen usage needs in different scenarios.

[0239] In this embodiment, the theme can be a combination of desktop wallpaper background images, lock screen wallpaper background images, window colors, and sounds. The background images for desktop and lock screen wallpapers can be static images, animated images, or videos. When a theme is set as the desktop or lock screen wallpaper, the background images included in the theme can be converted to darker colors, allowing the background image to be changed according to the screen mode. It should be noted that the following embodiments are all described using the example of displaying an image as wallpaper; in actual implementation, the theme can also be displayed as wallpaper, and can be set according to actual usage needs.

[0240] In some embodiments, when a user sets or requests a wallpaper change, the electronic device automatically retrieves the dark image corresponding to the selected image and establishes an association between the two. When the electronic device is about to display the desktop, the screen may be in either dark or light mode. The wallpaper display method differs depending on the mode. (See reference...) Figure 4 As shown, the wallpaper display method provided in this application embodiment may include the following steps S201 to S206.

[0241] S201, The electronic device receives the user's first operation.

[0242] The first operation is used to request that the target image selected by the user be set as the wallpaper.

[0243] Optionally, the first operation can be a touch operation on the screen, a voice operation, or an air gesture operation. Taking a touch operation on the screen as an example, the touch operation includes: selecting a target image and confirming that the target image is applied as wallpaper.

[0244] For example, if a user wants to change their phone's wallpaper while using the phone, they can first return to the home screen, which includes the Themes app icon, and then press the Themes app icon to trigger the Themes app interface. Alternatively, the user can open the phone's settings and find the wallpaper option, which will trigger an interface displaying various wallpaper options. If a landscape image suits the user's preferences, the user can first select the landscape image by tapping it, and then tap the "Set" control, thus the phone receives a request to set that landscape image as the wallpaper.

[0245] The target image mentioned above can be a static image, an animated image, or a video. Taking the user's choice to set a static image as wallpaper as an example, the static image can be a theme image of the electronic device, such as cute pets, landscapes, anime, games, cars, buildings, etc.; it can also be a photo, screenshot, or online image saved in the electronic device's album; or it can be a static image provided by a wallpaper application. The specific image can be determined according to actual usage needs, and this application embodiment does not impose any limitations.

[0246] S202, In response to the first operation, the electronic device marks the target image as wallpaper and converts the target image into a dark image. The target image has a brightness greater than the dark image; that is, the target image is brighter than the dark image.

[0247] It should be noted that the dark image in this embodiment refers to the image after the target image has undergone dark processing. Since the brightness of the target image is greater than that of the dark image, the target image can also be called a light image. The dark image after dark processing does not change the content of the original image; that is, the target image before processing and the dark image after processing contain the same content, only the color value, contrast, illuminance, grayscale, and other parameters are changed. Essentially, the target image before processing and the dark image after processing are different display forms of the same image. For example, the primary and secondary objects and background elements in image A and the corresponding dark image B are the same, and the composition (i.e., arrangement) of each element in the two images is also the same. However, for the same element, the contrast is higher in the target image A, resulting in a lighter color; while the contrast is lower in the dark image B, resulting in a lighter color.

[0248] Alternatively, the method of converting the target image to a dark image may include at least one of the following:

[0249] (1) Reduce the color value of the target image to obtain a dark image. That is, the color value of the target image is greater than the color value of the dark image.

[0250] (2) Reduce the contrast of the target image to obtain a darker image. That is, the contrast of the target image is greater than the contrast of the darker image.

[0251] (3) Reduce the illuminance of the target image to obtain a dark image. That is, the illuminance of the target image is greater than that of the dark image.

[0252] (4) In some cases, the target image is a grayscale image, so the grayscale of the target image can be increased to obtain a dark image. That is, the grayscale of the target image is less than the grayscale of the dark image.

[0253] Optionally, the target image and the dark image can be images of the same format, such as both being portable network graphics (PNG), joint photographic experts group (JPEG), or tag image file format (TIFF). Alternatively, the target image and the dark image can be images of different formats, for example, the target image is in PNG format and the dark image is a bitmap.

[0254] Optionally, after converting the user-selected unprocessed light-colored image into a dark-colored image, the electronic device can also establish a relationship between the light-colored image and the dark-colored image, and store the dark-colored image.

[0255] For example, multiple directories are created in the wallpaper library of an electronic device. Each directory includes at least one set of related dark and light images. For instance, related light and dark images are named using the same or similar naming convention within the same directory. Thus, when the screen switches from dark mode to light mode, the electronic device can retrieve a light image with the same or similar naming convention from the same directory as the dark image, setting the light image as wallpaper to match the current light mode. Alternatively, when the screen switches from light mode to dark mode, the electronic device can retrieve a dark image with the same or similar naming convention from the same directory as the light image, setting the dark image as wallpaper to match the current dark mode.

[0256] Optionally, if the target image is a static image, then the static image is processed to obtain a dark image, that is, the dark image used as wallpaper is one; if the target image is multiple static images, GIFs or videos, then the multiple static images, GIFs or videos are processed to obtain multiple dark images, that is, the dark images used as wallpaper are multiple.

[0257] For example, taking a dynamic image as an example, assuming the switching frequency of the dynamic image is f1, when applying dark processing to the dynamic image, it can first be split into M static images, and the playback order of each image can be recorded. Then, each static image is converted into a dark image. After that, according to the recorded playback order, the dark images are recombined to generate a dynamic image, and the switching frequency of the dynamic image is set to f1. In this way, when the recombined dynamic image is displayed as wallpaper, the dark images will be played sequentially according to the switching frequency f1.

[0258] In some embodiments, after receiving the first operation and before returning to the desktop, since the interface displayed by the electronic device is still the wallpaper setting interface, the electronic device can respond to the first operation by marking the target image as wallpaper, converting the target image to a dark image, and displaying the wallpaper preview interface using any of the following schemes:

[0259] The first approach involves displaying a dark-colored image as the preview wallpaper in the first area of ​​the wallpaper preview interface, and the target image as the preview wallpaper in the second area. This approach allows both dark and light wallpapers to be displayed simultaneously within a single preview interface, enabling users to view the preview effects of both wallpapers at the same time.

[0260] The second approach is to display the target image as the wallpaper in the wallpaper preview interface, along with a prompt asking "Preview the dark wallpaper corresponding to the current wallpaper?". If the user confirms, the target image in the wallpaper preview interface is updated to a dark version. This approach first previews the user-selected image as the wallpaper, and only displays the dark image as the wallpaper in the preview interface when the user requests it. This aligns with user habits and improves the user experience.

[0261] The third approach involves detecting the screen mode. If the current screen mode is dark mode, a dark image will be displayed as the wallpaper in the wallpaper preview interface; if the current screen mode is light mode, the target image will be displayed as the wallpaper. This approach allows the wallpaper preview color to be adjusted in real-time according to the current screen mode, avoiding eye discomfort caused by a mismatch between screen brightness and wallpaper color.

[0262] Furthermore, after displaying a dark image as wallpaper, if the user wants to see how a light-colored wallpaper would look, the electronic device can be triggered to update the dark image in the wallpaper preview interface to display the target image. Alternatively, after displaying the target image as wallpaper, if the user wants to see how a dark wallpaper would look, the electronic device can be triggered to update the target image in the wallpaper preview interface to display a dark image.

[0263] In some embodiments, the electronic device may display the wallpaper in the following two ways:

[0264] The first method involves the electronic device detecting the screen mode in real time. If the screen mode is dark, a dark image is set as the wallpaper; or, if the screen mode is light, a light image is set as the wallpaper. When switching to the desktop, the set image will be displayed directly as the wallpaper.

[0265] The second method involves the electronic device detecting in real time whether it has received a trigger to display the desktop. Upon receiving any such trigger, the device checks whether the screen mode is dark or light. If the screen mode is dark, a dark image is displayed as the wallpaper; otherwise, if the screen mode is light, a light image is displayed as the wallpaper.

[0266] The second method will be used as an example below. The solution for displaying wallpaper according to screen mode will be explained through S203 to S206.

[0267] S203, The electronic device receives a second operation from the user. The second operation is used to trigger the display of the desktop or lock screen interface.

[0268] In one implementation, the second operation is to trigger the electronic device to return to the desktop from the application's interface when the application's interface is displayed.

[0269] It should be noted that the second operation can include not only returning to the desktop from the interface of the application used to set the wallpaper, but also returning to the desktop from the interface of any other application. That is, after converting the light-colored image to a dark-colored image, any operation triggered to display the desktop received at any time and in any application interface can be considered the second operation, not limited to an operation triggered to display the desktop received immediately after the first operation. For example, the second operation could be returning to the desktop from a browser interface, returning to the desktop from a game application interface, returning to the desktop from a shopping application interface, etc.

[0270] In another implementation, the second operation is to trigger the electronic device to unlock the screen when the screen is locked. For example, this unlocking operation could be entering a fingerprint, a password, or a user's facial image while the lock screen is displayed. Typically, the electronic device displays the home screen after unlocking the screen; therefore, the unlocking operation can also be understood as triggering the display of the home screen.

[0271] In another implementation, the second operation involves triggering the electronic device to turn on the screen when the screen is off. For example, when the screen is off, the user can trigger the electronic device to turn on the screen and display the lock screen by tapping the screen or pressing a physical button.

[0272] S204. Detect the screen mode of the electronic device.

[0273] After receiving the second operation, the electronic device can respond to the second operation by periodically detecting whether the screen mode is dark mode or light mode, for example, the detection period is 1 millisecond, 5 milliseconds, 1 second, 5 seconds, 1 minute, or 10 minutes. When the screen mode is dark mode, the electronic device can display a dark image as wallpaper, i.e., execute S205. When the screen mode is light mode, the electronic device can display a light image as wallpaper, i.e., execute S206.

[0274] S205. Electronic devices display dark images as wallpapers.

[0275] S206. The electronic device displays the target image as wallpaper.

[0276] Optionally, the conditions for displaying dark wallpaper include at least one of the following:

[0277] Condition 1: The system time of the electronic device is within the preset time period.

[0278] In one possible example, the aforementioned preset time period is provided by the electronic device system and confirmed by the user.

[0279] In another possible example, the preset time period mentioned above is a user-defined time period.

[0280] For example, the phone's settings offer a function to change the wallpaper. Figure 5 As shown, when the wallpaper switching interface corresponding to the wallpaper switching function is displayed, this interface includes "Sunset to Sunrise" 51 and "Custom Time Period" 52. Among them, "Sunset to Sunrise" 51 corresponds to the preset time period provided by the mobile phone system, such as 22:00-8:00. "Custom Time Period" 52 is used by users to set the time period according to their usage needs.

[0281] If the user clicks as shown Figure 5 The "Sunset to Sunrise" timeframe shown is 51, meaning the preset time period is 22:00-8:00. When the phone's system time falls within this period, the wallpaper will be a dark image if the phone is displaying the home screen. Conversely, when the phone's system time is between 8:00 and 22:00, the wallpaper will be a light image if the phone is displaying the home screen.

[0282] If the user clicks as shown Figure 5 If the "Custom Time Period" is set to 52 as shown, the phone will display something like this: Figure 6 The diagram shows the start time corresponding to "light color" 61 and the start time corresponding to "dark color" 62. Assuming the user sets the start time corresponding to "light color" 61 to 7:00 and the start time corresponding to "dark color" 62 to 21:00, then if the phone's system time is between 21:00 and 7:00, the wallpaper will be a dark image if the phone is displaying the home screen; if the phone's system time is between 7:00 and 21:00, the wallpaper will be a light-colored image if the phone is displaying the home screen.

[0283] In another possible example, the aforementioned preset time period is determined based on historical data of the user's use of electronic devices.

[0284] Electronic devices can collect historical data on screen modes and running applications at any given time. For example, statistical analysis of this historical data reveals that users typically use dark mode to read ebooks after 9:30 PM and light mode to read news after 7:30 AM. Based on this data, users are more likely to use dark wallpapers between 9:30 PM and 7:30 AM; therefore, 9:30 PM to 7:30 AM is designated as a preset time period. Thus, when the phone's system time falls within this period (9:30 PM to 7:30 AM), the wallpaper will be a dark image if the phone is on the home screen; conversely, when the phone's system time falls within this period (7:30 AM to 9:30 PM), the wallpaper will be a light image if the phone is on the home screen.

[0285] It should be noted that the above time periods are merely illustrative examples and do not constitute any limitation on the embodiments of this application. The preset time periods can also be set to any other possible time periods, which can be determined according to actual usage requirements.

[0286] It is understandable that when the desktop is triggered, if the electronic device's system time is within a preset time period, such as late at night, then displaying a dark image as the wallpaper can reduce the eye strain caused by screen light during this period.

[0287] Condition 2: The electronic device is in a preset geographical location.

[0288] In one possible example, the preset geographic location mentioned above is user-defined.

[0289] If the preset geographic location is a user-defined geographic location, the customization process includes:

[0290] The process of adding tags to geographical locations;

[0291] The process of customizing geolocation from added tags.

[0292] Specifically, users can add tags to frequently used locations while using various location-enabled applications such as map apps, shopping apps, food ordering apps, ticketing apps, payment apps, and travel apps. Alternatively, users can use the location function provided by their mobile phone's operating system to add tags to frequently used locations.

[0293] For example, users typically work during the day and are home in the evening, making them more likely to use dark mode at home. However, manually changing the wallpaper every time they get home is tedious. In this case, at home, users can open their phone's map application and then long-press... Figure 7 The current position identifier 71 shown in (a) is added to label 4, thereby indicating the current position. Figure 7 As shown in (b), when the wallpaper switching interface is displayed, the interface may include a "Custom Location" option. If the user clicks "Custom Location" 72, the phone will display the corresponding labels: Label 1, Label 2, Label 3, and Label 4. Each label indicates a pre-added geographic location. Assuming the user selects Label 3 and Label 4, the preset geographic locations include the geographic location indicated by Label 3 and the geographic location indicated by Label 4. With the phone's location function enabled, if the current location is detected as the geographic location indicated by Label 3 or Label 4, the phone's wallpaper will be a dark image; if the current location is detected as another location, the phone's wallpaper will be a light image when the desktop is displayed.

[0294] For example, such as Figure 8 As shown in (a), when the wallpaper switching interface is displayed, the interface may include an "Add Tag" option 81, which allows the user to add at least one tag. If the user is not satisfied with the tags already added, they can click "Add Tag" 81, and the phone will then display... Figure 8The map interface is shown in (b). The current location marker 71 in this map interface indicates the phone's current location, such as the user's home. The map interface also includes a prompt "Add current location to tag 5?" and options "Yes" 82 and "No" 83. If the user selects "Yes" 82, tag 5 will be created for the current location. If the user selects "No" 83, the interface will return to the previous state. Figure 8 The wallpaper switching interface is shown in (a). Users can select label 5 as the preset location. If the phone's location services are enabled and the current location is detected as indicated by label 5, the wallpaper will be a dark image when the phone displays its home screen.

[0295] In another possible example, the aforementioned preset geographical location is determined by the electronic device based on the user's historical data of using the electronic device.

[0296] Electronic devices can collect historical data on screen patterns and applications running in each geographic location. For example, analyzing this historical data might reveal that the user frequently uses dark mode to read ebooks when their current location is their home. This suggests that the user is more likely to use a dark wallpaper at home, and thus, their home could be designated as a preset geographic location. Consequently, if the current location is detected as the user's home, the electronic device's wallpaper will be a dark image.

[0297] It should be noted that the above-described geographical locations are merely illustrative examples and do not constitute any limitation on the embodiments of this application. The preset geographical location can also be set to any other possible geographical location, which can be determined according to actual usage needs.

[0298] It is understandable that when the desktop is triggered, if the electronic device is in a preset geographical location, such as home or library, then displaying a dark image as the wallpaper can reduce the eye strain caused by screen light in that location.

[0299] Condition 3: The intensity of external light detected by the electronic device is less than or equal to the preset intensity.

[0300] Optionally, the electronic device may include at least one light sensor to detect the intensity of ambient light. The electronic device can detect the intensity of ambient light at a preset period. When the detected light intensity is less than or equal to a preset intensity, the wallpaper of the electronic device can be set to a dark image.

[0301] Furthermore, to avoid the electronic device mistakenly setting the wallpaper to a dark image due to weak detected ambient light intensity caused by the user's hand briefly blocking the light, the above condition 3 can be specifically: the duration for which the intensity of ambient light detected by the electronic device is less than or equal to the preset intensity exceeds the preset duration.

[0302] Taking a preset duration of 5 minutes as an example. Assuming that the intensity of the ambient light detected at 12:00 is less than or equal to the preset intensity, the timer starts counting. If the intensity of the ambient light detected at 12:05 is still less than or equal to the preset intensity, it can be determined that the condition is met, and the wallpaper of the electronic device is set to a dark picture.

[0303] It is understandable that when the desktop is triggered, if the intensity of the ambient light detected by the electronic device is less than or equal to the preset intensity, the user may be in a dim environment. The screen should not be too bright, so setting the wallpaper to a dark image meets the usage needs in dim environments.

[0304] Condition 4: When the second operation is received, the application running on the electronic device is a preset application.

[0305] In one possible example, the aforementioned preset application is a user-defined application.

[0306] For example, such as Figure 9 As shown in (a), when the wallpaper switching interface is displayed, this interface can include "Custom App" 91, which allows users to define at least one app. After the user clicks "Custom App" 91, as shown... Figure 9 As shown in (b), the phone will display the various apps corresponding to "Custom Apps" 91: APP1 92, APP2 93, APP3 94, and APP4 95, and display "Add App" 96. One method is for the user to directly select an existing app, such as APP1 92 and APP3 94. In this case, APP1 92 and APP3 94 will become default applications. When APP1 92 or APP3 94 is detected as the running application, if the user switches to the home screen in response to the second operation, the wallpaper will be a dark image. Another method is for the user to add other apps via "Add App" 96. This allows other apps to be added as default applications. When the user detects that another app is running when the second operation is received, if the user switches to the home screen in response to the second operation, the wallpaper will be a dark image.

[0307] In another possible example, the aforementioned preset application is determined by the electronic device based on the user's historical data of using the electronic device.

[0308] Electronic devices can collect historical data on whether the screen is in dark or light mode while each application is running. For example, analyzing this historical data reveals that users frequently use dark mode when running browsers or e-books. This indicates that users prefer dark wallpapers when using browsers or e-books, and therefore, the browser or e-book can be set as the default application. Thus, if a browser or e-book is detected as the running application when a second operation is received, that dark image will be displayed as the wallpaper after the second operation to return to the desktop is received.

[0309] It should be noted that the above-described applications are merely illustrative examples and do not constitute any limitation on the embodiments of this application. The preset applications can also be set to any other possible applications, which can be determined according to actual usage needs.

[0310] Understandably, if the application running on the electronic device when receiving the second operation is the default application, then displaying a dark image as the wallpaper would make the wallpaper color match the needs when using the default application.

[0311] Condition 5: The screen mode of the electronic device is set to dark mode.

[0312] In some implementations, dark mode is automatically enabled on electronic devices.

[0313] The preconditions for an electronic device to automatically activate dark mode may include, but are not limited to, at least one of conditions 1 to 4 above. For example, if the electronic device's system time is within a preset time period and the electronic device is in a preset geographical location, the electronic device will automatically activate dark mode. For conditions 1 to 4, please refer to the relevant descriptions in the above embodiments, which will not be repeated here.

[0314] In other implementations, dark mode is activated by the electronic device in response to the user's selection of dark mode before receiving the second operation. This dark mode is provided by the electronic device system or a third-party application.

[0315] For example, consider the dark mode provided by the mobile phone system. Figure 10 As shown in (a), when the settings application interface is displayed, if the interface includes a dark mode 101 selection function, the user can trigger the phone to turn on dark mode by clicking on the corresponding area of ​​dark mode 101, and trigger a return to the home screen, thus displaying the screen as shown in (a). Figure 10 The dark wallpaper shown in (b) is shown in the image.

[0316] For example, consider the dark mode provided by third-party applications. When a user is browsing a webpage in light mode and feels the screen is too bright, causing eye discomfort, they can trigger a dark mode by clicking the option at the bottom of the webpage. Figure 11 The function bar shown in (a) includes options such as History, Multiple Windows, Font Size, Fullscreen Mode, Dark Mode 111, and Add to Desktop. If the user clicks Dark Mode 111, then... Figure 11 As shown in (b), the browser enables dark mode, meaning all interfaces within the browser are switched to a darker color. During web browsing, as... Figure 11 (b) and Figure 11 As shown in (c), if the phone receives a swipe-up action to return to the home screen, and given that the browser has enabled dark mode, the user may prefer to use a dark wallpaper. Therefore, the phone screen can display something like this. Figure 11 The dark wallpaper 112 shown in (d) is shown in the image.

[0317] For example, consider dark mode provided by third-party applications. When a user is browsing a webpage in dark mode and feels the screen light is too low to see the content clearly, they can trigger the display of dark mode by clicking the option at the bottom of the webpage. Figure 12 The function bar shown in (a) includes options such as History, Multiple Windows, Font Size, Fullscreen Mode, Light Mode 121, and Add to Desktop. If the user clicks Light Mode 121, then... Figure 12 As shown in (b) above, the browser is in light mode, meaning all interfaces in the browser are switched to light colors. During web browsing, as... Figure 12 (b) and Figure 12 As shown in (c), if the phone receives a swipe-up action to return to the home screen, given that the browser is in light mode, the user may prefer to use a light-colored wallpaper. Therefore, the phone screen can display something like this. Figure 12 The light-colored wallpaper 122 shown in (d) is shown in the image.

[0318] It is understandable that when the desktop is displayed, if the screen mode of the electronic device is dark mode, the user may not want the screen to be too bright. Therefore, the electronic device sets the wallpaper to a dark picture to meet the user's needs in dim environments.

[0319] Understandably, after S205 and S206 above, the electronic device will continue to detect whether there is an operation that triggers the display of the desktop, and if it receives an operation that triggers the display of the desktop, it will continue to determine whether the conditions for displaying a dark wallpaper are met, and then display the wallpaper of the corresponding color.

[0320] The wallpaper display method provided in this application embodiment, when receiving a request to set a target image as wallpaper, the electronic device marks the target image as wallpaper and converts it into a darker image with lower brightness. After receiving a second operation triggering the display of the desktop, it detects whether the electronic device's screen mode is dark or light. If the screen mode is dark, the dark image is displayed as wallpaper; otherwise, if the screen mode is light, the target image is displayed as wallpaper. This allows the wallpaper color to adapt to the screen mode in different situations. Especially when the screen is in dark mode, returning to the desktop from the application interface allows the use of a dark image as wallpaper, reducing eye strain and thus meeting the user's screen usage needs in different scenarios.

[0321] In the wallpaper display method provided in the above embodiments: when the desktop is not yet displayed, in response to the received second operation triggering the display of the desktop, it can be detected whether the conditions for displaying a dark wallpaper are met, and then a wallpaper of the corresponding color can be displayed on the desktop. This application embodiment also provides another wallpaper display method: when the desktop is already displayed, in response to the user's selection of a screen mode, the wallpaper can be updated to a dark image or a light image.

[0322] For example, Figure 13 As shown, the method may include the following steps S301 to S305.

[0323] S301, The electronic device receives the user's first operation.

[0324] The first operation is used to request that the target image selected by the user be set as the wallpaper.

[0325] S302, the electronic device responds to the first operation by marking the target image as wallpaper and converting the target image to a dark image.

[0326] For S301 and S302, please refer to the description of S201 and S202 in the above embodiments, which will not be repeated here.

[0327] S303. When the desktop is displayed, the electronic device receives a third operation from the user, which is a selection operation of the screen mode.

[0328] S304. If the third operation is a dark mode selection operation, in response to the third operation, update the wallpaper to a dark image.

[0329] S305. If the third operation is a selection operation for a light-colored mode, in response to the third operation, update the wallpaper to the target image.

[0330] For example, when an electronic device is displaying the desktop in light mode, a user can trigger the display of a light-colored screen by pulling down from the top of the screen or swiping up from the bottom of the screen. Figure 14 The status bar 141 is shown in (a) above. The status bar 141 includes multiple controls such as WLAN, Bluetooth, mobile data, silent mode, dark mode 142, and brightness adjustment. If the user clicks dark mode 142, then... Figure 14 As shown in (b), the mobile phone can update the background color of the status bar 141 to dark and update the dark mode 142 in the status bar 141 to light mode 143 according to the user's selection operation of dark mode 04. In addition, the desktop wallpaper is changed to a dark image corresponding to the current light image.

[0331] Furthermore, after changing the desktop wallpaper to a darker image that corresponds to the current light-colored image, if the user clicks again... Figure 14 If the status bar 141 is in light mode 143 as shown in (b) above, the phone will update the background color of the status bar 141 to the color shown in the image based on the received selection of light mode 143. Figure 14 The light color shown in (a) will be updated again in the light color mode 143 of the status bar 141, as shown in (a). Figure 14 The image shows dark mode 142 in (a). Additionally, the electronic device will also display a light-colored image corresponding to the dark image and change the desktop wallpaper back to a light-colored image. Understandably, the wallpaper is a dark image when the user selects dark mode and a light image when the user selects light mode, ensuring the wallpaper color matches the phone's mode and improving the user experience.

[0332] It should be noted that the above embodiments are exemplified by using user operations on the dark and light modes in the status bar to trigger the switching between two colors of wallpaper on the electronic device, and do not limit the embodiments of this application. It is understood that screen modes can also be switched via physical button operations or voice assistants to trigger the switching between dark and light wallpapers.

[0333] In addition, the above Figure 14 This example illustrates how the notification bar background color updates to dark after a dark image is set as the phone's wallpaper. In actual implementation, the notification bar background color may not need to be updated. Furthermore, after setting a dark image as the wallpaper, the notification bar, search box, widgets, etc., on the desktop may or may not update to dark. These can be flexibly set according to actual usage needs, and this embodiment does not impose limitations.

[0334] The wallpaper display method provided in this application allows users to select a screen mode to trigger an electronic device to update the wallpaper to a dark or light image when the desktop is already displayed. This ensures that the wallpaper color matches the user's selected screen mode, especially reducing eye strain from screen light when the screen is in dark mode, thus meeting the user's screen usage needs in different scenarios.

[0335] In the wallpaper display method provided in the above embodiments, the electronic device first responds to a received first operation by converting the target image into a dark image; then, in response to a received second operation, it displays the dark image as wallpaper if the conditions for displaying a dark wallpaper are met. This application also provides another wallpaper display method: after receiving the first operation, the target image is not converted initially. Instead, if the conditions for displaying a dark wallpaper are met, the target image is converted into a dark image and displayed as wallpaper.

[0336] For example, such as Figure 15 As shown, the method may include the following steps S401 to S406.

[0337] S401, The electronic device receives the user's first operation.

[0338] The first operation is used to request that the target image selected by the user be set as the wallpaper.

[0339] S402, In response to the first operation, the electronic device marks the target image as wallpaper.

[0340] S403, The electronic device receives a second operation from the user, the second operation being used to trigger the display of the desktop or lock screen interface.

[0341] S404, Detect the screen mode of the electronic device.

[0342] When the electronic device's screen mode is dark mode, the electronic device can convert the target image to a dark image and display the dark image as wallpaper, i.e., execute S405. When the electronic device's screen mode is light mode, the electronic device can display a light image as wallpaper, i.e., execute S406.

[0343] S405. The electronic device converts the target image into a dark image and displays the dark image as wallpaper.

[0344] Optionally, after converting the user-selected light-colored image into a dark-colored image, the electronic device can also establish a relationship between the light-colored image and the dark-colored image, and store the dark-colored image.

[0345] S406. The electronic device displays the target image as wallpaper.

[0346] For S401 to S406, the description of S201 to S206 in the above embodiments can be referred to, and will not be repeated here.

[0347] For example, suppose the screen is in light mode before the user selects a new wallpaper. Figure 16 As shown in (a), users can click on "Wallpaper" in "Settings" 161 to update the screen display as shown. Figure 16 The new wallpaper selection interface is shown in (b) above. In this interface, if the user clicks "Image 1" 162, the phone can mark "Image 1" 162 as the wallpaper. Afterwards, if the phone receives a return-to-home command, because the screen is in light-color mode, the phone can display as shown below. Figure 16 The desktop shown in (c) is a light-colored wallpaper 163.

[0348] Next, let's take a user browsing the web as an example. When a user feels the screen is too bright, causing eye discomfort, they can click the dark mode option on the webpage to trigger the browser to enable dark mode, meaning all interfaces in the browser will switch to a dark interface. During web browsing, if the phone receives a notification to return to the home screen, based on the browser's dark mode, the user might prefer a dark wallpaper. Therefore, the phone can convert image 1 into a dark image and display it as shown... Figure 16 The dark wallpaper 164 shown in (d) is an example.

[0349] The wallpaper display method provided in this application embodiment can temporarily refrain from converting the target image after receiving the first operation. This eliminates the need to establish a correlation between light and dark images or store dark images before the conditions for displaying a dark wallpaper are met, thus saving memory space on the electronic device. Furthermore, if a different image is used as the wallpaper before the conditions for displaying a dark wallpaper are met, the lack of unnecessary conversion operations on the target image reduces device power consumption to some extent.

[0350] In one alternative implementation, embodiments of this application can use a darkening algorithm to convert a light-colored image selected by the user as wallpaper into a dark-colored image. For example... Figure 17 As shown, the algorithm may specifically include S501 to S506 as described below.

[0351] S501. Convert the target image to a bitmap.

[0352] Typically, theme images, album photos, or wallpapers downloaded from the internet for electronic devices are in PNG or JPEG format and are relatively large in size. To facilitate subsequent processing, the image size can be reduced by converting the target image into a bitmap.

[0353] S502, Obtain the contrast and illuminance of each pixel in the bitmap.

[0354] Since a pixel is white when it is brightest, the contrast of a pixel is obtained by the ratio of the color value of a pixel to the color value of white (255, 255, 2555).

[0355] like Figure 18 As shown, taking a pixel in a bitmap as an example, assuming r represents the color value of the R channel of this pixel, g represents the color value of the G channel of this pixel, and b represents the color value of the B channel of this pixel, then the following relationship exists:

[0356]

[0357] Where R represents the contrast of the R channel, G represents the contrast of the G channel, and B represents the contrast of the B channel.

[0358] Considering that the contrast of the color values ​​of each channel obtained using Formula 1 is relatively low, the f(x) function can be used to perform non-linear tone editing on the image to improve the image contrast. It should be noted that f(x) is different when the value of x is different; for example, f(x) can be Formula 2 or Formula 3 as shown below.

[0359] Specifically, let x in f(x) represent the values ​​in Formula 1.

[0360] Then, determine whether x in f(x) is greater than or equal to a preset value.

[0361] If x is greater than or equal to the preset value, then the following formula 2 can be used to perform non-linear tone editing on the image:

[0362]

[0363] If x is less than the preset value, then the following formula 3 can be used to perform non-linear tone editing on the image:

[0364]

[0365] It should be noted that the above preset values ​​can be as follows: Figure 18 The value of 0.03928 shown can also be 0.04045 or other values. This application embodiment does not limit the value and can be determined according to actual usage requirements.

[0366] This yields the f(x) functions corresponding to the R, G, and B channels, respectively.

[0367] Suppose that the f(x) function corresponding to the R channel of a pixel is denoted by fr, the f(x) function corresponding to the G channel is denoted by fg, and the f(x) function corresponding to the B channel is denoted by fb; the f(x) function corresponding to the R channel of a white pixel is denoted by fR, the f(x) function corresponding to the G channel is denoted by fG, and the f(x) function corresponding to the B channel is denoted by fB.

[0368] Then the gray level of this pixel is:

[0369] 0.2126*fr+0.7152*fg+0.0722*fb (Formula 4)

[0370] The grayscale value of the white pixel is:

[0371] 0.2126*fR+0.7152*fG+0.0722*fB (Formula 5)

[0372] After obtaining the grayscale of a pixel and the grayscale of the white pixels, the contrast of that pixel can be obtained using the following formula 6:

[0373]

[0374] Thus, the contrast of each pixel in the bitmap can be obtained according to the above formulas 1-6.

[0375] In addition, the illumination of each pixel in the bitmap can be obtained using the following formula 7:

[0376]

[0377] Thus, the illumination of each pixel in the bitmap can be obtained according to Formula 7 above.

[0378] It should be noted that the coefficients of each variable in the above formulas were determined based on experimental data and do not limit the embodiments of this application. It is understood that other possible values ​​may be used in actual implementation.

[0379] S303. Calculate the average contrast of the bitmap using the contrast of all pixels.

[0380] The average contrast of a bitmap is equal to the sum of the contrasts of all pixels in the bitmap, divided by the total number of pixels in the bitmap.

[0381] Assuming C(i) represents the contrast of a single pixel, n represents the total number of pixels in the bitmap, and C represents the average contrast of the bitmap, then the following relationship exists:

[0382]

[0383] S304. Calculate the differential illuminance of the bitmap using the illuminance of all pixels.

[0384] Assuming L(i) represents the illuminance of a single pixel, L1 represents the average illuminance of the bitmap, n represents the total number of pixels in the bitmap, and L represents the differential illuminance of the bitmap, then the following relationship exists:

[0385]

[0386] L1 can be obtained using the following formula 10:

[0387]

[0388] S305. Determine the wallpaper type to which the bitmap belongs based on the average contrast and / or differential illuminance.

[0389] In this embodiment of the application, multiple wallpaper types are preset, each wallpaper type corresponding to a bitmap with different average contrast and / or differential illuminance values.

[0390] This application sets p thresholds for the average contrast: C1, C2, ..., C p And set q thresholds for differential illuminance: L1, L2, ... L q Where C1 < C2 ... < C p L1 > L2 ... > L q Both p and q are positive integers.

[0391] Specifically, the wallpaper type of the bitmap can be determined in the following three ways:

[0392] Method 1

[0393] Based on the average contrast of the bitmap, determine the wallpaper type to which the bitmap belongs, including:

[0394] If the average contrast of a bitmap is less than C1, then the bitmap belongs to wallpaper type 1;

[0395] If the average contrast of a bitmap is greater than or equal to C1 and less than C2, then the bitmap belongs to wallpaper type 2.

[0396] ...

[0397] If the average contrast of a bitmap is greater than or equal to Cp-1 and less than Cp, then the bitmap belongs to wallpaper type p.

[0398] Method 2

[0399] Based on the differential illuminance of the bitmap, determine the wallpaper type to which the bitmap belongs, including:

[0400] If the differential illuminance of a bitmap is greater than or equal to L1, then the bitmap belongs to wallpaper type 1.

[0401] If the differential illuminance of a bitmap is greater than or equal to L2 and less than L1, then the bitmap belongs to wallpaper type 2.

[0402] ...

[0403] If the differential illuminance of a bitmap is greater than or equal to Lq-1 and less than Lq, then the bitmap belongs to wallpaper type q.

[0404] Method 3

[0405] Based on the average contrast and differential illuminance of the bitmap, determine the wallpaper type to which the bitmap belongs, including:

[0406] If the average contrast of a bitmap is less than C1, then the bitmap belongs to wallpaper type 1;

[0407] If the average contrast of a bitmap is greater than or equal to C1 and less than C2, then the bitmap belongs to wallpaper type 2.

[0408] ...

[0409] If the average contrast of a bitmap is greater than or equal to Cp-1 and less than Cp, then the bitmap belongs to wallpaper type p.

[0410] If the average contrast of a bitmap is greater than or equal to Cp, and the differential illuminance of the bitmap is greater than or equal to L1, then the bitmap belongs to wallpaper type p+1.

[0411] If the average contrast of a bitmap is greater than or equal to Cp, and the differential illuminance of the bitmap is greater than or equal to L2 and less than L1, then the bitmap belongs to the wallpaper type p+2.

[0412] ...

[0413] If the average contrast of a bitmap is greater than or equal to Cp, and the differential illuminance of the bitmap is greater than or equal to Lq-1 and less than Lq, then the bitmap belongs to the wallpaper type p+q.

[0414] It should be noted that the color filter parameters differ for different wallpaper types across the three methods described above. This application does not limit the values ​​of p and q, which can be determined based on actual usage requirements. It should be understood that larger values ​​for p and q, and a wider variety of wallpaper types, result in more color filter parameters for setting bitmaps, leading to richer darker images obtained using these color filter parameters.

[0415] S306. Set the bitmap using the color filter parameters corresponding to the wallpaper type to which the bitmap belongs, and obtain a dark image.

[0416] Optionally, different wallpaper types require different color filter parameters. This embodiment of the application can change the color values ​​of pixels in a bitmap by setting color filter parameters, thereby altering the darkening or blackening effect of the bitmap.

[0417] Specifically, when the average contrast of a bitmap is low, the bitmap color is light, requiring a higher degree of darkness, thus the color filter parameter value is small. As the average contrast of the bitmap increases, the bitmap color gradually darkens, requiring a lower degree of darkness, thus the color filter parameter value gradually increases. Conversely, as the differential illuminance of the bitmap decreases, the pattern becomes darker, requiring a lower degree of darkness, thus the color filter parameter value gradually increases.

[0418] The following example uses method three described above to determine the wallpaper type to which the bitmap belongs, illustrating a specific implementation method for setting the bitmap using color filter parameters corresponding to the wallpaper type to which the bitmap belongs, to obtain a dark image. For example, assume that the average contrast is set with three thresholds: A, B, and C, and the differential illuminance is set with one threshold: D. These thresholds satisfy the following condition: A < B < C.

[0419] If the average contrast of the bitmap is less than A, then the bitmap is mainly light-colored and belongs to wallpaper type 1.

[0420] If the average contrast of a bitmap is greater than or equal to A and less than B, then the bitmap has a lot of color elements and belongs to wallpaper type 2.

[0421] If the average contrast of a bitmap is greater than or equal to B and less than C, then the bitmap is in color and belongs to wallpaper type 3.

[0422] If the average contrast of the bitmap is greater than or equal to C, and the differential illuminance of the bitmap is greater than or equal to D, then the bitmap has half dark and half light colors and belongs to wallpaper type 4.

[0423] If the average contrast of the bitmap is greater than or equal to C, and the differential illuminance of the bitmap is less than D, then the bitmap is predominantly dark with some light areas, and belongs to wallpaper type 5.

[0424] Based on the above embodiments, from wallpaper type 1 to wallpaper type 5, the color of the bitmap gradually deepens, the required darkness of the bitmap gradually decreases, and the color filter parameter value gradually increases. For example, the color filter parameter value for wallpaper type 1 is 1, the color filter parameter value for wallpaper type 2 is 2, the color filter parameter value for wallpaper type 3 is 3, the color filter parameter value for wallpaper type 4 is 4, and the color filter parameter value for wallpaper type 5 is 5.

[0425] It should be noted that, for ease of understanding, the above embodiments are exemplified by using color filter parameter values ​​of 1, 2, 3, 4, and 5, and do not limit the embodiments of this application. In actual implementation, color filter parameters can be binary, quaternary, octal, decimal, or hexadecimal. Furthermore, the values ​​of the color filter parameters can be continuous or discontinuous. For example, when the bitmap belongs to wallpaper type 1, the color filter parameter value is 00000001; when the bitmap belongs to wallpaper type 5, the color filter parameter value is ffffffff; when the bitmap belongs to wallpaper type 2, wallpaper type 3, and wallpaper type 4, the color filter parameter value is any three different values ​​between 00000001 and ffffffff. Of course, other values ​​can also be used for the color filter parameters, which can be determined according to actual usage requirements.

[0426] Understandably, since a pre-defined correspondence between wallpaper types and color filter parameters is established, after acquiring the target image, it can be converted into a bitmap and its average contrast and differential illuminance can be calculated. This allows the determination of the wallpaper type to which the bitmap belongs. Then, based on the correspondence between wallpaper types and color filter parameters, the corresponding color filter parameters can be determined. In this way, the color filter parameters can be used to adjust the darkening level of the bitmap, reducing its brightness and achieving the conversion from light to dark wallpaper.

[0427] It should also be noted that in the embodiments of this application, "greater than" can be replaced with "greater than or equal to", "less than or equal to" can be replaced with "less than", or "greater than or equal to" can be replaced with "greater than", and "less than" can be replaced with "less than or equal to".

[0428] The various embodiments described herein can be independent solutions or combinations thereof based on their inherent logic, and all such solutions fall within the protection scope of this application.

[0429] It is understood that the methods and operations implemented by electronic devices in the above-described method embodiments can also be implemented by components (such as chips or circuits) that can be used in electronic devices.

[0430] The method embodiments provided in this application have been described above. The apparatus embodiments provided in this application will be described below. It should be understood that the description of the apparatus embodiments corresponds to the description of the method embodiments. Therefore, any content not described in detail can be referred to the method embodiments above. For the sake of brevity, it will not be repeated here.

[0431] The foregoing mainly describes the solutions provided by the embodiments of this application from the perspective of method steps. It is understood that, in order to achieve the above functions, the electronic device implementing this method includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of protection of this application.

[0432] This application embodiment can divide an electronic device into functional modules based on the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware or as software functional modules. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, other feasible division methods may exist. The following description uses the division of functional modules according to each function as an example.

[0433] Figure 19 This is a schematic block diagram of a wallpaper display device 900 provided in an embodiment of this application. The device 900 can be used to perform the actions performed by the electronic device in the above method embodiments. The device 900 includes a receiving module 901, a processing module 902, and a display module 903.

[0434] In one possible implementation:

[0435] The receiving module 901 can be used to receive a first operation from a user, which is to set the selected target image as wallpaper.

[0436] The processing module 902 can be used to respond to the first operation by marking the target image as wallpaper and converting the target image into a dark image. The target image and the dark image have the same screen elements and the same arrangement of screen elements, and the brightness of the target image is greater than that of the dark image.

[0437] The receiving module 901 can also be used to receive a second operation from the user, which is used to trigger the display of the desktop or lock screen interface.

[0438] The display module 903 can be used to display a dark image as wallpaper when the screen mode of the electronic device is dark mode; or to display a target image as wallpaper when the screen mode of the electronic device is light mode.

[0439] According to this application, when a user sets a wallpaper image, the electronic device will convert that image to a darker, less bright one. Upon receiving a trigger to display the desktop, it will check whether the conditions for displaying a dark wallpaper are met. If the conditions are met, the dark image will be displayed as the wallpaper; otherwise, the image will still be displayed as the wallpaper. This allows the wallpaper color to adapt to the screen mode in different situations. Specifically, when the screen is in dark mode, returning to the desktop from an application interface allows the use of a dark image as the wallpaper, reducing eye strain and thus meeting the user's screen usage needs in various scenarios.

[0440] In another possible implementation:

[0441] The receiving module 901 can be used to receive a first operation, which is used to request that the target image be set as wallpaper;

[0442] Processing module 902 can be used to mark the target image as wallpaper in response to the first operation;

[0443] The receiving module 901 can also be used to receive a second operation, which is used to trigger the display of the desktop or lock screen interface.

[0444] The display module 903 can be used to respond to the second operation by converting the target image into a dark image and displaying the dark image as wallpaper when the screen mode of the electronic device is dark mode; or by displaying the target image as wallpaper when the screen mode of the electronic device is light mode.

[0445] The solution proposed in this application allows for temporary suspension of the target image conversion after receiving the first operation. This means that if a different image is used as the wallpaper before the conditions for displaying a dark wallpaper are met, the device's power consumption is reduced to some extent because no unnecessary conversion operation was performed on the target image beforehand.

[0446] In yet another possible implementation:

[0447] The display module 903 can be used to update the desktop wallpaper to a dark image when the target image is the desktop wallpaper, and if a dark mode selection operation is received, or if preset conditions are met. The target image and the dark image have the same screen elements and the same arrangement of screen elements, and the brightness of the target image is greater than that of the dark image.

[0448] According to the solution proposed in this application, when the screen mode of the electronic device is in light mode, the desktop wallpaper is a target image corresponding to the light mode. Subsequently, if a selection action for dark mode is received, or if the preset conditions for enabling dark mode are met, the electronic device will update the desktop wallpaper to display a darker image with lower brightness. In this way, the wallpaper color adapts to the screen mode, thus meeting the user's screen usage needs in different scenarios and improving the user experience.

[0449] The apparatus 900 according to the embodiments of this application can correspond to the execution of the method described in the embodiments of this application, and the above and other operations and / or functions of the units in the apparatus 900 are respectively for implementing the corresponding process of the method, which will not be described again here for the sake of brevity.

[0450] It should be understood that Figure 2 The electronic device 100 shown can correspond to Figure 19 The device 900 shown. Wherein, Figure 2 The processor 110, sensor module 180, and display screen 194 in the illustrated electronic device 100 can respectively correspond to Figure 19 The device 800 includes a processing module 902, a receiving module 901, and a display module 903.

[0451] In actual implementation, when the electronic device 100 is running, the processor 110 executes computer execution instructions in the memory 121 to perform the operation steps of the above method through the electronic device 100.

[0452] Optionally, in some embodiments, this application provides a chip coupled to a memory, the chip being used to read and execute computer programs or instructions stored in the memory to perform the methods described in the above embodiments.

[0453] Optionally, in some embodiments, this application provides an electronic device including a chip for reading and executing computer programs or instructions stored in a memory, such that the methods in the various embodiments are performed.

[0454] Optionally, in some embodiments, this application also provides a computer-readable storage medium storing program code that, when run on a computer, causes the computer to perform the methods described in the above embodiments.

[0455] Optionally, in some embodiments, this application also provides a computer program product including computer program code, which, when run on a computer, causes the computer to perform the methods described in the above embodiments.

[0456] In this embodiment, the electronic device includes a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on the operating system layer. The hardware layer may include hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also called main memory). The operating system layer can be any one or more computer operating systems that implement business processing through processes, such as Linux, Unix, Android, iOS, or Windows. The application layer may include applications such as browsers, address books, word processing software, and instant messaging software.

[0457] This application does not impose any particular limitation on the specific structure of the execution subject of the method provided in this application embodiment. As long as it is possible to communicate according to the method provided in this application embodiment by running a program that records the code of the method provided in this application embodiment. For example, the execution subject of the method provided in this application embodiment can be an electronic device, or a functional module in an electronic device that can call and execute a program.

[0458] Various aspects or features of this application can be implemented as methods, apparatus, or articles of manufacture using standard programming and / or engineering techniques. As used herein, the term "article of manufacture" can encompass a computer program accessible from any computer-readable device, carrier, or medium. For example, computer-readable media can include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks, or magnetic tapes), optical discs (e.g., compact discs (CDs), digital versatile discs (DVDs), etc.), smart cards, and flash memory devices (e.g., erasable programmable read-only memory (EPROMs), cards, sticks, or key drives, etc.).

[0459] The various storage media described herein may represent one or more devices and / or other machine-readable media used for storing information. The term "machine-readable media" may include, but is not limited to, wireless channels and various other media capable of storing, containing and / or carrying instructions and / or data.

[0460] It should be understood that the processor mentioned in the embodiments of this application can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0461] It should also be understood that the memory mentioned in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM). For example, RAM can be used as an external cache. By way of example and not limitation, RAM can include a variety of forms, such as: static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0462] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA, or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, the memory (storage module) can be integrated into the processor.

[0463] It should also be noted that the memory described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0464] Those skilled in the art will recognize that the units and steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of protection of this application.

[0465] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0466] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of apparatuses or units may be electrical, mechanical, or other forms.

[0467] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0468] In addition, the functional units in the various embodiments of this application can be integrated into one unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0469] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium and includes several instructions that cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0470] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.

[0471] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A wallpaper display method, characterized in that, The method is applied to an electronic device, wherein both the system and third-party applications of the electronic device provide dark mode and light mode, and the method includes: Receive a first operation, the first operation being used to request the electronic device to set the target image as wallpaper; In response to the first operation, the target image is marked as wallpaper and the target image is converted into a dark image. The target image and the dark image have the same screen elements and the same arrangement of screen elements. The brightness of the target image is greater than that of the dark image. In response to a selection operation of dark mode or light mode provided by a third-party application, the screen display mode is set to the mode corresponding to the selection operation; In response to a second operation that triggers the display of a wallpaper, the screen display mode is detected; When the screen display mode is the dark mode provided by the third-party application, and the dark mode and light mode provided by the system are turned off, the dark image is displayed as wallpaper; When the screen display mode is the light mode provided by the third-party application, and the dark mode and light mode provided by the system are turned off, the target image is displayed as wallpaper.

2. The method according to claim 1, characterized in that, After converting the target image to a dark image, the method further includes: Establish the association between the target image and the dark image, and store the dark image; The step of displaying the dark image as wallpaper includes: Based on the aforementioned association, the dark-colored image is displayed as wallpaper.

3. The method according to claim 1, characterized in that, The wallpaper in question is a desktop wallpaper; The second operation in response to triggering the display of wallpaper, detecting the screen display mode, includes: When the interface of the target application is displayed, the second operation of returning to the desktop from the interface of the target application is received; In response to the second operation, the screen display mode is detected.

4. The method according to claim 3, characterized in that, Before receiving the second operation of returning to the desktop from the interface of the target application, the method further includes: In response to the selection operation of dark mode or light mode provided by the third-party application, the interface of the target application is updated to a dark interface or light interface corresponding to the selected screen display mode.

5. The method according to any one of claims 1 to 4, characterized in that, Converting the target image to a dark image includes: Convert the target image into a bitmap; Determine the wallpaper type to which the bitmap belongs; The bitmap is set with color filter parameters corresponding to the wallpaper type to which it belongs, to obtain the dark image; Different wallpaper types have different color filter parameters.

6. The method according to claim 5, characterized in that, Determining the wallpaper type to which the bitmap belongs includes: Obtain the contrast of each pixel in the bitmap; Calculate the average contrast of the bitmap using the contrast of all pixels in the bitmap; Based on the average contrast, the wallpaper type to which the bitmap belongs is determined.

7. The method according to claim 5, characterized in that, Determining the wallpaper type to which the bitmap belongs includes: Obtain the contrast and illuminance of each pixel in the bitmap; Calculate the average contrast of the bitmap using the contrast of all pixels in the bitmap; Calculate the differential illuminance of the bitmap using the illuminance of all pixels; The wallpaper type to which the bitmap belongs is determined based on the average contrast and the differential illuminance.

8. The method according to claim 7, characterized in that, The step of determining the wallpaper type to which the bitmap belongs based on the average contrast and the differential illuminance includes: If the average contrast is less than a first value, the wallpaper type to which the bitmap belongs is determined according to the value range to which the average contrast belongs. If the average contrast is greater than or equal to the first value, the wallpaper type to which the bitmap belongs is determined according to the numerical range to which the differential illuminance belongs.

9. An electronic device, characterized in that, The device includes a processor coupled to a memory, the processor being configured to execute a computer program or instructions stored in the memory to cause the electronic device to implement the wallpaper display method as described in any one of claims 1 to 8.

10. A chip system, characterized in that, The chip system is coupled to a memory, and the chip system is used to read and execute a computer program stored in the memory to implement the wallpaper display method as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on an electronic device, causes the electronic device to perform the wallpaper display method as described in any one of claims 1 to 8.

12. A computer program product, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the wallpaper display method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Display control method, electronic equipment and storage medium

    CN113112944A