A display method and electronic device

By determining the background color of target display elements in the user interface in relation to their area and background region, and using a weighted average value, the problem of disharmonious background colors of display elements in the user interface is solved, thereby improving the color harmony and visual experience of the user interface.

CN123114597APending Publication Date: 2026-11-17HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510632220.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-15
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

When a user interface contains multiple display elements that support adaptive color schemes, the background colors are different for each element, resulting in a cluttered color scheme and affecting the user's visual experience.

Method used

By determining that the background color of the target display element is related to its area and the color of the background area it is in, a weighted average is used to unify the background color, making it harmonious with the interface background color.

Benefits of technology

It improves the color scheme flexibility of the user interface, making the background color of display elements that support adaptive color matching more harmonious with the interface background color, thus enhancing the user's visual experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114597A_ABST
    Figure CN123114597A_ABST
Patent Text Reader

Abstract

This application provides a display method and an electronic device. Through this method, the background color of all display elements in the user interface that support adaptive color matching is related to the area of ​​these display elements and the color of the background area they are in. This method provides a new color matching mechanism for display elements, which can improve the color matching flexibility of the user interface and make the background color of these display elements that support adaptive color matching in the user interface more harmonious with the color of the interface background.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic device technology, and more particularly to a display method and an electronic device. Background Technology

[0002] In the user interface of electronic devices, to enhance the overall harmony between display elements and the user interface background (hereinafter referred to as the interface background), the background color of display elements that support adaptive color matching is generally related to the color of the interface background. The current approach is that the background color value of each display element supporting adaptive color matching is the average color value of the background area of ​​its corresponding interface background. However, when the user interface contains multiple display elements that support adaptive color matching, and the interface background has a rich variety of colors, the background colors of these display elements may differ, resulting in a cluttered user interface color scheme and negatively impacting the user's visual experience. Summary of the Invention

[0003] This application provides a display method and electronic device for improving the color matching flexibility of the user interface, making the background color of the display elements that support adaptive color matching in the user interface more harmonious with the color of the interface background, thereby improving the user's visual experience.

[0004] Firstly, embodiments of this application provide a display method that can be applied to an electronic device. Here, "electronic device" can refer to the electronic device itself, or to a processor, module, chip, or chip system within the electronic device that implements the method. The following description uses an electronic device as an example; the method includes the following steps:

[0005] An electronic device displays a first user interface; in response to a first user operation, the electronic device updates the display content in the first user interface; wherein the updated first user interface includes multiple target display elements; the background color of the multiple target display elements is related to the area of ​​the multiple target display elements and the color of the background area where the multiple target display elements are located in a first background; the first background is the background of the first user interface, and any one of the target display elements is a display element whose background color can be adjusted.

[0006] This method establishes that the background color of all adaptively colored display elements in the user interface of an electronic device is related to the area of ​​these elements and the color of the surrounding background. This provides a novel color matching mechanism for display elements, enhancing the flexibility of user interface color schemes and resulting in a more harmonious integration of the background colors of these adaptively colored display elements with the overall interface background.

[0007] In one possible design, the electronic device may further determine the color values ​​of the background colors of the plurality of target display elements according to the following steps:

[0008] The electronic device determines the color value of the background area where the plurality of target display elements are located; and determines the area of ​​the plurality of target display elements; then, the electronic device can determine the color value of the background color of the plurality of target display elements based on the area of ​​the plurality of target display elements and the color value of the background area where the plurality of target display elements are located.

[0009] Through this design, the background color of all display elements that support adaptive color matching in the user interface of the electronic device is unified and related to the area of ​​these display elements and the color of the background area they are in, making the background color of these display elements that support adaptive color matching in the user interface more harmonious with the color of the interface background.

[0010] In one possible design, the electronic device can determine the background color value of the plurality of target display elements based on the area of ​​the plurality of target display elements and the color value of the background area where the plurality of target display elements are located by the following steps:

[0011] The electronic device determines the weight of the background area where the multiple target display elements are located based on the area of ​​the multiple target display elements; and determines the weighted average of the color values ​​of the background area where the multiple target display elements are located based on the weight of the background area; finally, the electronic device can use the weighted average as the color value of the background color of the multiple target display elements.

[0012] This design allows electronic devices to determine the weight of the background area (i.e., the weight of the color value of the background area) of each target display element based on its area. This makes the color value of the background area of ​​a larger target display element have a greater impact on the color value of the background color of all target display elements, thus making the background color of these target display elements in the user interface more harmonious with the background color of the interface.

[0013] In one possible design, the electronic device may further determine the color values ​​of the background colors of the plurality of target display elements according to the following steps:

[0014] The electronic device can divide the first background into multiple background regions based on the color distribution in the first background; and perform the following steps for each of the multiple background regions: determine at least one first display element located in the first background region among the multiple target display elements; wherein the first background region is any one of the multiple background regions; the electronic device determines the color value of the background region where the at least one first display element is located; and determines the area of ​​the at least one first display element; finally, the electronic device determines the color value of the background color of the at least one display element based on the area of ​​the at least one first display element and the color value of the background region where the at least one first display element is located.

