Interface processing method, electronic equipment and related device

By processing the user interface at the pixel level and adjusting the transparency of the covering layer according to the brightness difference, the problem of difficulty in balancing the readability of UI elements and the image display effect in the existing technology is solved, and a better user experience is achieved.

CN118796325APending Publication Date: 2024-10-18HUAWEI TECH CO LTD

Patent Information

Application Number
CN202410749661.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

While existing user interface technologies improve the readability of UI elements, they often affect the display effect of images, resulting in poor user experience.

Method used

By processing UI elements and images at the pixel level, covering them to varying degrees according to the brightness difference of different pixels, and adjusting the transparency of the covering layer to ensure the readability of UI elements and improve the display effect of the image.

Benefits of technology

On the basis of ensuring the readability of UI elements, the display effect of images is improved and the poor user experience caused by covering the entire area is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796325A_ABST
    Figure CN118796325A_ABST
Patent Text Reader

Abstract

The invention provides an interface processing method, electronic equipment and a related device, in the method, aiming at a first pixel and a third pixel with small brightness difference, a user is difficult to identify a UI element at the first pixel in an image, the UI readability at the first pixel is poor, the electronic equipment can increase the covering processing degree, and the user experience is improved. Namely, the transparency of the covering layer at the first pixel is reduced, so that the UI readability at the first pixel can be improved. For the second pixel and the fourth pixel with large brightness difference, a user can easily identify the UI element at the second pixel in the image, the UI readability at the second pixel is good, and the electronic equipment can reduce the covering processing degree, that is, the transparency of the covering layer at the first pixel is increased, so that the display effect of the image at the second pixel can be improved. According to the method provided by the embodiment of the invention, the display effect of the image can be improved on the basis of ensuring the readability of the UI element.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of user interface technology, and in particular, to an interface processing method, electronic equipment, and related devices. Background Art

[0002] Many user interfaces (UIs) display images and UI elements on top of the images. For example, UI elements may include but are not limited to icons and text. Because images contain a variety of colors, if the color of a UI element is the same or similar to the color of the image, the UI element will blend into the image and the user will not be able to see the UI element clearly.

[0003] Currently, in order to solve the problem of unclear UI elements, electronic devices can perform full-area projection, masking, or gradient masking processing on UI elements. Such projection, masking, or gradient masking will cover the entire area of ​​the image, affecting the display effect of the image and poor user experience. Summary of the invention

[0004] The embodiments of the present application provide an interface processing method, an electronic device, and related devices, which can improve the display effect of an image while ensuring the readability of UI elements.

[0005] In a first aspect, an embodiment of the present application provides an interface processing method, and the execution subject of the interface processing method may be an electronic device or a chip in an electronic device. The following description takes an electronic device as an example. In this method, the electronic device may display an interface. The interface includes an image, a cover layer on the image, and a first user interface UI element on the cover layer. The first UI element occupies a first pixel and a second pixel, the first pixel corresponds to a third pixel in the image, and the second pixel corresponds to a fourth pixel in the image.

[0006] In some embodiments, the covering layer may include, but is not limited to: a projection, a mask, a gradient mask, or a blur layer.

[0007] The brightness difference between the first pixel and the third pixel is a first brightness difference, the brightness difference between the second pixel and the fourth pixel is a second brightness difference, and the first brightness difference is smaller than the second brightness difference. The first transparency of the covering layer at the first pixel is smaller than the second transparency at the second pixel, and the transparency is used to indicate the degree of covering of the image by the covering layer.

[0008] In the embodiment of the present application, the brightness difference between the first UI element and the image of the lower layer at different pixels may be different. If the brightness difference is different, the readability of the first UI element is different. Exemplarily, when the brightness difference between the first pixel and the third pixel is the first brightness difference, the brightness difference between the second pixel and the fourth pixel is the second brightness difference. Wherein, the first brightness difference is less than the second brightness difference, indicating that: the brightness difference between the first pixel and the third pixel is small, the brightness is relatively close, it is difficult for the user to identify the UI element at the first pixel in the image, and the UI readability at the first pixel is poor. In this way, the electronic device can increase the degree of masking at the first pixel, that is, reduce the transparency of the masking layer at the first pixel, so that the UI readability at the first pixel can be improved. The brightness difference between the second pixel and the fourth pixel is large, the brightness difference is large, the user can easily identify the UI element at the second pixel in the image, and the UI readability at the second pixel is good. The electronic device can reduce the degree of masking at the second pixel, that is, increase the transparency of the masking layer at the first pixel, so that the display effect of the image at the second pixel can be improved.

[0009] In the embodiment of the present application, the electronic device can perform pixel-level processing on UI elements and images. Specifically, for different pixels, the electronic device can perform different degrees of masking processing on different pixels to improve the display effect of the image while ensuring the readability of the UI.

[0010] It should be understood that the above description, from the perspective of the electronic device display interface, explains that for different pixels, the electronic device can perform different degrees of masking processing on different pixels. In one possible implementation, the electronic device can process the pixels in the interface before displaying the interface to obtain the above interface and then display the interface.

[0011] Wherein, before displaying the interface, the electronic device further includes: obtaining initial information of the interface, wherein the initial information is used to indicate that the third transparency of the covering layer at the first pixel is equal to the fourth transparency at the second pixel. It should be understood that the initial information of the interface can be understood as pre-configured for the interface, and the third transparency of the covering layer at the first pixel in the initial information is equal to the fourth transparency at the second pixel. In other words, in the initial information, the transparency of the covering layer at the first pixel and the second pixel of the interface are equal. It can also be said that in the initial information, the transparency of the covering layer at each pixel of the interface is equal.

[0012] In the embodiment of the present application, the electronic device can obtain the first brightness difference between the first pixel and the third pixel, and the second brightness difference between the second pixel and the fourth pixel. The electronic device can adjust the transparency of the covering layer at the pixel in the initial information according to the different brightness differences at the pixel, so that the transparency of the covering layer can adapt to the brightness difference at the pixel.

[0013] The electronic device may adjust the third transparency to the first transparency according to the first brightness difference, and adjust the fourth transparency to the second transparency according to the second brightness difference.

[0014] The following first introduces a method for the electronic device to obtain the first brightness difference and the second brightness difference:

[0015] First, the electronic device may obtain a first brightness of the first pixel according to the color of the first pixel, and obtain a second brightness of the third pixel according to the color of the third pixel. The electronic device may use the difference between the first brightness and the second brightness as the first brightness difference.

[0016] Similar to the first pixel, the electronic device can obtain the third brightness of the second pixel according to the color of the second pixel, and obtain the fourth brightness of the fourth pixel according to the color of the fourth pixel. The electronic device can use the difference between the third brightness and the fourth brightness as the second brightness difference.

[0017] Secondly, the electronic device may obtain the contrast between the first pixel and the third pixel, and the electronic device may determine the first brightness difference according to the contrast between the first pixel and the third pixel.

[0018] Similar to the first pixel, the electronic device may obtain the contrast between the second pixel and the fourth pixel, and the electronic device may determine the second brightness difference according to the contrast between the second pixel and the fourth pixel.

[0019] The following describes a method in which the electronic device adjusts the third transparency to the first transparency according to the first brightness difference, and adjusts the fourth transparency to the second transparency according to the second brightness difference:

[0020] First, in some embodiments, a conversion relationship between a brightness difference and an adjustment coefficient of transparency may be preset in the electronic device. The electronic device may determine the adjustment coefficient of transparency corresponding to the first brightness difference based on the first brightness difference and the conversion relationship. The electronic device may adjust the third transparency to the first transparency based on the adjustment coefficient of transparency corresponding to the first brightness difference.

[0021] Similarly, the electronic device can determine the transparency adjustment coefficient corresponding to the second brightness difference according to the second brightness difference and the conversion relationship. The electronic device can adjust the fourth transparency to the second transparency according to the transparency adjustment coefficient corresponding to the second brightness difference.

