Brightness adjustment method and related device

By intercepting rendering commands to obtain image brightness information, adjusting the brightness of the switched application to an intermediate value and gradually restoring it, the problem of visual discomfort caused by brightness differences between applications displayed on the same screen is solved, thus improving the user experience.

CN121922052APending Publication Date: 2026-04-24HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2024-10-15
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

When switching between multiple applications displayed on the same screen, users experience a poor visual experience due to differences in image brightness, and are unable to quickly adapt to the new image brightness, resulting in visual discomfort.

Method used

By intercepting the application's rendering commands, image brightness information is obtained, and the brightness of the switched application is adjusted to be between the brightness before and after the switch, and then gradually restored to the original brightness, reducing the brightness difference and alleviating visual discomfort.

Benefits of technology

It improves the user's visual experience when switching between applications displayed on the same screen, making the transition smoother and more natural by buffering brightness changes and reducing visual differences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121922052A_ABST
    Figure CN121922052A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a brightness adjustment method and a related device, and relates to the technical field of terminals. The method comprises the steps that a first area and a second area are displayed at the first moment, the first area is used for displaying the content of a first application, the second area is used for displaying the content of a second application, the image brightness of the first area is first brightness, the image brightness of the second area is second brightness, and the first brightness is different from the second brightness; the user focus at the first moment is in the first area; at the second moment, in response to the fact that the focus of interest of the user is switched from the first area to the second area, the image brightness of the second area is adjusted to third brightness, and the third brightness is located between the first brightness and the second brightness; at the third moment, the image brightness of the second area is adjusted to the second brightness, the content of the first application in the first area is continuously displayed from the second moment to the third moment, and the focus of attention of the user is in the second area. On the basis, the visual experience of a user when the attention focus of the application is switched can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to brightness adjustment methods and related devices. Background Technology

[0002] As the performance of electronic devices improves, some devices can support simultaneous display and operation of multiple applications, allowing users to view any application displayed on the same screen.

[0003] When a user switches their focus from one application to another, if there is a difference in display brightness between the two applications before and after the switch, the user may experience a temporary inability to adapt to the change in display brightness after the switch, resulting in a poor visual experience. Summary of the Invention

[0004] The brightness adjustment method and related apparatus provided in this application are applied in the field of terminal technology. They help to improve the user's visual experience by reducing the temporary inability to adapt to changes in image brightness when switching the focus between two applications with different image brightness displayed on the same screen.

[0005] In a first aspect, the brightness adjustment method provided in the embodiments of this application includes: at a first moment, displaying a first region and a second region, the first region being used to display content of a first application, the second region being used to display content of a second application, the image brightness of the first region being a first brightness, the image brightness of the second region being a second brightness, the first brightness and the second brightness being different, and the user's focus at the first moment being the first region; at a second moment, in response to the user's focus switching from the first region to the second region, adjusting the image brightness of the second region to a third brightness, the third brightness being between the first brightness and the second brightness; at a third moment, adjusting the image brightness of the second region to the second brightness, from the second moment to the third moment, the content of the first application in the first region is continuously displayed, and the user's focus is always on the second region; wherein, the second moment is later than the first moment, and the third moment is later than the second moment.

[0006] Based on the embodiments of this application, when two applications displayed on the same screen have different image brightness, in response to the user switching the focus from one application to another, the image brightness of the application after the focus switch is adjusted to be between the image brightness of the two applications before and after the switch. This can reduce the difference in display brightness between the two applications and alleviate visual discomfort. Then, the image brightness of the application after the switch is restored to the image brightness before the adjustment, maintaining the original screen style. Therefore, by performing an adjustment and then restoration operation on the image brightness of the application after the focus switch, it helps to buffer the visual difference caused by different image brightness after the switch, making the visual transition smoother and more natural, thereby improving the user's visual experience.

[0007] In one possible implementation, the image brightness of the second region is adjusted multiple times between the second and third time points, and during these adjustments, the image brightness of the second region gradually transitions from the third brightness to the second brightness.

[0008] Based on the embodiments of this application, in the process of restoring the image brightness of the second region to the second brightness, a strategy of multiple adjustments and gradual transition is adopted, which can make the image brightness restoration process more gentle, reduce the visual discomfort caused by changes in image brightness, and improve the user's visual experience.

[0009] In one possible implementation, the image brightness of the first region at the third time is the fourth brightness. The method further includes: at the fourth time, in response to the user's focus switching from the second region to the first region, adjusting the image brightness of the first region to the fifth brightness, the fifth brightness being between the fourth brightness and the second brightness; at the fifth time, adjusting the image brightness of the first region to the fourth brightness, from the fourth time to the fifth time, the content of the second application in the second region is continuously displayed, and the user's focus is always on the first region; wherein the fourth time is later than the third time, and the fifth time is later than the fourth time.

[0010] Based on the embodiments of this application, in response to a user switching their focus from the second area back to the first area, adjusting the image brightness of the second area to be between the image brightness of the two applications before and after the switch can reduce the difference in image brightness between the two applications and alleviate visual discomfort; then restoring the image brightness of the first area to its original state can maintain the original screen style. Therefore, by performing an adjustment and restoration operation on the image brightness of the application after switching the focus, it helps to buffer the visual differences caused by different image brightness after the switch, making the visual transition smoother and more natural, thereby improving the user's visual experience.

[0011] In one possible implementation, before adjusting the image brightness of the second region to the third brightness, the method further includes: intercepting rendering instructions from the first application and the second application to obtain rendering resources for the first region and the second region; obtaining a first value for indicating the image brightness of the first region and a second value for indicating the image brightness of the second region based on the rendering resources of the first region and the second region; adjusting the image brightness of the second region to the third brightness includes: adjusting the image brightness of the second region to the third brightness when the difference between the first value and the second value is greater than a threshold and the user's focus switches from the first region to the second region.

[0012] Based on the embodiments of this application, for the first and second applications, rendering resources can be obtained from each rendering instruction by intercepting their respective rendering commands. Then, a first value and a second value can be obtained based on the rendering resources. The difference between the first and second values ​​is compared with a threshold. When the difference is greater than the threshold, it indicates a significant difference in image brightness between the two applications, and the user is more likely to experience visual discomfort when switching focus. Therefore, when the difference between the first and second values ​​is greater than the threshold and the user switches focus from the first area to the second area, adjusting the image brightness of the second area to a third brightness can improve the user's visual experience.

[0013] In one possible implementation, intercepting the rendering instructions of the first application and the second application includes: intercepting the rendering instructions of the first application and the second application when it is determined that the first application and the second application are displayed simultaneously.

[0014] Based on the embodiments of this application, a first value indicating the image brightness of the first region and a second value indicating the image brightness of the second region can be obtained before the user switches the focus of attention, enabling earlier determination of the image brightness and differences between the two regions. Therefore, when the user switches the focus of attention, a rapid response can be achieved, quickly adjusting the image brightness of the region after the focus switch and reducing delayed adjustments.

[0015] In one possible implementation, intercepting rendering instructions from the first application and the second application includes: intercepting rendering instructions from the first application and the second application in response to a user's focus switching from the first area to the second area.

[0016] Based on the embodiments of this application, the implementation of the intercepted rendering instructions can be executed after the user's focus is switched, which can reduce the execution of the intercepted rendering instructions and save computation.

[0017] In one possible implementation, both the first and second values ​​are calculated using histograms on image frames in the rendering resource.

[0018] Based on the embodiments of this application, the first and second values ​​can be easily obtained using histograms, thereby reducing the amount of computing resources required.

