Data processing method, device and electronic equipment

CN113535283BActive Publication Date: 2024-10-18BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010292068.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-14
Publication Date
2024-10-18
Estimated Expiration
2040-04-14

AI Technical Summary

Technical Problem

The existing eye protection mode is difficult to effectively distinguish different web page elements in electronic products, resulting in poor visual experience.

Method used

By grabbing the original color values ​​of interface elements in eye protection mode, calculating and replacing them with eye protection color values, it ensures that the color values ​​of each interface element are adjusted during the rendering process, making it easier for users to distinguish between different web page elements.

Benefits of technology

It improves the visual experience in eye protection mode and enhances the user's ability to differentiate between interfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113535283B_ABST
    Figure CN113535283B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a data processing method, device and electronic device, wherein the method comprises: determining an interface to be processed in an eye protection mode, and capturing the original color value of each interface element in the interface to be processed; based on the original color value of each interface element, respectively calculating the eye protection color value corresponding to each interface element; during the rendering process, replacing the original color value of each interface element in the interface to be processed with the corresponding eye protection color value. The embodiment of the present invention can adjust each web page element from the original color value to the corresponding eye protection color value, so that users can distinguish different web page elements, thereby improving the visual experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a data processing method, device and electronic equipment. Background Art

[0002] With the development of electronic technology, more and more users use mobile phones, computers and other electronic products for electronic office and entertainment. Facing the electronic screen for a long time will increase the user's eye fatigue, thereby increasing the risk of eye diseases (such as myopia, dry eyes, etc.). Therefore, the eye protection mode of electronic products is applied. When using electronic products, users can turn on the eye protection mode to relieve eye fatigue.

[0003] In the prior art, most eye protection modes are based on the web page level of the web page, and set the corresponding color; for example, only the background of the entire web page is set to the same color, such as black; another example is to set the background of the entire web page to the same color, and set the foreground of the entire web page to another color; etc. Since different web page elements may be at the same web page level, in these existing eye protection modes, users may not be able to distinguish different web page elements well, and the visual experience is poor. Summary of the invention

[0004] An embodiment of the present invention provides a data processing method to improve the user's visual experience of the interface in the eye protection mode.

[0005] Correspondingly, an embodiment of the present invention further provides a data processing device and an electronic device to ensure the implementation and application of the above method.

[0006] In order to solve the above problems, an embodiment of the present invention discloses a data processing method, which specifically includes: determining the interface to be processed in the eye protection mode, and capturing the original color value of each interface element in the interface to be processed; based on the original color value of each interface element, respectively calculating the eye protection color value corresponding to each interface element; during the rendering process, replacing the original color value of each interface element in the interface to be processed with the corresponding eye protection color value.

[0007] Optionally, capturing the original color value of each interface element in the interface to be processed includes: obtaining restriction range information pre-set for color value capture; and capturing the original color value of each interface element in the interface to be processed whose color value satisfies the restriction range information.

[0008] Optionally, the eye protection color value corresponding to each interface element is calculated based on the original color value of each interface element, including: determining a target primary color value from a plurality of preset primary color values, and determining a target difference coefficient corresponding to the target primary color value from a plurality of preset difference coefficients; for each interface element, calculating the color value difference between the original color value corresponding to the interface element and the reference color value; and calculating the eye protection color value corresponding to the interface element based on the color value difference, the target difference coefficient and the target primary color value.

[0009] Optionally, the eye protection color value corresponding to each interface element is calculated based on the original color value of each interface element, including: determining the target brightness ratio between each interface element; and determining the eye protection color value of each interface element according to the original color value and target brightness ratio of each interface element.

[0010] Optionally, the eye-protection color value corresponding to each interface element is calculated based on the original color value of each interface element, including: obtaining the user's historical behavior data, and determining the user's corresponding browsing habit information based on the historical behavior data; and calculating the eye-protection color value corresponding to each interface element based on the original color value of each interface element and the browsing habit information.

[0011] Optionally, the base color value and the difference coefficient are determined according to user-defined settings, terminal settings, or server settings.

[0012] An embodiment of the present invention also discloses a data processing device, which specifically includes: an original color value determination module, which is used to determine the interface to be processed in the eye protection mode, and capture the original color value of each interface element in the interface to be processed; an eye protection color value determination module, which is used to calculate the eye protection color value corresponding to each interface element based on the original color value of each interface element; and a rendering module, which is used to replace the original color value of each interface element in the interface to be processed with the corresponding eye protection color value during the rendering process.

[0013] Optionally, the original color value determination module is used to obtain restriction range information pre-set for color value capture; and capture the original color value of each interface element in the interface to be processed whose color value satisfies the restriction range information.

[0014] Optionally, the eye protection color value determination module includes: a first eye protection color value calculation submodule, used to determine a target primary color value from a plurality of preset primary color values, and to determine a target difference coefficient corresponding to the target primary color value from a plurality of preset difference coefficients; for each interface element, calculating the color value difference between the original color value corresponding to the interface element and the reference color value; and calculating the eye protection color value corresponding to the interface element based on the color value difference, the target difference coefficient and the target primary color value.

[0015] Optionally, the eye protection color value determination module includes: a second eye protection color value calculation submodule, used to determine the target brightness ratio between each interface element; and determine the eye protection color value of each interface element according to the original color value of each interface element and the target brightness ratio.