[0022] Second, in some embodiments, the types of UI elements are diverse. For example, UI elements can be status bars, application icons, application names, time, date, etc. Users have different requirements for UI readability of different types of UI elements. The sizes of UI elements are different, and users have different requirements for UI readability of UI elements of different sizes. Under the premise that the type and size of UI elements are the same, different masking types will also affect the difficulty of users identifying UI elements, and accordingly users have different requirements for UI readability of different masking types.

[0023] Accordingly, for different types of UI elements, UI elements of different sizes, and different types of covering, different conversion relationships can be pre-configured in the electronic device. The conversion relationship is an abbreviation of the conversion relationship between the brightness difference and the transparency adjustment coefficient.

[0024] In some embodiments, the conversion relationship may be related to at least one of the type of UI element, the size of UI element, and the covering type. In this embodiment, the electronic device may determine the conversion relationship adapted to the first UI element based on at least one of the type of UI element, the size of UI element, and the covering type.

[0025] After determining the conversion relationship to adapt the first UI element, the electronic device can determine the adjustment coefficient of the third transparency according to the first brightness difference and the conversion relationship. The electronic device can adjust the third transparency to the first transparency according to the adjustment coefficient of the third transparency. Similarly, the electronic device can determine the adjustment coefficient of the fourth transparency according to the first brightness difference and the conversion relationship. The electronic device can adjust the fourth transparency to the second transparency according to the adjustment coefficient of the fourth transparency.

[0026] The following is an example of a conversion relationship preset in an electronic device:

[0027] Exemplarily, when the type of the first UI element is a status bar, the user just casually touches the status bar, which does not affect the main task, and the user does not have high requirements for the UI readability of the status bar. In some embodiments, the first conversion relationship corresponding to the status bar can be set as a non-strict readability function. For example, the first conversion relationship corresponding to the status bar is embodied as a straight line with a slope.

[0028] For example, when the first UI element is a text containing important content such as an application name, the user has high requirements for UI readability of the UI element. In some embodiments, the first conversion relationship corresponding to the application name can be set as a strict readability function. For example, the first conversion relationship corresponding to the application name is embodied as a curve.

[0029] In the embodiment of the present application, different first conversion relationships can be pre-set for different types of first UI elements, different sizes of first UI elements, and different covering types. The electronic device can determine the first conversion relationship that is suitable for the first UI element according to the type, size, and covering type of the first UI element. Furthermore, the electronic device can determine the transparency adjustment coefficient based on the first conversion relationship and the brightness difference between pixels, and then adjust the transparency of the covering layer at each pixel based on the transparency adjustment coefficient, so as to better meet the user's requirements for UI readability.

[0030] In a second aspect, an embodiment of the present application provides an interface processing method. The execution subject of the interface processing method may be an electronic device or a chip in the electronic device. The following description is made using an electronic device as an example:

[0031] In the method, the electronic device can obtain initial information of the interface. The interface includes: an image, a cover layer on the image, and a first user interface UI element on the cover layer. The initial information is used to indicate that the transparency of the cover layer at each pixel in the first UI element is equal, and is the third transparency.

[0032] The electronic device can obtain the brightness difference between each pixel in the first UI element and the corresponding pixel in the underlying image, and the electronic device can adjust the transparency of the covering layer at each pixel according to the brightness difference corresponding to each pixel.

[0033] Exemplarily, taking the first UI element including the first pixel as an example, the initial information is used to indicate that the transparency of the covering layer at the first pixel is the third transparency. The first pixel corresponds to the third pixel in the image, and the electronic device can obtain a first brightness difference between the first pixel and the third pixel, and based on the first brightness difference, adjust the third transparency at the first pixel to the first transparency.

[0034] Among them, the method in which the electronic device obtains the first brightness difference and adjusts the third transparency at the first pixel to the first transparency can refer to the description in the first aspect and will not be repeated here.

[0035] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, the memory being used to store code instructions, and the processor being used to run the code instructions to execute the first aspect or any possible implementation of the first aspect, and the method described in the second aspect.

[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is run on a computer, the computer executes the first aspect or any possible implementation of the first aspect, as well as the method described in the second aspect.

[0037] In a fifth aspect, an embodiment of the present application provides a computer program product comprising a computer program. When the computer program runs on a computer, the computer executes the method described in the first aspect or any possible implementation of the first aspect, as well as the second aspect.

[0038] In a sixth aspect, the present application provides a chip or a chip system, the chip or chip system comprising at least one processor and a communication interface, the communication interface and the at least one processor are interconnected by a line, and the at least one processor is used to run a computer program or instruction to execute the first aspect or any possible implementation of the first aspect, and the method described in the second aspect. Among them, the communication interface in the chip can be an input / output interface, a pin or a circuit, etc.

[0039] In a possible implementation, the chip or chip system described above in the present application further includes at least one memory, in which instructions are stored. The memory may be a storage unit inside the chip, such as a register, a cache, etc., or a storage unit of the chip (e.g., a read-only memory, a random access memory, etc.).

[0040] It should be understood that the second to sixth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 This is a schematic diagram of covering UI elements;

[0042] Figure 2 A flowchart of an embodiment of the interface processing method provided in the embodiment of the present application;

[0043] Figure 3A A schematic diagram of interface comparison provided in an embodiment of the present application;

[0044] Figure 3B Another interface comparison diagram provided in an embodiment of the present application;

[0045] Figure 3C A schematic diagram of the relationship between the brightness difference between UI elements and images and the transparency of projection provided in an embodiment of the present application;

[0046] Figure 4 A flowchart of another embodiment of the interface processing method provided in the embodiment of the present application;

[0047] Figure 5 A function diagram of a first conversion relationship corresponding to a status bar provided in an embodiment of the present application;

[0048] Figure 6 A function diagram of a first conversion relationship corresponding to an application name provided in an embodiment of the present application;

[0049] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] For ease of understanding, the following first introduces the relevant terms and concepts involved in the embodiments of the present application:

[0051] 1. UI elements: The user interface (UI) involved in the embodiments of the present application will display an image and UI elements on the upper layer of the image. The UI elements are on the upper layer of the image, and the UI elements may block part of the image.

[0052] In some embodiments, the UI element being in the upper layer of the image can be understood as: the layer where the UI element is located is in the upper layer where the image is located. Before displaying the UI, the electronic device can perform layer synthesis processing on the layers included in the UI. For example, the electronic device can perform layer synthesis on the layer where the UI element is located and the layer where the image is located. Among them, the layer where the UI element is located is in the upper layer of the layer where the image is located. After the electronic device performs layer synthesis processing, the UI can be obtained. The electronic device can send the UI for display to display the UI.

[0053] In some embodiments, the UI can also be said to include a background image and foreground UI elements.

[0054] In some embodiments, a UI element can be understood as content that a user can see on a UI except for images.

[0055] Exemplarily, taking the desktop as an example, the image can be understood as a wallpaper, and the UI elements can include but are not limited to: status bar, folders, cards, application icons, time, date and other text, weather and other icons. Among them, the status bar can include but are not limited to: time and other text, signal strength, battery remaining and other icons. Exemplarily, taking the lock screen interface as an example, the image can be understood as a lock screen wallpaper, and the UI elements can include but are not limited to: time, date, step count and other text, flashlight, camera and other icons. Exemplarily, taking the chat interface as an example, the image can be understood as a chat background picture or chat wallpaper, and the UI elements can include but are not limited to: status bar, the other party's name, chat information, message input box, etc.

[0056] It should be understood that the interface processing method provided in the embodiment of the present application is not limited to application in the desktop, lock screen interface, and chat interface, but can also be applied to other interfaces that include "background images and foreground UI elements".

[0057] 2. UI readability: It can be understood as the difficulty for users to identify and extract UI elements on the UI.