[0019] In one possible implementation, when intercepting the rendering instructions of the first application and the second application, the rendering state of the first application and the rendering state of the second application are also intercepted; based on the rendering resources of the first region and the rendering resources of the second region, a first value for indicating the image brightness of the first region and a second value for indicating the image brightness of the second region are obtained, including: if it is determined from the rendering state of the first application and the rendering state of the second application that both the first application and the second application are game applications, the first value for indicating the image brightness of the first region and the second value for indicating the image brightness of the second region are obtained based on the rendering resources of the first region and the rendering resources of the second region.

[0020] Based on the embodiments of this application, by intercepting the rendering state, it can be determined whether the first application and the second application are game applications. If they are determined to be game applications, the first and second values ​​can be conveniently obtained through the intercepted rendering resources, thereby enabling image brightness adjustment for game applications.

[0021] In one possible implementation, while displaying the first region and the first region, a third region is also displayed, which is used to display the content of a third application.

[0022] Based on the embodiments of this application, electronic devices can display a first area, a second area, and a third area on the same screen, enabling the simultaneous display and operation of multiple applications. Furthermore, when switching the focus between any two applications displayed on the same screen, the image brightness of the area after the focus is switched can be adjusted, thereby improving the user's visual experience.

[0023] Secondly, embodiments of this application provide a brightness adjustment device, which can be an electronic device, or a chip or chip system within an electronic device. The device may include a processing unit. The processing unit is used to implement any processing-related method executed by the electronic device in the first aspect or any possible implementation of the first aspect. When the device is an electronic device, the processing unit may be a processor. The device may also include a storage unit, which may be a memory. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit to cause the electronic device to implement the method described in the first aspect or any possible implementation of the first aspect. When the device is a chip or chip system within an electronic device, the processing unit may be a processor. The processing unit executes the instructions stored in the storage unit to cause the electronic device to implement the method described in the first aspect or any possible implementation of the first aspect. The storage unit may be a storage unit within the chip (e.g., a register, cache, etc.), or a storage unit located outside the chip within the electronic device (e.g., a read-only memory, random access memory, etc.).

[0024] For example, the processing unit is configured to: 1) display a first region and a second region, wherein the first region displays content of a first application and the second region displays content of a second application; the image brightness of the first region is a first brightness and the image brightness of the second region is a second brightness, the first brightness and the second brightness are different, and the user's focus at the first time is on the first region; 2) adjust the image brightness of the second region to a third brightness in response to the user's focus switching from the first region to the second region, the third brightness being between the first brightness and the second brightness; 3) adjust the image brightness of the second region back to the second brightness. From the second time to the third time, the content of the first application in the first region is continuously displayed, and the user's focus remains on the second region; wherein the second time is later than the first time, and the third time is later than the second time.

[0025] In one possible implementation, the processing unit adjusts the image brightness of the second region multiple times between the second and third time points, during which the image brightness of the second region gradually transitions from the third brightness to the second brightness.

[0026] In one possible implementation, the image brightness of the first region at the third time is the fourth brightness. The processing unit, at the fourth time, responds to the user's focus switching from the second region to the first region by adjusting the image brightness of the first region to the fifth brightness, which is between the fourth and second brightness. At the fifth time, the image brightness of the first region is adjusted back to the fourth brightness. From the fourth time to the fifth time, the content of the second application in the second region is continuously displayed, and the user's focus remains on the first region. The fourth time is later than the third time, and the fifth time is later than the fourth time.

[0027] In one possible implementation, the processing unit is further configured to intercept rendering instructions from the first application and the second application to obtain rendering resources for the first region and the second region; based on the rendering resources for the first region and the second region, to obtain a first value for indicating the image brightness of the first region and a second value for indicating the image brightness of the second region; the processing unit is configured to adjust the image brightness of the second region to a third brightness when the difference between the first value and the second value is greater than a threshold and the user's focus switches from the first region to the second region.

[0028] In one possible implementation, the processing unit is configured to intercept rendering instructions of the first application and the second application when it is determined that the first application and the second application are displayed simultaneously.

[0029] In one possible implementation, the processing unit is configured to intercept rendering instructions from the first application and the second application in response to a user's focus switching from the first region to the second region.

[0030] In one possible implementation, both the first and second values ​​are calculated using histograms on image frames in the rendering resource.

[0031] In one possible implementation, when intercepting the rendering instructions of the first application and the second application, the rendering state of the first application and the rendering state of the second application are also intercepted; the processing unit is configured to, when it is determined from the rendering state of the first application and the rendering state of the second application that both the first application and the second application are game applications, obtain a first value for indicating the image brightness of the first region and a second value for indicating the image brightness of the second region based on the rendering resources of the first region and the rendering resources of the second region.

[0032] In one possible implementation, while displaying the first region and the first region, a third region is also displayed, which is used to display the content of a third application.

[0033] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, the memory for storing code instructions, and the processor for running the code instructions to perform the methods described in the first aspect or any possible implementation of the first aspect.

[0034] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program or instructions that, when executed on a computer, cause the computer to perform the methods described in the first aspect or any possible implementation thereof.

[0035] Fifthly, embodiments of this application provide a computer program product including a computer program, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof.

[0036] Sixthly, this application provides a chip or chip system including at least one processor and a communication interface. The communication interface and the at least one processor are interconnected via a circuit. The at least one processor is used to run computer programs or instructions to perform the methods described in the first aspect or any possible implementation of the first aspect. The communication interface in the chip can be an input / output interface, pins, or circuits, etc.

[0037] In one possible implementation, the chip or chip system described above in this application further includes at least one memory storing instructions. The memory can be an internal storage unit of the chip, such as a register or cache, or it can be a storage unit of the chip itself (e.g., read-only memory, random access memory, etc.).

[0038] It should be understood that the second to sixth aspects of this application correspond to the technical solutions of the first aspect of this application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation are similar, and will not be repeated here. Attached Figure Description

[0039] Figure 1 A schematic diagram illustrating the simultaneous display of multiple applications on an electronic device provided in this application embodiment;

[0040] Figure 2 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;

[0041] Figure 3 A schematic diagram of the software architecture of an electronic device provided in an embodiment of this application;

[0042] Figure 4 A schematic block diagram illustrating a brightness adjustment method provided in an embodiment of this application;

[0043] Figure 5 This is a schematic diagram illustrating the statistical comparison of histogram data provided in the embodiments of this application;

[0044] Figure 6 One of the schematic diagrams for image brightness adjustment provided in the embodiments of this application;

[0045] Figure 7 A second schematic diagram illustrating image brightness adjustment provided in an embodiment of this application;

[0046] Figure 8 A schematic flowchart illustrating a brightness adjustment method provided in an embodiment of this application;

[0047] Figure 9 This is a schematic diagram of the structure of a chip provided in an embodiment of this application. Detailed Implementation

[0048] To facilitate a clear description of the technical solutions in the embodiments of this application, the following explanation is provided first:

[0049] In the embodiments of this application, terms such as "first" and "second" are used to distinguish identical or similar items with essentially the same function and purpose. For example, "first chip" and "second chip" are used only to distinguish different chips and do not limit their order of execution. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or execution order, and that "first" and "second" do not necessarily imply that they are different.

[0050] It should be noted that, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0051] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to 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, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0052] With technological advancements, the performance of electronic devices in storage, computing, and display is constantly improving, enabling them to support the simultaneous display and operation of multiple applications. For example, users of foldable phones, candybar phones, or tablets can open two or more applications, allowing them to be displayed and run simultaneously on the screen. For instance, a user can open at least one game application and at least one video application, displaying both simultaneously on the screen; or, a user can open two or more game applications, displaying multiple games simultaneously on the screen. The display screen of an electronic device can also be called a monitor or screen. Foldable phones can display multiple applications on one or more screens, while candybar phones and tablets can display multiple applications on a single screen through split-screen or horizontal split-screen methods.