[0016] Optionally, the eye protection color value determination module includes: a third eye protection color value calculation submodule, used to obtain the user's historical behavior data, and determine the user's corresponding browsing habit information based on the historical behavior data; based on the original color value and browsing habit information of each interface element, calculate the eye protection color value corresponding to each interface element respectively.

[0017] Optionally, the base color value and the difference coefficient are determined according to user-defined settings, terminal settings, or server settings.

[0018] Optionally, the interface element includes a foreground and a background.

[0019] An embodiment of the present invention further discloses a readable storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute a data processing method as described in any one of the embodiments of the present invention.

[0020] An embodiment of the present invention also discloses an electronic device, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations: determining an interface to be processed in an eye protection mode, and capturing the original color value of each interface element in the interface to be processed; based on the original color value of each interface element, respectively calculating the eye protection color value corresponding to each interface element; during the rendering process, replacing the original color value of each interface element in the interface to be processed with the corresponding eye protection color value.

[0021] Optionally, capturing the original color value of each interface element in the interface to be processed includes: obtaining restriction range information pre-set for color value capture; and capturing the original color value of each interface element in the interface to be processed whose color value satisfies the restriction range information.

[0022] Optionally, the eye protection color value corresponding to each interface element is calculated based on the original color value of each interface element, including: determining a target primary color value from a plurality of preset primary color values, and determining a target difference coefficient corresponding to the target primary color value from a plurality of preset difference coefficients; for each interface element, calculating the color value difference between the original color value corresponding to the interface element and the reference color value; and calculating the eye protection color value corresponding to the interface element based on the color value difference, the target difference coefficient and the target primary color value.

[0023] Optionally, the eye protection color value corresponding to each interface element is calculated based on the original color value of each interface element, including: determining the target brightness ratio between each interface element; and determining the eye protection color value of each interface element according to the original color value and target brightness ratio of each interface element.

[0024] Optionally, the eye-protection color value corresponding to each interface element is calculated based on the original color value of each interface element, including: obtaining the user's historical behavior data, and determining the user's corresponding browsing habit information based on the historical behavior data; and calculating the eye-protection color value corresponding to each interface element based on the original color value of each interface element and the browsing habit information.

[0025] Optionally, the base color value and the difference coefficient are determined according to user-defined settings, terminal settings, or server settings.

[0026] Optionally, the interface element includes a foreground and a background.

[0027] The embodiments of the present invention include the following advantages:

[0028] In an embodiment of the present invention, in the eye protection mode, the original color value of each interface element in the interface to be processed can be captured, and then based on the original color value of each interface element, the eye protection color value corresponding to each interface element is calculated respectively; then in the rendering process, the original color value of each interface element in the interface to be processed is replaced with the corresponding eye protection color value; and then each web page element can be adjusted from the original color value to the corresponding eye protection color value, which is convenient for users to distinguish different web page elements, thereby improving the visual experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 is a flow chart of steps of an embodiment of a data processing method of the present invention;

[0030] Figure 2 is a flowchart of steps of an optional embodiment of a data processing method of the present invention;

[0031] Figure 3 is a flowchart of steps of another optional embodiment of a data processing method of the present invention;

[0032] Figure 4 is a flowchart of steps of another optional embodiment of a data processing method of the present invention;

[0033] Figure 5 is a structural block diagram of an embodiment of a data processing device of the present invention;

[0034] Figure 6 is a structural block diagram of an optional embodiment of a data processing device of the present invention;

[0035] Figure 7 A structural block diagram of an electronic device for data processing according to an exemplary embodiment;

[0036] Figure 8 It is a structural schematic diagram of an electronic device for data processing according to another exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0037] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0038] Reference Figure 1 , shows a flow chart of steps of a data processing method embodiment of the present invention, which may specifically include the following steps:

[0039] Step 102: determine the interface to be processed in the eye protection mode, and capture the original color value of each web page element in the interface to be processed.

[0040] In the embodiment of the present invention, the eye protection mode can be automatically set by the electronic device; or the user can customize the eye protection mode when using the electronic device to reduce the user's eye pressure. The electronic device can be a mobile terminal or a PC (Personal Computer), which is not limited in the embodiment of the present invention.

[0041] In an embodiment of the present invention, when the electronic device determines that it is currently in the eye protection mode, it can determine the interface to be processed that needs to be processed for eye protection; wherein, the interface to be processed can be the interface of an application such as a web page of a browser, or it can be a system interface, and the embodiment of the present invention does not limit this. Then, the color value of each interface element in the interface to be processed can be captured separately. For the convenience of subsequent description, the captured color value of each interface element can be referred to as the original color value. Among them, the interface elements can include multiple types, such as pictures, videos, buttons, shortcut entries, option menus, backgrounds, foregrounds, etc., and the embodiment of the present invention does not limit this. Among them, the color value can be expressed in different ways, such as RGB expression, or it can be expressed in other ways, and the embodiment of the present invention does not limit this. Then, based on the original color value of each interface element in the interface to be processed, the interface to be processed can be processed for eye protection, and the following steps 104-106 can be referred to:

[0042] Step 104: Based on the original color value of each interface element, the eye protection color value corresponding to each interface element is calculated respectively.

[0043] Step 106: During the rendering process, the original color value of each interface element in the interface to be processed is replaced with the corresponding eye protection color value.

