Disclosure of Invention
In view of this, the present invention provides a method, a system, and a terminal for display control, which are used to adjust a font and screen brightness in combination with a distance between a user and a screen and screen brightness of a current environment, so as to improve visual experience of the user.
In accordance with the above object of the present invention, there is provided a method of display control, the method comprising:
acquiring the distance between a user and a screen and the light intensity value of the current environment;
generating a font fuzzy lookup table and a screen brightness fuzzy lookup table according to the distance, the light intensity value and a preset control rule;
generating actual control quantity of the fonts and actual control quantity of the screen brightness according to the font fuzzy lookup table and the screen brightness fuzzy lookup table, the acquired distance between the user and the screen and the light intensity of the current environment and a preset fuzzy algorithm;
and carrying out display adjustment on the font and the screen brightness according to the actual control quantity.
Preferably, the method further comprises:
the presetting of the control rule specifically includes:
according to the attribute parameters of the screen, performing domain division on the ambient light intensity, the distance between a user and the screen, the font size range and the screen brightness respectively;
and according to the domain value of the ambient light intensity and the domain value of the distance between the user and the screen, obtaining the corresponding relation between the displayed font size domain value, the displayed screen brightness domain value and the current ambient light intensity domain value as well as the domain value of the distance between the user and the screen according to a preset algorithm.
Preferably, the domain of distance, the domain of light intensity, the domain of font, and the domain of screen brightness values are determined based on the following functions:
x=<kd·(d-dL)>,
wherein d is a continuous value range [ dL,dH]N is {0,1, …, n-1, n }, x is a value on the domain of discourse,<>representing a rounding operation.
Preferably, the respective corresponding trigonometric membership function table is generated according to the respective corresponding fuzzy language description and the respective theoretic domain value of the distance, the theoretic domain value of the light intensity, the theoretic domain value of the font and the theoretic domain value of the screen brightness.
Preferably, obtaining the correspondence between the displayed font size theory threshold, the screen brightness theory threshold and the current ambient light intensity theory threshold, and the theory threshold of the distance between the user and the screen according to a predetermined algorithm based on the theory threshold of the ambient light intensity and the theory threshold of the distance between the user and the screen specifically includes:
the correspondence is determined using the following function:
Rij(x,y,u)={Ai(x)×Bj(y)}×Cij(u)
wherein x, y and u are values in the universe of discourse {0,1, …,6,7 and 8 }.
Preferably, the generating of the actual controlled quantity of the font and the actual controlled quantity of the screen brightness according to the preset fuzzy algorithm specifically includes:
according to the argument value of the font in the font fuzzy lookup table and the argument value of the screen brightness in the screen brightness fuzzy lookup table, determining a fuzzy output value on the argument domain corresponding to the font and a fuzzy output value on the argument domain corresponding to the screen brightness based on the following functions,
wherein A is a theoretical threshold of distance, B is a theoretical threshold of light intensity, and R is a fuzzy relation;
determining the actual control quantity of the font and the actual control quantity of the screen brightness based on the following functions according to the fuzzy output value of the font corresponding to the discourse domain and the fuzzy output value of the screen brightness corresponding to the discourse domain,
u=ku·u*+uL
wherein U is a continuous range of values [ U ]L,UH]And n is {0,1, …, n-1, n }.
In accordance with the above object of the present invention, there is provided a display control system comprising:
the distance acquisition module is used for acquiring the distance between a user and a terminal screen;
the light intensity acquisition module is used for acquiring a light intensity value of the current environment;
the quantization module is used for generating a font fuzzy lookup table and a screen brightness fuzzy lookup table according to the distance, the light intensity value and a preset control rule;
the output control module is used for generating actual control quantity of the fonts and actual control quantity of the screen brightness according to the font fuzzy lookup table and the screen brightness fuzzy lookup table, the acquired distance between the user and the screen and the light intensity of the current environment and a preset fuzzy algorithm;
and the adjusting module is used for carrying out display adjustment on the font and the screen brightness according to the actual control quantity.
Preferably, the quantization module specifically includes:
the system comprises a domain dividing unit, a display unit and a display unit, wherein the domain dividing unit is used for dividing the domain of the environment light intensity, the distance between a user and a screen, the font size range and the screen brightness respectively according to the attribute parameters of the screen;
and the domain corresponding unit is used for obtaining the corresponding relation between the displayed font size domain value and the displayed screen brightness domain value and the domain value of the current ambient light intensity theory and the domain value of the distance between the user and the screen according to the domain value of the ambient light intensity and the domain value of the distance between the user and the screen and a preset algorithm.
Preferably, the output control module specifically includes:
a fuzzy output unit for determining a fuzzy output value on the discourse domain corresponding to the font and a fuzzy output value on the discourse domain corresponding to the screen brightness based on the following functions according to the discourse domain value of the font in the font fuzzy lookup table and the discourse domain value of the screen brightness in the screen brightness fuzzy lookup table,
wherein A is a theoretical threshold of distance, B is a theoretical threshold of light intensity, and R is a fuzzy relation;
a precise output unit for determining the actual control quantity of the font and the actual control quantity of the screen brightness based on the following functions according to the fuzzy output value of the font corresponding to the discourse domain and the fuzzy output value of the screen brightness corresponding to the discourse domain,
u=ku·u*+uL
wherein U is a continuous range of values [ U ]L,UH]And n is {0,1, …, n-1, n }.
According to the above object, the present invention also provides a terminal including the display control system as described above.
Compared with the prior art, the method, the system and the terminal for display control have the following beneficial effects: the problem of among the prior art, only consider the single factor of the distance of user and mobile terminal to adjust the font size automatically, perhaps only consider the single factor of external environment light luminance and adjust screen backlight luminance or typeface, combine the distance of user and screen and the screen luminance of current environment together, adjust the typeface or the screen luminance of terminal screen, improved user's visual experience, simultaneously under the complicated circumstances of surrounding environment, also can be better provide user experience.
Detailed Description
As mentioned in the background art, how to automatically adjust the font size and the screen brightness on the terminal screen to improve the user experience is a general concern.
Therefore, the font fuzzy lookup table and the screen brightness fuzzy lookup table are generated by acquiring the distance between the user and the screen and the light intensity of the current environment and utilizing the preset control rule. According to the font fuzzy query table and the screen brightness fuzzy query table, the acquired distance between the current user and the screen and the light intensity of the current environment, the actual control quantity of the font and the actual control quantity of the screen brightness are generated according to a preset fuzzy algorithm, and then the font and the screen brightness are displayed and adjusted, so that the visual experience of the user is improved.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will be made with reference to the accompanying drawings. It is obvious that the drawings in the following description are only some examples of the invention, and that for a person skilled in the art, other drawings and embodiments can be derived from them without inventive effort.
Fig. 1 is a flowchart of a display control method according to an embodiment of the present invention. As shown in fig. 1, the method specifically includes the following steps:
s1, acquiring the distance between the user and the screen and the light intensity value of the current environment;
s2, generating a font fuzzy lookup table and a screen brightness fuzzy lookup table according to the distance, the light intensity value and a preset control rule;
s3, generating actual control quantity of the font and actual control quantity of the screen brightness according to the font fuzzy lookup table and the screen brightness fuzzy lookup table, the acquired distance between the user and the screen and the light intensity of the current environment and a preset fuzzy algorithm;
and S4, according to the actual control quantity, carrying out display adjustment on the font and the screen brightness.
In the specific implementation process of step S1, the distance between the user and the screen of the terminal is collected, the distance between the user and the screen can be obtained by using the infrared distance sensor of the terminal and the peripheral circuit thereof, for example, the distance between the user and the screen can be calculated by measuring the time required for the infrared ray to travel to and fro the target, and then the distance between the user and the screen can be calculated according to the propagation speed of the infrared ray, and the distance sensing signal is processed by the system, and then the application program of the terminal calls and obtains the distance between the user and the screen. According to the light sensor and the peripheral circuit of the terminal, the light intensity value of the current environment can be calculated, and the application program of the terminal calls and obtains the light intensity value.
In the specific implementation process of step S2, a font fuzzy lookup table and a screen brightness fuzzy lookup table are generated according to the distance and the light intensity value obtained by the terminal and a preset control rule.
Fuzzification is the conversion of accurate input and output values into linguistic values described in human natural language, which is convenient for people to formulate the existing experience into control rules in the form of natural language. In practical application, it is often encountered that the input/output quantity is a value in a continuous domain, and in order to establish a fuzzy lookup table, a quantization factor is set to convert the value into a value in a finite integer discrete domain (i.e., a discourse domain).
Specifically, the preset control rules include:
according to the attribute parameters of the screen, performing domain division on the ambient light intensity, the distance between a user and the screen, the font size range and the screen brightness respectively;
and according to the theory domain value of the ambient light intensity and the distance theory domain value of the user and the screen, obtaining the corresponding relation between the displayed font size theory domain value, the screen brightness theory domain value and the current ambient light intensity theory domain value as well as the theory domain value of the distance between the user and the screen according to a preset algorithm.
The following description will be made with reference to a specific embodiment in which a continuous value of a distance between a user and a screen is converted into a theoretical threshold value of the distance.
Suppose that the continuous range of values of the distance d between the user and the screen is [ d ]L,dH]Its domain may be defined as {0,1, …, n-1, n }, where dL=0,dH60 (unit: cm), n is 8, the quantization factor kdCan be obtained from equation 1.
Using quantization factor kdThe distance value d in the continuous domain can be converted into a value in the domain of interest, and is marked as x. Wherein,<>representing a rounding operation.
x=<kd·(d-dL) The method of the formula (2),
the universe of discourse is divided into a plurality of limited files to form fuzzy language values, which is convenient for the formulation of fuzzy rules. For example, by dividing five levels in the domain of distance d, the corresponding distance fuzzy language can be described as { near, middle, far }. The mapping relation between the discourse domain of the distance and the corresponding distance fuzzy input quantity can be represented by a triangular membership function. FIG. 2 is a distribution diagram of the triangular membership function according to an embodiment of the present invention, as shown in FIG. 2. Accordingly, table 1 is a table of discretized trigonometric membership functions. In the conversion process from the domain of discourse to the fuzzy language, the fuzzy value with the maximum membership degree can be used as the fuzzy input/output quantity, and if a plurality of maximum fuzzy values exist, one of the fuzzy values can be selected. For example, as can be seen from table 1, the maximum value when the theoretical threshold of the distance is 4 is 1.0, the corresponding rank is "medium", and thus the fuzzy language corresponding to the distance is "medium", and the theoretical threshold of the corresponding distance is obtained.
Table 1 is a table of discretized trigonometric membership functions
In the specific implementation process of continuously taking values of the light intensity into the theoretical threshold value of the light intensity, the value range of the light intensity value of the current environment is set to be [0,100], the theoretical threshold can be defined as {0,1, …,6,7, 8}, five levels are divided on the theoretical threshold, the corresponding fuzzy language can be described as { weak, normal, strong }, and the light intensity value is converted into the corresponding theoretical threshold value of the light intensity by using the calculation of the formula 1 and the formula 2 and the triangular membership function.
The calculation of the threshold values of the font and the screen brightness is described below in a specific embodiment. Setting font size value range as [3,8] (unit: millimeter), the discourse domain can be defined as {0,1, …,6,7, 8} and dividing five grades on the discourse domain, the corresponding fuzzy language can be described as { small, medium, large }, the screen brightness value range is [0,100], the discourse domain can be defined as {0,1, …,6,7, 8} and dividing five grades on the discourse domain, and the fuzzy language can be described as { dark, darker, normal, brighter, bright }. And finally converting the character font theory domain value and the screen brightness theory domain value by adopting a triangular membership function. Of course, the value ranges of the parameters of the font size and the screen brightness are different for different mobile terminals.
In the specific implementation process, according to the theory threshold of the ambient light intensity and the theory threshold of the distance between the user and the screen, and according to a predetermined algorithm, obtaining the corresponding relationship between the displayed font size theory threshold, the screen brightness theory threshold and the current ambient light intensity theory threshold, and the theory threshold of the distance between the user and the screen specifically includes:
the correspondence is determined using the following function:
Rij(x,y,u)={Ai(x)×Bj(y)}×Cij(u) (formula 3)
Wherein x, y and u are values in the universe of discourse {0,1, …,6,7 and 8 }.
The following description is given with reference to a specific embodiment. According to the existing experience summary of human beings, a plurality of control rules are obtained in the expression mode of fuzzy language, and a fuzzy logic control rule table is formed. For example, in the fuzzy logic control rule table shown in table 2, the distance between the user and the screen, the light intensity, the font size, and the screen brightness are in one-to-one correspondence, and are all input in the fuzzy language, and it can be seen in the table that, when the distance between the user and the mobile terminal is a medium distance, the font size gradually increases from a medium size along with the gradual increase of the light intensity in the current environment, and the screen brightness also gradually increases.
Table 2 is a fuzzy logic control rule table
In Table 2, assume that the control rule of the ijth item is "RijIF distance is AiAND light intensity is BjTHEN font size is Cij", the fuzzy relationship contained in the rule can be shown by the above equation 3.
The n rules in the fuzzy logic control rule table can be regarded as an or, that is, an "union" relationship, so that the fuzzy relationship R implied in the whole fuzzy logic control rule table can be represented by equation 4.
In the specific implementation process of step S3, the actual control amount of the font and the actual control amount of the screen brightness are generated according to the font fuzzy lookup table and the screen brightness fuzzy lookup table, the acquired distance between the user and the screen and the light intensity of the current environment, and according to the preset fuzzy algorithm.
In a specific implementation process, the fuzzy controller may be set as a Dual Input Dual Output (DIDO) model, which may be regarded as two dual input single Output controllers. The fuzzy logic inference process for a two input single output controller can be represented by fig. 3. As shown in fig. 3, for a given fuzzy input a, B, a conclusion C can be derived from the relation matrix R of the fuzzy implication relations, wherein ". "denotes a composition operation.
In the embodiment of the present invention, a min-max synthesis method may be adopted, and the product of the measured fuzzy values is synthesized with the above-mentioned minimum-maximum synthesis method, as shown in formula 5. Therefore, according to the argument value of the font in the font fuzzy lookup table and the argument value of the screen brightness in the screen brightness fuzzy lookup table, the fuzzy output value on the argument domain corresponding to the font and the fuzzy output value on the argument domain corresponding to the screen brightness are determined based on the function as the formula 5.
Wherein A is a theoretical threshold of distance, B is a theoretical threshold of light intensity, and R is a fuzzy relation.
The fuzzy output value C obtained by the fuzzy inference of the formula 5 belongs to a subset on an output domain, and needs to be converted into a precise control quantity u. This method of transformation is commonly referred to as clarification, or defuzzification. In this embodiment, a maximum membership method is adopted, and in the maximum membership method, an element u whose membership is the maximum in the fuzzy output value C is regarded as a control quantity of the precise output. For example, the fuzzy output value C is expressed as "curdlan" by
The denominator of each item in the above formula is an element in the discrete theory domain, and the numerator is the corresponding degree of membership. It can be seen that the maximum membership degree is obtained when the element in the discourse domain is 2, and the corresponding accurate output control quantity u x is 2 according to the maximum membership degree method. If the membership degree of the elements of the fuzzy output quantity has a plurality of maximum values, and the maximum values are the same, the average value can be taken as the control quantity in the case.
In the specific implementation process, according to the fuzzy output value on the discourse domain corresponding to the font and the fuzzy output value on the discourse domain corresponding to the screen brightness, the actual control quantity on the corresponding continuous domain, that is, the actual control quantity converted into the font and the screen brightness, can be determined based on the following functionsuCan be obtained from equation 6 using the scaling factor kuThe output quantity u on the domain of discourse can be converted into a value on the continuous domain, and the value can be obtained by an equation 7, namely the actual control quantity of the font and the actual control quantity of the screen brightness are calculated.
u=ku·u*+uL(formula 7)
Wherein U is a continuous range of values [ U ]L,UH]And n is {0,1, …, n-1, n }.
In the implementation process of step S4, the font and the screen brightness of the terminal are adjusted according to the actual control quantity of the font and the actual control quantity of the screen brightness obtained after the fuzzy algorithm processing.
According to the technical scheme, the distance between a user and a screen and the light intensity of the current environment are obtained, and a font fuzzy query table and a screen brightness fuzzy query table are generated by using a preset control rule. According to the font fuzzy lookup table and the screen brightness fuzzy lookup table, the acquired distance between the current user and the screen and the light intensity of the current environment, the actual control quantity of the font and the actual control quantity of the screen brightness are generated according to a preset fuzzy algorithm, then the font and the screen brightness are displayed and adjusted, the distance between the user and the screen and the light intensity of the surrounding environment are comprehensively considered, the font and the screen brightness of the terminal are automatically adjusted, and the visual experience of the user is improved.
Fig. 4 is a block diagram of a display control system according to an embodiment of the present invention. As shown in fig. 4, the system includes:
a distance obtaining module 40, configured to obtain a distance between a user and a terminal screen;
a light intensity obtaining module 41, configured to obtain a light intensity value of a current environment;
the quantization module 42 is configured to generate a font fuzzy lookup table and a screen brightness fuzzy lookup table according to the distance, the light intensity value, and a preset control rule;
an output control module 43, configured to generate an actual control amount of the font and an actual control amount of the screen brightness according to a preset fuzzy algorithm, according to the font fuzzy lookup table and the screen brightness fuzzy lookup table, and the acquired distance between the user and the screen and the light intensity of the current environment;
and the adjusting module 44 is used for performing display adjustment on the font and the screen brightness according to the actual control quantity.
In the technical scheme, the distance between the user and the terminal screen and the light intensity value of the current environment are respectively obtained in the distance obtaining module 40 and the light intensity obtaining module 41. The distance between the user and the terminal screen can be obtained by utilizing the infrared distance sensor and the peripheral circuit of the terminal, and the light intensity value of the current environment can be calculated according to the light sensor and the peripheral circuit of the terminal.
In the quantization module 42, a font fuzzy lookup table and a screen brightness fuzzy lookup table are generated according to the distance, the light intensity value and a preset control rule.
Specifically, the quantization module 42 specifically includes:
a domain dividing unit 420, configured to divide the domain of the ambient light intensity, the distance between the user and the screen, the font size range, and the screen brightness according to the attribute parameters of the screen;
the domain corresponding unit 421 is configured to obtain, according to the theory domain value of the ambient light intensity and the distance theory domain value between the user and the screen, a corresponding relationship between the displayed font size theory domain value, the screen brightness theory domain value, and the current theory domain value of the ambient light intensity and the domain value of the distance between the user and the screen according to a predetermined algorithm.
In the domain partitioning unit 420, the domain of distance, the domain of light intensity, the domain of font, and the domain value of screen brightness are obtained by equations 1 and 2. In the domain corresponding unit 421, the control rule of the fuzzy logic is obtained according to the corresponding relationship between the displayed font size domain value, the screen brightness domain value, the current ambient light intensity domain value, and the user-screen distance domain value obtained by the formula 3, so as to generate the font fuzzy lookup table and the screen brightness fuzzy lookup table.
In the output control module 43, the actual control amount of the font and the actual control amount of the screen brightness are generated according to the font fuzzy lookup table and the screen brightness fuzzy lookup table, the acquired distance between the user and the screen and the light intensity of the current environment, and according to the preset fuzzy algorithm.
Specifically, the output control module 43 includes:
a fuzzy output unit 430, for determining a fuzzy output value on the discourse domain corresponding to the font and a fuzzy output value on the discourse domain corresponding to the screen brightness based on the following functions according to the discourse domain value of the font in the font fuzzy lookup table and the discourse domain value of the screen brightness in the screen brightness fuzzy lookup table,
wherein A is a theoretical threshold of distance, B is a theoretical threshold of light intensity, and R is a fuzzy relation;
a precise output unit 431 for determining an actual control amount of the font and an actual control amount of the screen brightness based on the following functions according to the fuzzy output value on the discourse field corresponding to the font and the fuzzy output value on the discourse field corresponding to the screen brightness,
u=ku·u*+uL
wherein U is a continuous range of values [ U ]L,UH]And n is {0,1, …, n-1, n }.
The font corresponding to the blurred output value on the discourse field and the screen brightness corresponding to the blurred output value on the discourse field are obtained through the blurred output unit 430, and then the actual control amount of the font and the actual control amount of the screen brightness are obtained through the precise output unit 431. Through the adjusting module 44, the font and the screen brightness are adjusted according to the actual control quantity of the font and the actual control quantity of the screen brightness. According to the technical scheme, the distance between the user and the screen and the light intensity of the surrounding environment are comprehensively considered, the font and the screen brightness of the terminal are automatically adjusted, and the visual experience of the user is improved.
Another embodiment of the present invention also provides a terminal including the display control system as described above.
Preferably, in an embodiment of the present invention, a font size value and a screen brightness value are preset at the terminal by the user, and the display control system determines the font size range and the screen brightness range with the font size preset value and the screen brightness preset value as a center. When the display control system is triggered, the font size and the screen brightness of the terminal screen are adjusted through the display control system, better screen display control is achieved according to the use habits of different users, and better user experience is achieved.
Preferably, in order to prevent the phenomenon that the adjustment of the font size or the screen brightness is too frequent, which may cause jitter, and increase the power consumption of the system, a timing time may be preset, at which the font and the screen brightness of the terminal screen are automatically adjusted.
In summary, a display control method, a display control system and a terminal are provided to adjust font and screen brightness of a terminal screen by combining a distance between a user and the terminal and screen brightness of a current environment, so as to improve visual experience of the user.
It should be noted that the above embodiments can be freely combined as necessary. The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.