[0053] Figure 1 This is a schematic diagram illustrating the simultaneous display of multiple applications on an electronic device provided in an embodiment of this application, such as... Figure 1 As shown, the upper and lower halves of the electronic device screen display screenshots of two game applications, respectively. Due to the significant differences in the game styles of the two games, the image brightness of the game displayed in the upper half of the screen is lower, while the image brightness of the game displayed in the lower half of the screen is higher, resulting in a difference in image brightness between the two areas. This demonstrates that when an electronic device displays multiple applications simultaneously, differences in image brightness may occur between different display areas. Image brightness can be understood as the lightness or darkness of an image, which is related to image detail and / or color, and may be independent of the display screen's brightness value.

[0054] When multiple applications are displayed on the same screen, and the image brightness of these applications differs, users may not be able to immediately adapt to the new image brightness when switching between them, resulting in a poor visual experience. For example... Figure 1 As shown, if a user is viewing the upper half of the game screen, their eyes have already adapted to the lower image brightness. When the user switches their focus to the lower half of the game screen, the image appears too bright, causing glare, as the eyes cannot immediately adapt to the higher brightness, resulting in a poor visual experience. Conversely, if the user is viewing the lower half of the game screen, their eyes have already adapted to the higher brightness. When the user switches their focus to the upper half of the game screen, the image appears too dark, making it difficult to see details, as the eyes cannot immediately adapt to the lower brightness, also resulting in a poor visual experience. Therefore, when multiple applications are displayed on the same screen with varying image brightness, it is necessary to address the issue of poor visual experience when switching between applications.

[0055] In view of this, embodiments of this application provide a brightness adjustment method. This method compares the image brightness of multiple applications displayed on the same screen. When there are differences in image brightness and the user's focus switches between applications, the method adjusts the image brightness of the application corresponding to the switched focus to be the same as or similar to the image brightness of the application before the switch. This reduces the difference in image brightness between the switched and previous applications, helping the user adapt to the image brightness of the switched application more quickly. Furthermore, after adjusting the image brightness, the image brightness of the application corresponding to the switched focus is gradually adjusted back to the original image brightness of that application to restore the normal display of the application. This eliminates the image brightness deviation of the switched application. Based on this, embodiments of this application, by performing an adjustment and then restoration operation on the image brightness of the application after switching the focus, help users buffer the visual differences caused by different image brightness before and after the focus switch, making the visual transition smoother and more natural, thereby improving the user's visual experience when switching focus between applications displayed on the same screen.

[0056] The electronic devices in this application can be handheld devices including a display screen and vehicle-mounted devices including a display screen, etc. For example, some electronic devices include: mobile phones, tablets, PDAs, laptops, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, in-vehicle devices, electronic devices in 5G networks, or future evolution of public land mobile communication networks. Electronic devices in a mobile network (PLMN), etc., are not limited in this application embodiment. Among them, mobile phones may include foldable phones or candybar phones, etc. Foldable phones may include bi-fold phones, tri-fold phones, quad-fold phones or n-fold phones, where n can be a natural number greater than 4.

[0057] Furthermore, in this application embodiment, the electronic device can also be an electronic device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-machine interconnection and object-to-object interconnection.

[0058] The electronic devices in the embodiments of this application may also be referred to as: terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent, or user device, etc.

[0059] To facilitate understanding of the embodiments of this application, the hardware structure of the electronic device provided in the embodiments of this application will be described below.

[0060] Figure 2 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Figure 2 As shown, the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

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

[0062] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0063] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

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

[0065] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface, etc.

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

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

[0068] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. In some embodiments, an electronic device may include at least one display screen 194. The electronic device implements display functions through a GPU, display screen 194, and application processor, etc. Display screen 194 can display and run multiple applications simultaneously. The GPU is a microprocessor for image processing, connected to display screen 194 and application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include at least one GPU, which executes program instructions to generate or modify display information.

[0069] For example, in this embodiment of the application, the internal memory 121 may store a program for executing the brightness adjustment method of this embodiment of the application, and the display screen 194 may display the content of multiple applications. After the focus is switched from one application to another, the processor 110 may implement the brightness adjustment in this embodiment of the application based on the program for executing the brightness adjustment method of this embodiment of the application stored in the internal memory 121, thereby improving the user experience.

[0070] The software system of an electronic device can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. A layered architecture can use the Android system, the Apple iOS system, or other operating systems; this application embodiment does not limit this. The following uses a layered Android system as an example to exemplify the software architecture of the electronic device provided in this application embodiment.

[0071] Figure 3 This is a schematic diagram of the software architecture of an electronic device provided in an embodiment of this application. Figure 3 As shown, a layered architecture can divide the software system of an electronic device into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system can be divided into five layers, from top to bottom: applications, application framework, hardware abstraction layer (HAL), kernel, and hardware layer.

[0072] The application layer can include a series of application packages. The application layer runs applications by calling the application programming interface (API) provided by the application framework layer. For example... Figure 3 As shown, an application package may include applications such as a first game application, a second game application, and a video application. Applications can also be called applications, and they can include system applications and third-party applications.

[0073] The application framework layer provides APIs and a programming framework for applications within the application layer. The application framework layer includes predefined functions. For example... Figure 3 As shown, the application framework layer can include SurfaceFlinger, Window Manager Service (WMS), and system libraries. SurfaceFlinger manages and composites windows and layers from different applications, compositing and displaying the application's graphical content on the screen. WMS is used to obtain the screen size, determine the presence of a status bar, screen lock, screen touch, screen dragging, screen capture, etc. WMS can also determine which application is currently receiving attention and whether the attention is switching between different applications.

[0074] The system library, also known as the native layer, can include multiple functional modules. These include media libraries, function libraries, the Open Graphics Library (OpenGL), and GPU computing modules. Media libraries support playback and recording of various common audio and video formats, as well as still image files. They support multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. Function libraries provide developers with APIs for various services, facilitating rapid integration and implementation of diverse functionalities. OpenGL can be used for 3D graphics drawing, image rendering, compositing, and layer processing.

[0075] like Figure 3 As shown, the HAL layer may include a display driver module. This display driver module can provide virtual hardware for the display screen.

[0076] The kernel layer is the layer between hardware and software. For example... Figure 3 As shown, the kernel layer may include display drivers, etc. The display driver is used to drive the display screen to show images.

[0077] The hardware layer can include hardware such as displays and GPUs.

[0078] For example, the possible implementation process of the brightness adjustment method of the present application embodiments is described below in conjunction with hardware and software architecture.

[0079] In this embodiment, SurfaceFlinger can subscribe to the focus position in WMS. When the first game application runs, it generates corresponding application data in response to user actions. This application data is transmitted to the application framework layer, which calls the OpenGL instruction library to generate rendering instructions corresponding to the application data. These rendering instructions are transmitted to the GPU in the hardware layer via the hardware abstraction layer and kernel layer. After receiving the rendering instructions, the GPU performs image rendering according to the instructions to draw the image data corresponding to the application data. The image data is then displayed on the screen, allowing the user to see the corresponding game screen. The display principle of the game screen when the second game application runs is similar to that of the first game application and will not be described in detail.