[0015] This design unifies the background colors of adaptively colored display elements within different background areas of the electronic device's user interface. The colors are also related to the area of ​​these elements and the color of the surrounding background, resulting in a more harmonious blend of background colors for these adaptively colored display elements and the overall interface background. Based on this design, in scenarios where the color distribution of the first user interface's background (i.e., the first background) is clearly regionalized, the background colors of adaptively colored display elements within the user interface can be made more harmonious with the overall interface background.

[0016] In one possible design, the electronic device may further determine the color value of the background color of the at least one display element according to the following steps:

[0017] The electronic device determines the weight of the background area where the at least one first display element is located based on the area of ​​the at least one first display element; and determines the weighted average of the color values ​​of the background area where the at least one first display element is located based on the weight of the background area where the at least one first display element is located; then, the electronic device uses the weighted average as the color value of the background color of the at least one first display element.

[0018] With this design, the electronic device can determine the weight of the background area (i.e., the weight of the color value of the background area) based on the area of ​​the first display element, so that the color value of the background area of ​​the first display element with a larger area has a greater impact on the color value of the background color of at least one first display element in the first background area, thereby making the background color of at least one first display element in the first background area of ​​the user interface more harmonious with the color of the first background area.

[0019] In one possible design, the color value of the background area where any target display element is located is the average of the color values ​​of multiple sampling points within the background area.

[0020] In one possible design, the first user operation is used to enable a target color scheme mode, wherein the target color scheme mode sets the background color of the target display element based on the area of ​​the target display element and the color of the background area in which it is located; or the first user operation is used to adjust the position of at least one of the plurality of target display elements; or the first user operation is used to adjust the area of ​​at least one of the plurality of target display elements; or the first user operation is used to add or delete target display elements in the first user interface; or the first user operation is used to modify or set the background of the first user interface.

[0021] This design allows electronic devices to adjust the background color value of target display elements in the user interface after various user operations, making the background color of these adaptive color-matching display elements in the user interface more harmonious with the interface background color.

[0022] In one possible design, any target display element can be any of the following: a folder control, a player control, a notification control, a business card, or an application icon; wherein the folder control contains icons for multiple applications; the player control is used to display playback service operation information for applications that support playback services; the notification component is used to display notification content and manage notifications; and the business card is a control used to implement the target business.

[0023] Secondly, embodiments of this application provide an electronic device including a display screen, one or more processors, and a memory; the display screen is used to display a user interface, and the one or more processors are coupled to the memory, wherein the one or more processors are used to read a computer program stored in the memory to execute the method provided in the first aspect. The computer program code includes computer instructions.

[0024] Thirdly, embodiments of this application provide a chip including a processor coupled to a memory. The processor is used to call computer program instructions stored in the memory during runtime to implement the method provided in the first aspect. Optionally, the chip may further include components such as a memory, a communication interface, and a power supply module. The memory is used to store computer programs; the communication interface is used to receive and send data; and the power supply module is used to supply power to the processor.

[0025] Fourthly, embodiments of this application provide a computer storage medium storing computer program instructions that, when executed on an electronic device, cause the computer to perform the method provided in the first aspect.

[0026] Fifthly, embodiments of this application provide a computer program product, the computer program product including computer program instructions; when the computer program instructions are executed on a computer, the computer performs the method provided in the first aspect.

[0027] The technical effects that can be achieved by any of the second to fifth aspects mentioned above can be described with reference to the technical effects that can be achieved by any possible design in the first aspect mentioned above. The repetition will not be discussed. Attached Figure Description

[0028] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0029] Figure 2 A software structure diagram of an electronic device provided in an embodiment of this application;

[0030] Figure 3 A flowchart illustrating a display method provided in an embodiment of this application;

[0031] Figure 4 A flowchart for determining the color values ​​of the background colors of multiple target display elements is provided in an embodiment of this application;

[0032] Figure 5 This is a schematic diagram illustrating a display example provided in an embodiment of this application;

[0033] Figure 6 This is a schematic diagram illustrating a display example provided in an embodiment of this application;

[0034] Figure 7 A flowchart for determining the color value of the background color of at least one first display element located within a first background area, provided as an embodiment of this application;

[0035] Figure 8 This is a schematic diagram illustrating a display example provided in an embodiment of this application;

[0036] Figure 9 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0037] This application provides a display method and an electronic device for improving the color matching flexibility of display elements in a user interface, making the colors of display elements supporting adaptive color matching in the user interface more harmonious with the background color, thereby improving the user's visual experience. The method and electronic device are based on the same technical concept. Since the methods and electronic devices solve problems based on similar principles, their implementations can be mutually referenced, and repeated details will not be elaborated further.

[0038] The following explanations of some terms used in this application are provided to facilitate understanding by those skilled in the art.

[0039] 1) Electronic devices are devices or apparatuses that have data connectivity, data calculation, and processing capabilities. Generally, electronic devices have a display screen capable of displaying a user interface (UI).

[0040] For example, the electronic device in this application may be a tablet computer, personal computer (PC), laptop computer, computer, netbook, in-vehicle computer, in-vehicle terminal, smartphone, smart wearable device (e.g., smartwatch, smart bracelet, smart glasses, smart helmet, etc.), personal digital assistant (PDA), smart home device (e.g., smart TV, smart mirror, smart speaker, etc.). This application does not limit the specific form of the electronic device.

[0041] Electronic devices can perform their functions and provide services to users through an operating system they run. For example, the electronic device may, but is not limited to, running an operating system... Or other operating systems.