[0058] 3. Inversion mechanism: The inverted color (complementary color) is a color that can be turned into white when superimposed with the primary color. For example, you can use white (RGB: 255,255,255) minus the primary color to get the inverted color of the primary color.

[0059] In some embodiments, in order to improve UI readability, black or dark text (UI elements) can be used on white or light-colored images, so that the image and UI elements are in reverse colors and have a contrast, which makes it easier for users to quickly identify and extract UI elements in the image.

[0060] 4. Projection: Set a shadow under the UI element to show the UI element. For example, refer to Figure 1 In a, when the image is white and the UI element is white, in order to facilitate the user to identify and extract the UI element, the UI element can be projected. For example, a dark shadow is set under the UI element. It should be understood that Figure 1 In a, a UI element is a text “Camera” and a camera application icon as an example, and the text “Camera” is white.

[0061] It is understandable that the shape of the projection may be a rectangle, an ellipse, a circle, or may change with the shape of the UI element, and the embodiment of the present application does not limit this.

[0062] 5. Mask: It can be understood as setting a mask layer under the UI element to cover the image. Figure 1 In b, taking the UI element as the status bar 11 as an example, a mask layer can be set under the UI element, which can also facilitate users to identify the UI element in the image. It should be understood that Figure 1 The gray shadow of b in the figure represents the mask, and the specific mask effect can refer to the mask processing results in the prior art.

[0063] 6. Gradient mask: It can be understood as setting a mask layer under the UI element, and the transparency of the mask layer changes gradually.

[0064] 7. Blur: It can be understood as blurring the underlying image of the UI element to make it easier for users to identify the UI element in the image.

[0065] In summary, whether it is projection, masking, gradient masking or blur processing, a covering layer is set under the UI element, and the covering layer is used to cover the image so as to highlight the UI element, so that the user can recognize the UI element in the image and improve the readability of the UI. In the embodiment of the present application, the covering processing is projection, masking, gradient masking or blur processing as an example, and it should be understood that the interface processing method provided in the embodiment of the present application can also be applied to other processing methods for covering images.

[0066] 8. Electronic equipment:

[0067] The electronic device in the embodiment of the present application has a display screen, and the display screen can display a UI. The electronic device can be called a user equipment (UE), a terminal, etc. For example, the electronic device can be a mobile phone, a tablet computer (tablet), a personal digital assistant (PDA), a handheld device with a wireless communication function, a computing device, a vehicle-mounted device or a wearable device, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in a smart home, etc. The form of the electronic device in the embodiment of the present application is not specifically limited.

[0068] In order to improve the readability of the UI, in some embodiments, the electronic device can use an inversion mechanism to set the color of the UI element. For example, taking the UI element as text, the image is white or light-colored, and the electronic device can set the UI element to black or dark, so that the image and the UI element have a contrast, and the user can quickly identify the UI element in the image. However, because the color of the image is rich and colorful, not a pure color or a single color system, the electronic device uses an inversion mechanism and cannot guarantee the readability of the UI. Exemplarily, taking an image including a white area and a black area as an example, if the electronic device sets the UI element to black, the user can see the UI element in the white area, but in the black area, because the UI element is also black, the two are integrated, the user cannot recognize the UI element, and the UI readability is poor.

[0069] In some embodiments, in order to improve the readability of the UI, the electronic device may project, mask, gradually mask or blur the UI elements, because the projection, mask, gradually mask or blur can cover the image under the UI element, so it is easy for the user to identify the UI element. At present, electronic devices will project, mask, gradually mask or blur the entire area of ​​the UI element, which can improve the readability of the UI to a certain extent, but the projection, mask, gradually mask or blur will cover the image in the entire area, affecting the display effect of the image and poor user experience.

[0070] Exemplarily, taking the desktop as an example, and taking the masking of UI elements as an example, the electronic device masks the entire desktop, that is, a mask is set below the UI elements and above the desktop wallpaper, and the mask can cover the wallpaper. On the one hand, because the wallpaper is covered, the user cannot see the specific content in the wallpaper, resulting in a poor user experience. On the other hand, some highlight colors in the wallpaper will appear dirty due to the masking, and the display effect will be poor. Dirty highlight colors can be understood as: highlight colors become less bright.

[0071] Accordingly, the embodiment of the present application provides an interface processing method. For an interface including an image and a UI element, an electronic device can perform pixel-level processing on the UI element and the image. In the embodiment of the present application, the electronic device can perform projection, masking, gradual masking or blurring on different pixels in the UI element to different degrees. For example, for an area where the brightness difference between the UI element and the pixel in the image is large, the user can recognize the UI element in the image, and the UI readability at the pixel is good, so the electronic device can reduce the degree of projection, masking, gradual masking or blurring, which can improve the display effect of the image. In addition, for an area where the brightness difference between the UI element and the pixel in the image is small, it is difficult for the user to recognize the UI element in the image, and the UI readability at the pixel is poor, so the electronic device can increase the degree of projection, masking, gradual masking or blurring, which can improve the UI readability. In the embodiment of the present application, the pixel-level processing of the UI element and the image can improve the display effect of the image on the basis of ensuring the readability of the UI.

[0072] The interface processing method provided by the embodiment of the present application is described below in conjunction with specific embodiments. The following embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0073] In the embodiment of the present application, before displaying the interface, the electronic device may process the interface to achieve the effect that different pixels correspond to different degrees of masking. After processing the interface, the electronic device may send the processed interface for display to display the interface. Figure 2 This is a flow chart of an embodiment of the interface processing method provided in the present application. Figure 2 , the interface processing method provided in the embodiment of the present application may include:

[0074] S201, obtaining initial information of the interface, where the initial information is used to indicate that a third transparency of the covering layer at a first pixel is equal to a fourth transparency of the covering layer at a second pixel.

[0075] Before displaying the interface, the electronic device can obtain the initial information of the interface. The interface may include an image, a cover layer on the image, and a first UI element on the image. In the embodiment of the present application, the cover layer is on the image, which can be understood as: the layer where the cover layer is located is on the upper layer of the layer where the image is located, and the first UI element is on the upper layer of the cover layer, which can be understood as: the layer where the first UI element is located is on the upper layer of the layer where the cover layer is located.

[0076] It should be understood that before displaying the interface, the electronic device may perform layer synthesis processing on the layers constituting the interface. The electronic device may synthesize the layer where the first UI element is located, the layer where the covering layer is located, and the layer where the image is located in the order of the layers, and place the layer where the first UI element is located on the upper layer of the layer where the covering layer is located, and place the layer where the covering layer is located on the upper layer of the layer where the image is located, to obtain the interface. The electronic device may send the interface for display to display the interface.

[0077] The layer where the first UI element is located may include at least one UI element. In some embodiments, all UI elements in the layer where the first UI element is located may be referred to as the first UI element. Alternatively, the layer where the first UI element is located may include the first UI element and may also include other UI elements, and the processing method of other UI elements may refer to the processing method of the first UI element. In the embodiment of the present application, the first UI element is taken as an example to introduce the processing method of the electronic device for the UI element.

[0078] The first UI element may occupy multiple pixels, for example, the first UI element may occupy "multiple pixels in the layer where the first UI element is located". In the embodiment of the present application, the pixel-level interface processing method provided in the embodiment of the present application is described by taking the first UI element occupying the first pixel and the second pixel as an example.

[0079] In an embodiment of the present application, the first pixel corresponds to the third pixel in the image, and the second pixel corresponds to the fourth pixel in the image. The first pixel corresponding to the third pixel in the image can be understood as: the first pixel in the layer where the first UI element is located corresponds to the third pixel in the layer where the image is located. It can also be understood as: the first pixel and the third pixel are in the same position in the interface, but the first pixel and the third pixel are in different layers of the interface. The first pixel is in the upper layer where the first UI element is located, and the third pixel is in the lower layer where the image is located.