[0080] In a scenario where the first and second game applications run simultaneously, the GPU computing module can intercept the rendering instructions of both applications to obtain the image brightness of the image frames to be rendered in both the first and second game applications. This information is then transmitted to SurfaceFlinger. When SurfaceFlinger switches its focus from the first to the second game application from the WMS, and the image brightness of the image frames to be rendered in the first and second game applications differs significantly, SurfaceFlinger can adjust the brightness of the second image frame to be rendered closer to that of the first game application, resulting in an adjusted image frame. Furthermore, SurfaceFlinger and the Hardware Composer (HWC) can perform image rendering and compositing based on the image frames to be rendered in the first and second game applications, and then display the results. It is understood that the image brightness adjustment of an image frame can be modified in SurfaceFlinger as described above, or the image brightness adjustment of an image frame can be modified in the GPU computing module of the next frame. The specific module for image brightness modification is not limited in the embodiments of this application.

[0081] It should be understood that in some embodiments, layers that perform the same function may be called by other names, or layers that can perform the functions of multiple layers may be considered as one layer, or layers that can perform the functions of multiple layers may be divided into multiple layers. This application does not limit this. It should be noted that this application only uses the Android system as an example. In other operating systems (such as Windows, iOS, etc.), as long as the functions implemented by each functional module are similar to those in the embodiments of this application, the solution of this application can also be implemented.

[0082] To better understand the brightness adjustment method provided in the embodiments of this application, the following will be combined with Figure 3 and Figure 4 Please provide a detailed explanation. Figure 4 This is a schematic block diagram illustrating a brightness adjustment method provided in an embodiment of this application, such as... Figure 4 As shown, the method includes the following steps:

[0083] S401. Intercept the rendering instructions of the first game application and the second game application respectively to obtain the rendering resources of the first game application and the second game application.

[0084] In this embodiment, the rendering instructions may include rendering state and rendering resources reflecting the image rendering process. For example, the rendering state may characterize the current rendering stage; rendering resources include the rendered image frames. The image frames include information such as textures that can reflect the image brightness.

[0085] For example, a rendering state can be used to indicate the moment when an image frame is intercepted. For instance, rendering an image frame typically requires performing a transparency operation, which can be understood as a rendering state. Because the system calls the image frame after performing the transparency operation, if the rendering state is set to perform a transparency operation, it can be determined that the image frame can be intercepted and obtained.

[0086] In some implementations, the GPU computing module can perform hook operations to intercept rendering instructions from both a first game application and a second game application. For example, the GPU computing module can first intercept specific instructions to determine if the current process is a game process. If so, it can continue to intercept the rendering instructions of the game application through hook operations until the game process terminates. Here, "specific instructions" can be understood as any instruction that can be used to determine whether the current process is a game process; this application embodiment does not limit the scope of the instruction.

[0087] Of course, in this embodiment of the application, the conditions under which the GPU computing module intercepts the rendering instructions of the first game application and the rendering instructions of the second game application can be arbitrary. For example, several possible methods are provided below.

[0088] Method 1: The GPU computing module can intercept rendering instructions of any application running in the foreground. Therefore, when the first game application and the second game application are running in the foreground, the GPU computing module can intercept the rendering instructions of the first game application and the second game application.

[0089] Method 2: The GPU computing module can monitor in real time whether multiple applications are running. When only one application is running in the foreground, the GPU computing module does not need to intercept its rendering instructions. When multiple applications are running in the foreground, the GPU computing module can intercept the rendering instructions of multiple applications. For example, if at any given moment, one of the first and second game applications is running, the GPU computing module will not intercept its rendering instructions. However, when the GPU computing module detects that another game application has started, resulting in multiple applications running in the foreground, it can begin to intercept the rendering instructions of both the first and second game applications.

[0090] Method 3: The GPU computing module can intercept rendering instructions from multiple game applications running in the foreground. For example, during image rendering, each draw call renders a portion of the image content. When rendering images from game applications, the number of draw calls is higher. Therefore, the number of draw call executions in the intercepted rendering state can be used to determine if the displayed application is a game application. For instance, if the number of draw call executions included in the intercepted rendering resources exceeds a preset threshold, the application can be identified as a game application.

[0091] S402. Based on the rendering resources, perform data statistics using histograms to obtain histogram data statistics for the first game application and the second game application, or obtain the image brightness of the first game application and the image brightness of the second game application.

[0092] After intercepting the rendering commands from the first game application and the second game application, the GPU computing module can perform histogram-based data statistics on the rendering resources within the rendering commands, obtaining histogram data statistics for both the first and second game applications. The histogram data statistics reflect the image brightness of the image frame corresponding to the game application's rendering command during display; it can be understood as the image brightness of the game layer corresponding to the rendering command.

[0093] For example, for either the first or second game application, the GPU computing module can create a computer shader to process the pixel data in the image frame and obtain histogram data statistics, which can also be called histogram data statistics. The computer shader can traverse each pixel of the image frame and update the value of the corresponding bin in the histogram data statistics according to the color value of the pixel. Here, a bin can represent a single value or a range of values.

[0094] For example, the GPU computing module can allocate a buffer within the GPU for hist data statistics. This buffer can store the values ​​corresponding to each bucket in the hist data statistics. For instance, for an image frame in red-green-blue (RGB) color mode, the color values ​​of the R, G, and B color channels all range from 0 to 255. One color value can correspond to one bucket, so a total of 256 buckets can be included. A color value can also be understood as the RGB pixel value of a pixel in its corresponding color channel.

[0095] For example, the GPU computing module can schedule the computer shader to run on the GPU, traverse the color value of each pixel in the image frame, count the number of pixels belonging to each bucket, and obtain the value corresponding to each bucket. A buffer can cache the value corresponding to each bucket. After the traversal is complete, the GPU computing module can read the statistical data from the GPU's buffer to obtain the histogram statistics. Based on this, histogram statistics for the first game application and the second game application can be obtained.

[0096] Of course, the GPU computing module can also perform histogram data statistics for the first game application and the second game application in computing devices such as CPUs, and this application embodiment does not limit this.

[0097] After the GPU computing module obtains the histogram data statistics for the first and second game applications, in one possible implementation, it can pass these histogram data statistics to SurfaceFlinger. SurfaceFlinger then calculates the image brightness of both games, enabling subsequent brightness comparison steps. In another possible implementation, the GPU computing module can calculate the image brightness of both games and pass them to SurfaceFlinger, allowing SurfaceFlinger to perform subsequent brightness comparison steps.

[0098] S403. Based on focus detection and / or eye tracking, determine whether there is a focus switching between the first game application and the second game application.

[0099] The focus of attention refers to the element the user is currently interacting with on the interface. For example, in a game application, if a user is entering text into a form, the input box becomes the current focus. The application interface can clearly display the current focus using visual cues (such as highlighting, border changes, etc.). Focus detection can determine whether the user's focus has shifted.

[0100] In one possible implementation, the focus position can be determined by the WMS (Web Service Management System) in the application framework layer to determine whether the focus has been switched between the first and second game applications.

[0101] For example, the WMS (Web Management System) in the application framework layer can obtain the position of the focus on the screen, thereby determining whether the focus of attention in the current screen frame is on the same game application as the focus of attention in the previous screen frame. If they are on the same game application, it can be determined that the focus of attention has not switched; if they are not on the same game application, it can be determined that the focus of attention has switched. Here, a screen frame can be understood as the overall image frame displayed on the screen. SurfaceFlinger can subscribe to focus of attention switching events in WMS. After WMS detects a focus of attention switching event, it can transmit the focus of attention switching event message to SurfaceFlinger. Upon receiving the focus of attention switching message, SurfaceFlinger can perform operations such as adjusting image brightness based on the image brightness of the application before and after the focus of attention switching.

[0102] Another possible implementation is to determine whether the user's focus has shifted through eye tracking.