[0042] 2) An application (APP) is installed on an electronic device and provides services to the user through specific business logic after it runs. Applications can be developed by the electronic device manufacturer, the operating system vendor, or a third-party application vendor; this application does not limit the scope of the application. Applications can also be called application programs, application software, etc.

[0043] For example, applications can include: various drawing applications, calling applications, camera applications, SMS applications, chat applications, video applications, music applications, electronic map applications, social applications, etc.

[0044] 3) Display elements are components that can be displayed in the user interface of an electronic device and constitute the content displayed in the user interface. They can also be called user interface elements (or UI elements). Optionally, when the electronic device receives a control operation performed by the user on a display element, the electronic device can perform the corresponding action.

[0045] For example, display elements may include, but are not limited to, various controls such as application icons, file icons, folder controls, player controls, notification controls, and business cards.

[0046] Optionally, display elements shown in the user interface may have the following attributes: background color, display pattern, and contained sub-display elements. For example, an application icon may have a background color and a specific display pattern. Another example is a folder control, which may have a background color and at least one sub-display element, including, but not limited to, icons of files located within the folder, icons of applications located within the folder, etc. Yet another example is a player control, notification component, or business card, which not only has a background color but also at least one display element related to implementing the relevant business logic.

[0047] It should be noted that the background colors of some display elements in the user interface are fixed. For example, the icons of some applications are usually set by the application's developer in the application's configuration file, and the background color of some business cards is determined by the application associated with them. Additionally, the user interface may contain some display elements that support adjustable background colors, i.e., display elements that support adaptive color matching, such as folder controls, player controls, notification components, certain business cards, and icons of some applications.

[0048] Optionally, the background color of these display elements that support adaptive color schemes is related to the background of the user interface they are in (i.e., the interface background).

[0049] 4) Color value: a code or numerical value used to represent color, enabling the standardization and digitization of colors in the user interface.

[0050] Optionally, in the embodiments of this application, color values ​​may be represented, but are not limited to, by any of the following representation methods:

[0051] Hexadecimal (HEX), Red Rreen Blue (RGB), Red Rreen Blue Alpha (RGBA), Hue Saturation Lightness (HSL), Hue Saturation Lightness Alpha (HSLA), Cyan Magenta Yellow Key (CMYK), Hue Saturation Value (HSV) / ​​Hue Saturation Brightness (HSB), etc.

[0052] It should be understood that in the embodiments of this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, or a, b, and c, where a, b, and c can be single or multiple.

[0053] In the embodiments of this application, descriptions such as "when," "under the circumstances," "if," and "if" all refer to the electronic device making corresponding processing under certain objective circumstances. They are not time limits, nor do they require the electronic device to make a judgment action when implementing it, nor do they imply any other limitations.

[0054] It should be noted that in this application, "used for indicating" can include both direct and indirect indication. When describing information as being used to indicate A, it can include whether the information directly or indirectly indicates A, but does not necessarily mean that the information contains A. Taking first information used to indicate first content as an example, the first information can contain the first content, or a part of the first content, or an identifier, index, indicator, etc., of the first content, and can also contain algorithms, calculation parameters, etc., for determining the first content. This application does not limit the manner of "indication".

[0055] In this application, "containing / including A" may be equivalent to "containing / including information A". Information A is used to indicate A.

[0056] In addition, it should be understood that in the description of this application, the words "first" and "second" are used only for the purpose of distinguishing descriptions and should not be construed as indicating or implying relative importance or order.

[0057] To enhance the overall coherence between the display elements in the user interface and the interface background, the background color of the display elements that support adaptive color matching is related to the color of the interface background.

[0058] In one design, the background color of each display element in the user interface that supports adaptive color matching is the average color value of its surrounding background area. However, when the user interface contains multiple display elements that support adaptive color matching, and the background colors of the interface are rich, the background colors of these display elements may be different, resulting in a cluttered color scheme for the user interface and affecting the user's visual experience.

[0059] In another design, the background color of all display elements in the user interface that support adaptive color matching is the average color value of the interface background. However, when the number of display elements supporting adaptive color matching in the user interface is small, the color of the display element may differ significantly from the color of its background area, resulting in an overall color disharmony in the user interface and negatively impacting the user's visual experience.

[0060] To provide color matching flexibility for user interfaces and make the background colors of display elements supporting adaptive color matching in the user interface more harmonious with the interface background color, embodiments of this application provide a display method. In this method, the background colors of multiple target display elements in the user interface of an electronic device are related to the area of ​​these target display elements and the color of the background area in which these target display elements are located within the interface background. The target display elements are display elements that support background color adjustment, i.e., display elements that support adaptive color matching. Thus, the background colors of display elements supporting adaptive color matching in the user interface are related to the area of ​​these display elements and the color of the background area in which they are located. This method provides a new color matching mechanism for display elements, which can improve the color matching flexibility of the user interface and make the background colors of these display elements supporting adaptive color matching in the user interface more harmonious with the interface background color.

[0061] The solutions provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0062] This application provides an electronic device that can implement the display method provided in this application. See below for further details. Figure 1 The structure of the electronic device provided in the embodiments of this application will be described.

[0063] like Figure 1As shown, the electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a SIM card interface 195, etc.

[0064] Processor 110 may include one or more processing units, such as a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.

