Content display method and terminal
By using brightness reduction processing to reduce the brightness of non-highlighted areas in the application page, the problems of complex masking and increased power consumption in the existing technology are solved, and the effects of simplified display and energy saving are achieved.
Patent Information
- Application Number
- CN202410224835.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-28
- Publication Date
- 2025-09-05
AI Technical Summary
The existing technology uses a complex method of adding a mask to highlight content in an application page, which increases the graphics card load and power consumption.
Brightening is used to reduce the brightness in non-highlighted areas and highlight the highlighted areas by reducing the pixel color value, instead of using a mask to cover and reduce the mask rendering steps.
This simplifies the display process of salient content, reduces power consumption, and reduces the load on the graphics card.
Smart Images

Figure CN120595973A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminals and image processing technology, and in particular to a content display method and a terminal. Background Art
[0002] When the terminal displays an application page, if there is content in the application page that is desired to be highlighted (referred to as highlighted content), a mask (or called a mask) can be set in the non-highlighted area of the application page to reduce the visibility of the non-highlighted area of the application page and highlight the highlighted content in the highlighted area of the application page.
[0003] However, adding a mask to highlight the content of an application page is relatively complex, requiring operations such as rendering the mask to display the highlighted content. This complex method may increase the load on the graphics card and thus increase power consumption.
[0004] It is worth discussing how to simplify the way to highlight content on application pages. Summary of the Invention
[0005] This application provides a content display method and terminal that can use brightness reduction processing to reduce the brightness of non-highlighted areas of an application page that do not require attention, thereby highlighting the content in the highlighted areas of the application page. Brightening reduction processing means that instead of using a mask to cover the non-highlighted areas to achieve the brightness reduction effect, the color values (e.g., RGB values) of the pixels in the non-highlighted areas are lowered instead of covering them with a mask to achieve the brightness reduction effect.
[0006] In a first aspect, the present application provides a content display method, the method comprising: in the case of displaying a first page, in response to a first operation of displaying the first content of the first application; the terminal controls the brightness of the non-highlighted area of the second page to be lower than the brightness of the highlighted area of the second page through brightness reduction processing; the highlighted area includes the first content, and the non-highlighted area includes the content provided by the first application in the first page and not covered by the highlighted area; the terminal displays the second page.
[0007] In the above embodiment, the first application may be business application 1 in the following content, the first content may be highlighted content in the following content, and the second page may also be business application 2 in the following content.
[0008] When the terminal displays application page 1, in response to an operation to display highlighted content in business application 1, the terminal displays the highlighted content in application page 1 to obtain application page 2. At the same time, the non-highlighted areas in application page 2 are brightened so that the brightness of the non-highlighted areas is lower than that of the highlighted areas, thereby highlighting the highlighted content in the highlighted areas. This eliminates the need to use a mask to brighten the non-highlighted areas, and instead brightens the non-highlighted areas, reducing power consumption when rendering the mask.
[0009] In combination with the first aspect, in some embodiments, the brightening process includes: multiplying the color value of the pixel in the area corresponding to the non-highlighted area in the first page by a first coefficient to obtain the non-highlighted area; the first coefficient is a positive number less than 1.
[0010] In the above embodiment, the first coefficient may be the brightness reduction coefficient 1 involved in the following embodiment.
[0011] In combination with the first aspect, in some embodiments, after the terminal displays the second page, the method also includes: the terminal refreshes the non-prominent area N times, and the i-th refresh among the N times includes: multiplying the color value of the pixel in the area corresponding to the non-prominent area in the first page by a second coefficient to obtain the i-th refresh of the non-prominent area; the second coefficient used in the i-th refresh is greater than the second coefficient used in the i+1-th refresh; the second coefficient is less than the first coefficient, and N is an integer greater than or equal to 1.
[0012] In the above embodiment, the second coefficient may be the rated brightness reduction coefficient 2 involved in the following embodiment.
[0013] Implementing the above N times of refreshing can gradually reduce the brightness of the non-prominent area, so that the user can adapt to the brightness change of the non-prominent area without causing the problem of sudden dimming.
[0014] In combination with the first aspect, in some embodiments, when the content in the first page is all provided by the first application, before the brightening process, the method also includes: the terminal uses the first page as the background layer, and obtains a highlighted layer for displaying the first content; the terminal marks the background layer as a non-highlighted layer that needs to be brightened; after the brightening process, the method also includes: the terminal synthesizes the brightened background layer and the highlighted layer to obtain the second page; the area in the first page corresponding to the non-highlighted area is: the area in the background layer that does not overlap with the highlighted layer.
[0015] In combination with the first aspect, in some embodiments, the brightening processing specifically includes: the terminal multiplies the color value of the first pixel in the background layer by the first coefficient to obtain the brightened background layer, and the first pixel is: the pixel in the area corresponding to the non-highlighted area in the first page.
[0016] In the above embodiment, the first pixel may be the pixel 1 involved in the following embodiment.
[0017] In combination with the first aspect, in some embodiments, when the content in the first page is provided by the first application and the second application, before the brightening process, the method also includes: the terminal obtains at least one background layer when displaying the first page, and obtains a highlighted layer displaying the first content; the at least one background layer includes a first background layer belonging to the first application and a second background layer belonging to the second application; based on the first operation acting on the first application, the terminal marks the first background layer as a non-highlighted layer that needs to be brightened; after the brightening process, the method also includes: the terminal synthesizes the brightened first background layer, the second background layer and the highlighted layer to obtain the second page; the area in the first page corresponding to the non-highlighted area is: the area in the first background layer that does not overlap with the highlighted layer and the second background layer.
[0018] In the above embodiment, the first background layer may be the background layer (background layer 1) of the business application 1 involved in the following embodiment, and the second background layer may be the background layer (background layer 2) of the business application 2 involved in the following embodiment.
[0019] In combination with the first aspect, in some embodiments, it specifically includes: the terminal multiplies the color value of the second pixel in the first background layer by the first coefficient to obtain the brightened first background layer, and the second pixel includes: the pixel in the area corresponding to the non-highlighted area in the first page.
[0020] In the above embodiment, the first pixel may be the pixel 2 involved in the following embodiment.
[0021] In combination with the first aspect, in some embodiments, in response to a first operation of displaying the first content of the first application, before the terminal displays the second page, the method also includes: the terminal generates a first instruction through the first application, the first instruction being used to instruct the terminal to cover the non-highlighted area with a mask when displaying the first content, and the first instruction also carries a mask transparency value; the second page does not include the mask.
[0022] In the above embodiment, the first instruction may be an instruction for displaying highlighted content involved in the following embodiment.
[0023] When using a brightening process instead of a mask to brighten the non-highlighted area, no business application adaptation is required. Business application 1 (the first application) generates the same instructions as in the masking solution. The terminal performs the brightening process based on the instructions for displaying the highlighted content.
[0024] In combination with the first aspect, in some embodiments, the first coefficient and the second coefficient are determined based on the screen brightness value, the mask transparency value, and N when the first page is displayed.
[0025] In conjunction with the first aspect, in some embodiments, the first coefficient and the second coefficient are determined based on the screen brightness value when the first page is displayed, the mask transparency value, and N, specifically including:
[0026] The first coefficient is equal to the median value of the first coefficient plus X multiplied by the preset step value, and the median value of the first coefficient is determined by the correspondence between the screen brightness value and the mask transparency value and the median value of the coefficient; when N is an odd number, X is equal to [(N-1) / 2]+1, and when N is an even number, X is equal to N / 2. The second coefficient used in the i-th refresh in the N-th time is equal to the first coefficient plus i multiplied by the preset step value.
[0027] In the above embodiment, the first coefficient median value is the brightness reduction coefficient median value described below.
[0028] In a second aspect, an embodiment of the present application provides a terminal comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code comprising computer instructions, the one or more processors calling the computer instructions to enable the terminal to execute the method implemented in the first aspect.
[0029] In a third aspect, an embodiment of the present application provides a computer-readable storage medium comprising instructions, which, when executed on a terminal, causes the terminal to execute the method implemented in the first aspect.
[0030] In a fourth aspect, an embodiment of the present application provides a chip system, which is applied to a terminal. The chip system includes one or more processors, which are used to call computer instructions to enable the terminal to execute the method implemented in the first aspect.
[0031] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a terminal, enables the terminal to execute the method implemented in the first aspect.
[0032] It is understandable that the terminal provided in the second aspect, the computer storage medium provided in the third aspect, the chip system provided in the fourth aspect, and the computer program product provided in the fifth aspect are all used to execute the methods provided in the embodiments of the present application. Therefore, other beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1A A schematic diagram showing highlighting content in an application page through a mask is shown;
[0034] Figure 1B An example of layers involved in the synthesis of application page 2 is shown;
[0035] Figure 2 The exemplary software modules involved in highlighting the prominent content in the application page through the mask are shown;
[0036] Figure 3 A schematic diagram showing the comparison of the effects of adding a mask and performing a brightening process on highlighting content is shown;
[0037] Figure 4 A schematic diagram showing a composite application page 2 when all the contents in the application page 1 are provided by the business application 1 is shown;
[0038] Figure 5 A schematic diagram showing a composite application page 2 when the contents of application page 1 are provided by both business application 1 and business application 2;
[0039] Figure 6 The exemplary software modules involved in highlighting the prominent content in the application page by highlighting are shown;
[0040] Figure 7 A schematic diagram comparing modules for adding a mask and performing a brightening process to display highlighted content is shown;
[0041] Figure 8 An exemplary module interaction diagram is shown for highlighting prominent content in an application page by highlighting the content;
[0042] Figure 9 An exemplary correspondence between screen brightness value and mask transparency value and coefficient median value is shown;
[0043] Figure 10 It is a schematic diagram of the structure of the terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] In one content display method (method 1), a terminal can set a mask (also known as a mask layer) in the non-highlighted area of an application page to reduce the visibility of the non-highlighted area of the application page. The highlighted area containing the highlighted content is not masked, making its brightness greater than the non-highlighted area with the mask, thereby achieving the purpose of highlighting the highlighted content of the application page.
[0045] like Figure 1AAs shown in (1), when the terminal displays application page 1, the application page 1 includes a new control 1011 provided by business application 1. The new control 1011 is used to trigger the highlighting of the content corresponding to the new control 1011 (a type of highlighted content). In response to the operation on the new control 1011, the terminal displays application page 2, and displays a pop-up window corresponding to the new control 1011 in the highlighted area 102 of the application page 2. At the same time, a mask is added to the non-highlighted area 101 of the application page 2 to reduce the brightness of the non-highlighted area, and the brightness of the non-highlighted area 101 is controlled to be lower than that of the highlighted area 102.
[0046] The operation of creating a new control 1011 provided by business application 1 can be considered an operation for displaying highlighted content in business application 1. The operation for displaying highlighted content in business application 1 is not limited to an operation on a control, but can also be a voice control command, etc. The embodiment of the present application does not limit the type of operation for displaying highlighted content.
[0047] refer to Figure 1B , shows an example of the layers involved in the synthesis of application page 2. The layers of the synthesis of application page 2 include three layers. They are the background layer: com.X1.X2 / com.X1.X2.app.ui.activity.MainActivity#1711, the mask layer: Dim Layer for-Task=23#1727, and the highlight layer: com.X1.X2 / com.X1.X2.app.-
[0048] -ui.activity.MainActivity#1725. X1 represents the name of business application 1. Here, Figure 1B The following is an example in which the background layer is provided only by business application 1.
[0049] The following describes exemplary software modules involved when the terminal highlights the highlighted content in the application page 2 through the mask.
[0050] like Figure 2As shown in (1), when the application page 1 is displayed on the screen, the business application 1 in the application layer detects the operation of displaying the highlighted content in the business application 1. In response to the operation, the business application 1 generates an instruction to display the highlighted content. The instruction includes information about the highlight layer and information about the mask layer. The highlight layer is used to display the highlighted content. The information about the highlight layer includes information such as the size of the highlight layer and the content that can be displayed therein. The information about the mask layer includes information such as the mask layer flag and the mask layer transparency value. Here, the highlight layer is used as a pop-up window for explanation. The mask layer transparency value determines the transparency of the mask layer. The larger the mask layer transparency value, the more transparent the mask layer is, and the smaller the degree of reduction in the brightness of the covered content. The smaller the mask layer transparency value, the lower the degree of transparency of the mask layer is, and the larger the degree of reduction in the brightness of the covered content is.
[0051] like Figure 2 As shown in (2), after receiving the instruction, the window state manager in the window management service (in the application framework layer) calls the mask manager in the mask management service to create the mask corresponding to the pop-up window and the mask properties (including the mask transparency value).
[0052] like Figure 2 As shown in (3), the mask creation module binds the pop-up window to the mask layer to determine the positional relationship (also known as the hierarchical relationship) between the pop-up window and the mask layer. The binding result is sent to the layer manager. The binding result also carries the pop-up window information and the mask layer information. The binding result is to bind the pop-up window to the upper layer of the mask layer and the pop-up window to the top layer.
[0053] like Figure 2 As shown in (4), the layer manager obtains the background layer information when generating application page 1. Based on the background layer information and the pop-up window and mask information in the binding result, the positional relationship between the background layer, pop-up window, and mask is determined. The positional relationship of the layers is then sent to the layer composition service.
[0054] like Figure 2 As shown in (5), the layer composition service sends the positional relationship of each layer to the layer composition manager. Subsequently, the layer composition manager obtains layer parameters. Here, the layer parameters include the specific components included in each layer (background layer, pop-up window, mask layer), the positional relationship of each layer (from the layer composition service), and other parameters. The parameters are then passed to the hardware drawing interface to draw the application page 2 through the hardware, or passed to the software drawing interface (such as the layer drawing engine) to draw the application page 2 through the software.
[0055] It should be noted that when drawing the application page 2, whether to use hardware drawing or software drawing can be determined based on preset rules. For example, when the number of background layers, mask layers, and pop-up windows is greater than a preset number of layers (for example, 8 layers), software drawing is used. When the number of layers is less than or equal to 8, hardware drawing is used. Among them, 8 layers is only an example, and the specific method should be determined based on the processing capability of the terminal and should not constitute a limitation on the embodiments of the present application.
[0056] Among them, software drawing see Figure 2 As shown in (6a), the layer composition manager passes the layer parameters to the layer drawing engine, and the layer drawing engine calls the image cache and the software layer compositor 1 to merge the layers based on the position relationship to obtain the application page 2.
[0057] Hardware drawing see Figure 2 As shown in (6b), the layer composition manager passes the layer parameters to the hardware drawing interface. The hardware drawing interface calls the hardware layer compositor 1 to merge the layers based on the position relationship to obtain the application page 2.
[0058] It should be noted that the background layer when generating application page 1 includes at least background layer 1 of business application 1, or in addition to background layer 1, it can also include background layer 2 of business application 2, and the background layer 2 can be displayed in the form of a floating window on the background layer 1. Generally speaking, the content in background layer 2 will not be added with a mask in application page 2, because the application that needs to display the mask is business application 1, which should not interfere with the display of background layer 2 in application page 2. The mask will only be added to the non-highlighted area in application page 2. The non-highlighted area in application page 2 includes the content provided by business application 1 in application page 1 and not covered by the highlighted area.
[0059] It should also be noted that the non-highlighted area in application page 2 can also be understood as the other areas in application page 2 except the highlighted area. When the background layer when generating application page 1 only includes background layer 1 of business application 1, the highlighted area in application page 2 is used to display the content in the highlighted layer, that is, the highlighted area only includes the highlighted content. When the background layer when generating application page 1 includes background layer 1 of business application 1 and the background layer of business application 2, the highlighted area in application page 2 is used to display the content in both the highlighted layer and background layer 2, that is, the highlighted area includes the highlighted content and the content in background layer 2.
[0060] When the background layer, mask layer, and highlight layer are synthesized based on their positional relationships to obtain application page 2, the method of adding the mask layer to highlight the highlighted content in the application page is relatively complex, requiring operations such as rendering the mask layer to obtain the application page including the highlighted content. This complex method may increase the load on the graphics card and, in turn, increase power consumption.
[0061] An embodiment of the present application provides another content display method (Method 2). In this method, when a terminal displays application page 1, in response to an operation to display highlighted content in business application 1, the terminal displays the highlighted content in application page 1 to obtain application page 2, and controls the brightness of the non-highlighted area in application page 2 to be lower than the brightness of the highlighted area through brightness reduction processing, thereby highlighting the highlighted content in the highlighted area. Application page 2 includes a highlighted area and a non-highlighted area. The highlighted area includes the highlighted content, and the non-highlighted area includes content provided by business application 1 in application page 1 and not covered by the highlighted area.
[0062] Among them, performing the brightening process includes: not using a mask to cover the non-prominent area to achieve the brightening effect, but lowering the color value (such as RGB value) of the pixel in the non-prominent area instead of covering the mask to achieve the brightening effect. Lowering the color value of the pixel in the non-prominent area includes: multiplying the color value of the pixel in the area corresponding to the non-prominent area in the application page 1 by the brightening coefficient 1 to obtain the color value of the pixel in the non-prominent area. The area corresponding to the non-prominent area in the application page 1 has the same display position on the screen as the non-prominent area. The brightening coefficient 1 is a positive number less than 1. It can be a value preset in the terminal, or it can be determined based on factors such as screen brightness. Regarding the determination of the brightening coefficient 1, please refer to the following description of step S106b, which will not be repeated here.
[0063] Alternatively, the brightening process includes: not using a mask to cover the non-prominent area to achieve the brightening effect, but lowering the grayscale value of the pixel unit displaying the non-prominent area on the screen.
[0064] refer to Figure 3 In method 1, the terminal can add a mask layer to background layer 1 to obtain a masked background layer 1, and then combine the masked background layer 1 with the highlight layer, or other layers, to obtain application page 2. However, method 2 does not use a mask layer. Instead, background layer 1 is brightened to obtain a brightened background layer 1, and then the brightened background layer 1 is combined with the highlight layer, or other layers, to obtain application page 2.
[0065] It should be noted that Figure 3 In Method 2, all pixels in Background Layer 1 are brightened for comparison with Method 1. In some cases, the terminal may not brighten the entire area of Background Layer 1, but may instead brighten only the area of Background Layer 1 corresponding to the non-highlighted area (a localized brightening process). The area of Background Layer 1 corresponding to the non-highlighted area is the same area of Application Page 1 described above that corresponds to the non-highlighted area.
[0066] It should also be noted that Figure 3The other layers shown do not necessarily exist. For example, if the terminal is only running business application 1 in the foreground, no other layers exist. In this case, application page 1 only includes the content provided by business application 1. Background layer 1 is the background layer involved in generating application page 1. If the terminal is running business application 1 and business application 2 in the foreground, other layers exist, and these other layers are background layer 2 provided by the aforementioned business application 2. In this case, background layer 1 is the background layer provided by business application 1.
[0067] In some possible cases, to help users adapt to the reduced brightness of non-prominent areas, the brightness of the non-prominent areas in the first frame of Application Page 2 will not be reduced significantly. After Application Page 2 is displayed, the non-prominent areas in Application Page 2 are refreshed N times to gradually darken to achieve the final reduced brightness effect. N is an integer greater than or equal to 1. Typically, N is 30 times, but is not limited to 30 times. It can also be 50 times or 20 times, etc. This embodiment of the application is not limited to this.
[0068] Among them, performing N refreshes includes: after displaying application page 2, the terminal refreshes the non-prominent area N times, and the i-th refresh among the N times includes: multiplying the color value of the pixel in the area corresponding to the non-prominent area in application page 1 by the brightening coefficient 2 to obtain the color value of the pixel in the non-prominent area after the i-th refresh. The brightening coefficient 2 used in the i-th refresh is greater than the brightening coefficient 2 used in the (i+1)-th refresh. The brightening coefficient 2 is less than the brightening coefficient 1 mentioned above. Here, the brightening coefficient 1 can be regarded as the coefficient used to lower the color value of the pixel in the non-prominent area in the first frame application page 2.
[0069] It should be noted here that, in order to save power consumption, in some possible cases, the terminal does not refresh the highlighted area when refreshing the non-highlighted area, that is, the brightness of the screen pixel units displaying the highlighted area remains unchanged.
[0070] Before displaying application page 2, the terminal needs to synthesize application page 2. Figure 4 and Figure 5 Describe the relevant content of the synthesis application page 2 in detail.
[0071] in, Figure 4 It shows a schematic diagram of synthesizing application page 2 when the contents of application page 1 are all provided by business application 1. Figure 5 It shows a schematic diagram of synthesizing application page 2 when the contents of application page 1 are provided by both business application 1 and business application 2.
[0072] refer to Figure 4, when the contents in application page 1 are all provided by business application 1, the background layer generated for application page 1 only includes background layer 1 of business application 1. At this time, the process of synthesizing application page 2 includes: the terminal uses application page 1 as the background layer (generating the background layer of application page 1), and obtains a highlight layer for displaying the highlighted content. The background layer is marked as a non-highlighted layer that needs to be brightened, and the brightened background layer and the highlight layer are synthesized to obtain application page 2. The non-highlighted area in application page 2 (for example, area 301) is determined, and the area corresponding to the non-highlighted area in application page 1 (for example, area 301a) is determined as: the area in the background layer that does not overlap with the highlight layer. The highlight area is the area in application page 2 other than area 301. The content in the highlight area is the content in the highlight layer.
[0073] Obtaining the brightened background layer includes: the terminal multiplying the color value of pixel 1 in the background layer by a brightening factor 1 to obtain the brightened background layer. Pixel 1 is a pixel in an area of application page 1 corresponding to the non-highlighted area. Alternatively, it can be understood that by brightening the pixels in an area of application page 1 corresponding to the non-highlighted area (e.g., area 301a), the brightened non-highlighted area (e.g., area 301) can be obtained.
[0074] Or, as Figure 3 As shown, obtaining the brightened background layer includes: the terminal multiplies the color values of all pixels in the background layer by a brightening coefficient of 1 to obtain the brightened background layer.
[0075] It should be noted that, in some possible ways, the terminal can determine that the contents in application page 1 are all provided by business application 1 by judging that the only application running in the foreground is business application 1.
[0076] refer to Figure 5If the content of application page 1 is provided by both business application 1 and business application 2, the background layer generated for application page 1 only includes background layer 1 of business application 1 and background layer 2 of business application 2. In this case, the process of synthesizing application page 2 includes: the terminal obtains at least one background layer when displaying application page 1, and obtains a highlight layer for displaying highlighted content. The at least one background layer includes background layer 1 and background layer 2. The terminal then marks background layer 1 as a non-highlighted layer that requires brightening. The terminal brightens background layer 1 to obtain a brightened background layer 1. The terminal then synthesizes the brightened background layer 1, background layer 2, and highlight layer to obtain application page 2. The terminal also determines a non-highlighted area (area 401 and area 402) in application page 2, and determines that the area corresponding to the non-highlighted area in application page 1 (for example, area 401a and area 402a) is the area in background layer 1 that does not overlap with either the highlight layer or background layer 2. Here, the highlight area includes the area of application page 2 excluding the non-highlighted area. The content in the highlight area is the content in background layer 2 and the highlight layer.
[0077] Obtaining the brightened background layer 1 includes: the terminal multiplying the color value of pixel 2 in the background layer by a brightening coefficient 1 to obtain the brightened background layer. Pixel 2 is a pixel in an area corresponding to the non-highlighted area of application page 1. It can also be understood that by brightening the pixels in the areas corresponding to the non-highlighted area of application page 1 (e.g., area 401a and area 402a), the brightened non-highlighted area can be obtained (area 401a is brightened to obtain area 401, and area 402a is brightened to obtain area 402).
[0078] Alternatively, obtaining the brightened background layer 1 includes: the terminal multiplies the color values of all pixels in the background layer 1 by a brightening coefficient 1 to obtain the brightened background layer.
[0079] It should be noted that in some possible ways, the terminal can determine that the content in application page 1 is provided jointly by business application 1 and business application 2 by judging that the applications running in the foreground include business application 1 and business application 2.
[0080] It should be noted that the purpose of synthesizing application page 2 and determining the non-highlighted area in application page 2 and the area corresponding to the non-highlighted area in application page 1 is to subsequently refresh the non-highlighted area and gradually adjust the brightness of the non-highlighted area.
[0081] Based on the above content, it can be seen that when displaying highlighted content in the highlighted area of application page 2, the step of using a mask to reduce the brightness of the non-highlighted area is cancelled. Instead, the non-highlighted area is brightened, reducing the power consumption generated when rendering the mask.
[0082] The following describes exemplary software modules involved when the terminal highlights the highlighted content in the application page 2 through the highlighting process.
[0083] refer to Figure 6 The layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other via software interfaces. In some embodiments, the system is divided into four layers: application layer, application framework layer, system layer (also known as system library), hardware abstraction layer, and kernel layer.
[0084] The application layer and application framework layer run in a virtual machine. The virtual machine executes the application layer and application framework layer programming files (for example, Java files) as binary files. The virtual machine performs functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0085] Among them, the application layer can include a series of application packages.
[0086] For example, the aforementioned business applications 1 and 2 are application packages in the application layer. Specific business applications 1 and 2 may include system applications (also referred to as applications) such as gallery, map, and short message. They may also include some third-party applications. This embodiment of the present application is not limited to this.
[0087] The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0088] like Figure 6 As shown, the application framework layer may include a window management service, a brightness reduction management module, a brightness decision module, and the like.
[0089] The window management service can be used to manage window programs. The window management service includes the window state manager and the layer manager.
[0090] Among them, the window state manager is used for business application management (including displaying or closing) of windows (also known as pop-up windows). The aforementioned highlighted area including highlighted content can be regarded as a window displayed by business application 1. After receiving the operation of displaying highlighted content, business application 1 can realize the display of the window (including the pop-up window of highlighted content) through the window state manager. For example, see Figure 6At (1), when application page 1 is displayed on the screen, business application 1 detects an operation to display highlighted content in business application 1. In response to this operation, compared to the aforementioned method 1, in method 2, business application 1 also generates an instruction to display the highlighted content. The instruction includes information about the highlighted layer and the mask layer. For details about the instructions to display the highlighted content, please refer to the aforementioned related description and will not be repeated here.
[0091] The mask information included in the instruction to display the highlighted content indicates that the non-highlighted areas need to be brightened when displaying the highlighted content. However, in method 2, the window management service does not use the aforementioned mask management service to create a mask to brighten the non-highlighted areas. Instead, the brightness management module and the brightness decision module perform brightness processing on the non-highlighted areas to achieve this.
[0092] See Figure 6 At (2), the brightness reduction management module is used to obtain the brightness reduction coefficients involved in the brightness reduction (such as the brightness reduction coefficient 1 and brightness reduction coefficient 2 mentioned above) and the objects to which the brightness reduction coefficients act through the brightness reduction service after being called by the window state manager.
[0093] For the process of obtaining the brightness reduction coefficient of the brightness reduction service, please refer to Figure 6 At (2a), the highlight reduction service calls the non-highlight layer screening module to filter out the background layer belonging to business application 1 from at least one background layer (belonging to business application 1 or to business application 1 and business application 2). The non-highlight layer screening module then notifies the layer manager via the highlight reduction instruction issuing module to mark the background layer belonging to business application 1 as a non-highlight layer for highlight reduction.
[0094] For the process of obtaining the brightness reduction coefficient of the brightness reduction service, please refer to Figure 6 At (2b): The brightening service calls the local brightness controller to determine the median value of the brightening coefficient. Then the local brightness controller determines the M (equal to 1+N) frame brightening coefficients based on the median value of the brightening coefficients through the animation controller. The M frame brightening coefficients include the aforementioned brightening coefficient 1 and the N frame brightening coefficient 2. The median value of the brightening coefficient is the median of the M frame brightening coefficients. The brightening coefficient is determined based on the mask transparency value (carried in the instruction to display the highlighted content). For the detailed process of obtaining the median value of the brightening coefficient, please refer to the description of step S105b below. For the relevant content of determining the M frame brightening coefficient, please refer to the description of step S106b below, which will not be repeated here. Subsequently, the display state manager can send the M frame brightening coefficients to the layer manager.
[0095] like Figure 6In (3): After receiving the notification that the background layer belonging to business application 1 is marked as a non-highlighted layer for brightening processing and the M-frame brightening coefficient, the layer manager determines the positional relationship between the background layer and the highlight layer based on the information of the background layer and the highlight layer, and sends the positional relationship, the M-frame brightening coefficient, and the object of the brightening coefficient (the background layer of business application 1) to the layer synthesis service of the system layer.
[0096] In addition to the layer composition service, the system layer can also include multiple other functional modules, such as the layer composition manager and the layer drawing engine.
[0097] like Figure 6 As shown in (4), the layer synthesis service sends the positional relationship of each layer, the M-frame brightening coefficient, and the object of the brightening coefficient to the layer synthesis manager. Subsequently, the layer synthesis manager obtains the layer parameters. Here, the layer parameters include the specific components included in each layer (background layer and highlight layer), the positional relationship of each layer, the M-frame brightening coefficient, and the object of the brightening coefficient (from the layer synthesis service). And pass the parameters to the hardware drawing interface through the hardware drawing application page 2, or pass the parameters to the software drawing interface (such as the layer drawing engine) through the software drawing application page 2. Whether to perform software drawing or hardware drawing here can refer to the description of the relevant content above, which will not be repeated here.
[0098] Among them, software drawing see Figure 6 As shown in (5a), the layer composition manager passes the layer parameters to the layer drawing engine. The layer drawing engine calls the image cache and the software layer compositor 2 to composite the background layer 2, the highlight layer, and the brightened background layer 1 based on the positional relationship, thereby obtaining the application page 2 and determining the non-highlighted area in the application page 2. The purpose of determining the non-highlighted area is to subsequently refresh the non-highlighted area. A detailed description of this process can be found in step S210 below and will not be repeated here.
[0099] Hardware drawing see Figure 6 As shown in (5b), the layer composition manager passes the layer parameters to the hardware drawing interface. The hardware drawing interface calls the hardware layer compositor 2 to composite the background layer 2, the highlight layer, and the brightened background layer 1 based on their positional relationships, obtaining the application page 2 and determining the non-highlighted area within the application page 2. The purpose of determining the non-highlighted area is to subsequently refresh the non-highlighted area. A detailed description of this process can be found in step S111 below and will not be repeated here.
[0100] It should be noted that, compared to the aforementioned method 1, when the method 2 uses a brightening process instead of a mask to brighten the non-highlighted area, no business application adaptation is required. Figure 7After detecting an operation to display the highlighted content, business application 1 in both methods 1 and 2 sends a command to the window management service to display the highlighted content. The command to display the highlighted content in both methods 1 and 2 is the same. For example, the command to display the highlighted content in both methods 1 and 2 includes information about the mask layer (including the mask layer's transparency value).
[0101] Continue to refer Figure 7 Although the business application side indicates through instructions that a mask layer needs to be added when displaying highlighted content, unlike method 1, method 2 does not generate a mask layer. Instead, a brightness reduction management module and a brightness decision module are used instead of the mask layer management service to obtain the brightness reduction coefficient and the object of the brightness reduction coefficient (the background layer of business application 1). Then, through layer management, the positional relationship between the background layer and the highlighted layer, the brightness reduction coefficient, and the brightness reduction coefficient applied to background layer 1 are sent to the page synthesis module to synthesize application page 2 and refresh the non-highlighted area of application page 2. The page synthesis module in method 2 includes the aforementioned layer synthesis service, layer synthesis manager, hardware layer synthesizer 1, and software layer synthesizer 1, and other modules involved in the synthesis of application page 2. In contrast, the page synthesis module in method 1 synthesizes application page 2 based on the positional relationship between the mask layer, background layer, and highlighted layer. Here, the page synthesis module includes the aforementioned layer synthesis service, layer synthesis manager, hardware layer synthesizer 2, and software layer synthesizer 2, and other modules involved in the synthesis of application page 2.
[0102] Figure 8 An exemplary module interaction diagram is shown when highlighting prominent content in an application page through highlighting processing.
[0103] Figure 8 The modules involved include the aforementioned Figure 6 Business applications 1, window management service, brightness reduction management module, brightness decision module. It also includes page synthesis module. Figure 8 The process involved in highlighting the highlighted content in the application page by highlighting is described in detail. For a description of this process, please refer to the following steps S101 to S111.
[0104] S101. When the terminal displays application page 1, business application 1 detects an operation to display highlighted content.
[0105] When the business application 1 is running in the foreground, the application page 1 may only include the content provided by the business application 1 .
[0106] When business application 1 and business application 2 are running in the foreground, application page 1 can include the content provided by business application 1 and business application 2. For example, the content provided by business application 2 is displayed in a floating window on the window of business application 1. Or, in a split-screen scenario, business application 1 and business application 2 occupy different areas of application page 1.
[0107] The operation of displaying the highlighted content may be an operation on a control in the window of the business application 1 , or may be other types of operations that the business application 1 is responsible for responding to, such as voice control.
[0108] S102. Business application 1 sends an instruction to display highlighted content to the window state manager.
[0109] In response to the operation of displaying the highlighted content, the business application 1 generates an instruction to display the highlighted content, and sends the instruction to display the highlighted content to the window state manager.
[0110] The instruction to display the highlighted content includes information about the highlight layer and the mask layer. The highlight layer can be in the form of a pop-up window for displaying the highlighted content. The information about the highlight layer includes information such as the size of the highlight layer, its position on the screen, the application to which it belongs (here, business application 1), and the content that can be displayed therein. The information about the mask layer includes information such as the mask layer flag and the mask layer transparency value. The mask layer transparency value is used to determine the median value of the brightness reduction coefficient in the subsequent step S105b, and then determine the M-frame brightness reduction coefficient in the subsequent step S106b.
[0111] S103 . The window state manager obtains information about the background layer when generating application page 1 . The background layer includes at least background layer 1 of business application 1 and may also include background layer 2 of business application 2 .
[0112] The background layer information includes the name of the background layer, its position on the screen, the application it belongs to, and other information.
[0113] When the business application 1 is running in the foreground, the background layer only includes the background layer of the business application 1. At this time, the window state manager can use the application page 1 as the background layer.
[0114] When business application 1 and business application 2 are running in the foreground, the background layer may include background layer 1 of business application 1 and background layer 2 of business application 2.
[0115] Subsequently, the window state manager can send information about the background layer and the highlight layer to the brightness reduction management module, so that the brightness reduction management module can filter out the layers that need to be brightened based on the information about the background layer and the highlight layer. For more information on this, please refer to the description of steps S104a-S106a below. Furthermore, the window state manager can also send the mask layer transparency value in the mask layer information to the brightness decision module, so that the brightness decision module generates the M-frame brightness reduction coefficient. For more information on this, please refer to the description of steps S104b-S106b below.
[0116] S104a. The window state manager sends information about the background layer and the highlight layer to the brightness reduction management module.
[0117] It should be noted that when the mask flag in the mask information indicates that a mask is required when displaying highlighted content, the window state manager sends information about the background layer and highlight layer to the brightness reduction management module. If a mask is not required, brightness reduction is not required, and the brightness reduction management module and brightness decision module are not involved. The highlighted content can be displayed through the window management service.
[0118] S105a. The highlight reduction management module marks the background layer 1 belonging to the same application as the highlight layer as a non-highlight layer.
[0119] The highlight management module determines, based on the information of the highlighted layer, that the application to which the highlighted layer belongs is business application 1. Based on the information of the background layer, background layer 1, which also belongs to business application 1, is marked as a non-highlighted layer.
[0120] If there is a background layer 2 belonging to business application 2, the background layer 2 should be a layer that needs to be highlighted and does not need to be brightened.
[0121] S106a. The highlight reduction management module notifies the layer manager to mark the background layer 1 as a non-highlighted layer to be highlighted.
[0122] Marking the background layer 1 as a non-highlighted layer to be brightened indicates that the M-frame brightening coefficient acts on the color value of the pixel in the background layer 1.
[0123] S104b. The window state manager sends the mask transparency value in the mask information to the brightness decision module.
[0124] Refer to the aforementioned Figure 6 As described, in some possible cases, the window state manager can send the mask transparency value in the mask information to the brightness decision module through the brightness reduction service in the brightness reduction management module, specifically to the local brightness controller in the brightness decision module.
[0125] It should be noted that the window state manager sends the mask transparency value in the mask information to the brightness decision module only when the mask flag in the mask information indicates that a mask needs to be added when displaying highlighted content.
[0126] S105b. The brightness decision module determines a median value 1 of the brightness reduction coefficient based on the mask transparency value and the screen brightness value when the application page 1 is displayed.
[0127] The median value of the brightness reduction coefficient, 1, is the median of the brightness reduction coefficients across all M frames. The terminal records the correspondence between the screen brightness value, the mask transparency value, and the median value of the coefficient. Given a given screen brightness value and mask transparency value, the corresponding median value of the brightness reduction coefficient can be found based on this correspondence.
[0128] Figure 9 An exemplary correspondence between screen brightness values, mask transparency values, and the median value of the coefficient is shown. The median value of the brightness reduction coefficient corresponding to each screen brightness value and mask transparency value is preset. For example, when the mask transparency value is 0.15 and the screen brightness is 600 nits, the median value of the brightness reduction coefficient is 0.038. The median value of the brightness reduction coefficient is correlated with the mask transparency value: a higher mask transparency value indicates a more transparent mask and a smaller reduction in the brightness of the covered content. Therefore, at the same screen brightness, a higher mask transparency value corresponds to a higher median value of the brightness reduction coefficient, resulting in a smaller reduction in the brightness of non-salient areas. A lower mask transparency value indicates a lower degree of mask transparency and a greater reduction in the brightness of the covered content. The median value of the brightness reduction coefficient is also correlated with screen brightness: a brighter screen requires a greater reduction in the brightness of non-salient areas to better highlight the highlighted content. Therefore, at the same mask transparency value, a higher screen brightness corresponds to a lower median value of the brightness reduction coefficient, resulting in a greater reduction in the brightness of non-salient areas.
[0129] S106b. The brightness decision module determines the M-frame brightness reduction coefficient of the non-salient layer based on the median value of the brightness reduction coefficient.
[0130] The M-frame brightness reduction coefficients include a one-frame brightness reduction coefficient of 1 and an N-frame brightness reduction coefficient of 2. Brightness reduction coefficient 1 is used to reduce the brightness of the non-prominent area to obtain the first-frame application page 2. The N-frame brightness reduction coefficient 2 is used to refresh the non-prominent area N times after displaying application page 2. Brightness reduction coefficient 1 is the largest of the M-frame brightness reduction coefficients and has the least effect on the non-prominent area. The brightness reduction coefficient 2 used for the i-th refresh of the non-prominent area in the N-frame brightness reduction coefficients is greater than the brightness reduction coefficient 2 used for the i+1-th refresh. In this way, the brightness of the non-prominent area is gradually reduced, allowing users to adapt to the brightness changes in the non-prominent area without causing sudden dimming.
[0131] It should be noted that N is an integer greater than or equal to 1 (usually 30). It can be a parameter built into the terminal. It can also be a parameter configured by the business application 1 in the instruction to display the highlighted content, which is not limited in this embodiment of the application.
[0132] The brightness reduction coefficient 1 and the N-frame brightness reduction coefficient 2 are specifically determined based on the median value of the brightness reduction coefficient and the N value. The brightness decision module adds the median value of the brightness reduction coefficient to X multiplied by the preset step value to obtain the brightness reduction coefficient 1. That is, the brightness reduction coefficient 1 is equal to the median value of the brightness reduction coefficient plus X multiplied by the preset step value to obtain the brightness reduction coefficient 1. When N is an odd number, X is equal to [(N-1) / 2]+1, and when N is an even number, X is equal to N / 2. The brightness reduction coefficient 2 used when refreshing the non-highlighted area for the i-th time in the N-th time is equal to the brightness reduction coefficient 1 plus i multiplied by the preset step value. The preset step value can be equal to 0.001, or it can be equal to other values, such as 0.002, 0.005, etc., and is set according to actual conditions. The embodiments of the present application do not limit this.
[0133] S107. The brightness decision module sends the M-frame brightness reduction coefficient to the layer manager.
[0134] S108. The layer manager determines the positional relationship between the background layer and the highlight layer.
[0135] The positional relationship between the background layer and the highlight layer includes the display levels of the background layer and the highlight layer, as well as the display area on the screen.
[0136] Generally speaking, the terminal sets background layer 1 of business application 1 as the bottom layer. The highlighted layer is set as the upper layer of background layer 1. If background layer 2 exists, background layer 2 is set as the top layer.
[0137] S109. The layer manager sends the position relationship, M frame brightening coefficients, and the brightening coefficients to the page synthesis module to act on the background layer 1.
[0138] Subsequently, the page synthesis module executes the following step S110 to synthesize and display the application page 2 , and step S111 to refresh the non-highlighted area in the application page 2 .
[0139] S110 . The page synthesis module synthesizes the background layer 2 , the highlight layer, and the brightened background layer 1 based on the positional relationship to obtain the application page 2 and determine the non-highlighted area in the application page 2 .
[0140] The purpose of determining the non-prominent area is to subsequently refresh the non-prominent area. For details on refreshing the non-prominent area, please refer to the following description of step S111.
[0141] In some possible cases, the page synthesis module first multiplies the color value of pixel 2 in background layer 1 (belonging to application page 1) by the brightening coefficient 1 to obtain the brightened background layer 1. Pixel 2 is the pixel in the area of application page 1 corresponding to the non-highlighted area. In this case, the non-highlighted area of application page 2 includes the content provided by business application 1 in application page 1 and not covered by the highlighted layer and background layer 2. Then, the page synthesis module synthesizes background layer 2, the highlighted layer, and the brightened background layer 1 based on the positional relationship to obtain application page 2 and determine the non-highlighted area of application page 2. In application page 2, the area other than the non-highlighted area is the highlighted area. In this case, the content in the highlighted area is the content in the highlighted layer and background layer 2. Therefore, the content included in the non-highlighted area of application page 2 can also be described as the content provided by business application 1 in application page 1 and not covered by the highlighted area.
[0142] It should be noted that step S110 is described using the example of a background layer 2. If background layer 2 does not exist, step S110 can also be described as the page composition module synthesizing the highlight layer and the brightened background layer based on their positional relationships to obtain application page 2 and determine the non-highlighted area within application page 2. This process involves the page composition module first multiplying the color value of pixel 1 in the background layer (which can be application page 1) by a brightening factor 1 to obtain the brightened background layer, where pixel 1 is the pixel in the area of application page 1 corresponding to the non-highlighted area. In this case, the non-highlighted area within application page 2 includes the content provided by business application 1 within application page 1 that is not covered by the highlight layer. Then, the page composition module synthesizes the highlight layer and the brightened background layer based on their positional relationships to obtain application page 2 and determine the non-highlighted area within application page 2. The area of application page 2 excluding the non-highlighted area is the highlight area. In this case, the content within the highlight area is the content within the highlight layer.
[0143] S111. The page synthesis module performs M-1 brightness adjustments on the non-highlighted area based on the M-1 frame brightness reduction coefficient and the area corresponding to the non-highlighted area in background layer 1.
[0144] The M-1 frame brightness reduction coefficient is the aforementioned N frame brightness reduction coefficient 2. Performing M-1 brightness adjustments is equivalent to refreshing the non-salient area N times. The i-th refresh in the N-th refresh includes multiplying the pixels in the area corresponding to the non-salient area on application page 1 by the i-th frame brightness reduction coefficient 2. Here, the i-th frame brightness reduction coefficient 2 refers to the i-th frame brightness reduction coefficient 2 after the N frame brightness reduction coefficients 2 are sorted from smallest to largest.
[0145] It should be noted that the aforementioned Figure 8There is no particular order in which step S104a and step S104b are executed.
[0146] The following describes an exemplary terminal provided in an embodiment of the present application.
[0147] Figure 10 It is a schematic diagram of the structure of the terminal provided in an embodiment of the present application.
[0148] The following embodiment is specifically described by taking a terminal as an example. It should be understood that a terminal may have more Figure 10 More or fewer components may be shown, two or more components may be combined, or the components may be arranged differently. Figure 10 The various components shown in the drawings may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.
[0149] The terminal 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, an earphone interface 170D, a sensor module 180, a button 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, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light 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.
[0150] It is understood that the structures illustrated in the embodiments of the present application do not constitute specific limitations on the terminal. In other embodiments of the present application, the terminal may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0151] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0152] The controller can be the nerve center and command center of the terminal. It can generate operation control signals based on instruction operation codes and timing signals to complete the control of instruction fetching and execution.
[0153] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0154] The wireless communication function of the terminal can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
[0155] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the terminal can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0156] The mobile communication module 150 can provide wireless communication solutions including 2G / 3G / 4G / 5G applied on the terminal.
[0157] The wireless communication module 160 can provide wireless communication solutions applied on the terminal, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), etc.
[0158] The terminal implements display functions through a GPU, display screen 194, and an application processor. The GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0159] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
[0160] The terminal can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0161] The sensor module 180 can be used to measure data at the terminal.
[0162] The buttons 190 include a power button, a volume button, and the like.
[0163] Motor 191 can generate vibration prompts.
[0164] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.
[0165] The SIM card interface 195 is used to connect a SIM card.
[0166] In the embodiment of the present application, the processor 110 can call the computer instructions stored in the internal memory 121 to enable the terminal to execute the method in the embodiment of the present application.
[0167] The present application also provides a chip system, which includes at least one processor for implementing the functions involved in the method executed by the terminal in any of the above embodiments.
[0168] In one possible design, the chip system further includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.
[0169] The chip system can be composed of chips, or can include chips and other discrete devices.
[0170] Optionally, there may be one or more processors in the chip system. The processor may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0171] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be separated from the processor, which is not limited in the embodiment of the present application.
[0172] Exemplarily, the memory can be a non-transient processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip or can be set on different chips respectively. The embodiments of the present application do not specifically limit the type of memory and the setting method of the memory and the processor.
[0173] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
[0174] The present application also provides a computer program product, which includes: a computer program (also referred to as code, or instruction), which, when executed, enables a computer to execute the terminal execution method in any of the above embodiments.
[0175] The present application also provides a computer-readable storage medium storing a computer program (also referred to as code or instruction). When the computer program is executed, the computer executes the method executed by the terminal in any of the above embodiments.
[0176] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0177] As used in the above embodiments, the term “when…” may be interpreted to mean “if…” or “after…” or “in response to determining…” or “in response to detecting…”, depending on the context. Similarly, the phrases “upon determining…” or “if (stated condition or event) is detected” may be interpreted to mean “if determining…” or “in response to determining…” or “upon detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.
[0178] The terms used in the embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. As used in the specification and appended claims of this application, the singular expressions "a," "an," "said," "above," "the," and "this" are intended to include plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used in this application refers to and encompasses any and all possible combinations of one or more of the listed items.
[0179] The terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, features defined as "first" or "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.
[0180] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk).
[0181] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A content display method, characterized in that: The method comprises: In response to a first operation of displaying first content of the first application in a case where the first page is displayed; The terminal controls the brightness of the non-highlighted area of the second page to be lower than the brightness of the highlighted area of the second page through brightness reduction processing; the highlighted area includes the first content, and the non-highlighted area includes content provided by the first application on the first page and not covered by the highlighted area; The terminal displays the second page.
2. The method according to claim 1, characterized in that The brightening process includes: multiplying the color values of pixels in the area corresponding to the non-highlighted area in the first page by a first coefficient to obtain the non-highlighted area; the first coefficient is a positive number less than 1.
3. The method according to claim 2, characterized in that After the terminal displays the second page, the method further includes: The terminal refreshes the non-highlighted area N times, where the i-th refresh among the N times includes: multiplying the color values of pixels in an area corresponding to the non-highlighted area in the first page by a second coefficient to obtain the non-highlighted area after the i-th refresh; the second coefficient used in the i-th refresh is greater than the second coefficient used in the (i+1)-th refresh; the second coefficient is less than the first coefficient, and N is an integer greater than or equal to 1.
4. The method according to claim 2 or 3, characterized in that When all the content on the first page is provided by the first application, before the brightness reduction process, the method further includes: The terminal uses the first page as a background layer and obtains a highlight layer for displaying the first content; The terminal marks the background layer as a non-highlighted layer that needs to be brightened; After the brightness reduction process, the method further includes: The terminal synthesizes the brightened background layer and the highlighted layer to obtain the second page; the area in the first page corresponding to the non-highlighted area is: the area in the background layer that does not overlap with the highlighted layer.
5. The method according to claim 4, characterized in that The brightness reduction process specifically includes: The terminal multiplies the color value of a first pixel in the background layer by the first coefficient to obtain a brightened background layer, where the first pixel is a pixel in an area of the first page corresponding to the non-highlighted area.
6. The method according to claim 2 or 3, characterized in that In a case where the content on the first page is provided by the first application and the second application, before the highlight reduction process, the method further includes: The terminal obtains at least one background layer when displaying the first page, and obtains a highlighted layer for displaying the first content; the at least one background layer includes a first background layer belonging to the first application and a second background layer belonging to the second application; Based on the first operation performed on the first application, the terminal marks the first background layer as a non-highlighted layer that needs to be brightened; After the brightness reduction process, the method further includes: The terminal synthesizes the first background layer, the second background layer, and the highlighted layer after being brightened to obtain the second page; the area in the first page corresponding to the non-highlighted area is: the area in the first background layer that does not overlap with the highlighted layer and the second background layer.
7. The method according to claim 6, characterized in that The brightness reduction process specifically includes: The terminal multiplies the color value of the second pixel in the first background layer by the first coefficient to obtain a brightened first background layer, where the second pixel includes: a pixel in an area of the first page corresponding to the non-highlighted area.
8. The method according to any one of claims 3 to 7, characterized in that In response to the first operation of displaying the first content of the first application, before the terminal displays the second page, the method further includes: The terminal generates a first instruction through the first application, the first instruction being used to instruct the terminal to cover the non-highlighted area with a mask when displaying the first content, the first instruction also carrying a mask transparency value; the second page does not include the mask.
9. The method according to claim 8, characterized in that The first coefficient and the second coefficient are determined based on a screen brightness value when the first page is displayed, the mask transparency value, and N.
10. The method according to claim 9, characterized in that The first coefficient and the second coefficient are determined based on the screen brightness value when the first page is displayed, the mask transparency value, and N, and specifically include: The first coefficient is equal to the median value of the first coefficient plus X multiplied by a preset step value, and the median value of the first coefficient is determined by the correspondence between the screen brightness value and the mask transparency value and the median value of the coefficient; when N is an odd number, X is equal to [(N-1) / 2]+1, and when N is an even number, X is equal to N / 2. The second coefficient used in the i-th refresh in the N-th time is equal to the first coefficient plus i multiplied by the preset step value.
11. A terminal, characterized in that: include: One or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the terminal to execute the method according to any one of claims 1 to 10.
12. A computer-readable storage medium comprising computer instructions, characterized in that: When the computer instructions are executed on a terminal, the terminal is caused to execute the method according to any one of claims 1 to 10.
13. A chip system, applied to a terminal, characterized in that: The chip system includes one or more processors, and the processors are used to call computer instructions to enable the terminal to execute the method according to any one of claims 1 to 10.