[0044] In an embodiment of the present invention, the eye protection color value corresponding to each interface element can be calculated based on the original color value of each interface element in the interface to be processed; wherein, the eye protection color value corresponding to each interface element can be calculated based on the original color value of each interface element according to the characteristics of each interface element, such as the contrast relationship related to the color; or the eye protection color value corresponding to each interface element can be calculated based on the original color value of each interface element according to the browsing habit information of the user; the embodiment of the present invention does not limit this. Then, in the rendering process of the interface to be processed, the original color value of each interface element in the interface to be processed is replaced with the corresponding eye protection color value; thereby facilitating the user to distinguish different web page elements and improving the visual experience.

[0045] In summary, in the embodiment of the present invention, in the eye protection mode, the original color value of each interface element in the interface to be processed can be captured, and then based on the original color value of each interface element, the eye protection color value corresponding to each interface element is calculated respectively; then in the rendering process, the original color value of each interface element in the interface to be processed is replaced with the corresponding eye protection color value; and then each web page element can be adjusted from the original color value to the corresponding eye protection color value, which is convenient for users to distinguish different web page elements, thereby improving the visual experience.

[0046] In the embodiment of the present invention, there are multiple ways to calculate the eye protection color value corresponding to each interface element based on the original color value of each interface element. The following describes the various ways to calculate the eye protection color value.

[0047] In one embodiment of the present invention, a method for calculating the eye protection color value corresponding to each interface element based on the original color value of each interface element may be: calculating the eye protection color value corresponding to each interface element according to the color contrast relationship between the interface elements. Then, the color contrast relationship of each interface element after the to-be-processed interface is processed by the eye protection process can correspond to the color contrast relationship of each interface element before the to-be-processed interface is processed by the eye protection process, so that the user can better distinguish each interface element; further improving the visual experience of the user in the eye protection mode.

[0048] Reference Figure 2 , showing a step flow chart of an optional embodiment of a data processing method of the present invention.

[0049] Step 202: Determine the interface to be processed in the eye protection mode.

[0050] In the embodiment of the present invention, a method for capturing the original color value of each interface element in the interface to be processed can refer to steps 204 to 206:

[0051] Step 204: Obtain the limit range information pre-set for color value capture.

[0052] Step 206: Capture the original color value of each interface element in the interface to be processed, whose color value satisfies the restriction range information.

[0053] In an embodiment of the present invention, the color to be captured and the color value capture range corresponding to the color to be captured can be pre-set; then, the color value capture range corresponding to each color to be captured is used to generate the restricted range information set for color value capture. For example, grayish white is set as the color to be captured, and the corresponding color value capture range can be set to: RGB (255, 255, 255) ~ RGB (192, 192, 192). Among them, the restricted range information can be set by the user, or it can be automatically set by the electronic device; the electronic device can be a terminal or a server. In other words, the restricted range information can be determined according to the user's customized settings or according to the terminal settings or according to the server settings; the embodiment of the present invention does not limit this. Among them, when the restricted range information is automatically set by the electronic device, the electronic device can use light colors as the color to be captured and set the corresponding color value capture range according to the needs. Then, by performing eye protection processing on the light-colored interface elements in the interface, the contrast with the dark-colored interface elements in the interface is reduced, and the eye protection effect is improved.

[0054] Then, the original color value of each interface element in the interface to be processed can be captured according to the restricted range information; wherein, after capturing the color value corresponding to each interface element, it can be determined whether the color value of the interface element meets the restricted range information; if the color value of the interface element meets the restricted range information, the color value of the interface element is retained. If the color value of the interface element does not meet the restricted range information, the color value of the interface element is discarded; and thus the original color value of each interface element whose color value meets the restricted range information can be captured.

[0055] In an embodiment of the present invention, a method for respectively calculating the eye protection color value corresponding to each interface element based on the original color value of each interface element can refer to steps 208 to 212:

[0056] Step 208: Determine a target primary color value from a plurality of preset primary color values, and determine a target difference coefficient corresponding to the target primary color value from a plurality of preset difference coefficients.

[0057] Step 210: For each interface element, calculate the color value difference between the original color value and the reference color value corresponding to the interface element.

[0058] Step 212: Calculate the eye protection color value corresponding to the interface element according to the color value difference, the target difference coefficient and the target base color value.

[0059] In an embodiment of the present invention, a plurality of primary color values ​​may be pre-set; the primary color value may be automatically set by the electronic device or may be set by a user; that is, the primary color value may be determined according to a user-defined setting or according to a terminal setting or according to a server setting; the embodiment of the present invention does not limit this. Wherein, when the primary color value is automatically set by the electronic device, the primary color value may be set according to the color value corresponding to the color that can protect the eyes. For example, the colors that can protect the eyes are: almond yellow, autumn leaf brown, carmine red, grass green and sea and sky blue, and the color values ​​corresponding to these eye-protecting colors RGB (250, 249, 222) (almond yellow), RGB (255, 242, 226) (autumn leaf brown), RGB (253, 230, 224) (carmine red), RGB (227, 237, 205) (grass green) and RGB (220, 226, 241) (sea and sky blue) may be used as primary color values.