[0065] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from this memory. By providing memory, the number of times the processor 110 accesses data in the internal memory 121 can be reduced, thus reducing the processor 110's waiting time and improving system efficiency.

[0066] The display method provided in this application embodiment can be controlled by processor 210 or invoked by other components. For example, it can invoke the software program of this application embodiment stored in internal memory 221 to calculate the background color of some display elements in the user interface that support adaptive color matching, render the user interface, and display the user interface on display screen 194. Processor 210 may include different devices. For example, when integrating CPU and GPU, CPU and GPU can cooperate to execute the display method provided in this application embodiment. For example, part of the software operation in the method is executed by CPU, and another part of the process related to user interface display is executed by GPU to obtain faster processing efficiency.

[0067] Display screen 194 is used to display various user interfaces. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Minied, MicroLED, Micro-OLED, quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays screens 194, where N is a positive integer greater than 1. Display screen 194 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces (GUIs). For example, display screen 194 may display windows, photos, videos, web pages, or documents, etc.

[0068] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, program code for at least one application, etc. The operating system may include, but is not limited to, […]. The program storage area can store computer programs for implementing the display method provided in the embodiments of this application. When the processor 110 executes these computer programs, the electronic device can execute the display method. The data storage area can store data created during the use of the electronic device 100.

[0069] In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0070] The sensor module 180 may include, but is not limited to, fingerprint sensors, touch sensors, pressure sensors, magnetic sensors, ambient light sensors, barometric pressure sensors, bone conduction sensors, etc.

[0071] A touch sensor, also known as a "touch panel," can be located on the display screen 194. The touch sensor detects touch operations applied to or near it. It transmits the detected touch operation to an application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In some embodiments, the touch sensor can be integrated with the display screen 194 to form a touch display. In other embodiments, the touch sensor may be located on the surface of the electronic device 100, in a different position than the display screen 194.

[0072] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Mobile communication module 150 can provide wireless communication solutions for electronic device 100, including 2G / 3G / 4G / 5G. Wireless communication module 160 can provide wireless communication solutions for electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.

[0073] In this embodiment, the electronic device 100 can connect to peripheral devices via USB interface 130 or other interfaces; the electronic device 100 can also establish a wireless connection with peripheral devices via wireless communication module 160. For example, peripheral devices may include, but are not limited to, input devices such as keyboards, mice, gamepads, handwriting input tablets, remote controls, joysticks, etc.; output devices such as extended screens, speakers, printers, etc.; cameras, external storage devices, etc.

[0074] It should be understood that Figure 1 The electronic device 100 shown is merely an example and does not constitute a limitation on the electronic device. In practical applications, the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0075] The software system of the electronic device 100 provided in this application embodiment can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment takes a layered architecture as an example. Figure 2 The software structure of an electronic device is illustrated by example.

[0076] A layered architecture divides the software within an electronic device into several layers, each with a clear role and function. Layers can communicate with each other through software interfaces. For example... Figure 2 As shown, the software architecture of an electronic device, from top to bottom, includes at least: an application layer, a system service layer, a kernel layer, and a hardware abstraction layer (HAL). Additionally, an electronic device may include a hardware layer to provide hardware resource support.

[0077] The application layer is the top layer of the operating system, including the operating system's native applications and installed third-party applications, such as camera, gallery, calendar, Bluetooth, music, video, messaging, calculator, chat applications, video applications, music applications, electronic map applications, social applications, and so on.

[0078] The system service layer is an important part of the operating system of an electronic device, including various system services provided by the operating system. For example, the system service layer may include: window management service, operation management service, notification management service, layer management service, input management service, etc.

[0079] The window management service manages the display and configuration of the window library. Based on display settings and multiple management functions, it controls the display of windows or interfaces on the screen, adjusting their transparency, position, and size. It also includes features such as screen locking and screenshot capabilities. The window management service can obtain parameters such as screen size and resolution, and can identify display areas in the user interface, such as the status bar.

[0080] The operation and management service is responsible for starting, switching, and scheduling various components in the system, as well as managing and scheduling applications.

[0081] Notification management services allow applications to display notification information in the status bar, as well as to convey informational messages. These messages can disappear automatically after a short pause, without requiring user interaction.

[0082] The input management service is used to collect, process, and distribute user operation information and input events. For example, after receiving operation information reported by touch drivers or other input device drivers (such as keyboard drivers, mouse drivers, etc.), the input management service can convert it into input events and distribute the input events to other modules for processing. For instance, when a user performs a user operation on an application, the input management service can generate an input event based on the received user operation information and distribute the input event to the application.

[0083] Layer management service is a standalone service provided by the operating system of an electronic device. It is a low-level, resident service of the operating system. During device operation, this layer management service needs to run continuously, and the operating system prioritizes allocating resources to it to ensure that it can perform image compositing at any time, thereby ensuring that the electronic device can display the user interface in real time. The layer management service is mainly responsible for layer creation, control, and management. It composites and renders the image frames of the corresponding window in each layer, and finally combines the image frames from all layers to create the final user interface image to be displayed on the screen.