[0080] Similarly, the second pixel corresponds to the fourth pixel in the image, which can be understood as: the second pixel in the layer where the first UI element is located corresponds to the fourth pixel in the layer where the image is located. It can also be understood as: the second pixel and the fourth pixel are in the same position in the interface, but the second pixel and the fourth pixel are in different layers in the interface. Among them, the second pixel is in the upper layer where the first UI element is located, and the fourth pixel is in the lower layer where the image is located.

[0081] In some embodiments, the first pixel may include at least one pixel, and the second pixel may include at least one pixel. In some embodiments, each pixel in the first pixel may be regarded as a first pixel, and each pixel in the second pixel may be regarded as a second pixel. In the embodiments of the present application, the first pixel and the second pixel are taken as examples to illustrate the processing method of each pixel by the electronic device, and the first pixel and the second pixel are taken as examples to illustrate the processing method of different pixels by the electronic device.

[0082] Accordingly, the third pixel may include at least one pixel, and the fourth pixel may include at least one pixel.

[0083] In some embodiments, the initial information of the interface may be used to indicate that the third transparency of the covering layer at the first pixel is equal to the fourth transparency at the second pixel. Exemplarily, the initial information of the interface may include: the transparency of the covering layer at each pixel. The transparency of the covering layer at each pixel may be equal. Accordingly, the initial information of the interface may include: the third transparency of the covering layer at the first pixel, and the fourth transparency of the covering layer at the second pixel. The third transparency is equal to the fourth transparency.

[0084] The transparency of the covering layer is used to indicate the degree of covering of the image by the covering layer. Exemplarily, the covering layer can be, for example, a projection, a mask, a gradient mask, or a fuzzy layer, etc. Correspondingly, the transparency of the covering layer can be, for example, projection transparency, mask transparency, gradient mask transparency, or fuzzy transparency.

[0085] The higher the transparency of the covering layer, the lower the degree of covering of the image by the covering layer, and the clearer the image can be seen by the user. The lower the transparency of the covering layer, the higher the degree of covering of the image by the covering layer, and the less clear the image can be seen by the user.

[0086] In the embodiment of the present application, the third transparency is equal to the fourth transparency, which can be characterized as follows: the degree of covering of the image by the covering layer at the first pixel is equal to the degree of covering of the layer at the second pixel. It can also be characterized as follows: the degree of covering processing by the electronic device at the first pixel is equal to the degree of covering processing at the second pixel. In other words, taking the covering layer as a masking layer as an example, the electronic device can perform the same degree of masking at the first pixel and the second pixel.

[0087] S202: Acquire a first brightness difference and a second brightness difference.

[0088] In the embodiment of the present application, the electronic device can perform different degrees of masking processing for different pixels, that is, the transparency of the masking layer is different, which can improve the display effect of the image while ensuring the readability of the UI.

[0089] Brightness refers to the lightness or darkness of a color. The brightness difference between the image and the first UI element can characterize the UI readability. Among them, if the brightness difference between the image and the first UI element is large, that is, the color brightness difference between the background image and the foreground UI element is large, it is beneficial for the user to identify the first UI element in the image, and the UI readability is good. When the UI readability is good, the electronic device can increase the transparency of the covering layer, so that on the basis of ensuring the UI readability, the display effect of the image can also be improved. If the brightness difference between the image and the first UI element is small, that is, the color brightness difference between the background image and the foreground UI element is small, it is difficult for the user to identify the first UI element in the image, and the UI readability is poor. When the UI readability is poor, the electronic device can reduce the transparency of the covering layer to improve the UI readability.

[0090] Based on this technical concept, in an embodiment of the present application, the electronic device can obtain a first brightness difference between the first pixel and the third pixel. Based on the first brightness difference, the electronic device can determine the UI readability of the first UI element at the first pixel, and then the electronic device can adjust the third transparency of the covering layer at the first pixel based on the UI readability at the first pixel. Similarly, the electronic device can obtain a second brightness difference between the second pixel and the fourth pixel. Based on the second brightness difference, the electronic device can determine the UI readability of the first UI element at the second pixel, and then the electronic device can adjust the fourth transparency of the covering layer at the second pixel based on the UI readability at the second pixel.

[0091] The following describes a method for an electronic device to obtain a first brightness difference and a second brightness difference:

[0092] First:

[0093] The color of a pixel is related to the brightness of the pixel. For example, taking the color of a pixel as red, green, and blue (RGB) color as an example, R, G, and B are all values ​​between 0 and 255. The smaller the value, the lower the brightness, and the larger the value, the greater the brightness. In some embodiments, the RGB color of a pixel and the brightness of the pixel have a relationship as shown in the following formula 1:

[0094] Brightness=a×R+b×G+c×B Formula 1

[0095] Among them, Brightness represents the brightness of the pixel, R, G, and B represent the colors of the red, green, and blue channels of the pixel respectively. a, b, and c represent the weights of R, G, and B respectively. For example, a can be 0.3, b can be 0.6, and c can be 0.1.

[0096] In some embodiments, the initial information of the interface may further include: the color of the first pixel, the color of the second pixel, the color of the third pixel, and the color of the fourth pixel. The electronic device may obtain the first brightness of the first pixel based on the color (such as RGB) of the first pixel based on the above formula 1. The electronic device may obtain the second brightness of the third pixel based on the color of the third pixel based on the above formula 1. The electronic device may use the difference between the first brightness and the second brightness as the first brightness difference.

[0097] Similarly, the electronic device can obtain the third brightness of the second pixel according to the color (such as RGB) of the second pixel based on the above formula 1. The electronic device can obtain the fourth brightness of the fourth pixel according to the color of the fourth pixel based on the above formula 1. The electronic device can use the difference between the third brightness and the fourth brightness as the second brightness difference.

[0098] In some embodiments, the electronic device may also convert the RGB color of the pixel into other color spaces, and the electronic device may determine the brightness of the pixel and the brightness difference between pixels based on the information of the pixel in the other color spaces.

[0099] For example, taking the example of an electronic device converting the RGB color of a pixel into a YUV color space, the electronic device may convert the RGB color of a first pixel into a YUV color space, wherein in the YUV color space, the Y of the first pixel represents the brightness of the first pixel, and the U and V of the first pixel represent the color and saturation of the first pixel.

[0100] In this example, the electronic device can convert the RGB color of the first pixel, the RGB color of the second pixel, the RGB color of the third pixel, and the RGB color of the fourth pixel into the YUV color space, and the electronic device can obtain the first brightness of the first pixel, the third brightness of the second pixel, the second brightness of the third pixel, and the fourth brightness of the fourth pixel. In this way, the electronic device can use the difference between the first brightness and the second brightness as the first brightness difference, and use the difference between the third brightness and the fourth brightness as the second brightness difference.

[0101] For example, taking the example of an electronic device converting the RGB color of a pixel into a LUV color space, the electronic device may convert the RGB color of a first pixel into a LUV color space, wherein in the LUV color space, L of the first pixel represents the brightness of the first pixel, and U and V of the first pixel represent the color and saturation of the first pixel.

[0102] In this example, the electronic device can convert the RGB color of the first pixel, the RGB color of the second pixel, the RGB color of the third pixel, and the RGB color of the fourth pixel into the LUV color space, and the electronic device can obtain the first brightness of the first pixel, the third brightness of the second pixel, the second brightness of the third pixel, and the fourth brightness of the fourth pixel. In this way, the electronic device can use the difference between the first brightness and the second brightness as the first brightness difference, and use the difference between the third brightness and the fourth brightness as the second brightness difference.

[0103] Second:

[0104] Contrast is related to brightness. Contrast usually refers to the brightness difference between the brightest and darkest parts of an image, that is, the gradient from black to white. The higher the contrast, the more obvious the difference in light and dark of the image, the richer the color levels that can be displayed, and the more vivid and clear the image. In an embodiment of the present application, the electronic device can obtain a first contrast between the first pixel and the third pixel, and then obtain a first brightness difference between the first pixel and the third pixel based on the first contrast. Among them, the first contrast is used to characterize: the difference in light and dark between the first pixel and the third pixel.