[0060] In the embodiment of the present invention, at least one corresponding difference coefficient may be set in advance for different primary color values. For example, for the primary color value: RGB (227, 237, 205) (grass green), a corresponding difference coefficient may be set: such as (2.0, 1.0, 2.0), (2.0, 1.5, 2.0), etc. Among them, the first "2.0" in (2.0, 1.0, 2.0) corresponds to the difference coefficient of the "R" channel in the RGB color value, "1.0" corresponds to the difference coefficient of the "G" channel in the RGB color value, and the second "2.0" corresponds to the difference coefficient of the "B" channel in the RGB color value.

[0061] The difference coefficient can be automatically set by the electronic device according to the visual effects of colors such as hue bias, brightness, purity, etc. The electronic device can also provide the user with visual effect setting items of colors such as hue bias, brightness, purity, etc. for each primary color value. After the user customizes the values ​​of the setting items corresponding to these visual effects, the electronic device determines the difference coefficient corresponding to each primary color value according to the values ​​of the setting items corresponding to each visual effect customized by the user. In other words, the difference coefficient can be determined according to the user's customized setting, or according to the terminal setting, or according to the server setting.

[0062] Then, the target primary color value can be determined from the preset multiple primary color values; and the target difference coefficient corresponding to the target primary color value can be determined from the preset multiple difference coefficients. Then, the eye protection color value corresponding to each interface element can be calculated based on the original color value, target primary color value and target difference coefficient of each interface element; so as to ensure that the color contrast relationship of each interface element after the eye protection processing of the interface to be processed corresponds to the color contrast relationship of each interface element before the eye protection processing of the interface to be processed.

[0063] Among them, when the primary color value selected by the user for the interface to be processed is obtained, the primary color value selected by the user can be determined as the target primary color value. When the primary color value selected by the user for the interface to be processed is not obtained, the primary color value preset by the electronic device can be determined as the target primary color value. Correspondingly, when it is obtained that the user has set a difference coefficient for the target primary color value, the difference coefficient set by the user can be determined as the target difference coefficient. When the difference coefficient set by the user for the target primary color value is not obtained, the difference coefficient preset by the electronic device can be determined as the target difference coefficient.

[0064] In an embodiment of the present invention, a method for calculating the eye protection color value corresponding to each interface element based on the original color value, target base color value and target difference coefficient of each interface element may be: for each interface element, the color value difference between the original color value corresponding to the interface element and the reference color value may be calculated; then, based on the color value difference, target difference coefficient and target base color value, the eye protection color value corresponding to the interface element is calculated. The reference color value may be set as required, such as the color value RGB (255, 255, 255) corresponding to pure white.

[0065] Among them, the product of the color value difference and the target difference coefficient can be calculated, and then the difference between the target base color value and the product can be calculated. As an example of the present invention, the target difference coefficient can be taken as (c1, c2, c3) as an example, and the eye protection color value corresponding to the interface element can be calculated according to the color value difference, the target difference coefficient and the target base color value with reference to the following formula:

[0066] R(x)=R(target base color value)-{[R(reference color value)-R(x)*c1]}

[0067] G(x)=G(target base color value)-{[G(reference color value)-G(x)*c2]}

[0068] B(x)=B(target base color value)-{[B(reference color value)-B(x)*c3]}

[0069] Among them, R(X) is the color value of the R channel in the eye protection color value, G(X) is the color value of the G channel in the eye protection color value, and B(X) is the color value of the B channel in the eye protection color value. R(target primary color value) is the color value of the R channel in the target primary color value, G(target primary color value) is the color value of the G channel in the target primary color value, and B(target primary color value) is the color value of the B channel in the target primary color value. R(reference color value) is the color value of the R channel in the reference color value, G(reference color value) is the color value of the G channel in the reference color value, and B(reference color value) is the color value of the B channel in the reference color value. R(x) is the color value of the R channel in the original color value, G(x) is the color value of the G channel in the original color value, and B(x) is the color value of the B channel in the original color value.

[0070] Step 214: During the rendering process, the original color value of each interface element in the interface to be processed is replaced with the corresponding eye protection color value.

[0071] In summary, in an embodiment of the present invention, in the process of grabbing the original color values ​​of each interface element in the interface to be processed, the restriction range information pre-set for color value grabbing can be obtained, and then the original color values ​​of each interface element in the interface to be processed whose color values ​​meet the restriction range information can be grabbed; wherein, the restriction range information can be determined based on user-defined settings, and thus the original color values ​​of the interface elements whose color values ​​meet the requirements can be grabbed, thereby facilitating subsequent eye protection processing of the interface elements whose color values ​​meet the requirements, and better meeting the personalized needs of users.

[0072] Secondly, in an embodiment of the present invention, in the process of calculating the eye protection color value corresponding to each interface element based on the original color value of each interface element, the target primary color value can be determined from a plurality of preset primary color values, and the target difference coefficient corresponding to the target primary color value can be determined from a plurality of preset difference coefficients; then, for each interface element, the color value difference between the original color value corresponding to the interface element and the reference color value is calculated, and the eye protection color value corresponding to the interface element is calculated based on the color value difference, the target difference coefficient and the target primary color value; thus, the color contrast relationship of each interface element after the interface to be processed is processed for eye protection corresponds to the color contrast relationship of each interface element before the interface to be processed is processed for eye protection, so that the user can better distinguish each interface element. In addition, the eye protection color value corresponding to the interface element is determined based on the color value difference, the target difference coefficient and the target primary color value, so that the color change between the interface elements is softer, further improving the visual experience of the user in the eye protection mode.