[0084] In this embodiment, the system service layer may further include an adaptive color matching service. In scenarios where the user interface of an electronic device contains multiple display elements supporting adaptive color matching, the adaptive color matching service determines the background color of these display elements based on their area and the color of the background area where these display elements are located in the interface background. The specific process can be found in the description of the following embodiments, and will not be repeated here. Optionally, the display content in the user interface of an electronic device can be drawn on one or more layers. In scenarios where the display content in the user interface is drawn on multiple layers, the display elements supporting adaptive color matching in the user interface may be located on different layers from the interface background. Based on this, the adaptive color matching service can interact with a layer management service in the process of determining the background color of these display elements to determine the color of the background area where these display elements are located in the interface background.

[0085] Optionally, between the application layer and the system service layer, the software architecture of the electronic device may also include an application framework layer (FWK) (not shown in the figure). The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer may include some predefined functions. For example, the application framework layer may include a content provider, a view system, a phone manager, a resource manager, etc. The content provider is used to store and retrieve data, making this data accessible to applications in the application layer. The view system includes visual components, such as components that display text, images, documents, etc.; components in the view system can be used to build the user interface of the application. The phone manager is used to provide communication functions for the electronic device.

[0086] The kernel layer provides the core system services of the operating system, such as security, memory management, process management, network protocol stack, and driver models, all of which are implemented based on the kernel layer. The kernel layer also serves as an abstraction layer between the hardware and software stacks. This layer contains many drivers related to electronic devices, including: display drivers; keyboard drivers; mouse drivers; Flash drivers for memory-based devices; camera drivers; audio drivers; Bluetooth drivers; WiFi drivers; and touch drivers.

[0087] Hardware Image Processing (HAL) is an interface layer located between the operating system kernel and the hardware circuitry of an electronic device. Its purpose is to abstract the hardware into standardized interfaces. Through this abstraction, upper-layer software of the operating system (such as kernel modules or drivers) does not need to directly manipulate the hardware; they only need to call the standardized interfaces in the HAL to complete their functions. For example, the HAL may include a hardware composer (HWC) and other standardized interfaces. Among them, the HWC is mainly responsible for using the image processor and other hardware resources to composite and display images in the layers, realizing the display of the user interface.

[0088] The hardware layer is located at the bottom layer of electronic devices and may include, but is not limited to, various hardware resources such as processors, sensors, displays, cameras, hard drives, mice, and keyboards.

[0089] It should be noted that, Figure 2 This is merely an example of the software architecture of an electronic device, simply listing some layers and software modules, and does not constitute any limitation on the software architecture of the electronic device. In practical applications, the operating system of an electronic device may include other layers, or each layer may include other software modules for implementing one or more functions or services. Furthermore, this application does not limit the specific layer at which each software module resides. For example, the aforementioned adaptive color matching service may be deployed at the application framework layer or at the kernel layer.

[0090] Furthermore, this application does not specifically limit the names of the various software modules in the software structure. For example, in In operating systems, the window management service can be WindowManagerServer (WMS), the layer management service can be the layer management engine (SurfaceFlinger), and the input management service can be InputManagerService. InputManagerService can include modules such as input management (InputManager), event hub (EventHub), and input dispatcher (InputDispatcher). operating system( In an OS, the window management service can be SceneBoard (SCB), the layer management service can be RenderService (RS), and the input management service can be Multimodal Input Service (INPUT).

[0091] To provide color scheme flexibility for user interfaces and to make the background color of display elements supporting adaptive color schemes in the user interface more harmonious with the interface background color, embodiments of this application provide a display method. This method can be applied to, for example... Figure 1 The electronic device shown can have a software structure as follows: Figure 2 As shown. See below. Figure 3 The flowchart shown below provides a detailed explanation of the method provided in the embodiments of this application.

[0092] Step 301: The electronic device displays the first user interface.

[0093] This application does not limit the first user interface, which can be any user interface capable of displaying display elements that support adaptive color schemes and setting the interface background. For example, the first user interface can be the main interface of an electronic device, the negative one screen interface, the lock screen interface, the notification bar interface, or the user interface displayed in the window of certain applications or system services opened by the electronic device.

[0094] Step 302: The electronic device responds to the first user operation and updates the display content in the first user interface; wherein, the updated first user interface contains multiple target display elements; the background color of the multiple target display elements is related to the area of ​​the multiple target display elements and the color of the background area where the multiple target display elements are located in the first background; the first background is the background of the first user interface (i.e., the interface background of the first user interface), and any target display element is a display element that supports adjusting the background color, that is, a display element that supports adaptive color matching (or automatic color matching).

[0095] Since the background color of the multiple target display elements is related to the area of ​​the multiple target display elements and the color of the background area where the multiple target display elements are located in the first background, in this embodiment, the background color of the target display elements is related to at least one of the following factors: the addition or removal of target display elements, the position of target display elements, the area of ​​target display elements (i.e., the size or dimensions of display elements), the interface background of the first user interface, etc. Based on this, the first user operation can be any user operation that affects the above factors. The following is an example:

[0096] The first user operation may be a user operation that adjusts the position of at least one of the multiple target display elements in the first user interface; or the first user operation may be a user operation that adjusts the size of at least one of the multiple target display elements; or the first user operation may be a user operation that adds or deletes target display elements in the first user interface (the electronic device may add or delete target display elements in the first user interface based on the first user operation, so that the first user interface contains the multiple target display elements); or the first user operation may be used to modify or set the background of the first user interface (i.e., the electronic device may set the interface background of the first user interface to a first background based on the first user operation).

[0097] Additionally, in scenarios where electronic devices support multiple display element color scheme modes, the first user operation can be the user operation to activate the target color scheme mode. This target color scheme mode sets the background color of the target display element based on its area and the color of the surrounding background area. For example, other color scheme modes may include: a first color scheme mode where the background color of the target display element is the average color value of its surrounding background area, and / or a second color scheme mode where the background color of all target display elements is the average color value of the interface background.

[0098] In this embodiment, the target display element can be any display element in the first user interface that supports adaptive color matching. The description of the display element can be found in the explanation of terms in point 3) above, and will not be repeated here. For example, any target display element can be any of the following: a folder control, a player control, a notification control, a service card, or an application icon. The folder control can contain icons of multiple applications; the player control is used to display the playback service operation information of applications that support playback services, and the playback service operation information may include, but is not limited to, playback status, volume, and file information of the currently playing multimedia file; the notification control is used to display notification content and manage notifications, such as a notification control in the notification bar; and the service card is a control used to implement the target service, such as some small components in the main interface or the negative one screen.