[0105] In some embodiments, the electronic device may determine the relative brightness of the first pixel and the third pixel based on the first brightness and the second brightness, and the electronic device may calculate the first contrast ratio based on the relative brightness. The relative brightness is the ratio of the first brightness to the second brightness. In some embodiments, the relative brightness may represent the first contrast ratio. Alternatively, in some embodiments, a mapping relationship between relative brightness and contrast ratio is preset in the electronic device, and the electronic device may determine the first contrast ratio based on the relative brightness ratio and the mapping relationship between relative brightness and contrast ratio.

[0106] In some embodiments, the electronic device may divide the maximum value of the RGB color of the first pixel by the minimum value of the RGB color of the third pixel to obtain the first contrast. Alternatively, in some embodiments, the electronic device may obtain the first mean value of the RGB color of the first pixel and the second mean value of the RGB color of the third pixel, and the electronic device may divide the larger value of the first mean value and the second mean value by the smaller value to obtain the first contrast.

[0107] In summary, after the electronic device obtains the first contrast, the electronic device can determine the first brightness difference between the first pixel and the third pixel according to the first contrast. The first contrast can characterize the difference in brightness between the first pixel and the third pixel. In some embodiments, the electronic device can use the first contrast as the first brightness difference. Alternatively, in some embodiments, a mapping relationship between contrast and brightness difference can be preset in the electronic device, and the electronic device can convert the first contrast into the first brightness difference according to the first contrast and the mapping relationship between contrast and brightness difference.

[0108] Similarly, the electronic device can obtain a second contrast between the second pixel and the fourth pixel, where the second contrast refers to a difference in brightness between the second pixel and the fourth pixel.

[0109] In some embodiments, the electronic device may divide the maximum value of the RGB color of the second pixel by the minimum value of the RGB color of the fourth pixel to obtain the second contrast. Alternatively, in some embodiments, the electronic device may obtain a third mean value of the RGB color of the second pixel and a fourth mean value of the RGB color of the fourth pixel, and the electronic device may divide the larger value of the third mean value and the fourth mean value by the smaller value to obtain the second contrast.

[0110] After the electronic device acquires the second contrast, the electronic device may determine a second brightness difference between the second pixel and the fourth pixel according to the second contrast.

[0111] The second contrast ratio may represent the difference in brightness between the second pixel and the fourth pixel. In some embodiments, the electronic device may use the second contrast ratio as the second brightness difference. Alternatively, in some embodiments, the electronic device may convert the second contrast ratio into the second brightness difference according to the conversion relationship between the contrast ratio and the brightness difference.

[0112] S203: Adjust the third transparency of the covering layer to the first transparency according to the first brightness difference.

[0113] S204: Adjust the fourth transparency of the covering layer to the second transparency according to the second brightness difference.

[0114] It should be understood that there is no order distinction between S203 and S204, and the two can be executed simultaneously.

[0115] In an embodiment of the present application, the first brightness difference is less than the second brightness difference, that is, the UI readability at the first pixel is worse than the UI readability at the second pixel. In order to improve the UI readability at the first pixel, the electronic device can reduce the third transparency of the covering layer to obtain the first transparency. As the transparency of the covering layer decreases, the degree of covering the image at the first pixel by the covering layer increases, so that the user can quickly identify the first UI element at the first pixel. Correspondingly, because the UI readability at the second pixel is better than the UI readability at the first pixel, in order to improve the display effect of the image at the second pixel, the electronic device can increase the fourth transparency of the covering layer to obtain the second transparency. The second transparency is greater than the first transparency. As the transparency of the covering layer increases, the degree of covering the image at the second pixel by the covering layer decreases, which can improve the display effect of the image at the second pixel.

[0116] In some embodiments, the electronic device may pre-store a conversion relationship between the brightness difference and the adjustment coefficient of the transparency of the covering layer. The adjustment coefficient of the transparency of the covering layer is used to adjust the third transparency and the fourth transparency in the initial information. In the following embodiments, the "conversion relationship between the brightness difference and the adjustment coefficient of the transparency of the covering layer" is referred to as the first conversion relationship, and the transparency of the covering layer is referred to as transparency.

[0117] In the embodiment of the present application, the electronic device can determine the first adjustment coefficient of the transparency corresponding to the first brightness difference according to the first brightness difference and the first conversion relationship. The electronic device can adjust the third transparency of the covering layer to the first transparency according to the first adjustment coefficient. Exemplarily, the electronic device can use the product of the third transparency and the first adjustment coefficient as the first transparency.

[0118] Similarly, the electronic device can determine the second adjustment coefficient of the transparency corresponding to the second brightness difference according to the second brightness difference and the first conversion relationship. The electronic device can adjust the fourth transparency of the covering layer to the second transparency according to the second adjustment coefficient. Exemplarily, the electronic device can use the product of the fourth transparency and the second adjustment coefficient as the second transparency.

[0119] After the electronic device obtains the first transparency of the covering layer at the first pixel and the second transparency at the second pixel, the electronic device can update the initial information of the interface to obtain the updated information of the interface. The updated information of the interface is used to indicate that the covering layer has the first transparency at the first pixel and the second transparency at the second pixel, and the first transparency is less than the second transparency.

[0120] Accordingly, the electronic device can display an interface based on the update information of the interface. In the interface, the brightness difference between the first pixel and the third pixel is the first brightness difference, and the brightness difference between the second pixel and the fourth pixel is the second brightness difference. The first brightness difference is smaller than the second brightness difference, and the first transparency of the covering layer at the first pixel is smaller than the second transparency at the second pixel.

[0121] The following uses the covering layer as a mask layer and a projection as examples to compare and illustrate the interface in the prior art and the interface in the present application:

[0122] First, take the case where a wallpaper and a status bar are displayed on the desktop and a UI element is masked, wherein the wallpaper can be an image and the status bar can be the first UI element on the upper layer of the image.

[0123] Reference Figure 3A In a, a status bar 31 and a wallpaper 32 located below the status bar 31 are displayed on the desktop 301. For example, Figure 3AIn the example, the status bar 31 includes the time and the remaining battery. For example, the time in the status bar 31 is "10:16 and 2024", and the remaining battery is 100%. It should be understood that Figure 3A The a in the figure shows the interface of the electronic device without masking the status bar 31 .

[0124] Reference Figure 3A In a, the text in the status bar 31 is white, and the "100%" in the status bar 31 corresponds to the light-colored area in the image. The user cannot clearly see the "100%" in the status bar 31, and the UI readability at this location is poor. The "10:16 and 2024" in the status bar 31 corresponds to the dark-colored area in the image, and the user can clearly see the "10:16 and 2024" in the status bar 31, and the UI readability at this location is better than the UI readability at the "100%" in the status bar 31.

[0125] In the prior art, in order to improve the readability of the UI of the status bar 31, a masking process may be performed on the entire area, and a covering layer may be provided under the upper UI element. Figure 3A The b in the figure shows the interface after the UI element is fully masked. Figure 3A In b, after the electronic device masks the entire area of ​​the UI element, the user can clearly see the "100%" in the status bar 31 because a cover layer is set under the UI element. Figure 3A The UI readability of "100%" in the status bar 31 in b is better than Figure 3A UI readability of "100%" in the status bar 31 in a.

[0126] However, when electronic devices mask the entire area of ​​UI elements, the underlying image will be obscured, and some highlight colors will appear dirty due to the mask. Figure 3A In the grayscale display of wallpaper 32 in b, some highlights are dirty. Figure 3A In b, it can be seen that a darker grayscale is superimposed on the image, and superimposing grayscale on the image will also cover the underlying image, resulting in a poor display effect of the image.