[0073] In an embodiment of the present invention, a method for calculating the eye protection color value corresponding to each interface element based on the original color value of each interface element may be: calculating the eye protection color value corresponding to each interface element according to the brightness contrast relationship between the interface elements. Then, the brightness contrast relationship of each interface element after the interface to be processed is made to correspond to the brightness contrast relationship of each interface element before the interface to be processed is made to correspond to the brightness contrast relationship of each interface element before the interface to be processed is made to correspond to the brightness contrast relationship of each interface element, so that the user can better distinguish each interface element and further improve the visual experience of the user in the eye protection mode.

[0074] Reference Figure 3 , showing a step flow chart of yet another optional embodiment of a data processing method.

[0075] Step 302: Determine the interface to be processed in the eye protection mode.

[0076] Step 304: Obtain the limit range information pre-set for color value capture.

[0077] Step 306: Capture the original color value of each interface element in the interface to be processed, whose color value satisfies the restriction range information.

[0078] Among them, step 302 to step 306 and the above-mentioned step 202 to step 206 are not repeated here.

[0079] In an embodiment of the present invention, a method for respectively calculating the eye protection color value corresponding to each interface element based on the original color value of each interface element can refer to steps 308 to 310:

[0080] Step 308: Determine the target brightness ratio between the interface elements.

[0081] Step 310: Determine the eye protection color value of each interface element according to the original color value and target brightness ratio of each interface element.

[0082] In the embodiment of the present invention, the color brightness ratio corresponding to each interface element in the interface to be processed can be calculated according to the original color value corresponding to each interface element in the interface to be processed, and the color brightness ratio corresponding to each interface element can be determined as the target brightness ratio. Of course, the brightness ratio selected by the user for each interface element in the interface to be processed can also be obtained, and the target brightness ratio can be determined from the brightness ratio selected by the user.

[0083] Then, the eye protection color value of each interface element can be determined according to the original color value and target brightness ratio of each interface element; the following sub-steps can be referred to:

[0084] Sub-step 22: determining the number of interface elements to be processed, and selecting a target base color value from a plurality of preset base color values.

[0085] Sub-step 24: using the target base color value as the eye protection color value of the interface element to be processed with the largest brightness ratio, and determining the eye protection color values ​​corresponding to other interface elements to be processed based on the eye protection color value of the interface element to be processed with the largest brightness ratio and the target brightness ratio.

[0086] The method of selecting the target primary color value from the plurality of preset primary color values ​​in sub-step 22 is similar to the method of selecting the target primary color value from the plurality of preset primary color values ​​in the above step 208, and will not be described in detail here.

[0087] Among them, in the process of determining the eye protection color value corresponding to each other interface element to be processed, if the target base color value is expressed in RGB, the target base color value can be first converted from the corresponding RGB expression to the HSB (Hue, Saturation, Brightness) expression. After taking the target base color value as the eye protection color value of the interface element to be processed with the largest brightness ratio, the eye protection color value corresponding to each other interface element to be processed can be determined based on the HSB expression corresponding to the eye protection color value of the interface element to be processed with the largest brightness ratio and the target brightness ratio. The other interface elements to be processed may refer to interface elements other than the interface element to be processed with the largest brightness ratio among the interface elements to be processed.

[0088] Among them, using the target base color value as the eye protection color value of the interface element to be processed with the largest brightness ratio can ensure that when calculating the value of the B channel in the eye protection color value corresponding to other interface elements to be processed, the value of the B channel does not exceed the limit range of the corresponding data of the B channel.

[0089] Among them, for each other interface element to be processed, the ratio relationship between the other interface element to be processed and the interface element to be processed with the largest proportion can be determined. Then, according to the ratio relationship and the value corresponding to the B channel in the eye protection color value corresponding to the interface element to be processed with the largest proportion, the value corresponding to the B channel of the eye protection color value corresponding to the other interface element to be processed is determined. Then, the value of the H channel in the eye protection color value corresponding to the interface element to be processed with the largest proportion is used as the value corresponding to the H channel of the eye protection color value corresponding to the other interface element to be processed; the value of the S channel in the eye protection color value corresponding to the interface element to be processed with the largest proportion is used as the value corresponding to the S channel of the eye protection color value corresponding to the other interface element to be processed; and then the HSB representation of the eye protection color value corresponding to the other interface element to be processed can be obtained. Then, the HSB representation of the eye protection color value corresponding to the other interface element to be processed can be converted into an RGB representation.

[0090] For example, there are 3 interface elements to be processed, and the corresponding target brightness ratio is 1.2:1:1.3. If the target base color value is sea and sky blue, the RGB representation is: 220, 226, 241; the HSB representation is: 223, 43, 90; and the target base color value is used as the eye protection color value corresponding to the third interface element to be processed. Then the HSB representation of the eye protection color value corresponding to the first interface element to be processed is: 223, 43, 83; the corresponding RGB representation is: 193, 204, 230. The HSB representation of the eye protection color value corresponding to the second interface element to be processed is: 223, 43, 69; the corresponding RGB representation is: 142, 161, 210.

[0091] Step 312: During the rendering process, the original color value of each interface element in the interface to be processed is replaced with the corresponding eye protection color value.