[0099] Optionally, in this application embodiment, the electronic device may, but is not limited to, determine the background color of the plurality of target display elements through the following implementation methods A1 or A2.

[0100] Implementation method A1: as follows Figure 4 As shown, the electronic device can determine the background color of multiple target display elements through the following steps 401 to 403:

[0101] Step 401: The electronic device determines the color value of the background area where the plurality of target display elements are located.

[0102] Step 402: The electronic device determines the area of ​​the plurality of target display elements.

[0103] Step 403: The electronic device determines the background color value of the multiple target display elements based on the area of ​​the multiple target display elements and the color value of the background area where the multiple target display elements are located.

[0104] Optionally, the electronic device may determine the color value of the background color of the plurality of target display elements by performing step 403 through the following steps 403-1 to 403-3:

[0105] Step 403-1: The electronic device can determine the weight of the background region where the multiple target display elements are located based on the area of ​​the multiple target display elements. The area of ​​each target display element is positively correlated with the weight of its corresponding background region.

[0106] Step 403-2: The electronic device determines the weighted average of the color values ​​of the background areas where the multiple target display elements are located, based on the weights of the background areas where the multiple target display elements are located.

[0107] Through implementation method A1, the background color of all display elements that support adaptive color matching in the user interface of the electronic device is unified and related to the area of ​​these display elements and the color of the background area they are in, so that the background color of these display elements that support adaptive color matching in the user interface is more harmonious with the color of the interface background.

[0108] Optionally, the weights of the background regions where these multiple target display elements are located conform to the formula: K i =S i / S 总 , where K i S is the weight of the background region where the i-th target element is located. i To display the area of ​​the element for the i-th target, S 总 This represents the total area of ​​the multiple target display elements. The color value R of the background area containing these multiple target display elements conforms to the formula: Where N is the number of multiple target display elements, R i K represents the color value of the background area containing the i-th target display element. i The weight of the background region where the i-th target element is located is assigned.

[0109] Step 403-3: The electronic device uses the weighted average value obtained in step 403-2 as the color value of the background color of the multiple target display elements.

[0110] For example, such as Figure 5 As shown in (a), the main interface of the electronic device contains six folder controls, namely folders 1-6 in user interface 1. These folder controls are display elements in user interface 1 that support adaptive color schemes. To facilitate observation of the area and position of each folder control, Figure 5 (b) in section (b) removes other display elements in user interface 1 that do not support adaptive color matching, as well as display elements in the folder controls. The electronic device can calculate the color value and weight of the background area where each folder control is located, and based on the color values ​​and weights of the background areas where the six folder controls are located, calculate the weighted average R of the color values ​​of the background areas where the six folder controls are located, such as... Figure 5As shown in (c); finally, the electronic device can set the background color value of the six folder controls in user interface 1 to R, as shown in (c). Figure 5 As shown in (d) above. The specific process can be found in steps 403-1 to 403-3 above, and will not be repeated here.

