Method and related apparatus for dynamically reducing screen blue light
By using terminal devices to determine whether to perform blue light reduction processing based on adjustment parameters, the problem of blue light radiation's impact on user health and the burden on device operation in existing technologies is solved. This achieves efficient and image-distortion-free blue light reduction, thus improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2023-12-05
- Publication Date
- 2026-05-15
AI Technical Summary
Prolonged exposure to blue light radiation from electronic product screens can affect users' sleep and may cause eye diseases. Existing technologies that reduce blue light may result in image distortion and place a heavy burden on the operation of terminal devices.
The terminal device determines whether to perform blue light reduction processing based on the presence of adjustment parameters. It determines whether to generate adjustment parameters through downsampling processing and blue light ratio calculation, and only performs blue light reduction processing on image frames with high blue light ratio to reduce unnecessary computational burden.
While ensuring the quality of displayed content, it improves the efficiency of blue light reduction processing and user experience, reduces the operating burden of terminal devices, and protects users' vision health.
Smart Images

Figure CN120148382B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing, and more particularly to a method and related apparatus for dynamically reducing blue light from a screen. Background Technology
[0002] In today's society, people are spending significantly more time using electronic devices for work or entertainment, placing a considerable burden on their eyes. This has forced technicians and users to focus on and seek ways to reduce eye strain when using electronic products. Scientific research has shown that when users use electronic devices or stare at electronic screens, their eyes are exposed to the blue light emitted by the devices or screens. Prolonged exposure to blue light radiation can affect sleep and, in severe cases, even cause eye diseases. Summary of the Invention
[0003] In a first aspect, this application provides a method and related apparatus for dynamically reducing blue light from a screen, the method including:
[0004] Responding to the user's operation command, retrieve the first content to be displayed;
[0005] If there is no first adjustment parameter corresponding to the first display content, then a first image frame is generated based on the first display content and drawn on the display screen;
[0006] Generate a first downsampled image frame corresponding to the first image frame, and calculate the first blue light percentage of the first downsampled image frame;
[0007] When the first blue light ratio is greater than the first preset value, a second adjustment parameter is generated based on the first blue light ratio. The second adjustment parameter can be used to adjust the blue light ratio of the image frame corresponding to the second display content. The second display content is one or more display contents displayed after the first display content.
[0008] Implementing the method provided in the first aspect, the terminal device can determine whether to perform blue light reduction processing on the currently displayed content based on whether there are adjustment parameters corresponding to the currently displayed content. Specifically, when there are no adjustment parameters corresponding to the currently displayed content, the terminal device performs normal rendering work on the currently displayed content without performing blue light reduction processing. Although the image frame corresponding to the currently displayed content may need to undergo blue light reduction processing, arbitrarily performing blue light reduction processing on the image frame corresponding to the displayed content without existing adjustment parameters may lead to adverse consequences such as image distortion. Therefore, not performing blue light reduction processing on the image frame corresponding to the currently displayed content when there are no existing adjustment parameters is more conducive to protecting the user experience. Furthermore, the terminal device can downsample the image frames corresponding to the currently displayed content and determine whether a new adjustment parameter needs to be generated based on the blue light ratio of the downsampled image frame. This adjustment parameter can be used to perform blue light reduction processing on other displayed content. Specifically, the terminal device does not need to calculate the blue light ratio of subsequent displayed content; it can directly use this adjustment parameter to perform blue light reduction processing on subsequent displayed content. This helps to improve the efficiency of blue light reduction processing on subsequent displayed content while ensuring the blue light reduction effect of the displayed content. In particular, the image frames obtained after downsampling the image frames corresponding to the displayed content retain the image features (such as color image features) of the displayed content while also helping to reduce the computational resources required by the terminal device to calculate the blue light ratio. This helps to improve the efficiency of calculating the blue light ratio while ensuring the accuracy of the blue light ratio statistics and reducing the operational burden on the terminal device.
[0009] In implementing the method provided in the first aspect, in some embodiments, the method may further include:
[0010] If a first adjustment parameter exists that corresponds to the first display content, a second image frame is generated based on the first adjustment parameter and the first display content, and the second image frame is drawn on the display screen.
[0011] By implementing the method provided in the above embodiments, when there are adjustment parameters corresponding to the currently displayed content, the terminal device can generate a blue light-reducing image frame based on the adjustment parameters corresponding to the currently displayed content and the currently displayed content, which helps to reduce the user's eye burden and improve the user experience.
[0012] In some embodiments of implementing the method provided in the first aspect, the operation instructions are operation instructions for a first image, and the first image is an image containing multiple consecutive image frames;
[0013] The first adjustment parameter is generated based on the third display content, which is the display content displayed before the first display content;
[0014] If a first adjustment parameter exists corresponding to the first display content, then a second image frame is generated based on the first adjustment parameter and the first display content, and the second image frame is drawn on the display screen, which may include:
[0015] Determine whether the timing relationship between the first and third displayed content meets the preset conditions;
[0016] If the preset conditions are met, a second image frame is generated based on the first adjustment parameters and the first display content, and the second image frame is drawn on the display screen;
[0017] If the preset conditions are not met, a first image frame is generated based on the first display content, and the first image frame is drawn on the display screen.
[0018] By implementing the method provided in the above embodiments, the terminal device can determine whether to apply the adjustment parameters based on the difference in the call time node and / or the difference in the call sequence number between the current displayed content and the display content corresponding to the adjustment parameters. Specifically, when the difference in the call time node and / or the difference in the call sequence number between the current displayed content and the display content corresponding to the adjustment parameters meets preset conditions, the terminal device can generate a corresponding image frame based on the current displayed content and existing adjustment parameters. This eliminates the need for downsampling and calculating the blue light percentage of the current displayed content, reducing the operational burden on the terminal device and improving the efficiency of the blue light reduction operation. When the difference in the call time node and / or the difference in the call sequence number between the current displayed content and the display content corresponding to the adjustment parameters does not meet preset conditions, the terminal device directly generates a corresponding image frame based on the current displayed content and renders the image frame on the display screen. It can be seen that the terminal device only needs to perform downsampling and calculating the blue light percentage for the current displayed content that does not meet preset conditions. This helps to reduce the operational burden on the terminal device while ensuring the blue light reduction processing effect and improving the efficiency of the blue light reduction operation.
[0019] Implementing the method provided in the first aspect, in some embodiments, determining whether the timing relationship between the first displayed content and the third displayed content meets preset conditions may include:
[0020] Determine whether the difference between the call time point corresponding to the first displayed content and the call time point corresponding to the third displayed content is within a first preset time period; and / or
[0021] Determine whether the difference between the call sequence number corresponding to the first displayed content and the call sequence number corresponding to the third displayed content is less than or equal to a second preset value.
[0022] In implementing the method provided in the first aspect, in some embodiments, the operation instructions are operation instructions for a second image, which is an image containing only one image frame;
[0023] After generating the second adjustment parameter based on the first blue light percentage, the method may further include:
[0024] If the user does not update the operation command within the second preset time period, a third image frame is generated based on the first display content and the second adjustment parameters, and the third image frame is drawn on the display screen.
[0025] By implementing the method provided in the above embodiments, the terminal device can perform different blue light reduction operations based on different operation command types. Specifically, when the operation command is for an image, the terminal device can determine the blue light adjustment scheme based on the time interval between operation command updates. If the user does not input a new operation command within a second preset time period, it can be assumed that the currently displayed content of the terminal device does not need to be updated. Therefore, when the display screen refreshes next time, blue light reduction processing can be performed on the image frame of the currently displayed content based on the updated adjustment parameters, helping to ensure that the currently displayed content achieves the best blue light reduction effect and improving the user experience.
[0026] Implementing the method provided in the first aspect, in some embodiments, the method may include:
[0027] When the proportion of blue light is greater than the first preset value, a fourth image frame is generated based on the first display content and adjustment parameters, and the fourth image frame is drawn on the display screen.
[0028] When the proportion of blue light is less than or equal to a first preset value, a first image frame is drawn on the display screen.
[0029] By implementing the method provided in the above embodiments, the terminal device can select different blue light adjustment schemes according to the blue light ratio corresponding to the displayed content. Specifically, the terminal device in this application embodiment does not need to perform blue light reduction processing on the displayed image (or displayed content) frame by frame. It only needs to perform blue light reduction processing on the displayed image (or displayed content) with a blue light ratio exceeding a preset value. This greatly reduces the operating burden of the terminal device and also helps to preserve the color characteristics of the displayed content with a small blue light ratio (i.e., the displayed content with a blue light ratio less than or equal to the first preset value). This ensures the user experience without causing eye strain to the user.
[0030] In implementing the method provided in the first aspect, in some embodiments, the adjustment parameters may include a third adjustment parameter and at least one preset adjustment parameter, wherein the third adjustment parameter is generated based on a fourth display content, and the fourth display content is the display content displayed before the first display content;
[0031] When the proportion of blue light is greater than a first preset value, generating a fourth image frame based on the first display content and adjustment parameters, and drawing the fourth image frame on the display screen, may include:
[0032] If the proportion of blue light is greater than the first preset value, determine whether the third adjustment parameter is empty;
[0033] If the third adjustment parameter is not empty, then a fourth image frame is generated based on the first display content and the third adjustment parameter, and the fourth image frame is drawn on the display screen;
[0034] If the third adjustment parameter is empty, a fourth image frame is generated based on the preset adjustment parameters corresponding to the first display content and the first blue light ratio, and the fourth image frame is drawn on the display screen.
[0035] By implementing the method provided in the above embodiments, the terminal device can adopt different blue light reduction schemes for the displayed content based on the types of existing adjustment parameters. Specifically, if the terminal device generated adjustment parameters in a previous blue light reduction processing flow for the displayed content, it can perform blue light reduction processing on the current displayed content based on the adjustment parameters; if the terminal device did not perform blue light reduction processing in a previous display flow corresponding to the displayed content, and therefore does not have corresponding adjustment parameters, it can perform blue light reduction processing on the current displayed content based on preset adjustment parameters. This helps to adopt the adjustment parameters most suitable for the current displayed content, thereby obtaining the best blue light reduction effect.
[0036] In implementing the method provided in the first aspect, in some embodiments, each preset adjustment parameter corresponds to a preset range;
[0037] If the third adjustment parameter is empty, then based on the preset adjustment parameters corresponding to the first display content and the first blue light ratio, a fourth image frame is generated and drawn on the display screen, which may include:
[0038] If the third adjustment parameter is empty, then the preset adjustment parameter corresponding to the first blue light percentage is determined based on the preset range corresponding to the first blue light percentage.
[0039] A fourth image frame is generated based on preset adjustment parameters corresponding to the first display content and the first blue light ratio, and the fourth image frame is drawn on the display screen.
[0040] Based on the first adjustment parameter, update the third adjustment parameter.
[0041] By implementing the method provided in the above embodiments, the terminal device can pre-store multiple preset adjustment parameters, each corresponding to a preset range. The terminal device can determine the corresponding preset range and preset adjustment parameters based on the blue light ratio of the currently displayed content, which helps to adopt the adjustment parameters most suitable for the current displayed content, thereby achieving the best blue light reduction effect. Furthermore, the terminal device will update the adjustment parameters based on the blue light ratio of the currently displayed content, which is beneficial for providing suitable blue light adjustment parameters for other displayed content in the future, thereby achieving a better blue light reduction effect and improving the user experience.
[0042] Implementing the method provided in the first aspect, in some embodiments, the blue light percentage of the image frame after downsampling of the third display content is the second blue light percentage;
[0043] If the third adjustment parameter is not empty, a fourth image frame is generated based on the first display content and the third adjustment parameter, and the fourth image frame is drawn on the display screen, which may include:
[0044] If the third adjustment parameter is not empty, then calculate the difference between the first blue light ratio and the second blue light ratio;
[0045] If the absolute value of the difference is less than or equal to the third preset value, a fourth image frame is generated based on the first display content and the third adjustment parameter, and the fourth image frame is drawn on the display screen.
[0046] By implementing the method provided in the above embodiments, the terminal device further determines blue light adjustment parameters based on the blue light ratio corresponding to the currently displayed content. Specifically, the terminal device compares the blue light ratio corresponding to the currently displayed content with the blue light ratio corresponding to the adjustment parameters. Only when the difference between the blue light ratio corresponding to the currently displayed content and the blue light ratio corresponding to the adjustment parameters is less than or equal to a second preset value will the terminal device use the adjustment parameters to reduce blue light on the displayed content, which helps to further ensure the effectiveness of the blue light reduction processing of the displayed content.
[0047] In implementing the method provided in the first aspect, in some embodiments, the method may further include:
[0048] If the absolute value of the difference is greater than the third preset value, a fourth image frame is generated based on the preset adjustment parameters corresponding to the first display content and the first blue light ratio, and the fourth image frame is drawn on the display screen.
[0049] Based on the first adjustment parameter, update the third adjustment parameter.
[0050] By implementing the method provided in the above embodiments, when the difference between the blue light percentage corresponding to the currently displayed content and the blue light percentage corresponding to the adjustment parameters is greater than a second preset value, the terminal device will use appropriate preset adjustment parameters to reduce the blue light of the displayed content, which helps to ensure the effectiveness of the blue light reduction processing. Furthermore, after reducing the blue light of the currently displayed content based on the preset adjustment parameters, the terminal device will update the adjustment parameters based on the blue light percentage corresponding to the currently displayed content, which helps subsequent displayed content to undergo blue light reduction processing based on more suitable adjustment parameters.
[0051] Secondly, embodiments of this application provide a terminal device, which may include: an input module, a processing module, and a display module;
[0052] The input module is used to receive user operation commands;
[0053] The processing module is used to respond to user operation commands and obtain the first display content;
[0054] The processing module is also configured to generate a first image frame based on the first display content and draw the first image frame on the display screen when there is no first adjustment parameter corresponding to the first display content;
[0055] The display module is used to display the first image frame;
[0056] The processing module is also used to generate a first downsampled image frame corresponding to the first image frame, and to calculate the first blue light ratio of the first downsampled image frame;
[0057] The processing module is further configured to generate a second adjustment parameter based on the first blue light ratio when the first blue light ratio is greater than the first preset value. The second adjustment parameter is used to adjust the blue light ratio of the image frame corresponding to the second display content. The second display content is one or more display contents displayed after the first display content.
[0058] In implementing the method provided in the second aspect, in some embodiments, the terminal device may further include:
[0059] The processing module is further configured to generate a second image frame based on the first adjustment parameter and the first display content when a first adjustment parameter corresponding to the first display content exists, and to draw the second image frame on the display screen;
[0060] The display module is also used to display a second image frame.
[0061] In implementing the method provided in the second aspect, in some embodiments, the operation instructions are operation instructions for a first image, which may be an image containing multiple consecutive image frames;
[0062] The first adjustment parameter is generated based on the third display content, which is the display content displayed before the first display content;
[0063] The terminal device may also include: a judgment module;
[0064] The judgment module is used to determine whether the timing relationship between the first displayed content and the third displayed content meets the preset conditions;
[0065] The processing module is also used to generate a second image frame based on the first adjustment parameters and the first display content, and to draw the second image frame on the display screen, provided that the preset conditions are met.
[0066] The processing module is also used to generate a first image frame based on the first display content and draw the first image frame on the display screen if the preset conditions are not met.
[0067] In implementing the method provided in the second aspect, in some embodiments, the terminal device may further include:
[0068] The judgment module is also used to determine whether the difference between the call time node corresponding to the first displayed content and the call time node corresponding to the third displayed content is within a first preset time period; and / or
[0069] The judgment module is also used to determine whether the difference between the call sequence number corresponding to the first displayed content and the call sequence number corresponding to the third displayed content is less than or equal to a second preset value.
[0070] In implementing the method provided in the second aspect, in some embodiments, the operation instructions are operation instructions for a second image, which may be an image containing only one image frame;
[0071] The terminal device may also include:
[0072] The processing module is also used to generate a third image frame based on the first display content and the second adjustment parameters, and to draw the third image frame on the display screen if the user does not update the operation instruction within the second preset time period.
[0073] The display module is also used to display a third image frame.
[0074] In implementing the method provided in the second aspect, in some embodiments, the terminal device may further include:
[0075] The processing module is also used to generate a fourth image frame based on the first display content and adjustment parameters, and to draw the fourth image frame on the display screen when the first blue light ratio is greater than the first preset value;
[0076] The display module is also used to display the fourth image frame;
[0077] The processing module is also used to draw a first image frame on the display screen when the first blue light ratio is less than or equal to a first preset value.
[0078] In implementing the method provided in the second aspect, in some embodiments, the adjustment parameters may include a third adjustment parameter and at least one preset adjustment parameter, wherein the third adjustment parameter is generated based on a fourth display content, which is the display content displayed before the first display content;
[0079] The terminal device may also include:
[0080] The judgment module is also used to determine whether the third adjustment parameter is empty when the first blue light ratio is greater than the first preset value;
[0081] The processing module is also used to generate a fourth image frame based on the first display content and the third adjustment parameter when the third adjustment parameter is not empty, and to draw the fourth image frame on the display screen.
[0082] The processing module is also used to generate a fourth image frame based on the preset adjustment parameters corresponding to the first display content and the first blue light ratio when the third adjustment parameter is empty, and to draw the fourth image frame on the display screen.
[0083] In implementing the method provided in the second aspect, in some embodiments, each preset adjustment parameter corresponds to a preset range;
[0084] The terminal device may also include:
[0085] The processing module is also used to determine the preset adjustment parameter corresponding to the first blue light ratio based on the preset range corresponding to the first blue light ratio when the third adjustment parameter is empty;
[0086] The processing module is also used to generate a fourth image frame based on preset adjustment parameters corresponding to the first display content and the first blue light ratio, and to draw the fourth image frame on the display screen;
[0087] The processing module is also used to update the third adjustment parameter based on the first adjustment parameter.
[0088] In implementing the method provided in the second aspect, in some embodiments, the blue light percentage of the image frame after downsampling of the third display content is the second blue light percentage;
[0089] The terminal device may also include:
[0090] The processing module is also used to calculate the difference between the first blue light ratio and the second blue light ratio when the third adjustment parameter is not empty;
[0091] The processing module is also used to generate a fourth image frame based on the first display content and the third adjustment parameter when the absolute value of the difference is less than or equal to a third preset value, and to draw the fourth image frame on the display screen.
[0092] In implementing the method provided in the second aspect, in some embodiments, the terminal device may further include:
[0093] The processing module is also used to generate a fourth image frame based on the preset adjustment parameters corresponding to the first display content and the first blue light ratio when the absolute value of the difference is greater than the third preset value, and to draw the fourth image frame on the display screen.
[0094] The processing module is also used to update the third adjustment parameter based on the first adjustment parameter.
[0095] Thirdly, this application provides a terminal device including one or more processors and one or more memories; wherein the one or more memories are coupled to one or more processors, and the one or more memories are used to store computer program code, the computer program code including computer instructions, which, when the one or more processors execute the computer instructions, cause the execution of the method described in the first aspect and any possible implementation thereof.
[0096] Fourthly, this application provides a computer-readable storage medium including instructions that, when executed on a target terminal, cause the execution of the method described in the first aspect and any possible implementation thereof.
[0097] Fifthly, this application provides a computer program product containing instructions that, when the computer program product is run on a terminal device, causes the terminal device to perform the method described in the first aspect and any possible implementation thereof.
[0098] It is understood that the terminal devices provided in the second and third aspects, the computer-readable storage medium provided in the fourth aspect, and the computer program product provided in the fifth aspect are all used to execute the methods provided in this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here. Attached Figure Description
[0099] Figure 1 This is a flowchart illustrating a method for dynamically adjusting blue light using existing technology;
[0100] Figure 2 This is a flowchart illustrating a method for dynamically reducing blue light from a screen, as provided in an embodiment of this application.
[0101] Figure 3aThis is a schematic diagram of a scenario for determining similar image frames based on a time node, provided in an embodiment of this application.
[0102] Figure 3b This is a schematic diagram of a scenario provided by an embodiment of this application for determining similar image frames based on a call sequence number;
[0103] Figure 4 This is a scene illustration of image redrawing provided in an embodiment of this application;
[0104] Figure 5 This is a schematic diagram of a downsampling scenario provided in an embodiment of this application;
[0105] Figure 6 This is a schematic diagram illustrating a scenario for calculating the proportion of blue light provided in an embodiment of this application;
[0106] Figure 7 This application provides another method for dynamically reducing blue light from screens.
[0107] Figure 8 This is a schematic diagram of the composition of a terminal device provided in an embodiment of this application;
[0108] Figure 9 This is a schematic diagram of the hardware structure of another terminal device provided in an embodiment of this application;
[0109] Figure 10 This is a software structure block diagram of a terminal device provided in an embodiment of this application. Detailed Implementation
[0110] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the word "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0111] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0112] The term "user interface (UI)" used in the following embodiments of this application refers to the medium interface through which an application or operating system interacts and exchanges information with the user. It realizes the conversion between the internal form of information and the form that the user can accept. The user interface is source code written in a specific computer language such as Java or Extensible Markup Language (XML). The interface source code is parsed and rendered on the terminal device, ultimately presenting content that the user can recognize. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be visible interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets displayed on the terminal device's screen.
[0113] To ensure clarity and conciseness in the description of the following embodiments, a brief introduction to the related technologies is given first:
[0114] The RGB color model is an industry-standard color system that creates a wide variety of colors by varying the red (R), green (G), and blue (B) color channels and their combinations. RGB represents the colors of these three channels and encompasses almost all colors perceptible to human vision, making it one of the most widely used color systems. All colors on an electronic display screen are created by mixing these three colors of light in different proportions. A set of red, green, and blue values constitutes the smallest display unit. Any color on an electronic display screen can be recorded and represented by a set of RGB values. Currently, technicians can reduce the amount of blue light emitted by the display device by limiting the blue light content in the RGB channels of the electronic display screen.
[0115] Downsampling is the process of reducing the sampling rate of a specific signal, typically used to reduce data transmission rate or data size. The downsampling factor (commonly represented by the symbol M) is generally an integer or rational number greater than 1. This factor expresses how many times the sampling period is increased, or equivalently, how many times the sampling rate is reduced. For an N×M image, if the downsampling coefficient is k, then every k points in each row and column of the original image are taken to form a new image.
[0116] Please see Figure 1 , Figure 1 This is a flowchart illustrating a method for dynamically adjusting blue light using existing technology.
[0117] like Figure 1As shown, the prior art may include the following steps:
[0118] S101: Obtain the color temperature level of the display, as well as the blue light hazard factor and preset display time corresponding to the color temperature level.
[0119] S102: Determine whether the blue light hazard factor is greater than the adjustment standard; if the blue light hazard factor is greater than the adjustment standard, obtain the blue light ratio in the screen displayed on the monitor, and control the backlight of the monitor to reduce blue light display based on the blue light ratio; if the blue light hazard factor is less than the adjustment standard, control the backlight of the monitor to maintain the current display.
[0120] S103: Determine whether the actual display time of the monitor at the color temperature level has reached the preset display time. If the actual display time has reached the preset display time, reduce the color temperature of the monitor to the lowest level.
[0121] The blue light emission wavelength of the backlight of the display includes: a first emission wavelength and a second emission wavelength, wherein the first emission wavelength is shorter than the second emission wavelength;
[0122] In step S102, controlling the backlight of the display to reduce blue light display based on the blue light ratio includes: determining whether the blue light ratio is greater than a reference ratio; if the blue light ratio is greater than the reference ratio, controlling the blue light of the backlight to emit a second emission wavelength to reduce blue light display; if the blue light ratio is less than the reference ratio, controlling the blue light of the backlight to emit both a second emission wavelength and a first emission wavelength simultaneously to reduce blue light display, wherein the pulse duty cycle used to drive the first emission wavelength is less than the pulse duty cycle used to drive the second emission wavelength.
[0123] It can be seen that existing technologies primarily determine blue light adjustment schemes by judging whether the blue light hazard corresponding to the color temperature level of the display screen exceeds the adjustment standard, and / or whether the actual display time of the display screen at the color temperature level reaches the preset display time. Understandably, existing technologies require real-time analysis of the blue light hazard coefficient corresponding to the display screen's color temperature level and statistical analysis of the display time for that color temperature level. This places a significant operational burden on the terminal device, potentially reducing its lifespan. Furthermore, existing technologies only adjust the display screen's color temperature level after the actual display time corresponding to that color temperature level has reached the preset display time. By then, the user has already been exposed to a screen with a "dangerous" color temperature level for a certain period, which is also detrimental to the user's healthy use of the terminal device.
[0124] This application provides a method for dynamically reducing blue light from a screen. It determines whether to perform blue light reduction processing on the currently displayed content based on the existence of adjustment parameters corresponding to the content being displayed. Specifically, when no adjustment parameters exist, the terminal device performs normal rendering on the content without blue light reduction processing. Although the image frames corresponding to the currently displayed content may require blue light reduction processing, arbitrarily performing blue light reduction processing on these frames without existing adjustment parameters could lead to adverse consequences such as image distortion. Therefore, not performing blue light reduction processing on the image frames corresponding to the currently displayed content when no adjustment parameters are available is more beneficial for protecting the user experience.
[0125] Please see Figure 2 , Figure 2 This is a flowchart illustrating a method for dynamically reducing blue light from a screen, as provided in an embodiment of this application.
[0126] like Figure 2 As shown, the method may include the following steps:
[0127] S201: The terminal device responds to the user's operation command and obtains the first display content.
[0128] It should be noted that the terminal device 10 used to execute the method of the embodiments of this application is a terminal device with rendering and display functions. The terminal device 10 can be of various types, and the embodiments of this application do not limit its specific type. For example, the terminal device 10 can be a mobile phone, and can also include tablet computers, desktop computers, desktop computers with touch-sensitive surfaces or touch panels, laptop computers, handheld computers, smart screens, wearable devices (such as smartwatches, smart bracelets, etc.), augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, in-vehicle systems, smart headphones, game consoles, and can also be Internet of Things (IoT) devices or smart home devices such as smart water heaters, smart lights, smart air conditioners, etc.
[0129] The specific form of the displayed content is binary encoding. Specifically, the content represented by the binary encoding of the displayed content is related to the user's operation instructions. For example, when the operation instruction is for video, the displayed content can be the binary encoding corresponding to a certain frame of the video; when the operation instruction is for image, the displayed content can be the binary encoding corresponding to a certain image.
[0130] Optionally, the terminal device 10 may obtain the first display content from memory space, or it may obtain the first display content sent by other terminal devices or servers via a communication network.
[0131] S202: If there is no first adjustment parameter corresponding to the first display content, the terminal device generates a first image frame based on the first display content and draws the first image frame on the display screen.
[0132] Specifically, the terminal device 10 can perform rendering and other processing on the first display content based on the display pipeline, thereby generating the first image frame.
[0133] It should be noted that the first adjustment parameter is generated based on the third display content, which is the display content displayed before the first display content. The adjustment parameter can be used to adjust the blue light ratio of the corresponding image frame. For example, if the operation instruction is for an image containing multiple consecutive image frames, and the terminal device 10 generates the first adjustment parameter based on the third display content, then the image frame corresponding to the first adjustment parameter can be the image frame corresponding to the display content displayed after the third display content.
[0134] Optionally, the adjustment parameter can be in the form of a matrix. For example, suppose the adjustment parameter is a 3×3 matrix C, where the diagonal of matrix C represents the adjustment values corresponding to the RGB values. Specifically, c... 1,1 This can represent the adjustment value corresponding to red (R), c 2,2 This can represent the adjustment value corresponding to green (G), c 3,3 This can represent the adjustment value corresponding to blue (B). In this embodiment, the value corresponding to the adjustment parameter can be filled into c. 3,3 .
[0135] In some possible implementations, the method may further include:
[0136] If there is a first adjustment parameter corresponding to the first display content, the terminal device 10 generates a second image frame based on the first adjustment parameter and the first display content, and draws the second image frame on the display screen.
[0137] For example, suppose the first image is in the form of a video. Based on the above, it can be considered that the third display content and the first display content are both display content in the same video stream. It can be understood that the time node of the image frame corresponding to the third display content in the video stream is located before the time node of the image frame corresponding to the first display content in the video stream. Since similar image frames in the same video stream (which can refer to consecutive image frames or image frames spaced a certain number of times) have color similarity, that is, the pixel values of each pixel in the similar image frames are similar, the pixel color ratio of the image frame corresponding to the current display content can be adjusted based on the adjustment parameters generated by the similar image frames (or, it can be understood as the blue light ratio in the image frame). For example, before performing rendering or other processing on the first display content based on the display pipeline, the terminal device 10 can first determine whether there is a first adjustment parameter in the cache space of the terminal device 10. If there is a first adjustment parameter, it means that the blue light ratio of the third display content before the first display content is greater than the first preset value. Furthermore, the terminal device 10 generates a corresponding adjustment parameter based on the blue light ratio of the third display content. Based on the view that "the pixel values of each pixel in similar image frames are similar", it can be considered that the blue light ratio of the image frame corresponding to the first display content is also very likely to be greater than the first preset value. Therefore, it is necessary to perform blue light reduction processing on the image frame corresponding to the first display content. The specific processing method is to combine the first adjustment parameter corresponding to the third display content to perform rendering or other operations on the first display content to achieve the purpose of reducing blue light. Correspondingly, if there is no first adjustment parameter, it means that the blue light ratio of the image frames corresponding to the display content before the first display content is less than or equal to the first preset value. Based on the view that "the pixel values of each pixel in similar image frames are similar", it can be considered that the blue light ratio of the image frames corresponding to the first display content is also very likely to be less than or equal to the first preset value. Therefore, there is no need to perform blue light reduction processing on the image frames corresponding to the first display content.
[0138] In some other possible implementations, the operation instructions are operation instructions for a first image, which may be an image containing multiple consecutive image frames;
[0139] If a first adjustment parameter exists corresponding to the first display content, the terminal device 10 generates a second image frame based on the first adjustment parameter and the first display content, and draws the second image frame on the display screen, which may include:
[0140] Terminal device 10 determines whether the timing relationship between the first displayed content and the third displayed content meets preset conditions;
[0141] If the preset conditions are met, the terminal device 10 generates a second image frame based on the first adjustment parameters and the first display content, and draws the second image frame on the display screen.
[0142] If the preset conditions are not met, the terminal device 10 generates a first image frame based on the first display content and draws the first image frame on the display screen.
[0143] The first and third display contents whose timing relationship meets the preset conditions can be understood as the display contents corresponding to the aforementioned "similar image frames". Furthermore, the first and third display contents whose timing relationship does not meet the preset conditions can be considered as not corresponding to the "similar image frames". Therefore, regardless of whether the third display contents have corresponding adjustment parameters, it cannot be used as a basis for determining whether the first display contents need blue light reduction processing. Thus, when the timing relationship between the first and third display contents does not meet the preset conditions, the terminal device 10 will directly perform rendering and other processing on the first display contents through the display pipeline, and will not perform blue light reduction processing on the first display contents.
[0144] For example, the first image may be in the form of a video, a live photograph, or an animated GIF, etc.
[0145] In some other possible implementations, the terminal device 10 determines whether the timing relationship between the first displayed content and the third displayed content meets preset conditions, which may include:
[0146] Terminal device 10 determines whether the difference between the call time node corresponding to the first displayed content and the call time node corresponding to the third displayed content is within a first preset time period; and / or
[0147] Terminal device 10 determines whether the difference between the call sequence number corresponding to the first displayed content and the call sequence number corresponding to the third displayed content is less than or equal to a second preset value.
[0148] For example, please see Figure 3a , Figure 3a This is a schematic diagram illustrating a scenario for determining similar image frames based on a time node call, as provided in an embodiment of this application.
[0149] like Figure 3aAs shown, the video stream corresponding to video 3 contains image frame 31 at a first time node (corresponding to a call time node of 0 seconds), image frame 32 at a second time node (corresponding to a call time node of 0.2 seconds), image frame 33 at a third time node (corresponding to a call time node of 0.4 seconds), image frame 34 at a fourth time node (corresponding to a call time node of 0.6 seconds), and image frame 35 at a fifth time node (corresponding to a call time node of 0.8 seconds). Assuming the first preset time period is 0.4 seconds, since image frame 31 at the first time node is the starting time node, there will be no [time period] before image frame 31 at the first time node. If adjustment parameters are generated, it can be assumed that there are no similar image frames for the first time node image frame 31 that can utilize the adjustment parameters. Similarly, for the second time node image frame 32, the first time node image frame 31 is a similar image frame to the second time node image frame 32. If corresponding adjustment parameters are generated for the first time node image frame 31, the adjustment parameters corresponding to the first time node image frame 31 can be utilized during the rendering of the second time node image frame 32. For the third time node image frame 33, the first time node image frame 31 and the second time node image frame 32 are similar image frames to the third time node image frame 32. For the third time node image frame 33, similar image frames are generated when corresponding adjustment parameters are generated for the first time node image frame 31 and the second time node image frame 32. During the rendering of the third time node image frame 33, the corresponding adjustment parameters for the first time node image frame 31 and the second time node image frame 32 can be used. Similarly, for the fourth time node image frame 34, the second time node image frame 32 and the third time node image frame 33 are similar image frames. During the rendering of the fourth time node image frame 34, the corresponding adjustment parameters for the second time node image frame 32 and the third time node image frame 33 can be used. For the fifth time node image frame 35, the third time node image frame 33 and the fourth time node image frame 34 are similar image frames. During the rendering of the fifth time node image frame 35, the corresponding adjustment parameters for the third time node image frame 33 and the fourth time node image frame 34 can be used.
[0150] For example, please see Figure 3b , Figure 3b This is a schematic diagram illustrating a scenario for determining similar image frames based on call sequence numbers, as provided in an embodiment of this application.
[0151] like Figure 3bAs shown, the video stream corresponding to video 3 contains a first called image frame 36 (corresponding to call number 1), a second called image frame 37 (corresponding to call number 2), a third called image frame 38 (corresponding to call number 3), a fourth called image frame 39 (corresponding to call number 4), and a fifth called image frame 30 (corresponding to call number 5). Assuming the second preset value is 2, since the first called image frame 36 is the starting time node (the starting called image frame), no adjustment parameters are generated before the first called image frame 36. Therefore, it can be assumed that the first called image frame 36 does not have a similar image frame from which adjustment parameters can be used. Similarly, for the second called image frame 37, the first called image frame 36 is a similar image frame to the second called image frame 37. When the first called image frame 36 generates corresponding adjustment parameters, the adjustment parameters corresponding to the first called image frame 36 can be used during the rendering of the second called image frame 37. For the third called image frame 38, the first called image frame 36 and the second called image frame 37 are the third called image frame. For image frame 38, similar image frames, when corresponding adjustment parameters are generated by the first called image frame 36 and the second called image frame 37, can utilize the corresponding adjustment parameters of the first called image frame 36 and the second called image frame 37 during the rendering of the third called image frame 38; for the fourth called image frame 39, the second called image frame 37 and the third called image frame 38 are similar image frames to the fourth called image frame 39, and when corresponding adjustment parameters are generated by the second called image frame 37 and the third called image frame 38, can utilize the corresponding adjustment parameters of the second called image frame 37 and the third called image frame 38 during the rendering of the fourth called image frame 39; for the fifth called image frame 30, the third called image frame 38 and the fourth called image frame 39 are similar image frames to the fifth called image frame 30, and when corresponding adjustment parameters are generated by the third called image frame 38 and the fourth called image frame 39, can utilize the corresponding adjustment parameters of the third called image frame 38 and the fourth called image frame 39 during the rendering of the fifth called image frame 30.
[0152] Optionally, blue light reduction processing for animated GIFs or live photos can also be referenced. Figures 3a-3b The methods related to the embodiments and their implementations are not described in detail here.
[0153] It should be noted that, Figure 3a and Figure 3b The examples of the first preset time period and the second preset value are only for illustrating the method of the embodiments of this application in more detail, and should not be construed as limiting. The specific first preset time period and the second preset value shall be set by the technician according to the actual situation.
[0154] In some other possible implementations, the terminal device 10 may calculate the blue light ratio of an image frame every preset time and / or preset frame, which helps to further reduce the computing overhead of the terminal device and reduce the operating burden of the terminal device.
[0155] For example, if the preset time is 0.5 seconds, and the terminal device 10 retrieves the first display content from the memory space at 00:00 and calculates the first blue light percentage of the image frame corresponding to the first display content, then for all display content retrieved by the terminal device 10 within the time interval (00:00, 00:50), it is not necessary to calculate the blue light percentage of the corresponding image frame. Optionally, if the preset frame is 3 frames, and the terminal device 10 retrieves the first display content (corresponding to the first frame) from the memory space and calculates the first blue light percentage of the image frame corresponding to the first display content, then for the display content corresponding to the second to fourth frames retrieved by the terminal device 10, it is not necessary to calculate the blue light percentage of the corresponding image frame.
[0156] In some other possible implementations, the operation instruction is an operation instruction for a second image, which may be an image containing only one image frame;
[0157] After generating the second adjustment parameter based on the first blue light percentage, the method in this application embodiment may further include:
[0158] If the user does not update the operation command within the second preset time period, the terminal device 10 generates a third image frame based on the first display content and the second adjustment parameters, and draws the third image frame on the display screen.
[0159] For example, please see Figure 4 , Figure 4 This is a schematic diagram of an image redrawing scene provided in an embodiment of this application.
[0160] like Figure 4 As shown, the user inputs an operation command for image 41 from the photo album application of terminal device 10, such as clicking image 41 (assuming the blue light ratio of the downsampled image frame corresponding to image 41 is greater than a first preset value). Then, the display content corresponding to image 41 is display content 42. Terminal device 10 will retrieve display content 42 from memory space and perform rendering and other processing on display content 42 through the display pipeline. Since display content 42 is image data, display content 42 does not have similar image frames, so it is impossible to perform blue light reduction processing on display content 42 based on adjustment parameters. Therefore, terminal device 10 can use... Figure 4The process shown performs the first rendering operation on the display content 42, generates the first image frame 43, and draws the first image frame 43 on the display screen 44. Assuming the screen refresh rate of terminal device 10 is 60 Hz and the second preset time period is 0.16 seconds, the rendering processing time of the terminal device for the displayed content 42 is less than the second preset time period. If the user does not input a new operation command (such as exit viewing, zoom in, zoom out, rotate, share, delete, or edit, etc.) for the first image frame 43 within 0.16 seconds after opening image 41 (considered as the first operation command input for image 41), terminal device 10 can perform blue light reduction processing on the displayed content 42 based on the adjustment parameters corresponding to the displayed content 42 when the display screen 44 refreshes next time, to obtain the second image frame 45, and draw the second image frame 45 on the display screen 44. If the user does not input a new operation command (such as exit viewing, zoom in, zoom out, rotate, share, delete, or edit, etc.) for the second image frame 45 within 0.16 seconds after the terminal device 10 draws the second image frame 45 on the display screen, then the display screen 44 will continue to display the second image frame 45 until the user inputs a new operation command for the second image frame 45, without needing to re-render the displayed content 42.
[0161] Optionally, for some operation instructions targeting the first image, it can also be applied. Figure 4 The methods mentioned in the embodiments are as follows. For example, during video playback, if a user inputs a command to pause the video, the display screen of terminal device 10 will continuously display the image frame corresponding to the pause command, and terminal device 10 will stop acquiring new display content. If the image frame corresponding to the pause command requires blue light reduction processing but has not been processed, or if the image frame corresponding to the pause command is processed for blue light reduction based on preset adjustment parameters, then the display screen can refer to the following on the next refresh: Figure 4 Based on the adjustment parameters corresponding to the image frame corresponding to the operation command to pause the video, the image frame corresponding to the operation command to pause the video is redrawn.
[0162] As can be seen, the embodiments of this application adopt different blue light reduction processing methods according to different operation command types, which helps to obtain better blue light reduction effects. Specifically, before rendering video content (or GIFs, or live photos), the terminal device 10 can determine whether there are suitable adjustment parameters. If there are suitable adjustment parameters, the display content can be rendered based on the adjustment parameters. This helps to avoid the terminal device 10 counting the blue light ratio of the corresponding image frames of the display content frame by frame, thereby reducing the operating burden of the terminal device 10 and lowering the usage threshold of blue light reduction operation, thus improving the versatility of the embodiments of this application. For image content (or videos in a paused state), the terminal device 10 can, under certain circumstances, redraw the display content based on the adjustment parameters corresponding to the display content. This helps to adjust the blue light ratio presented on the display screen in a timely manner, thereby reducing the user's eye burden and improving the user experience.
[0163] S203: The terminal device generates a first downsampled image frame corresponding to the first image frame, and calculates the first blue light percentage of the first downsampled image frame.
[0164] For example, please see Figure 5 , Figure 5 This is a schematic diagram of a downsampling scenario provided in an embodiment of this application.
[0165] like Figure 5 As shown, if the first image frame 51 is an image with a size of 8×8, the first image frame is downsampled with a downsampling coefficient of 2, and then a second image frame 52 with a size of 4×4 can be generated.
[0166] It should be noted that, Figure 5 The distance between the first image frame and the downsampling coefficient is only for better illustrating the method of the embodiments of this application and should not be construed as limiting. The specific size of the first image frame and the downsampling coefficient shall be set by the technician according to the actual situation and are not limited here.
[0167] Furthermore, the first blue light ratio can be calculated as the proportion of the total number of B values in the RGB values of each pixel in the first downsampled image frame to the total number of RGB values of each pixel in the first downsampled image frame; the first blue light ratio can also be calculated as the ratio of the number of blue light pixels in the first downsampled image frame to the total number of pixels in the first downsampled image frame; further still, blue light pixels can refer to pixels whose B values in the RGB values account for a preset blue light value. This preset blue light value can be set by technicians according to actual conditions, and this application does not impose any restrictions on it.
[0168] For example, please see Figure 6 , Figure 6This is a schematic diagram illustrating a scenario for calculating the proportion of blue light, provided as an embodiment of this application.
[0169] like Figure 6 As shown, the size of the first downsampled image frame 61 is 4×4, and the RGB values of each pixel in the first downsampled image frame 61 are as follows: Figure 6 As shown, if we follow the calculation rule of "the proportion of the total number of B values in the RGB values of each pixel in the first downsampled image frame to the total number of RGB values of each pixel in the first downsampled image frame", then we can conclude that the proportion of the first blue light in the first downsampled image frame 61 is (100+160+170+50+150+20+125+0+100+250+0+0+100+0+125+0)÷(320+360+390+50+210+220+375+0+130+350+255+20+200+255+375+0)=1350÷3510≈38.46%, that is, the proportion of the first blue light in the first downsampled image frame 61 is approximately 38.46%. Assuming the blue light preset value is 34%, and following the calculation rule of "the ratio of the number of blue light pixels in the first downsampled image frame to the total number of pixels in the first downsampled image frame", we first calculate the "B value: RGB value" of each pixel in the first downsampled image frame 61. The "B value: RGB value" of each pixel are: 31.25%, 44.44%, 43.59%, 100%, 71.43%, 9.1%, 33.33%, 0%, 76.92%, 71.43%, 0%, 0%, 50%, 0%, 33.33%, and 0%. We can determine that the number of blue light pixels is 7, and thus the first blue light percentage of the first downsampled image frame 61 is 7 ÷ 16 = 43.75%.
[0170] S204: When the first blue light ratio is greater than the first preset value, the terminal device generates a second adjustment parameter based on the first blue light ratio.
[0171] The second adjustment parameter can be used to adjust the blue light ratio of the image frame corresponding to the second display content, and the second display content is one or more display contents displayed after the first display content.
[0172] In summary, the method of this application embodiment can adopt different blue light reduction analysis or processing schemes according to different operation instructions, which helps to improve the efficiency of blue light ratio statistics while ensuring the accuracy of blue light ratio statistics results and reducing the operating burden of terminal equipment.
[0173] Please see Figure 7 , Figure 7 This application provides another method for dynamically reducing blue light from a screen.
[0174] like Figure 7As shown, the method may include the following steps:
[0175] S701: The terminal device responds to the user's operation command and obtains the first display content.
[0176] S702: If there is no first adjustment parameter corresponding to the first display content, the terminal device generates a first image frame based on the first display content and draws the first image frame on the display screen.
[0177] S703: The terminal device generates a first downsampled image frame corresponding to the first image frame, and calculates the first blue light percentage of the first downsampled image frame.
[0178] The explanations or examples related to steps S701-S703 can be found in [reference]. Figure 2 Steps S201-S203 and their related embodiments are not described in detail here.
[0179] S704: When the proportion of blue light is greater than the first preset value, the terminal device generates a fourth image frame based on the first display content and adjustment parameters, and draws the fourth image frame on the display screen.
[0180] The adjustment parameters may include a third adjustment parameter and at least one preset adjustment parameter. The third adjustment parameter is generated based on the fourth display content, which is the display content displayed before the first display content. Each preset adjustment parameter corresponds to a preset range.
[0181] For example, if the first preset value for the blue light percentage is 40%, it can be considered that when the first blue light percentage is greater than 40%, the blue light component in the image frame corresponding to the first displayed content (i.e., the aforementioned first image frame) is too high, which may cause eye strain for the user. Therefore, it is possible to select to perform blue light reduction processing on the first displayed content based on adjustment parameters, thereby reducing the eye strain for the user. Combined with... Figure 6 According to the relevant embodiments, if the calculation rule of "the proportion of the total number of B values in the RGB values of each pixel in the first downsampled image frame to the total number of RGB values of each pixel in the first downsampled image frame" is adopted, then there is no need to perform blue light reduction processing on the first display content, and the image frame corresponding to the first target content (i.e., the first image frame mentioned above) can be directly drawn on the display screen; if the calculation rule of "the ratio of the number of blue light pixels in the first downsampled image frame to the total number of pixels in the first downsampled image frame" is adopted, then it can be considered that the first display content needs to be processed to reduce blue light, and the image frame after blue light reduction processing (i.e., the fourth image frame mentioned above) is drawn on the display screen.
[0182] Furthermore, at least one preset range and its corresponding preset adjustment parameter can be set based on a first preset value. For example, a first preset range [40%, 50%), a second preset range [50%, 60%), and a third preset range [60%, 70%) can be set, wherein a first preset adjustment parameter (in conjunction with...) can be set for the first preset range. Figure 2 Step S204 provides an example of adjusting the parameter, let c 3,3 =0.8), and set the second preset adjustment parameter for the second preset range (in combination with 0.8). Figure 2 Step S204 provides an example of adjusting the parameter, let c 3,3 =0.6), set the third preset adjustment parameter for the third preset range (in combination with) Figure 2 Step S204 provides an example of adjusting the parameter, let c 3,3 =0.4). It should be noted that the examples of preset ranges and their corresponding preset adjustment parameters above are only for illustrating the methods of the embodiments of this application in more detail, and should not be construed as limiting. The specific preset ranges and their corresponding preset adjustment parameters shall be set by the technicians according to the actual situation.
[0183] In some possible implementations, when the first blue light percentage is greater than a first preset value, the terminal device 10 generates a fourth image frame based on the first display content and adjustment parameters, and draws the fourth image frame on the display screen, which may include:
[0184] If the proportion of blue light is greater than the first preset value, the terminal device 10 determines whether the third adjustment parameter is empty;
[0185] If the third adjustment parameter is not empty, the terminal device 10 generates a fourth image frame based on the first display content and the third adjustment parameter, and draws the fourth image frame on the display screen.
[0186] If the third adjustment parameter is empty, the terminal device 10 generates a fourth image frame based on the preset adjustment parameters corresponding to the first display content and the first blue light ratio, and draws the fourth image frame on the display screen.
[0187] For example, if there is no content before the first displayed content whose blue light percentage is greater than the first preset value, then no adjustment parameter is generated, and the adjustment parameter can be considered empty. Therefore, it is necessary to combine the preset adjustment parameter to reduce the blue light of the first displayed content. If there is content before the first displayed content whose blue light percentage is greater than the first preset value, then the corresponding adjustment parameter must have been generated, and the adjustment parameter can be considered non-empty. Therefore, the adjustment parameter can be combined to reduce the blue light of the first displayed content.
[0188] In other possible implementations, if the third adjustment parameter is empty, the terminal device 10 generates a fourth image frame based on the preset adjustment parameters corresponding to the first display content and the first blue light ratio, and draws the fourth image frame on the display screen, which may include:
[0189] If the third adjustment parameter is empty, the terminal device 10 determines the preset adjustment parameter corresponding to the first blue light ratio based on the preset range corresponding to the first blue light ratio.
[0190] The terminal device 10 generates a fourth image frame based on preset adjustment parameters corresponding to the first display content and the first blue light ratio, and draws the fourth image frame on the display screen.
[0191] Terminal device 10 updates the third adjustment parameter based on the first adjustment parameter.
[0192] For example, based on the above-mentioned preset range and its corresponding preset adjustment parameters, if the first blue light ratio corresponding to the first display content is 51%, it can be determined that the first blue light ratio is in the second preset range. It can be further determined that the preset adjustment parameter corresponding to the first blue light ratio is the second preset adjustment parameter. Then, based on the second preset adjustment parameter, the first target content can be processed to reduce blue light, generate the fourth image frame, and draw the fourth image frame on the display screen.
[0193] Furthermore, "the terminal device 10 updates the third adjustment parameter based on the first adjustment parameter" can be understood as replacing the third adjustment parameter with the first adjustment parameter. For example, suppose the third adjustment parameter is 0.6. Now, after the terminal device 10 generates a third image frame based on the preset adjustment parameters corresponding to the first display content and the first blue light ratio, and draws the third image frame on the display screen, it generates a first adjustment parameter of 0.7. Then, 0.7 can be determined as the new third adjustment parameter, and the new third display content is the first display content.
[0194] In some other possible implementations, the blue light percentage of the image frame after downsampling of the third display content is the second blue light percentage;
[0195] If the third adjustment parameter is not empty, the terminal device 10 generates a fourth image frame based on the first display content and the third adjustment parameter, and draws the fourth image frame on the display screen, which may include:
[0196] If the third adjustment parameter is not empty, the terminal device 10 calculates the difference between the first blue light ratio and the second blue light ratio.
[0197] If the absolute value of the difference is less than or equal to the third preset value, the terminal device 10 generates a fourth image frame based on the first display content and the third adjustment parameter, and draws the fourth image frame on the display screen.
[0198] Where the absolute value of the difference is less than or equal to the third preset value, it can be considered that the blue light ratios of the first and fourth displayed content are similar. Therefore, after applying blue light reduction processing to the first displayed content based on the third adjustment parameter, a better blue light reduction effect can be obtained. For example, assuming the first blue light ratio is 47%, the second blue light ratio is 45%, and the third preset value is 3%, the difference between the first and second blue light ratios can be calculated as: 47% - 45% = 2%, where |2%| < 3%. Therefore, based on the first displayed content and the third adjustment parameter, a fourth image frame can be generated and drawn on the display screen.
[0199] In other possible implementations, the method of this application embodiment may further include:
[0200] If the absolute value of the difference is greater than the third preset value, the terminal device 10 generates a fourth image frame based on the preset adjustment parameters corresponding to the first display content and the first blue light ratio, and draws the fourth image frame on the display screen.
[0201] Terminal device 10 updates the third adjustment parameter based on the first adjustment parameter.
[0202] In cases where the absolute value of the difference is greater than the third preset value, it can be assumed that the difference in blue light ratio between the first and fourth displayed content is significant. Therefore, applying the third adjustment parameter to the first displayed content to reduce blue light may result in a poor blue light reduction effect. Thus, using the preset adjustment parameter is a more suitable choice. For example, considering the aforementioned preset range and corresponding preset adjustment parameters, assuming the first blue light ratio is 55%, the second blue light ratio is 45%, and the third preset value is 3%, the difference between the first and second blue light ratios can be calculated as: 55% - 45% = 10%. Since |10%| > 3%, a fourth image frame needs to be generated based on the first displayed content and the second preset adjustment parameter, and then drawn on the display screen.
[0203] It should be noted that the third preset value is less than the size of the preset interval, and the third preset value is a positive number. For example, when the interval span of each preset interval is 10%, the third preset value is less than 10%; when the interval span of each preset interval is 5%, the third preset value is less than 5%; when the interval span of each preset interval is 3%, the third preset value is less than 3%.
[0204] S705: When the proportion of the first blue light is less than or equal to the first preset value, the terminal device draws the first image frame on the display screen.
[0205] In summary, by implementing the method of this application embodiment, the terminal device 10 can redraw the first displayed content based on adjustment parameters when the blue light ratio corresponding to the first displayed content is greater than a corresponding preset value. Specifically, the terminal device 10 will also determine the blue light reduction scheme for the first displayed content based on whether adjustment parameters exist and the relationship between the blue light ratio corresponding to the first displayed content and the blue light ratio corresponding to the adjustment parameters, which helps to obtain a better blue light reduction effect and improve the user experience.
[0206] Please see Figure 8 , Figure 8 This is a schematic diagram of the composition of a terminal device provided in an embodiment of this application.
[0207] like Figure 8 As shown, the terminal device 10 may include: an input module 810, a processing module 820, and a display module 830;
[0208] Input module 810 is used to receive user operation commands;
[0209] Processing module 820 is used to obtain the first display content in response to the user's operation command;
[0210] The processing module 820 is further configured to generate a first image frame based on the first display content and draw the first image frame on the display screen when there is no first adjustment parameter corresponding to the first display content;
[0211] Display module 830 is used to display the first image frame;
[0212] The processing module 820 is also used to generate a first downsampled image frame corresponding to the first image frame, and to calculate the first blue light ratio of the first downsampled image frame;
[0213] The processing module 820 is further configured to generate a second adjustment parameter based on the first blue light ratio when the first blue light ratio is greater than the first preset value. The second adjustment parameter is used to adjust the blue light ratio of the image frame corresponding to the second display content. The second display content is one or more display contents displayed after the first display content.
[0214] In implementing the method provided in the second aspect, in some embodiments, the terminal device may further include:
[0215] The processing module 820 is further configured to generate a second image frame based on the first adjustment parameter and the first display content when a first adjustment parameter corresponding to the first display content exists, and to draw the second image frame on the display screen;
[0216] The display module 830 is also used to display a second image frame.
[0217] In implementing the method provided in the second aspect, in some embodiments, the operation instructions are operation instructions for a first image, which may be an image containing multiple consecutive image frames;
[0218] The first adjustment parameter is generated based on the third display content, which is the display content displayed before the first display content;
[0219] The terminal device may also include: a judgment module 840;
[0220] The judgment module 840 is used to determine whether the timing relationship between the first display content and the third display content meets the preset conditions;
[0221] The processing module 820 is also used to generate a second image frame based on the first adjustment parameter and the first display content when the preset conditions are met, and to draw the second image frame on the display screen;
[0222] The processing module 820 is also used to generate a first image frame based on the first display content and draw the first image frame on the display screen if the preset conditions are not met.
[0223] In implementing the method provided in the second aspect, in some embodiments, the terminal device may further include:
[0224] The judgment module 840 is further configured to determine whether the difference between the call time node corresponding to the first displayed content and the call time node corresponding to the third displayed content is within a first preset time period; and / or
[0225] The judgment module 840 is also used to determine whether the difference between the call sequence number corresponding to the first display content and the call sequence number corresponding to the third display content is less than or equal to a second preset value.
[0226] In implementing the method provided in the second aspect, in some embodiments, the operation instructions are operation instructions for a second image, which may be an image containing only one image frame;
[0227] The terminal device may also include:
[0228] The processing module 820 is also used to generate a third image frame based on the first display content and the second adjustment parameters, and draw the third image frame on the display screen if the user does not update the operation instruction within the second preset time period.
[0229] Display module 830 is also used to display a third image frame.
[0230] In implementing the method provided in the second aspect, in some embodiments, the terminal device may further include:
[0231] The processing module 820 is further configured to generate a fourth image frame based on the first display content and adjustment parameters, and draw the fourth image frame on the display screen when the first blue light ratio is greater than the first preset value;
[0232] Display module 830 is also used to display a fourth image frame;
[0233] The processing module 820 is also used to draw a first image frame on the display screen when the first blue light ratio is less than or equal to a first preset value.
[0234] In implementing the method provided in the second aspect, in some embodiments, the adjustment parameters may include a third adjustment parameter and at least one preset adjustment parameter, wherein the third adjustment parameter is generated based on a fourth display content, which is the display content displayed before the first display content;
[0235] The terminal device may also include:
[0236] The judgment module 840 is also used to determine whether the third adjustment parameter is empty when the first blue light ratio is greater than the first preset value;
[0237] The processing module 820 is also used to generate a fourth image frame based on the first display content and the third adjustment parameter when the third adjustment parameter is not empty, and to draw the fourth image frame on the display screen.
[0238] The processing module 820 is also used to generate a fourth image frame based on the preset adjustment parameters corresponding to the first display content and the first blue light ratio when the third adjustment parameter is empty, and to draw the fourth image frame on the display screen.
[0239] In implementing the method provided in the second aspect, in some embodiments, each preset adjustment parameter corresponds to a preset range;
[0240] The terminal device may also include:
[0241] The processing module 820 is also used to determine the preset adjustment parameter corresponding to the first blue light ratio based on the preset range corresponding to the first blue light ratio when the third adjustment parameter is empty;
[0242] The processing module 820 is also used to generate a fourth image frame based on preset adjustment parameters corresponding to the first display content and the first blue light ratio, and to draw the fourth image frame on the display screen;
[0243] The processing module 820 is also used to update the third adjustment parameter based on the first adjustment parameter.
[0244] In implementing the method provided in the second aspect, in some embodiments, the blue light percentage of the image frame after downsampling of the third display content is the second blue light percentage;
[0245] The terminal device may also include:
[0246] The processing module 820 is also used to calculate the difference between the first blue light ratio and the second blue light ratio when the third adjustment parameter is not empty;
[0247] The processing module 820 is also used to generate a fourth image frame based on the first display content and the third adjustment parameter when the absolute value of the difference is less than or equal to a third preset value, and to draw the fourth image frame on the display screen.
[0248] In implementing the method provided in the second aspect, in some embodiments, the terminal device may further include:
[0249] The processing module 820 is also used to generate a fourth image frame based on the preset adjustment parameters corresponding to the first display content and the first blue light ratio when the absolute value of the difference is greater than the third preset value, and to draw the fourth image frame on the display screen.
[0250] The processing module 820 is also used to update the third adjustment parameter based on the first adjustment parameter.
[0251] Please see Figure 9 , Figure 9 This is a schematic diagram of the hardware structure of another terminal device provided in an embodiment of this application. The terminal device 10 is used to execute the image recommendation method provided in the preceding method embodiments.
[0252] Terminal device 10 may include a processor 101, a memory 102, a wireless communication module 103, a mobile communication module 104, an antenna 103A, an antenna 104A, a power switch 105, a sensor module 106, a focusing motor 107, a camera 108, a display screen 109, etc. The sensor module 106 may include a gyroscope sensor 106A, an accelerometer sensor 106B, an ambient light sensor 106C, an image sensor 106D, a proximity sensor 106E, etc. The wireless communication module 103 may include a WLAN communication module, a Bluetooth communication module, etc. All of the above components can transmit data via a bus.
[0253] Processor 101 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.
[0254] Memory 102 can be used to store computer executable program code, which may include instructions. Processor 101 executes various functional applications and data processing of terminal device 10 by running the instructions stored in memory 102. Memory 102 may include a program storage area and a data storage area. In specific implementations, memory 102 may include high-speed random access memory, and may also include non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices.
[0255] The wireless communication function of the terminal device 10 can be implemented through antenna 103A, antenna 104A, mobile communication module 104, wireless communication module 103, modem processor, and baseband processor.
[0256] Antennas 103A and 104A can be used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 10 can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization.
[0257] The mobile communication module 104 can provide solutions for wireless communication applications including 2G / 3G / 4G / 5G on the terminal device 10. The mobile communication module 104 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 104 can receive electromagnetic waves via antenna 104A, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 104 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 104A.
[0258] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs a sound signal through an audio device or displays an image or video through the display screen 109.
[0259] The wireless communication module 103 can provide solutions for wireless communication applications on the terminal device 10, including wireless local area networks (WLAN), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR). The wireless communication module 103 can be one or more devices integrating at least one communication processing module. The wireless communication module 103 receives electromagnetic waves via antenna 103A, performs frequency modulation and filtering of the electromagnetic wave signal, and sends the processed signal to processor 101. The wireless communication module 103 can also receive signals to be transmitted from processor 101, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 103A.
[0260] The power switch 105 can be used to control the power supply to the terminal device 10.
[0261] The gyroscope sensor 106A can be used to determine the motion attitude of the terminal device 10. In some embodiments, the gyroscope sensor 106A can determine the angular velocity of the terminal device 10 about three axes (i.e., the x, y, and z axes). The gyroscope sensor 106A can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 106A detects the angle of the shaking of the terminal device 10, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shaking of the terminal device 10 by moving in the opposite direction, thus achieving image stabilization. The gyroscope sensor 106A can also be used in navigation and motion-sensing game scenarios.
[0262] Accelerometer 106B can detect the magnitude of acceleration of terminal device 10 in various directions (generally three axes). When terminal device 10 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the user terminal's posture; for example, accelerometer 106B can be applied to applications such as landscape / portrait screen switching and pedometers.
[0263] The ambient light sensor 106C is used to sense the ambient light intensity. The terminal device 10 can adaptively adjust the brightness of the display screen 109 according to the sensed ambient light intensity. The ambient light sensor 106C can also be used to automatically adjust the white balance when taking pictures.
[0264] The 106D image sensor, also known as a photosensitive element, uses the photoelectric conversion function of an optoelectronic device to convert a light image on a photosensitive surface into an electrical signal proportional to the light image. Image sensors can be either charge-coupled device (CCD) sensors or complementary metal-oxide-semiconductor (CMOS) sensors.
[0265] The distance sensor 106E can be used to measure distance. The terminal device 10 can measure distance via infrared or laser. In some shooting scenarios, the terminal device 10 can use the distance sensor 106E to measure distance for fast focusing.
[0266] The focusing motor 107 can be used for rapid focusing. The terminal device 10 can control the movement of the lens via the focusing motor 107 to achieve autofocus.
[0267] Terminal device 10 can perform shooting functions through ISP, camera 108, video codec, GPU, display 109 and application processor.
[0268] The ISP is used to process data fed back by the camera 108. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, converting it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise and brightness. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 108.
[0269] Camera 108 can be used to capture still images or videos. An object is projected onto an image sensor through the lens, generating an optical image. The image sensor converts the light signal into an electrical signal, which is then passed to an ISP (Internet Service Provider) for conversion into a digital image signal. The ISP can output the digital image signal to a DSP (Digital Signal Processor) for processing. The DSP converts the digital image signal into image signals in standard formats such as RGB and YUV. In some embodiments, the terminal device 10 may include one or N cameras 108, where N is a positive integer greater than 1.
[0270] Video codecs are used to compress or decompress digital images. Terminal device 10 may support one or more image codecs. Thus, terminal device 10 can open or save images or videos in various encoding formats.
[0271] Terminal device 10 can implement display functions through a GPU, display screen 109, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 109 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 101 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0272] The display screen 109 is used to display images, videos, etc. The display screen 109 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal device 10 may include one or N displays 109, where N is a positive integer greater than 1.
[0273] It is understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the terminal device 10. In other embodiments of this application, the terminal device 10 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0274] The operations performed by each device in the terminal device 10 can be referred to the relevant descriptions in the previous method embodiments, and will not be elaborated here.
[0275] The software system of terminal device 10 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses a layered mobile operating system as an example to exemplify the software structure of terminal device 10.
[0276] Please see Figure 10 , Figure 10 This is a software structure block diagram of a terminal device according to an embodiment of this application.
[0277] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, a mobile operating system is divided into four layers, from top to bottom: the application layer, the application framework / core service layer, the system libraries and runtime, and the kernel layer.
[0278] The application layer can include a series of application packages.
[0279] like Figure 10 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.
[0280] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0281] like Figure 10 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0282] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0283] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0284] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0285] A phone manager is used to provide communication functions for user terminals. For example, it manages call status (including connection and disconnection).
[0286] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0287] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating the user's device, and flashing indicator lights.
[0288] Runtime can refer to all the code libraries, frameworks, etc., required for a program to run. For example, for the C language, the runtime includes a series of function libraries required for C programs to run. For the Java language, in addition to the core libraries, the runtime also includes the virtual machine required for Java programs to run. The aforementioned core libraries can include the functionalities that the Java language needs to call.
[0289] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0290] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0291] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0292] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0293] A 2D graphics engine is a graphics engine for 2D drawing.
[0294] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0295] It should be understood that each step in the above method embodiments can be completed by integrated logic circuits in the processor hardware or by instructions in software form. The method steps disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor.
[0296] This application also provides a user terminal, which may include a memory and a processor. The memory may be used to store computer programs; the processor may be used to invoke the computer programs in the memory, so that the user terminal executes the methods executed on the user terminal side in any of the above embodiments.
[0297] This application also provides a user terminal, which may include a memory and a processor. The memory may be used to store computer programs; the processor may be used to invoke the computer programs in the memory, so that the user terminal executes the methods executed on the user terminal side in any of the above embodiments.
[0298] This application also provides a chip system, which includes at least one processor for implementing the functions involved on the user terminal side in any of the above embodiments.
[0299] In one possible design, the chip system also includes a memory for storing program instructions and data, which may be located within or outside the processor.
[0300] The chip system can consist of chips or include chips and other discrete components.
[0301] Optionally, the chip system may contain one or more processors. These processors can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.
[0302] Optionally, the chip system may contain one or more memories. The memory may be integrated with the processor or disposed separately from it; this application embodiment does not limit this. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or disposed separately on different chips. This application embodiment does not specifically limit the type of memory or the arrangement of the memory and processor.
[0303] For example, the chip system may 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 micro controller unit (MCU), a programmable logic device (PLD), or other integrated chips.
[0304] This application also provides a computer program product, which includes a computer program (also referred to as code or instructions) that, when run, causes a computer to execute the method executed on the user terminal side in any of the above embodiments.
[0305] This application also provides a computer-readable storage medium storing a computer program (also referred to as code or instructions). When the computer program is run, it causes the computer to perform the method executed on the user terminal side in any of the above embodiments.
[0306] The various embodiments of this application can be combined arbitrarily to achieve different technical effects.
[0307] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as 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, all or part of the processes or functions described in this application are generated. 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. 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 wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0308] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above 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.
[0309] In summary, the above description is merely an embodiment of the technical solution of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made based on the disclosure of this application should be included within the scope of protection of this application.
Claims
1. A method for dynamically reducing blue light from a screen, characterized in that, The method includes the following steps: Responding to the user's operation command, retrieve the first content to be displayed; If there is no first adjustment parameter corresponding to the first display content, a first image frame is generated based on the first display content and drawn on the display screen. The first adjustment parameter is used to adjust the blue light ratio of the first image frame. Generate a first downsampled image frame corresponding to the first image frame, and calculate the first blue light percentage of the first downsampled image frame; When the first blue light ratio is greater than the first preset value, a second adjustment parameter is generated based on the first blue light ratio. The second adjustment parameter is used to adjust the blue light ratio of the image frame corresponding to the second display content. The second display content is one or more display contents displayed after the first display content.
2. The method according to claim 1, characterized in that, The method further includes: If a first adjustment parameter exists corresponding to the first display content, a second image frame is generated based on the first adjustment parameter and the first display content, and the second image frame is drawn on the display screen.
3. The method according to claim 2, characterized in that, The operation instruction is an operation instruction for a first image, and the first image is an image containing multiple consecutive image frames; The first adjustment parameter is generated based on the third display content, which is the display content displayed before the first display content; The method further includes: Determine whether the timing relationship between the first displayed content and the third displayed content meets preset conditions; If the preset conditions are met, the second image frame is generated based on the first adjustment parameter and the first display content, and the second image frame is drawn on the display screen; If the preset conditions are not met, the first image frame is generated based on the first display content, and the first image frame is drawn on the display screen.
4. The method according to claim 3, characterized in that, The step of determining whether the timing relationship between the first displayed content and the third displayed content meets preset conditions includes: Determine whether the difference between the call time node corresponding to the first displayed content and the call time node corresponding to the third displayed content is within a first preset time period; and / or Determine whether the difference between the call sequence number corresponding to the first displayed content and the call sequence number corresponding to the third displayed content is less than or equal to a second preset value.
5. The method according to claim 1 or 2, characterized in that, The operation instruction is an operation instruction for the second image, which is an image containing only one image frame; After generating the second adjustment parameter based on the first blue light percentage, the method further includes: If the user does not update the operation instruction within the second preset time period, a third image frame is generated based on the first display content and the second adjustment parameters, and the third image frame is drawn on the display screen.
6. The method according to claim 1, characterized in that, The method further includes: When the first blue light ratio is greater than the first preset value, a fourth image frame is generated based on the first display content, the third adjustment parameter and at least one preset adjustment parameter, and the fourth image frame is drawn on the display screen. The third adjustment parameter is generated based on the fourth display content, and the fourth display content is the display content displayed before the first display content. When the first blue light percentage is less than or equal to the first preset value, the first image frame is drawn on the display screen.
7. The method according to claim 6, characterized in that, When the first blue light percentage is greater than the first preset value, generating a fourth image frame based on the first display content, the third adjustment parameter, and at least one preset adjustment parameter, and drawing the fourth image frame on the display screen includes: If the proportion of the first blue light is greater than the first preset value, determine whether the third adjustment parameter is empty; If the third adjustment parameter is not empty, the fourth image frame is generated based on the first display content and the third adjustment parameter, and the fourth image frame is drawn on the display screen; If the third adjustment parameter is empty, the fourth image frame is generated based on the preset adjustment parameters corresponding to the first display content and the first blue light ratio, and the fourth image frame is drawn on the display screen.
8. The method according to claim 7, characterized in that, Each preset adjustment parameter corresponds to a preset range; If the third adjustment parameter is empty, then based on the preset adjustment parameters corresponding to the first display content and the first blue light ratio, the fourth image frame is generated and drawn on the display screen, including: If the third adjustment parameter is empty, then based on the preset range corresponding to the first blue light percentage, the preset adjustment parameter corresponding to the first blue light percentage is determined; The fourth image frame is generated based on the preset adjustment parameters corresponding to the first display content and the first blue light ratio, and the fourth image frame is drawn on the display screen. The third adjustment parameter is updated based on the first adjustment parameter.
9. The method according to claim 7 or 8, characterized in that, The blue light percentage of the downsampled image frame of the third display content is the second blue light percentage, and the third display content is the display content displayed before the first display content; If the third adjustment parameter is not empty, then the fourth image frame is generated based on the first display content and the third adjustment parameter, and the fourth image frame is drawn on the display screen, including: If the third adjustment parameter is not empty, then calculate the difference between the first blue light ratio and the second blue light ratio; If the absolute value of the difference is less than or equal to a third preset value, the fourth image frame is generated based on the first display content and the third adjustment parameter, and the fourth image frame is drawn on the display screen.
10. The method according to claim 9, characterized in that, The method further includes: If the absolute value of the difference is greater than the third preset value, the fourth image frame is generated based on the preset adjustment parameters corresponding to the first display content and the first blue light ratio, and the fourth image frame is drawn on the display screen. The third adjustment parameter is updated based on the first adjustment parameter.
11. A terminal device, characterized in that, The terminal device includes: an input module and a processing module; The input module is used to receive user operation instructions; The processing module is used to obtain the first display content in response to the operation instruction; The processing module is further configured to generate a first image frame based on the first display content and draw the first image frame on the display screen when there is no first adjustment parameter corresponding to the first display content; the first adjustment parameter is used to adjust the blue light ratio of the first image frame. The processing module is further configured to generate a first downsampled image frame corresponding to the first image frame, and calculate the first blue light percentage of the first downsampled image frame; The processing module is further configured to generate a second adjustment parameter based on the first blue light ratio when the first blue light ratio is greater than a first preset value. The second adjustment parameter is used to adjust the blue light ratio of the image frame corresponding to the second display content. The second display content is one or more display contents displayed after the first display content.
12. A terminal device, characterized in that, The terminal device includes one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, the computer program code including computer instructions, which, when executed by the one or more processors, cause the method as described in any one of claims 1-10 to be performed.
13. A computer-readable storage medium comprising instructions, characterized in that, When the instruction is executed on the target terminal, it causes the method described in any one of claims 1-10 to be performed.