[0092] In summary, in the embodiments of the present invention, in the process of calculating the eye protection color value corresponding to each interface element based on the original color value of each interface element, the target brightness ratio between the interface elements can be determined, and the eye protection color value of each interface element can be determined according to the original color value of each interface element and the target brightness ratio; thereby, the brightness contrast relationship of each interface element after the interface to be processed is subjected to eye protection processing can be made to correspond to the brightness contrast relationship of each interface element before the interface to be processed is subjected to eye protection processing, so that users can better adapt to the interface after the eye protection processing; at the same time, it can also facilitate users to distinguish between the interface elements; further improving the user's visual experience.

[0093] In an embodiment of the present invention, a method of calculating the eye protection color value corresponding to each interface element based on the original color value of each interface element may be: calculating the eye protection color value corresponding to each interface element according to the user's browsing habits for the interface. This can adapt to the user's browsing habits to perform eye protection processing, meet the user's personalized needs, and further improve the user's visual experience in the eye protection mode.

[0094] Reference Figure 4 , showing a step flow chart of yet another optional embodiment of a data processing method.

[0095] Step 402: Determine the interface to be processed in the eye protection mode.

[0096] Step 404: Obtain the limit range information pre-set for color value capture.

[0097] Step 406: Capture the original color value of each interface element in the interface to be processed, whose color value satisfies the restriction range information.

[0098] Among them, step 402 to step 406 and the above-mentioned step 202 to step 206 are not repeated here.

[0099] Step 408: Obtain the user's historical behavior data, and determine the user's corresponding browsing habit information based on the historical behavior data.

[0100] Step 410: Calculate the eye protection color value corresponding to each interface element according to the original color value of each interface element and the browsing habit information.

[0101] In the embodiment of the present invention, the user's historical behavior data can be obtained during the user's browsing of the interface; the historical behavior data may include multiple information, such as the length of time the user browses the interface, operations in the interface such as sharing, copying, etc., and buttons clicked, etc. Then, the user's browsing habit information can be determined by analyzing the user's historical behavior information; wherein the browsing habit information may include the user's attention to various categories of interface elements.

[0102] Then, the eye protection color value corresponding to each interface element can be calculated based on the original color value of each interface element according to the user's attention to various categories of interface elements in the browsing habit information. In one example, a target category whose attention is greater than the attention threshold can be determined; then, for the interface elements whose categories are associated with the target categories in the interface to be processed, the eye protection color value corresponding to the interface elements whose categories are associated with the target categories can be calculated according to the above steps 208-212, or according to the above steps 308-310. This can reduce the amount of calculation for calculating the eye protection color value and improve the efficiency of eye protection processing for the interface to be processed. Of course, it can also adapt to the user's browsing habits for eye protection processing, meet the user's personalized needs, and further improve the user's visual experience in eye protection mode.

[0103] For example, if the user pays more attention to the main text in a web page, the target category with an attention degree greater than an attention threshold can be determined as a text category; then the eye protection color values ​​corresponding to the text and background in the web page are calculated.

[0104] The attention threshold may be set as required, and the embodiment of the present invention does not limit this.

[0105] Step 412: During the rendering process, the original color value of each interface element in the interface to be processed is replaced with the corresponding eye protection color value.

[0106] In summary, in the embodiment of the present invention, in the process of calculating the eye protection color value corresponding to each interface element based on the original color value of each interface element, the user's historical behavior data can be obtained, and the user's corresponding browsing habit information can be determined based on the historical behavior data; then, the eye protection color value corresponding to each interface element can be calculated based on the original color value of each interface element and the browsing habit information. In this way, eye protection processing can be performed to adapt to the user's browsing habits, meet the user's personalized needs, and further improve the user's visual experience in the eye protection mode.

[0107] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0108] Reference Figure 5 , shows a structural block diagram of a data processing device embodiment of the present invention, which may specifically include the following modules:

[0109] The original color value determination module 502 is used to determine the interface to be processed in the eye protection mode, and to capture the original color value of each interface element in the interface to be processed;

[0110] The eye protection color value determination module 504 is used to calculate the eye protection color value corresponding to each interface element based on the original color value of each interface element;

[0111] The rendering module 506 is used to replace the original color value of each interface element in the interface to be processed with the corresponding eye protection color value during the rendering process.

[0112] Reference Figure 6 , showing a structural block diagram of an optional embodiment of a data processing device of the present invention.

[0113] In an optional embodiment of the present invention, the original color value determination module 502 is used to obtain the restriction range information pre-set for color value capture; and capture the original color value of each interface element in the interface to be processed whose color value meets the restriction range information.

[0114] In an optional embodiment of the present invention, the eye protection color value determination module 504 includes:

[0115] The first eye protection color value calculation submodule 5042 is used to determine a target primary color value from a plurality of preset primary color values, and to determine a target difference coefficient corresponding to the target primary color value from a plurality of preset difference coefficients; for each interface element, calculate the color value difference between the original color value corresponding to the interface element and the reference color value; and calculate the eye protection color value corresponding to the interface element based on the color value difference, the target difference coefficient and the target primary color value.

[0116] In an optional embodiment of the present invention, the eye protection color value determination module 504 includes:

[0117] The second eye protection color value calculation submodule 5044 is used to determine the target brightness ratio between each interface element; according to the original color value of each interface element and the target brightness ratio, the eye protection color value of each interface element is determined.

[0118] In an optional embodiment of the present invention, the eye protection color value determination module 504 includes:

[0119] The third eye protection color value calculation submodule 5046 is used to obtain the user's historical behavior data and determine the user's corresponding browsing habit information based on the historical behavior data; and calculate the eye protection color value corresponding to each interface element based on the original color value and browsing habit information of each interface element.

[0120] In an optional embodiment of the present invention, the base color value and the difference coefficient are determined according to user-defined settings, terminal settings, or server settings.

[0121] In an optional embodiment of the present invention, the interface elements include a foreground and a background.

[0122] In summary, in the embodiment of the present invention, in the eye protection mode, the original color value of each interface element in the interface to be processed can be captured, and then based on the original color value of each interface element, the eye protection color value corresponding to each interface element is calculated respectively; then in the rendering process, the original color value of each interface element in the interface to be processed is replaced with the corresponding eye protection color value; and then each web page element can be adjusted from the original color value to the corresponding eye protection color value, which is convenient for users to distinguish different web page elements, thereby improving the visual experience.

[0123] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0124] Figure 7 1 is a block diagram of an electronic device 700 for data processing according to an exemplary embodiment. For example, the electronic device 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0125] Reference Figure 7 , the electronic device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 716 .

[0126] The processing component 702 generally controls the overall operation of the electronic device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.

[0127] The memory 704 is configured to store various types of data to support operations on the device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0128] The power component 706 provides power to the various components of the electronic device 700. The power component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 700.

[0129] The multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0130] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the electronic device 700 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.

[0131] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0132] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the electronic device 700. For example, the sensor assembly 714 can detect the open / closed state of the device 700, the relative positioning of components, such as the display and keypad of the electronic device 700, and the sensor assembly 714 can also detect the position change of the electronic device 700 or a component of the electronic device 700, the presence or absence of contact between the user and the electronic device 700, the orientation or acceleration / deceleration of the electronic device 700, and the temperature change of the electronic device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0133] The communication component 716 is configured to facilitate wired or wireless communication between the electronic device 700 and other devices. The electronic device 700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 714 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 714 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0134] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0135] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by a processor 720 of an electronic device 700 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0136] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute a data processing method, the method comprising: determining an interface to be processed in an eye protection mode, and capturing the original color value of each interface element in the interface to be processed; based on the original color value of each interface element, respectively calculating the eye protection color value corresponding to each interface element; during the rendering process, replacing the original color value of each interface element in the interface to be processed with the corresponding eye protection color value.

[0137] Optionally, capturing the original color value of each interface element in the interface to be processed includes: obtaining restriction range information pre-set for color value capture; and capturing the original color value of each interface element in the interface to be processed whose color value satisfies the restriction range information.

[0138] Optionally, the eye protection color value corresponding to each interface element is calculated based on the original color value of each interface element, including: determining a target primary color value from a plurality of preset primary color values, and determining a target difference coefficient corresponding to the target primary color value from a plurality of preset difference coefficients; for each interface element, calculating the color value difference between the original color value corresponding to the interface element and the reference color value; and calculating the eye protection color value corresponding to the interface element based on the color value difference, the target difference coefficient and the target primary color value.

[0139] Optionally, the eye protection color value corresponding to each interface element is calculated based on the original color value of each interface element, including: determining the target brightness ratio between each interface element; and determining the eye protection color value of each interface element according to the original color value and target brightness ratio of each interface element.

[0140] Optionally, the eye-protection color value corresponding to each interface element is calculated based on the original color value of each interface element, including: obtaining the user's historical behavior data, and determining the user's corresponding browsing habit information based on the historical behavior data; and calculating the eye-protection color value corresponding to each interface element based on the original color value of each interface element and the browsing habit information.

[0141] Optionally, the base color value and the difference coefficient are determined according to user-defined settings, terminal settings, or server settings.

[0142] Figure 8 8 is a schematic diagram of the structure of an electronic device 800 for data processing according to another exemplary embodiment of the present invention. The electronic device 800 may be a server, which may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 822 (for example, one or more processors) and a memory 832, and one or more storage media 830 (for example, one or more mass storage devices) storing application programs 842 or data 844. Among them, the memory 832 and the storage medium 830 may be temporary storage or permanent storage. The program stored in the storage medium 830 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processor 822 may be configured to communicate with the storage medium 830 and execute a series of instruction operations in the storage medium 830 on the server.

[0143] The server may also include one or more power supplies 826, one or more wired or wireless network interfaces 850, one or more input and output interfaces 858, one or more keyboards 856, and / or one or more operating systems 841, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0144] An electronic device includes a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors. The one or more programs include instructions for performing the following operations: determining an interface to be processed in an eye protection mode, and capturing the original color value of each interface element in the interface to be processed; based on the original color value of each interface element, respectively calculating the eye protection color value corresponding to each interface element; during the rendering process, replacing the original color value of each interface element in the interface to be processed with the corresponding eye protection color value.

[0145] Optionally, capturing the original color value of each interface element in the interface to be processed includes: obtaining restriction range information pre-set for color value capture; and capturing the original color value of each interface element in the interface to be processed whose color value satisfies the restriction range information.

[0146] Optionally, the eye protection color value corresponding to each interface element is calculated based on the original color value of each interface element, including: determining a target primary color value from a plurality of preset primary color values, and determining a target difference coefficient corresponding to the target primary color value from a plurality of preset difference coefficients; for each interface element, calculating the color value difference between the original color value corresponding to the interface element and the reference color value; and calculating the eye protection color value corresponding to the interface element based on the color value difference, the target difference coefficient and the target primary color value.