[0111] Additionally, when the user moves any folder within user interface 1, the electronic device can recalculate the background color values ​​of those six folder controls. See also Figure 6 As shown in (a) and (b), when the user moves the position of folder 5 in user interface 1, the electronic device can recalculate the background color value R' of the six folder controls. Optionally, the electronic device can continue to calculate R' through the above steps, or calculate R' using the original color value R, the color value R5' of the background area where folder 5 is located after the move, and the weight K5 of the background area where folder 5 is located. R' can conform to the following formula: R'=R*(1-K5)+R5'*K5, or R'=R+(R5'-R)*K5.

[0112] Implementation A2: When the color distribution of the interface background (i.e., the first background) of the first user interface is clearly regionalized, in order to make the background color of the display elements in the user interface that support adaptive color matching more harmonious with the color of the interface background, the electronic device can divide the first background into multiple background regions according to the color distribution in the first background. Optionally, the electronic device can divide the first background into multiple background regions according to a set division rule based on the color value of each pixel in the first background. To avoid cluttered color matching in the first user interface, the electronic device can limit the number of background regions divided into the first background; for example, the first background can be divided into two or three background regions. Then, as... Figure 7 As shown, the electronic device can perform the following steps 701 to 704 for each of the plurality of background regions. The following description takes the first background region as an example, where the first background region is any one of the plurality of background regions.

[0113] Step 701: The electronic device determines at least one first display element located within a first background area among a plurality of target display elements.

[0114] Step 702: The electronic device determines the color value of the background area where the at least one first display element is located.

[0115] Step 703: The electronic device determines the area of ​​the at least one first display element.

[0116] Step 704: The electronic device determines the background color value of the at least one display element based on the area of ​​the at least one first display element and the color value of the background area where the at least one first display element is located.

[0117] Through implementation method A2, the background colors of display elements supporting adaptive color matching in different background areas of the user interface displayed by the electronic device are unified and related to the area of ​​these display elements and the color of the background area they are in, so that the background colors of these display elements supporting adaptive color matching in the user interface are more harmonious with the color of the interface background.

[0118] Similar to step 403 in implementation method A1, the electronic device can perform step 704 to determine the color value of the background color of the at least one display element by following steps 704-1 to 704-3:

[0119] Step 704-1: The electronic device determines the weight of the background region where the at least one first display element is located based on the area of ​​the at least one first display element. The area of ​​each first display element is positively correlated with the weight of its corresponding background region.

[0120] Step 704-2: The electronic device determines the weighted average of the color values ​​of the background area where the at least one first display element is located, based on the weight of the background area where the at least one display element is located.

[0121] Step 704-3: The electronic device uses the weighted average value obtained in step 704-2 as the color value of the background color of at least one first display element.

[0122] The specific process of the above steps can be referred to the description of steps 403-1 to 403-3 in implementation method A1, and will not be repeated here.

[0123] For example, continue with Figure 5 The user interface 1 shown in (a) will be used as an example for illustration. See also... Figure 8 As shown in (a), the electronic device can divide the background of the user interface 1 into two background areas, namely background area a and background area b, according to the color distribution in the background and the set division rules. To facilitate observation of the area and position of each folder control, Figure 8(b) in the code removes other display elements in user interface 1 that do not support adaptive color matching, as well as display elements in folder controls. The electronic device can determine the background color value of at least one target display element located within each background area. The specific process can be referred to steps 701 to 704 above. Finally, the electronic device can determine the background color value Ra of the four folder controls (folder 1 to folder 4) located in background area a, and determine the background color value Rb of the two folder controls (folder 5 and folder 6) located in background area b. Finally, the electronic device can set the background color value of the four folder controls in background area a in user interface 1 to Ra, and set the background color value of the two folder controls in background area b to Rb, as shown below. Figure 8 As shown in (c) in the figure.

[0124] It should also be noted that in the above embodiments A1 and A2, the electronic device can calculate the color value of the background area where any target display element is located in a variety of ways, and the embodiments of this application do not limit this. Optionally, the color value of the background area where any target display element is located is the average value of the color values ​​of multiple sampling points in the background area, or the average value of the color values ​​of multiple pixels in the background area, or the color value of the center point or the central area of ​​the background area.

[0125] In summary, this application provides a display method. In this method, the background color of multiple target display elements in the user interface of an electronic device is related to the area of ​​these target display elements and the color of the background area where these target display elements are located within the interface background. The target display elements are display elements that support background color adjustment, i.e., display elements that support adaptive color matching. Thus, the background color of all display elements in the user interface that support adaptive color matching is related to the area of ​​these display elements and the color of the background area they are located in. This method provides a new color matching mechanism for display elements, which can improve the color matching flexibility of the user interface and make the background colors of these adaptively color-matching display elements in the user interface more harmonious with the interface background color.

[0126] It should also be noted that each step in the above embodiments can be executed by the corresponding device, or by components such as chips, processors, or chip systems within that device. The embodiments of this application do not limit their execution. The above embodiments are merely illustrative examples of execution by the corresponding device. Furthermore, the specific implementation methods or examples in the above embodiments do not limit the solutions provided by the embodiments of this application.

[0127] It should be noted that in the above embodiments, some steps may be selected for implementation, and the order of the steps in the figures may be adjusted. This application does not limit this. It should be understood that performing some of the steps in the figures, adjusting the order of the steps, or combining them in a specific implementation all fall within the protection scope of this application.

[0128] It is understood that, in order to achieve the functions described in the above embodiments, each device involved in the above embodiments includes a hardware structure and / or software module corresponding to perform each function. Those skilled in the art should readily recognize that, based on the units and method steps of the various examples described in conjunction with the embodiments disclosed in this application, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0129] It is understood that the architecture and application scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. As those skilled in the art will know, with the evolution of network architecture and the emergence of new services, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems.

[0130] It should be noted that the "steps" in the embodiments of this application are merely illustrative and are intended to better understand one method of presentation used in the embodiments. They do not constitute a substantial limitation on the execution of the solution of this application. For example, the "step" can also be understood as a "feature". Furthermore, the steps do not constitute any limitation on the execution order of the solution of this application. Any changes to the order of steps, or the merging or splitting of steps made on this basis without affecting the overall solution implementation, resulting in a new technical solution, are also within the scope of disclosure of this application.

[0131] Based on the same concept, embodiments of this application also provide an electronic device. For example... Figure 9 As shown, the electronic device includes a display screen 901, one or more processors 902, and a memory 903. Optionally, the electronic device may also include a transceiver 904. For example, the above-mentioned devices can be connected via one or more communication buses. The one or more computer programs are stored in the memory 903 and configured to be executed by the one or more processors 902. The one or more computer programs include instructions that can be used to cause the electronic device to perform various steps of the methods in the above embodiments.