[0103] For example, eye tracking can detect and track a user's focus of attention based on their gaze point or the trajectory of their eye movements. For instance, an electronic device's camera captures the user's eye movements, generating eye-tracking images. Image processing algorithms are used to identify and detect these images, allowing the calculation of the user's gaze point on the display screen. When it's determined that the user's gaze point shifts from the display area of ​​one game application to that of another, a focus shift can be identified. The brightness of the game application to which the focus has shifted can then be adjusted based on the difference in image brightness between the two applications.

[0104] If it is determined that there is a focus switch between the first game application and the second game application, S404 can be executed. If it is determined that there is no focus switch between the first game application and the second game application, S407 can be executed.

[0105] S404. Compare the image brightness of the first game application and the second game application, and determine whether the difference between the image brightness of the first game application and the image brightness of the second game application is greater than a threshold.

[0106] For example, the image brightness of a first game application and a second game application can be compared based on histogram statistics. Image brightness can be understood as the degree of lightness or darkness of an image frame when displayed on a screen. Histogram statistics can reflect the image brightness of the corresponding image frames. For instance, in histogram statistics, if a large number of pixels are distributed in the low-value bucket area, the image brightness of the image frame is low; if a large number of pixels are distributed in the high-value bucket area, the image brightness of the image frame is high.

[0107] Figure 5 This is a schematic diagram of histogram data statistical comparison provided in the embodiments of this application, such as... Figure 5 As shown, the horizontal axis represents the buckets corresponding to each color value, and the vertical axis represents the number of pixels in each bucket. In the histogram data statistics of the image frames from the first game application, a large number of pixels with color values ​​less than 128 are distributed in buckets, while fewer pixels have color values ​​greater than 128. Therefore, the image brightness of the image frames from the first game application is relatively low. In the histogram data statistics of the image frames from the second game application, a large number of pixels with color values ​​greater than 128 are distributed in buckets, while fewer pixels have color values ​​less than 128. Therefore, the image brightness of the image frames from the second game application is relatively high. By comparing the distribution of the histogram data statistics, the image brightness of the first and second game applications can be compared.

[0108] For example, values ​​indicating image brightness can also be obtained from histogram data statistics. For instance, for any image frame, the computer shader can obtain the histogram data statistics for the R color channel, the G color channel, and the B color channel. The average color value of the R color channel is calculated based on the histogram data statistics. The average color value of the G color channel is calculated based on the histogram data statistics. The average color value of the B color channel is calculated based on the histogram data statistics. The average color value can be obtained by summing the color values ​​of all pixels in that color channel and dividing by the total number of pixels.

[0109] By performing a simple average or a weighted average on the mean values ​​of the R, G, and B color channels, a value indicating image brightness can be obtained. A simple average calculation involves summing the mean values ​​of the R, G, and B color channels, then dividing the sum by 3 to obtain a simple average value, which indicates image brightness. A weighted average calculation involves summing the mean values ​​of each color channel according to weights, and the resulting sum is the weighted average value, which also indicates image brightness. For example, the weight value corresponding to the mean value of the R color channel could be 0.299, the weight value corresponding to the mean value of the G color channel could be 0.587, and the weight value corresponding to the mean value of the B color channel could be 0.114.

[0110] The value indicating the brightness of the image, obtained by statistical calculation based on histogram data, can also be understood as the grayscale value corresponding to the image frame.

[0111] For example, the threshold can be a value used to distinguish the difference in brightness between two image frames. The threshold can be preset based on the brightness difference that the human eye can clearly perceive, and the threshold can be any brightness value, such as 1 nit or 2 nits.

[0112] In this embodiment, the SurfaceFlinger in the application framework layer can compare the image brightness of the two image frames based on the histogram data statistics corresponding to the image frames of the first game application and the image frames of the second game application, and determine the difference between the image brightness of the first game application and the image brightness of the second game application.

[0113] Taking a threshold of 2 nits as an example, after SurfaceFlinger calculates the indicator image brightness value for each image frame, it subtracts the two values ​​to obtain the difference. If the absolute value of the difference is greater than 2 nits, it is determined that there is a significant difference in image brightness between the two image frames; if the absolute value of the difference is less than or equal to 2 nits, it is determined that there is no significant difference in image brightness between the two image frames.

[0114] If the difference between the image brightness of the first game application and the image brightness of the second game application is determined to be greater than a threshold, execute S404; if the difference between the image brightness of the first game application and the image brightness of the second game application is determined not to be greater than a threshold, execute S407.

[0115] It is understandable that S403 compares the difference in image brightness between the first game application and the second game application with a threshold. In some other implementations, this comparison can also be adjusted. For example, the difference in image brightness between the first game application and the second game application can be compared with the image brightness value of either the first game application or the second game application to obtain a difference ratio. It is then determined whether the difference ratio is greater than a ratio threshold, such as 5% or 10%.

[0116] Taking a ratio threshold of 10% as an example, after SurfaceFlinger calculates the indicator image brightness value corresponding to each image frame, it subtracts the two values ​​to obtain the difference. The absolute value of this difference is then divided by the smaller indicator image brightness value of the two images to obtain the difference ratio. If the difference ratio is greater than 10%, it is determined that there is a significant difference in the image brightness of the two image frames; if the difference ratio is less than or equal to 10%, it is determined that there is no significant difference in the image brightness of the two image frames. In this implementation, if the difference ratio is greater than the ratio threshold, S405 or S406 is executed; if the difference ratio is not greater than the ratio threshold, S407 is executed.

[0117] It is understandable that the steps of obtaining the image brightness of the first game application and the image brightness of the second game application based on the histogram data statistics method can be implemented in the GPU computing module. Therefore, SurfaceFlinger can compare the image brightness of the first game application and the image brightness of the second game application based on the GPU computing module, which will not be elaborated further.

[0118] S405. If the focus shifts from a game application with higher image brightness to a game application with lower image brightness, increase the image brightness of the game application with lower image brightness and gradually restore it to the original image brightness.

[0119] For example, if a user's focus shifts from a game application with higher image brightness to a game application with lower image brightness, then the game application with lower image brightness is brightened to a level close to that of the game application with higher image brightness.

[0120] Figure 6 This is one of the schematic diagrams of image brightness adjustment provided in the embodiments of this application, such as... Figure 6 As shown, before the focus shifts, the focus is on the second game application, and the image brightness of the second game application is higher than that of the first game application. After detecting that the user has switched the focus from the second game application to the first game application, the first game application is brightened by increasing its image brightness. Figure 6 The system allows you to adjust the image brightness of the first game application to any brightness level between the first and second game applications. Then, after a preset duration or number of frame frames, the image brightness of the first game application can be restored to its original level. This ensures a smooth return to the original brightness of the first game application.

[0121] S406. If the focus shifts from a game application with lower image brightness to a game application with higher image brightness, then reduce the image brightness of the game application with higher image brightness and gradually restore it to the original image brightness.

[0122] For example, if a user's focus shifts from a game application with lower image brightness to a game application with higher image brightness, then the game application with higher image brightness is darkened, reducing its image brightness to be close to that of the game application with lower image brightness.

[0123] Figure 7 This is a second schematic diagram of image brightness adjustment provided in the embodiments of this application, as shown below. Figure 7As shown, before the focus shifts, the focus is on the first game application, and the image brightness of the first game application is lower than that of the second game application. After detecting that the user has switched the focus from the first game application to the second game application, the second game application is darkened, and its image brightness is reduced. Figure 7 The system allows the image brightness of the second game application to be lowered to any brightness level between the first and second game applications. Afterward, after a preset duration or number of frame frames, the image brightness of the second game application can be restored to its original brightness. This ensures a smooth return to the original image brightness of the second game application.