[0127] Figure 3A The interface c in FIG. 1 shows the interface processed by the method provided in the embodiment of the present application. In the embodiment of the present application, the electronic device can perform mask processing to different degrees for different pixels. Figure 3A In c, the status bar 31 can be regarded as the first UI element, the pixels occupied by "100%" in the status bar 31 can be regarded as the first pixel, and the pixels occupied by "10:16 and 2024" in the status bar 31 can be regarded as the second pixel. The light-colored area in the image corresponding to the first pixel can be regarded as the third pixel, and the dark-colored area in the image corresponding to the second pixel can be regarded as the fourth pixel.

[0128] Among them, the colors at the first pixel and the third pixel are similar, and there is a certain contrast in the colors at the second pixel and the fourth pixel. Therefore, the first brightness difference between the first pixel and the third pixel is smaller than the second brightness difference between the second pixel and the fourth pixel. In the embodiments of the present application, in order to improve the UI readability at the first pixel and the display effect at the second pixel, the electronic device may adjust the third transparency of the covering layer at the first pixel to the first transparency according to the first brightness difference, and adjust the fourth transparency of the covering layer at the second pixel to the second transparency. Among them, the third transparency is equal to the fourth transparency, the first transparency is less than the third transparency, and the second transparency is greater than the fourth transparency.

[0129] In addition, the first transparency is less than the second transparency, that is, the transparency of the masking layer at the first pixel is less than the transparency of the masking layer at the second pixel, that is, the covering degree of the masking layer at the first pixel on the third pixel is greater than the covering degree of the masking layer at the second pixel on the fourth pixel. In this way, because the transparency of the covering layer at the first pixel is reduced, the first UI element can be highlighted. Therefore, compared with Figure 3A b in, the UI readability at the first pixel is improved. In addition, because the transparency of the covering layer at the second pixel is less than the transparency of the covering layer at the first pixel and the transparency of the covering layer at the second pixel is increased, the display effect of the image at the second pixel can be improved on the basis of ensuring the UI readability at the second pixel.

[0130] Second: Take the display of the wallpaper, application icons, and application names on the desktop as an example. Among them, the wallpaper can be used as an image, and the application icons and application names can be used as the first UI elements on the upper layer of the image. Here, take the projection of the application name as an example.

[0131] Figure 3B a in shows the interface without projecting the application name. Referring to Figure 3B a in, the text of the application name "Video" is white. Among them, "Shi" in "Video" corresponds to the light-colored area of the image, and "Pin" in "Video" corresponds to the dark-colored area of the image. The difficulty for the user to recognize "Pin" is less than the difficulty to recognize "Shi", and the UI readability of "Shi" is worse than that of "Pin".

[0132] In the prior art, in order to improve the UI readability, the text of "Video" can be projected in the whole area, and a covering layer is set under "Video". Figure 3B b in shows the interface after projecting "Video" in the whole area. Referring to Figure 3B b in, after the electronic device applies a masking layer to "Video" in the whole area, because a covering layer is set under "Video", the user can easily recognize the two characters of "Video". It should be understood that Figure 3BIn b in [reference], the electronic device projects each pixel occupied by the "video" to the same degree. It should be understood that Figure 3B In b in [reference], in order to represent that each pixel occupied by the "video" is projected to the same degree, a black ellipse is used to represent the projection.

[0133] In the embodiments of the present application, for different pixels, the electronic device can perform projection processing to different degrees. Referring to Figure 3B In c in [reference], the text of the "video" can be regarded as the first UI element, the pixels occupied by the character "shi" can be regarded as the first pixels, and the pixels occupied by the character "pin" can be regarded as the second pixels. The pixels corresponding to the light-colored area in the image of the first pixels can be regarded as the third pixels, and the pixels corresponding to the dark-colored area in the image of the second pixels can be regarded as the fourth pixels.

[0134] Among them, the colors at the first pixels and the third pixels are close, and it is not easy for the user to recognize the character "shi". There is a certain contrast in the colors at the second pixels and the fourth pixels, and it is relatively easy for the user to recognize the character "pin". That is, the first brightness difference between the first pixels and the third pixels is less than the second brightness difference between the second pixels and the fourth pixels. In the embodiments of the present application, in order to improve the UI readability at the first pixels and the display effect at the second pixels, the electronic device can adjust the third transparency of the covering layer at the first pixels to the first transparency according to the first brightness difference, and adjust the fourth transparency of the covering layer at the second pixels to the second transparency. Among them, the third transparency is equal to the fourth transparency, the first transparency is less than the third transparency, and the second transparency is greater than the fourth transparency.

[0135] In addition, the first transparency is less than the second transparency, that is, the transparency of the projection at the first pixels is less than the transparency of the projection at the second pixels, that is, the covering degree of the projection at the first pixels to the third pixels is greater than the covering degree of the projection at the second pixels to the fourth pixels. In this way, because the transparency of the covering layer at the first pixels is reduced, the first UI element can be highlighted. Therefore, compared with Figure 3B b in [reference], the UI readability at the first pixels is improved. In addition, because the transparency of the covering layer at the second pixels is less than the transparency of the covering layer at the first pixels and the transparency of the covering layer at the second pixels increases, the display effect of the image at the second pixels can be improved on the basis of ensuring the UI readability at the second pixels.

[0136] It should be understood that Figure 3B In c in [reference], the transparency of the projection at the first pixels occupied by the character "shi" is small, and the projection at the first pixels occupied by the character "shi" is like the gray shadow under the character "shi". And the transparency of the projection at the second pixels occupied by the character "pin" is large. Figure 3B In c in [reference], taking the example that there is no projection at the second pixels occupied by the character "pin", it can also be regarded that the transparency of the projection at the second pixels occupied by the character "pin" is 100%, so that the user can see the dark area below the second pixels occupied by the character "pin".

[0137] Figure 3C Taking projection as an example, the relationship between the brightness difference of UI elements and images and the degree of projection (transparency of projection) is shown. Figure 3C The text of the UI element "File Management" is used as an example for explanation. Figure 3C In a, "File Management" is white and the image is white. At this time, the brightness difference between the UI element and the image is small, and the UI readability is poor. In order to improve the UI readability, the electronic device can reduce the transparency of "File Management", that is, increase the degree of coverage of the image by the projection, so that the user can recognize "File Management" in the image.

[0138] In some embodiments, Figure 3C The transparency of the projection in a can be regarded as transparency 1, that is, the projection layer is dark gray. Figure 3C In b, "File Management" is white, and the image color becomes darker and turns light gray. Figure 3C In a, the brightness difference between UI elements and images increases, and UI readability improves. Therefore, the electronic device can increase the transparency of the projection, that is, reduce the degree of coverage of the image by the projection, so as to improve the display effect of the image. For example, Figure 3C The transparency of the projection in b in FIG. 1 can be regarded as transparency 2, and transparency 2 is greater than transparency 1. For example, transparency 2 can be 50% and transparency 1 can be 30%. Figure 3C In b, the decrease in grayscale of the projection layer represents the increase in the transparency of the projection.

[0139] Reference Figure 3C In the c, "File Management" is white, and the color of the image is further deepened to dark gray. Figure 3C In b, the brightness difference between the UI element and the image is further increased, and the UI readability is improved. Therefore, the electronic device can increase the transparency of the projection, that is, reduce the degree of coverage of the image by the projection, so as to improve the display effect of the image. For example, Figure 3C The transparency of the projection in c in FIG. 1 can be regarded as transparency 3, and transparency 3 is greater than transparency 2. For example, transparency 3 can be 80%.

[0140] Reference Figure 3C In the d, "File Management" is white, and the color of the image is further deepened and turned into black. Figure 3C In c, the brightness difference between the UI element and the image is further increased, and the UI readability is improved. Therefore, the electronic device can increase the transparency of the projection, that is, reduce the degree of coverage of the image by the projection, so as to improve the display effect of the image. For example, Figure 3CThe transparency of the projection in d can be regarded as transparency 4, which is greater than transparency 3. For example, transparency 4 can be 100%, that is, there is no projection in the lower layer of "File Management", the image is not covered, and the image display effect is good.