[0132] For example, the one or more processors 902 described above may specifically be... Figure 1 The processor 110 in the illustrated electronic device 100. The aforementioned memory 903 can specifically be... Figure 1 The illustrated electronic device 100 includes internal memory 121 and / or external memory connected to the electronic device. The transceiver 904 can be... Figure 1 The mobile communication module 150 and / or wireless communication module 160 are shown. The aforementioned display screen 901 can specifically be... Figure 1 The display screen 194 shown is not limited in this embodiment of the application.

[0133] Based on the same concept, embodiments of this application also provide an electronic device, which includes units for performing the various steps of the methods provided in the above embodiments.

[0134] For details on the specific functions of each module, please refer to the above embodiments; they will not be repeated here.

[0135] Based on the above embodiments, this application also provides a computer program product, which includes instructions; when the computer program is run on a computer, it causes the computer to execute the method provided in the above embodiments.

[0136] Based on the above embodiments, this application also provides a computer-readable storage medium storing computer program instructions, which, when executed by a computer, cause the computer to perform the methods provided in the above embodiments.

[0137] Optionally, the aforementioned computer may include, but is not limited to, electronic devices.

[0138] The storage medium can be any available medium that a computer can access. For example, but not limited to, a computer-readable medium can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.

[0139] Based on the above embodiments, this application also provides a chip for reading a computer program stored in a memory to implement the method provided in the above embodiments. Optionally, the chip may include a processor and a memory, wherein the processor is coupled to the memory and is used to read the computer program stored in the memory to implement the method provided in the above embodiments.

[0140] Based on the above embodiments, this application provides a chip system including a processor for supporting a computer device in implementing the functions involved in the electronic devices described in the above embodiments. In one possible design, the chip system further includes a memory for storing necessary programs and data of the computer device. This chip system may be composed of chips or may include chips and other discrete components.

[0141] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0142] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0143] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0144] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

Claims

1. A display method applied to an electronic device, characterized in that, The method includes: Display the first user interface; In response to a first user operation, the displayed content in the first user interface is updated; wherein, the updated first user interface includes multiple target display elements; the background color of the multiple target display elements is related to the area of ​​the multiple target display elements and the color of the background area where the multiple target display elements are located in the first background; the first background is the background of the first user interface, and any target display element is a display element whose background color can be adjusted.

2. The method as described in claim 1, characterized in that, The method further includes: Determine the color values ​​of the background areas where the plurality of target display elements are located; Determine the area of ​​the plurality of target display elements; The background color value of the multiple target display elements is determined based on the area of ​​the multiple target display elements and the color value of the background area where the multiple target display elements are located.

3. The method as described in claim 2, characterized in that, The step of determining the background color value of the plurality of target display elements based on the area of ​​the plurality of target display elements and the color value of the background area where the plurality of target display elements are located includes: The weights of the background regions where the target display elements are located are determined based on the areas of the target display elements. Based on the weights of the background regions where the multiple target display elements are located, determine the weighted average of the color values ​​of the background regions where the multiple target display elements are located; The weighted average value is used as the color value of the background color of the plurality of target display elements.

4. The method as described in claim 1, characterized in that, The method further includes: Based on the color distribution in the first background, the first background is divided into multiple background regions; Perform the following steps for each of the plurality of background regions: Among the plurality of target display elements, at least one first display element located within a first background area is determined; wherein, the first background area is any one of the plurality of background areas; Determine the color value of the background area where the at least one first display element is located; Determine the area of ​​the at least one first display element; The background color value of the at least one display element is determined based on the area of ​​the at least one first display element and the color value of the background area where the at least one first display element is located.

5. The method as described in claim 4, characterized in that, Determining the background color value of the at least one display element based on the area of ​​the at least one first display element and the color value of the background area where the at least one first display element is located includes: The weight of the background region where the at least one first display element is located is determined based on the area of ​​the at least one first display element. Based on the weight of the background area where the at least one display element is located, determine the weighted average of the color values ​​of the background area where the at least one first display element is located; The weighted average value is used as the color value of the background color of the at least one first display element.

6. The method according to any one of claims 2-5, characterized in that, The color value of the background area where any target display element is located is the average of the color values ​​of multiple sampling points within the background area.

7. The method according to any one of claims 1-6, characterized in that, The first user operation is used to enable the target color scheme mode, which sets the background color of the target display element based on the area of ​​the target display element and the color of the background area it is located in; or The first user operation is used to adjust the position of at least one of the plurality of target display elements; or The first user operation is used to adjust the area of ​​at least one of the plurality of target display elements; or The first user operation is used to add or delete target display elements in the first user interface; or The first user action is used to modify or set the background of the first user interface.

8. The method according to any one of claims 1-7, characterized in that, Any target display element is one of the following: Folder controls, player controls, notification controls, business cards, application icons; The folder control contains icons for multiple applications; The player control is used to display playback service operation information of applications that support playback services; The notification component is used to display notification content and manage notifications; The business card is a control used to implement the target business.

9. An electronic device, characterized in that, The electronic device includes: A display screen used to show the user interface; Memory is used to store computer program instructions; A processor for executing the computer program instructions to support the electronic device in implementing the method as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processing circuit, implement the method as described in any one of claims 1-8.

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