[0124] For example, during brightening or darkening, the magnitude of image brightness adjustment can be adaptively calculated and adjusted based on the difference in image brightness between the first game application and the second game application. If the difference in image brightness is greater, the magnitude of brightening or darkening can be greater; if the difference in image brightness is smaller, the magnitude of brightening or darkening can be smaller.

[0125] In some examples, the color values ​​of pixels in an image frame whose brightness needs to be adjusted can be increased proportionally to achieve adaptive brightness adjustment. For instance, if the focus shifts from a game application with lower image brightness to a game application with higher image brightness, and the difference in image brightness between the two game application image frames is 10%, then increasing the R, G, and B color channel values ​​of each pixel in the lower-brightness game application image frame by 10% will proportionally brighten the lower-brightness game application image frame, making its image brightness closer to that of the higher-brightness game application, thus reducing the visual difference after the user switches focus.

[0126] Similarly, if the focus shifts from a game application with higher image brightness to a game application with lower image brightness, and the difference in image brightness between the two game application image frames is 20%, then the color values ​​of the R, G, and B color channels of each pixel in the image frame of the game application with higher image brightness can be reduced by 20%. This will proportionally darken the image brightness of the image frame of the game application with higher image brightness, making its image brightness closer to that of the game application with lower image brightness, thus reducing the visual difference after the user switches the focus.

[0127] When brightening or darkening the image, the adjustment ratio can be equal to or different from the difference ratio. Alternatively, during brightening or darkening, the image brightness can be increased or decreased to the same level as the image brightness of the game application before the focus shift.

[0128] The original image brightness can be understood as the image brightness when no brightness adjustment is made to the image frame, or it can be understood as the image brightness of the application itself. After brightening or darkening, the image brightness can be gradually restored to the original image brightness within a preset duration or a preset number of image frames. It should be understood that if the image brightness is not gradually restored, the image style of the user's game application will change, which may reduce the user's experience. Therefore, gradually restoring the original image brightness can improve the user's experience.

[0129] The preset duration can be any preset duration, such as 1 second or 2 seconds. The preset number of image frames can be any preset number, such as 60 frames or 100 frames.

[0130] With a preset duration of 1 second, if the focus switches from a game application with image brightness 'a' to a game application with image brightness 'c', where 'a' > 'c', upon detecting the focus switch, the image brightness of the game application with image brightness 'c' can be increased to 'b', where 'a' > 'b' > 'c'. Since the image brightness is increased by 'bc' and the preset duration is 1 second, the image brightness should be gradually restored from 'b' to 'c' within 1 second. If the displayed frame rate is 100 frames per second, then 100 image frames can be displayed within 1 second. Therefore, the image brightness of each image frame within 1 second can be successively reduced by (bc) / 100 until the image brightness is reduced to 'b'.

[0131] Taking a preset number of image frames of 60 frames as an example, if the focus switches from a game application with image brightness 'd' to a game application with image brightness 'f', where f > d, upon detecting the focus switch, the image brightness of the game application with image brightness 'f' can be reduced to 'e', ​​where f > e > d. Since the image brightness is reduced by 'fe', and the preset number of image frames is 60, the image brightness can be gradually restored from 'e' to 'f' over the subsequent 60 displayed image frames. For example, the image brightness of the subsequent 60 displayed image frames can be increased sequentially by (fe) / 60 until the image brightness reaches 'f'.

[0132] S407, Combine and display screen frames.

[0133] For example, when two game applications with different image brightness are displayed and running on the same screen, after switching the focus of the game application, SurfaceFlinger can adjust the image brightness of the game application's image frame after the focus is switched. During this process, the image frame with adjusted image brightness and the image frame of the game application that has lost focus are composited using SurfaceFlinger and HWC to form a composite screen frame. The composite screen frame is then sent to the display screen for display.

[0134] Understandably, for ease of understanding and description, Figure 4The brightness adjustment method shown is an illustrative example using two game applications displayed on the same screen. This method can also be applied to scenarios with any number of applications displayed simultaneously. When the focus switches from one application to another, the brightness of the image frames to be displayed in both applications can be adjusted to reduce the brightness difference between them. It's important to note that if more than two applications are displayed simultaneously, after a focus switch, it's necessary to first determine which two applications the focus is switching between, and then determine the brightness difference between those two applications. The principle is the same as... Figure 4 The implementation examples are similar and will not be described again.

[0135] Screen sharing can refer to displaying multiple applications on a single display screen, such as on a smartphone or tablet. It can also mean displaying multiple applications simultaneously on multiple screens, as in a multi-screen smartphone. In short, screen sharing can be understood as displaying multiple applications at the same time.

[0136] Without causing execution conflicts Figure 4 The steps of the brightness adjustment method shown can be executed in a different order. For example, S403 can be executed before S401; or S403 can be executed between S401 and S402; or S403 can be executed before S404.

[0137] By adjusting S403 to execute before S401, it's possible to first determine if there's a focus switch between the first and second game applications. If a switch is confirmed, other steps are then executed, thus increasing the necessity of brightness adjustment. If no focus switch is detected, other steps can be omitted to conserve computational resources.

[0138] When S403 is adjusted to execute between S401 and S402, after intercepting rendering resources, it first determines whether there is a focus switch. If there is a switch, it then executes steps such as obtaining histogram data statistics and comparing image brightness. Based on this, the time delay of brightness adjustment can be reduced while saving some computing resources.

[0139] Furthermore, the method in this application embodiment can also adjust brightness for three or more applications displayed on the same screen. For example, in a scenario where three applications are displayed on the same screen, the method in the above embodiment, which intercepts the rendering resources of two applications, can be adjusted to intercept the rendering resources of all three applications. When a focus switch is determined, the image brightness of the two applications before and after the switch is compared. If the difference in image brightness is significant, the image brightness of the application after the switch is adjusted and restored. Based on this, the user experience when switching focus is improved when multiple applications are displayed on the same screen.

[0140] based on Figure 4 The corresponding embodiments of this application can achieve the following: Figure 8 This describes the corresponding brightness adjustment scenarios. The brightness adjustment method of this application will be described in detail below through specific embodiments. The following embodiments can be combined with each other or implemented independently; the same or similar concepts or processes may not be repeated in some embodiments.

[0141] Figure 8 This is a flowchart illustrating a brightness adjustment method provided in an embodiment of this application, as shown below. Figure 8 As shown, the method includes:

[0142] S801, at the first moment, display a first area and a second area. The first area is used to display the content of the first application, and the second area is used to display the content of the second application. The image brightness of the first area is a first brightness, and the image brightness of the second area is a second brightness. The first brightness and the second brightness are different, and the user's focus at the first moment is on the first area.

[0143] The first region and the second region can be any two regions on the display screen of the electronic device. The first application and the second application can be any two applications. The content of the first application can be understood as the image frames of the first application, and the content of the second application can be understood as the image frames of the second application. The first region and the second region can be formed based on split-screen or based on multi-window display. This application embodiment does not limit the method of triggering the display of the first region and the second region.

[0144] The first brightness can indicate the image brightness value of the first application image frame at the first moment, and the second brightness can indicate the image brightness value of the second application image frame at the second moment. It should be noted that the first brightness and the second brightness are used to describe the brightness scene of the first region and the second region at the first moment. In the program implementation of the electronic device, the electronic device may not calculate the first brightness and the second brightness.

[0145] Corresponding to Figure 4In one embodiment, the first application can be a first game application, and the content of the first application can be image frames displaying the game screen of the first game application. The second application can be a second game application, and the content of the second application can be image frames displaying the game screen of the second game application. Further details are omitted.

[0146] Of course, in other implementations, the first application can be a first game application, and the content of the first application can be image frames displaying the game screen of the first game application. The second application can be a video application, and the content of the second application can be image frames displaying the video screen of the video application. This application embodiment does not limit the first application and the second application.