[0147] Optionally, the eye protection color value corresponding to each interface element is calculated based on the original color value of each interface element, including: determining the target brightness ratio between each interface element; and determining the eye protection color value of each interface element according to the original color value and target brightness ratio of each interface element.

[0148] Optionally, the eye-protection color value corresponding to each interface element is calculated based on the original color value of each interface element, including: obtaining the user's historical behavior data, and determining the user's corresponding browsing habit information based on the historical behavior data; and calculating the eye-protection color value corresponding to each interface element based on the original color value of each interface element and the browsing habit information.

[0149] Optionally, the base color value and the difference coefficient are determined according to user-defined settings, terminal settings, or server settings.

[0150] Optionally, the interface element includes a foreground and a background.

[0151] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0152] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0153] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0154] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0155] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0156] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0157] The data processing method, the data processing device and the electronic device provided by the present invention are introduced in detail above. The principle and implementation mode of the present invention are explained by using specific examples in this article. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation mode and the scope of application. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A data processing method, It is characterized in that include: Determine the interface to be processed in the eye protection mode, and capture the original color value of each interface element in the interface to be processed, including: obtaining the limit range information pre-set for color value capture; capture the original color value of each interface element in the interface to be processed whose color value meets the limit range information; Based on the original color value of each interface element, the eye protection color value corresponding to each interface element is calculated respectively, which includes: obtaining the user's historical behavior data, and determining the browsing habit information corresponding to the user according to the historical behavior data; according to the original color value of each interface element and the browsing habit information, the eye protection color value corresponding to each interface element is calculated respectively; the eye protection color value corresponding to each interface element based on the original color value of each interface element is calculated respectively, including: determining a target primary color value from a plurality of preset primary color values, and determining a target difference coefficient corresponding to the target primary color value from a plurality of preset difference coefficients; for each interface element, calculating the color value difference between the original color value corresponding to the interface element and the reference color value; according to the color value difference, the target difference coefficient and the target primary color value, calculating the eye protection color value corresponding to the interface element, which includes: calculating the product of the color value difference and the target difference coefficient, and then calculating the difference between the target primary color value and the product; During the rendering process, the original color value of each interface element in the interface to be processed is replaced with the corresponding eye protection color value.

2. The method according to claim 1, It is characterized in that The step of calculating the eye protection color value corresponding to each interface element based on the original color value of each interface element includes: Determine the target brightness ratio between each interface element; According to the original color value and target brightness ratio of each interface element, the eye protection color value of each interface element is determined.

3. The method according to claim 1, It is characterized in that The base color value and the difference coefficient are determined according to user-defined settings, terminal settings, or server settings.

4. The method according to claim 1, It is characterized in that The interface elements include a foreground and a background.

5. A data processing device, It is characterized in that include: The original color value determination module is used to determine the interface to be processed in the eye protection mode and capture the original color value of each interface element in the interface to be processed, including: obtaining the limit range information pre-set for color value capture; capturing the original color value of each interface element in the interface to be processed whose color value meets the limit range information; The eye protection color value determination module is used to calculate the eye protection color value corresponding to each interface element based on the original color value of each interface element; the eye protection color value corresponding to each interface element based on the original color value of each interface element is calculated, including: determining a target primary color value from a plurality of preset primary color values, and determining a target difference coefficient corresponding to the target primary color value from a plurality of preset difference coefficients; for each interface element, calculating the color value difference between the original color value corresponding to the interface element and the reference color value; calculating the eye protection color value corresponding to the interface element according to the color value difference, the target difference coefficient and the target primary color value, including: calculating the product of the color value difference and the target difference coefficient, and then calculating the difference between the target primary color value and the product; The rendering module is used to replace the original color value of each interface element in the interface to be processed with the corresponding eye protection color value during the rendering process.

6. An electronic device, It is characterized in that The system comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, and the one or more programs include instructions for performing the following operations: Determine the interface to be processed in the eye protection mode, and capture the original color value of each interface element in the interface to be processed, including: obtaining the limit range information pre-set for color value capture; capture the original color value of each interface element in the interface to be processed whose color value meets the limit range information; Based on the original color value of each interface element, the eye protection color value corresponding to each interface element is calculated respectively, which includes: obtaining the user's historical behavior data, and determining the browsing habit information corresponding to the user according to the historical behavior data; according to the original color value of each interface element and the browsing habit information, the eye protection color value corresponding to each interface element is calculated respectively; the eye protection color value corresponding to each interface element based on the original color value of each interface element is calculated respectively, including: determining a target primary color value from a plurality of preset primary color values, and determining a target difference coefficient corresponding to the target primary color value from a plurality of preset difference coefficients; for each interface element, calculating the color value difference between the original color value corresponding to the interface element and the reference color value; according to the color value difference, the target difference coefficient and the target primary color value, calculating the eye protection color value corresponding to the interface element, which includes: calculating the product of the color value difference and the target difference coefficient, and then calculating the difference between the target primary color value and the product; During the rendering process, the original color value of each interface element in the interface to be processed is replaced with the corresponding eye protection color value.

7. A readable storage medium, It is characterized in that When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the data processing method as described in any one of method claims 1-4.

Citation Information

Patent Citations

  • Color setting method and device and electronic device

    CN109358926A

  • Dark mode display interface processing method, electronic equipment and storage medium

    CN110609722A