[0141] In some embodiments, the interface processing method provided in the embodiments of the present application can be simplified as follows: Figure 4 It should be understood that Figure 4 The first pixel in the first UI element is used as an example for explanation. Figure 4 , the interface processing method provided in the embodiment of the present application may include:

[0142] Step 1: Get the color of the first pixel in the UI element and the color of the third pixel in the image, and the first pixel corresponds to the third pixel.

[0143] Step 2: Obtain a first brightness difference between the first pixel and the third pixel according to the color of the first pixel and the color of the third pixel.

[0144] Step 3: According to the first brightness difference, obtain a first adjustment coefficient of transparency corresponding to the first brightness difference.

[0145] Step 4: According to the first adjustment coefficient, the third transparency at the first pixel of the cover layer is adjusted to obtain the first transparency.

[0146] Step 5: Based on the first transparency, display the interface.

[0147] Among them, steps 1-2 may refer to the relevant description in S201-S202, and steps 3-5 may refer to the relevant description in S204.

[0148] In summary, in the interface processing method provided in the embodiment of the present application, the electronic device can perform pixel-level processing on UI elements and images. Among them, for different pixels, the electronic device can perform different degrees of masking processing on different pixels to improve the display effect of the image while ensuring the readability of the UI. In the embodiment of the present application, for the first pixel and the third pixel with a small brightness difference, it is difficult for the user to identify the UI element at the first pixel in the image, and the UI readability at the first pixel is poor. The electronic device can increase the degree of projection, masking, gradual masking or blurring, that is, reduce the transparency of the masking layer at the first pixel, which can improve the UI readability at the first pixel. For the second pixel and the fourth pixel with a large brightness difference, it is easier for the user to identify the UI element at the second pixel in the image, and the UI readability at the second pixel is good. The electronic device can reduce the degree of projection, masking, gradual masking or blurring, that is, increase the transparency of the masking layer at the first pixel, which can improve the display effect of the image at the second pixel.

[0149] In some embodiments, the types of UI elements are diverse. For example, the UI element may be a status bar, an application icon, an application name, time, date, etc. Users have different requirements for the UI readability of different types of UI elements. Exemplarily, the user needs to accurately find the application based on the application name. The user needs to accurately determine the time and date based on text such as time and date, and the user has high requirements for the UI readability of these UI elements. As for the status bar, the status bar generally includes information such as time and battery remaining, and the user has low demand for this information, so the UI readability requirements for the status bar are low. Because users have different requirements for the UI readability of different types of UI elements, the electronic device can adjust the transparency of the cover layer to different degrees for different types of UI elements in order to better adapt to the user's UI readability requirements.

[0150] In some embodiments, the sizes of UI elements are different, and the user's UI readability requirements for UI elements of different sizes are also different. Exemplarily, for UI elements with larger sizes, even if the brightness difference between the UI element and the image is small, the user can still recognize the UI element because of its large size. However, under the premise of the same brightness difference, if the size of the UI element is smaller, it is more difficult for the user to recognize the small-sized UI element than the large-sized UI element. Therefore, for UI elements of different sizes, in an embodiment of the present application, the electronic device can adjust the transparency of the cover layer to different degrees in order to better adapt to the user's UI readability requirements.

[0151] In some embodiments, under the premise that the type and size of UI elements are the same, different masking types will also affect the difficulty of users identifying UI elements. Exemplarily, when the masking type is a mask, the mask covers the entire image and has a strong masking ability. When the masking type is a projection, for example, there is a projection under the text, and the masking ability at the edge of the projection becomes worse. Therefore, compared to the mask, under the same transparency, the masking ability of the mask is stronger than the projection. Correspondingly, under the mask, it is easy for users to identify UI elements, and under the projection, it is more difficult for users to identify UI elements. Therefore, it can be said that users have higher requirements for the readability of the projected UI and lower requirements for the readability of the masked UI.

[0152] In summary, in some embodiments, the electronic device adjusts the transparency of the covering layer, which is related to at least one of the type of UI element, the size of the UI element, and the covering type. The above embodiment introduces that "a first conversion relationship can be pre-stored in the electronic device", and the electronic device can determine the adjustment coefficient of the transparency of the covering layer based on the first conversion relationship. The transparency adjustment coefficient is used to adjust the transparency of the covering layer. In some embodiments, it can be said that the transparency adjustment coefficient is related to at least one of the type of UI element, the size of the UI element, and the covering type.

[0153] Because the transparency adjustment coefficient is determined by the brightness difference and the first conversion relationship, the transparency adjustment coefficient is related to the brightness difference as well as the first conversion relationship. Under the premise that the brightness difference is determined, the first conversion relationship may be related to at least one of the type of UI element, the size of UI element, and the masking type.

[0154] Taking the first UI element as an example, under the premise that the brightness difference is determined, the transparency adjustment coefficient at each pixel of the first UI element depends on the conversion relationship between the brightness difference and the transparency adjustment coefficient.

[0155] In some embodiments, the electronic device may pre-store at least one of the type of the first UI element, the size of the first UI element, the masking type, and a mapping relationship between the first conversion relationships.

[0156] Taking the first conversion relationship, which is related to the type of the first UI element, the size of the first UI element, and the masking type as an example, in some embodiments, the electronic device may pre-store the mapping relationship between the type of the first UI element, the size of the first UI element, the masking type, and the first conversion relationship. In other words, different types of first UI elements, different sizes of first UI elements, and different masking types may correspond to different first conversion relationships. Among them, the mapping relationship between the type of the first UI element, the size of the first UI element, the masking type, and the first conversion relationship can be shown in the following Table 1:

[0157] Table 1

[0158]

[0159]

[0160] Referring to Table 1, taking the first UI element as a status bar as an example, illustratively, when the first conversion relationship is related to the type of the first UI element, the electronic device can query Table 1 to determine the conversion relationship corresponding to the status bar.

[0161] Exemplarily, when the first conversion relationship is related to the type of the first UI element and the size of the first UI element, the electronic device may query Table 1 to determine the conversion relationship corresponding to the status bar of the size.

[0162] Exemplarily, when the first conversion relationship is related to the type of the first UI element, the size of the first UI element, and the masking type, the electronic device can query Table 1 to determine the conversion relationship corresponding to the status bar of the size under the masking type.

[0163] After the electronic device determines the first conversion relationship corresponding to the first UI element, the electronic device can determine the transparency adjustment coefficient at each pixel according to the brightness difference at each pixel of the first UI element and the first conversion relationship. The electronic device can adjust the transparency of the covering layer at each pixel in the initial information according to the transparency adjustment coefficient at each pixel. Taking the first brightness difference between the first pixel and the third pixel as an example, the electronic device can determine the adjustment coefficient of the third transparency according to the first brightness difference and the first conversion relationship corresponding to the first UI element. The electronic device can adjust the third transparency of the covering layer to the first transparency according to the third transparency adjustment coefficient.

[0164] In summary, in the embodiments of the present application, different first conversion relationships can be pre-set for different types of first UI elements, different sizes of first UI elements, and different masking types. The electronic device uses the first conversion relationship to determine the transparency adjustment coefficient, which can be more adapted to the user's requirements for UI readability.

[0165] The following takes setting different first conversion relationships for different types of first UI elements as an example to illustrate the concept of presetting the first conversion relationship. It should be understood that the following takes the first UI elements being the status bar and the application name as examples to introduce the first conversion relationship.

[0166] First: Status Bar