[0147] S802, at the second moment, in response to the user's focus switching from the first area to the second area, the image brightness of the second area is adjusted to the third brightness, which is between the first brightness and the second brightness; wherein, the second moment is later than the first moment.

[0148] The second moment can be any moment later than the first moment. The third brightness can be any intermediate value between the first brightness and the second brightness. For example, the third brightness can be a value close to the second brightness, or the third brightness can be the midpoint between the first brightness and the second brightness, or a value near the midpoint, etc.

[0149] Users can switch focus areas by touching, tapping, long-pressing, staring for a long time, and / or other actions on the area to be switched. In response to the user's touch, tapping, long-pressing, staring for a long time, and / or other actions on the second area, the focus area switches from the first area to the second area.

[0150] When the focus shifts to the second area, the image brightness of the second area can be adjusted to the third brightness level. This reduces the difference in image brightness between the first and second areas, and reduces the likelihood of the user not being able to see the content in the second area clearly or the content in the second area being too glaring after shifting their gaze, thus improving the user's visual experience.

[0151] In this embodiment, the first brightness can be greater than the second brightness, and the specific implementation of the adjusted brightness can be referred to Figure 4 The S405 specification explains how to adjust brightness from high to low. Alternatively, the first brightness level can be lower than the second brightness level; the specific implementation of the brightness adjustment can be found in [reference needed]. Figure 4 The implementation of the adjustment from low brightness to high brightness in S406 will not be elaborated here.

[0152] S803, at the third moment, adjust the image brightness of the second area to the second brightness. From the second moment to the third moment, the content of the first application in the first area is continuously displayed, and the user's focus is on the second area; wherein, the third moment is later than the second moment.

[0153] The third moment can be any moment later than the second moment. Adjusting the image brightness of the second region to the second brightness can be understood as restoring the image brightness of the second region to its original image brightness.

[0154] Adjusting the image brightness of the second area to the second brightness level restores the original image brightness. This makes the image brightness of the second area match the visual style of the second application, reducing the deviation of the application's visual style from the real image style and thus improving the user experience. For instructions on adjusting the image brightness of the second area to the second brightness level, please refer to [link / reference]. Figure 4 In the relevant embodiments, the descriptions in S405 or S406 will not be repeated.

[0155] Of course, except Figure 4 In addition to the gradual adjustment in the relevant embodiments, the embodiments of this application can also adjust the image brightness of the second region from the third brightness to the second brightness in one adjustment to achieve rapid brightness recovery.

[0156] In this embodiment, when two applications displayed on the same screen have different image brightness, in response to the user switching the focus from one application to another, the image brightness of the application after the focus switch is adjusted to be between the image brightness of the two applications before and after the switch. This reduces the brightness difference between the two applications and alleviates visual discomfort. Then, the image brightness of the application after the switch is restored to its original brightness, maintaining the original screen style. Therefore, by performing an adjustment and restoration operation on the image brightness of the application after the focus switch, it helps to buffer the visual difference caused by different image brightness after the switch, making the visual transition smoother and more natural, thereby improving the user's visual experience.

[0157] Optional, in Figure 8 Based on the corresponding embodiment, between the second time and the third time, the image brightness of the second region is adjusted multiple times. During these multiple adjustments, the image brightness of the second region gradually transitions from the third brightness to the second brightness.

[0158] In this embodiment, when the image brightness of the second region recovers from the third brightness to the second brightness, it can be a smooth transition after multiple adjustments. This allows the user to restore the image brightness of the second application to normal without noticing or with very little perception. Possible specific implementations can be found above. Figure 3 or Figure 4 The relevant descriptions in the corresponding embodiments will not be repeated here.

[0159] Optional, in Figure 8 Based on the corresponding embodiment, the image brightness of the first region at the third time is the fourth brightness. The method further includes: at the fourth time, in response to the user's focus switching from the second region to the first region, adjusting the image brightness of the first region to the fifth brightness, the fifth brightness being between the fourth brightness and the second brightness; at the fifth time, adjusting the image brightness of the first region to the fourth brightness, from the fourth time to the fifth time, the content of the second application in the second region is continuously displayed, and the user's focus is always on the first region; wherein, the fourth time is later than the third time, and the fifth time is later than the fourth time.

[0160] In this embodiment, during the adjustment of the brightness of the second area, the brightness of the first application may change or remain unchanged depending on the needs of the first application itself. Therefore, the fourth brightness and the first brightness may be different or the same. When the user's focus switches from the second area to the first area, the above description can be used as a reference. Figure 3 or Figure 4 The relevant descriptions in the corresponding embodiments are used to adjust the image brightness of the first region to alleviate visual discomfort for the user, and will not be repeated here.

[0161] Optionally, before adjusting the image brightness of the second region to the third brightness, the method further includes: intercepting the rendering instructions of the first application and the second application to obtain the rendering resources of the first region and the second region; obtaining a first value for indicating the image brightness of the first region and a second value for indicating the image brightness of the second region based on the rendering resources of the first region and the second region; adjusting the image brightness of the second region to the third brightness includes: adjusting the image brightness of the second region to the third brightness when the difference between the first value and the second value is greater than a threshold and the user's focus switches from the first region to the second region.

[0162] In this embodiment, the values ​​used by the first and second applications to indicate image brightness can be obtained based on intercepted rendering instructions, and brightness adjustment can be performed when the brightness difference between the first and second applications is large. Possible specific implementations can refer to the above. Figure 3 or Figure 4 The relevant descriptions in the embodiments corresponding to S401, etc., will not be repeated here.

[0163] Of course, in addition to methods such as intercepting rendering commands to obtain the method for indicating the image brightness of the first region and the second region, any method that can obtain the method for indicating the image brightness of the first region and the second region can also be used in the embodiments of this application, without limitation.

[0164] Optionally, intercepting the rendering instructions of the first application and the second application includes: intercepting the rendering instructions of the first application and the second application when it is determined that the first application and the second application are displayed at the same time.

[0165] In this embodiment, when multiple applications are displayed simultaneously, rendering commands are intercepted. Then, when the user switches focus, the brightness can be adjusted promptly based on the intercepted rendering commands, achieving a fast response and reducing delayed adjustments. Possible specific implementations can be found above. Figure 3 or Figure 4 The relevant descriptions in the embodiments corresponding to S401, etc., will not be repeated here.

[0166] Optionally, intercepting rendering instructions from the first application and the second application includes: intercepting rendering instructions from the first application and the second application in response to the user's focus switching from the first area to the second area.

[0167] This allows the interception of rendering commands to execute after the user's focus shifts, reducing the number of intercepted rendering commands and saving computational resources. A possible specific implementation can be found above. Figure 3 or Figure 4 The relevant descriptions in the embodiments corresponding to S401, etc., will not be repeated here.

[0168] Optionally, both the first and second values ​​are calculated using histograms on the image frames in the rendered resource.

[0169] The method for calculating the brightness of an image frame using histograms in this embodiment can be referred to the above for possible specific implementations. Figure 3 or Figure 4 The relevant descriptions in the embodiments corresponding to S402, etc., will not be repeated here.

[0170] Of course, in addition to using histograms to calculate image brightness, the embodiments of this application may also use any method that can be used to indicate the image brightness of the first region and the second region respectively, without limitation.

[0171] Optionally, when intercepting the rendering instructions of the first application and the second application, the rendering state of the first application and the rendering state of the second application are also intercepted; based on the rendering resources of the first region and the rendering resources of the second region, a first value for indicating the image brightness of the first region and a second value for indicating the image brightness of the second region are obtained, including: when it is determined from the rendering state of the first application and the rendering state of the second application that both the first application and the second application are game applications, the first value for indicating the image brightness of the first region and the second value for indicating the image brightness of the second region are obtained based on the rendering resources of the first region and the rendering resources of the second region.

[0172] This allows for image brightness adjustment for gaming applications; specific implementation details can be found above. Figure 3 or Figure 4 The relevant descriptions in the embodiments corresponding to S401, etc., will not be repeated here.

[0173] Optionally, when displaying the first area and the third area, a third area is also displayed, which is used to display the content of a third application. That is to say, the embodiments of this application can also be applied to scenarios where more than two applications are displayed on the same screen; possible specific implementations can be found above. Figure 3 or Figure 4 The relevant descriptions in the corresponding embodiments will not be repeated here.

[0174] In summary, the embodiments of this application are not limited to game applications. They are applicable to various applications supporting multi-window and split-screen modes, and are suitable for scenarios where multiple windows or split-screen displays are displayed simultaneously. Furthermore, the embodiments of this application are not limited to foldable phones, but are also applicable to electronic devices such as candybar phones that support split-screen and / or multi-window functionality. Moreover, the embodiments of this application are not limited to two applications in split-screen mode; they can be used for multiple applications, multiple small windows, and multiple split-screen scenarios. The core idea of ​​these embodiments is to optimize the user experience when switching between applications with user focus, addressing issues such as unclear visibility, glare, or other discomfort caused by significant differences in image brightness.

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

[0176] The foregoing primarily describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the aforementioned functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the method steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0177] This application embodiment can divide the apparatus for implementing the method into functional modules based on the above method examples. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0178] Figure 9 This is a schematic diagram of the structure of a chip provided in an embodiment of this application, such as... Figure 9 As shown, chip 900 includes one or more processors 901, communication lines 902, communication interfaces 903, and memory 904.

[0179] In some implementations, memory 904 stores elements such as executable modules or data structures, or subsets thereof, or extended sets thereof.

[0180] The methods described in the embodiments of this application can be applied to, or implemented by, processor 901. Processor 901 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above methods can be completed by integrated logic circuits in the hardware of processor 901 or by instructions in software form. Processor 901 may be a general-purpose processor (e.g., a microprocessor or conventional processor), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates, transistor logic devices, or discrete hardware components. Processor 901 can implement or execute the various processing-related methods, steps, and logic block diagrams disclosed in the embodiments of this application.

[0181] The steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can be located in mature storage media in the art, such as random access memory, read-only memory, programmable read-only memory, or electrically erasable programmable read-only memory (EEPROM). This storage medium is located in memory 904, and processor 901 reads the information in memory 904 and, in conjunction with its hardware, completes the steps of the above method.

[0182] The processor 901, memory 904 and communication interface 903 can communicate with each other via communication line 902.

[0183] In the above embodiments, the instructions stored in the memory for the processor to execute can be implemented in the form of a computer program product. This computer program product can be pre-written into the memory, or it can be downloaded and installed into the memory as software.

[0184] This application also provides a computer program product comprising one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions may be transmitted from a website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. For example, available media may include magnetic media (e.g., floppy disk, hard disk, or magnetic tape), optical media (e.g., digital versatile disc (DVD)), or semiconductor media (e.g., solid-state disk (SSD)).

[0185] This application also provides a computer-readable storage medium. The methods described in the above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. The computer-readable medium may include computer storage media and communication media, and may also include any medium capable of transferring a computer program from one place to another. The storage medium can be any target medium accessible by a computer.

[0186] As one possible design, computer-readable media may include compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM, or other optical disc storage; computer-readable media may also include disk storage or other disk storage devices. Furthermore, any connecting cable may also be appropriately referred to as computer-readable media. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of media. As used herein, disks and optical discs include optical discs (CD), laser discs, optical discs, digital versatile discs (DVD), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers.

[0187] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of 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 processing unit 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 processing unit 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.

Claims

1. A brightness adjustment method, characterized in that, The method includes: At the first moment, a first area and a second area are displayed. The first area is used to display the content of a first application, and the second area is used to display the content of a second application. The image brightness of the first area is a first brightness, and the image brightness of the second area is a second brightness. The first brightness and the second brightness are different, and the user's focus at the first moment is on the first area. At the second moment, in response to the user's focus switching from the first area to the second area, the image brightness of the second area is adjusted to a third brightness, which is located between the first brightness and the second brightness. At the third moment, the image brightness of the second area is adjusted to the second brightness. From the second moment to the third moment, the content of the first application in the first area is continuously displayed, and the user's focus is on the second area. Wherein, the second time is later than the first time, and the third time is later than the second time.

2. The method according to claim 1, characterized in that, Between the second time point and the third time point, the image brightness of the second region is adjusted multiple times, and during these multiple adjustments, the image brightness of the second region gradually transitions from the third brightness to the second brightness.

3. The method according to claim 1 or 2, characterized in that, The image brightness of the first region at the third time moment is the fourth brightness, and the method further includes: At the fourth moment, in response to the user's focus switching from the second area to the first area, the image brightness of the first area is adjusted to a fifth brightness, which is located between the fourth brightness and the second brightness; At the fifth moment, the image brightness of the first area is adjusted to the fourth brightness. From the fourth moment to the fifth moment, the content of the second application in the second area is continuously displayed, and the user's focus is on the first area. The fourth time point is later than the third time point, and the fifth time point is later than the fourth time point.

4. The method according to any one of claims 1-3, characterized in that, Before adjusting the image brightness of the second region to the third brightness, the method further includes: Intercept the rendering instructions of the first application and the second application to obtain the rendering resources of the first region and the rendering resources of the second region; Based on the rendering resources of the first region and the rendering resources of the second region, a first value for indicating the image brightness of the first region and a second value for indicating the image brightness of the second region are obtained. Adjusting the image brightness of the second region to a third brightness includes: If the difference between the first value and the second value is greater than a threshold, and the user's focus switches from the first region to the second region, the image brightness of the second region is adjusted to the third brightness.

5. The method according to claim 4, characterized in that, The interception of rendering instructions from the first application and the second application includes: If it is determined that the first application and the second application are displayed simultaneously, the rendering instructions of the first application and the rendering instructions of the second application are intercepted.

6. The method according to claim 4, characterized in that, The interception of rendering instructions from the first application and the second application includes: In response to the user's focus switching from the first area to the second area, the rendering instructions of the first application and the rendering instructions of the second application are intercepted.

7. The method according to any one of claims 4-6, characterized in that, Both the first value and the second value are calculated using histograms on the image frames in the rendering resource.

8. The method according to any one of claims 4-7, characterized in that, When intercepting the rendering instructions of the first application and the second application, the rendering state of the first application and the rendering state of the second application are also intercepted. The step of obtaining a first value indicating the image brightness of the first region and a second value indicating the image brightness of the second region based on the rendering resources of the first region and the rendering resources of the second region includes: If, based on the rendering states of the first application and the second application, it is determined that both the first application and the second application are game applications, then, based on the rendering resources of the first region and the rendering resources of the second region, a first value for indicating the image brightness of the first region and a second value for indicating the image brightness of the second region are obtained.

9. The method according to any one of claims 1-8, characterized in that, When the first area and the first area are displayed, a third area is also displayed, which is used to display the content of a third application.

10. An electronic device, characterized in that, include: A memory and a processor, the memory for storing a computer program and the processor for executing the computer program to perform the method as claimed in any one of claims 1-9.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed, cause a computer to perform the method as described in any one of claims 1-9.

12. A computer program product, characterized in that, Includes a computer program that, when run, causes an electronic device to perform the method as described in any one of claims 1-9.