[0167] When the type of the first UI element is a status bar, the user just casually touches the status bar, which does not affect the main task, and the user does not have high requirements for the UI readability of the status bar. In some embodiments, the first conversion relationship corresponding to the status bar can be set as a non-strict readability function. For example, the first conversion relationship corresponding to the status bar is embodied as a straight line with a slope. Exemplarily, the first conversion relationship corresponding to the status bar can be shown as the following formula 2:

[0168] α=a'×ΔL+b' Formula 2

[0169] Wherein, α represents the transparency adjustment coefficient, ΔL represents the brightness difference between pixels. a' and b' are coefficients in the function, which can be empirical values. For example, a' can be -3.2051, and b' can be 1.25.

[0170] Figure 5 It is a function diagram of the first conversion relationship corresponding to the status bar. Figure 5 The horizontal axis is the brightness difference between pixels, and the vertical axis is the transparency adjustment coefficient. Figure 5As the brightness difference between pixels decreases, the UI readability of the UI element becomes worse, and the transparency adjustment coefficient increases, so that the transparency of the cover layer can be adjusted to a greater extent to increase the degree of covering the image, which can improve the UI readability. Similarly, as the brightness difference between pixels increases, the UI readability of the UI element becomes better, and the transparency adjustment coefficient decreases, so that the transparency of the cover layer can be adjusted to a lesser extent to reduce the degree of covering the image, which can improve the display effect of the image.

[0171] Second: Application name

[0172] When the first UI element is a text containing important content such as an application name, the user has high requirements for the UI readability of the UI element. In some embodiments, the first conversion relationship corresponding to the application name can be set as a strict readability function. For example, the first conversion relationship corresponding to the application name is embodied as a curve. Exemplarily, the first conversion relationship corresponding to the application name can be shown as the following formula 3:

[0173] α= a”ΔL 3 + b”ΔL 2 +c”ΔL + d” Formula 3

[0174] Wherein, α represents the transparency adjustment coefficient, and ΔL represents the brightness difference between pixels. a", b", c", and d" are coefficients in the function, which can be empirical values. For example, a" can be -21.383, b" can be 14.922, c" can be -4.2153, and d" can be 1.

[0175] Figure 6 A function diagram of the first conversion relationship corresponding to the application name. Figure 6 The horizontal axis is the brightness difference between pixels, and the vertical axis is the transparency adjustment coefficient. Figure 6 As the brightness difference between pixels decreases, the UI readability of the UI element becomes worse, and the transparency adjustment coefficient increases, so that the transparency of the cover layer can be adjusted to a greater extent to increase the degree of covering the image, which can improve the UI readability. Similarly, as the brightness difference between pixels increases, the UI readability of the UI element becomes better, and the transparency adjustment coefficient decreases, so that the transparency of the cover layer can be adjusted to a lesser extent to reduce the degree of covering the image, which can improve the display effect of the image.

[0176] But with Figure 5 The difference is that the first conversion relationship corresponding to the application name is not a simple straight line, but a curve with different adjustment changes of the brightness difference between pixels and the transparency adjustment coefficient. This setting is more suitable for the application name and meets the user's readability requirements for different types of UI elements.

[0177] In the embodiment of the present application, different first conversion relationships can be pre-set for different types of first UI elements, different sizes of first UI elements, and different covering types. The electronic device can determine the first conversion relationship corresponding to the first UI element according to the type, size, and covering type of the first UI element. Furthermore, the electronic device can determine the transparency adjustment coefficient based on the first conversion relationship and the brightness difference between pixels, and then adjust the transparency of the covering layer at each pixel based on the transparency adjustment coefficient, so as to better meet the user's requirements for UI readability.

[0178] It should be noted that the data involved in this application (including but not limited to data used for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0179] In one embodiment, the present application also provides an electronic device, referring to Figure 7 , the electronic device may include: a processor 701 (such as a CPU), and a memory 702. The memory 702 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory. The memory 702 may store various instructions for completing various processing functions and implementing the method steps of the present application.

[0180] Optionally, the electronic device involved in the present application may further include: a power supply 703, a communication bus 704 and a communication port 705. The above-mentioned communication port 705 is used to realize the connection and communication between the electronic device and other peripherals. In the embodiment of the present application, the memory 702 is used to store computer executable program code, and the program code includes instructions; when the processor 701 executes the instruction, the instruction causes the processor 701 of the electronic device to perform the action in the above-mentioned method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0181] Optionally, the electronic device involved in the present application may further include: a display screen 706. The display screen 706 is used to display an interface of the electronic device.

[0182] It should be noted that the modules or components described in the above embodiments may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs). For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program codes, such as a controller. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

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

[0184] The term "plurality" in this article refers to two or more than two. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship; in the formula, the character " / " indicates that the previous and next associated objects are in a "division" relationship. In addition, it should be understood that in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.

[0185] It should be understood that the various numerical numbers involved in the embodiments of the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.

[0186] It can be understood that in the embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

Claims

1. An interface processing method, characterized in that: Applied to electronic equipment, the method comprises: A display interface includes an image, a cover layer on the image, and a first user interface UI element on the cover layer, the first UI element occupies a first pixel and a second pixel, the first pixel corresponds to a third pixel in the image, and the second pixel corresponds to a fourth pixel in the image; The brightness difference between the first pixel and the third pixel is a first brightness difference, the brightness difference between the second pixel and the fourth pixel is a second brightness difference, the first brightness difference is smaller than the second brightness difference, the first transparency of the covering layer at the first pixel is smaller than the second transparency at the second pixel, and the transparency is used to indicate the degree of covering of the image by the covering layer.

2. The method according to claim 1, characterized in that Before the display interface, it also includes: Acquire initial information of the interface, where the initial information is used to indicate that a third transparency of the covering layer at the first pixel is equal to a fourth transparency of the covering layer at the second pixel; Acquire the first brightness difference and the second brightness difference; adjusting the third transparency to the first transparency according to the first brightness difference; The fourth transparency is adjusted to the second transparency according to the second brightness difference.

3. The method according to claim 1 or 2, characterized in that: The covering layer is: a projection, a mask layer, a gradient mask layer, or a blur layer.

4. The method according to claim 2, characterized in that: The obtaining the first brightness difference comprises: acquiring a first brightness of the first pixel according to the color of the first pixel; Acquire a second brightness of the third pixel according to the color of the third pixel; The difference between the first brightness and the second brightness is used as the first brightness difference.

5. The method according to claim 2, characterized in that: The obtaining the first brightness difference comprises: Acquire a contrast ratio between the first pixel and the third pixel; The first brightness difference is determined according to the contrast.

6. The method according to claim 2, characterized in that The step of adjusting the third transparency to the first transparency according to the first brightness difference includes: Determine, according to at least one of the type of the first UI element, the size of the first UI element, and the covering type, a conversion relationship for adapting the first UI element, where the conversion relationship is used to indicate a relationship between an adjustment coefficient of a brightness difference and a transparency: Determining an adjustment coefficient of the third transparency according to the first brightness difference and the conversion relationship; The third transparency is adjusted to the first transparency according to the adjustment coefficient of the third transparency.

7. The method according to claim 6, characterized in that When the type of the first UI element is a status bar, the conversion relationship is embodied as a straight line with a slope; or, When the first UI element is text, the conversion relationship is reflected as a curve.

8. An electronic device, characterized in that: The electronic device comprises: one or more processors and a memory; The memory is coupled to the one or more processors, and the memory is used to store computer program codes, wherein the computer program codes include computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method according to any one of claims 1 to 7.

9. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device executes the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 7.

11. A computer program product, characterized in that The computer program product comprises a computer program code, and when the computer program code is run on an electronic device, the electronic device is caused to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Interface display technology and terminal device

    CN107016978A

  • Background determination method and device, equipment and storage medium

    CN114117281A

  • Image self-adaption method and device, equipment and storage medium

    CN115248652A

  • Dynamic Transparency Adjustment of User Interface Element

    US20150170606A1

Cited By

  • Interface processing method, electronic device, and related apparatus

    WO2025256351A1