Summary of the invention
The embodiment of the present invention provides a kind of method and apparatus and terminal of terminal backlight brightness regulation, to optimize regulation technology backlight, improves the dirigibility of its adjusting.
First aspect present invention provides a kind of terminal backlight brightness adjusting method, comprising:
The bottom layer driving of ambient light sensor is obtained the current environmental light brightness value constantly that gathers that ambient light sensor gathers;
When the current environmental light brightness value that gathers the moment gathers the environmental light brightness value in the moment less than upper one, the parameter configuration function of the bottom layer driving call operation system of ambient light sensor, the environmental light brightness value in edit the registry are the described current environmental light brightness value constantly that gathers;
The backlight control bottom layer driving is called the parameter function reading of described operating system, reads amended environmental light brightness value from described registration table;
It is dimmed that described backlight control bottom layer driving is controlled backlight illumination according to the environmental light brightness value in described registration table.
In the possible implementation of the first of first aspect present invention, described method, also comprise: when the current environmental light brightness value that gathers the moment was not less than the environmental light brightness value in a upper collection moment, the bottom layer driving of ambient light sensor offered described operating system with the described current environmental light brightness value constantly that gathers;
Described operating system is controlled backlight illumination and is brightened according to the described current environmental light brightness value constantly that gathers.
In the possible implementation of the first of first aspect present invention, parameter configuration function in the bottom layer driving call operation system of ambient light sensor, environmental light brightness value in edit the registry be described current gather environmental light brightness value constantly before, also comprise:
When receiving user's input message, the bottom layer driving of ambient light sensor is called the unlatching function of described operating system, opens described registration table;
The bottom layer driving of ambient light sensor is called the adjusting value of enabling backlight in the described registration table of described parameter configuration function modification;
In the parameter function reading of backlight control bottom layer driving call operation system, read amended environmental light brightness value from described registration table before, also comprise:
Described backlight control bottom layer driving is called the unlatching function of described operating system, opens described registration table;
Described backlight control bottom layer driving is called described parameter function reading and read described adjusting value of enabling backlight from described registration table;
When described backlight control bottom layer driving recognizes described adjusting value of enabling backlight when effective, trigger the operation of reading described amended environmental light brightness value.
In the third possible implementation of first aspect present invention, judge when the bottom layer driving of ambient light sensor current gather environmental light brightness constantly less than on one gather constantly environmental light brightness the time, the parameter configuration function of call operation system, environmental light brightness value in edit the registry be described current gather environmental light brightness value constantly after, also comprise:
After postponing the second setting duration, the described current environmental light brightness value constantly that gathers is offered described operating system.
In the 4th kind of possible implementation of first aspect present invention, wherein, described backlight control bottom layer driving controls according to the environmental light brightness value in described registration table that backlight illumination is dimmed to be comprised:
Described backlight control bottom layer driving compares environmental light brightness value and setting threshold in described registration table;
When comparative result satisfies when pre-conditioned, control backlight illumination dimmed.
In the 4th kind of possible implementation of first aspect present invention, preferred version is, when comparative result satisfies when pre-conditioned, postpone first set duration after, then it is dimmed to control backlight illumination.
In conjunction with first aspect present invention, and four kinds of possible implementations of the first to the of first aspect, in the 5th kind of possible implementation of first aspect present invention, described upper one gathers the environmental light brightness value that constantly gets is stored in the bottom layer driving of ambient light sensor.
Second aspect present invention provides a kind of terminal backlight brightness regulating apparatus, comprising:
The brightness value acquisition module is configured in the bottom layer driving of ambient light sensor, is used for obtaining the current environmental light brightness value constantly that gathers that ambient light sensor gathers;
The brightness value modified module, be configured in the bottom layer driving of ambient light sensor, be used for when the current environmental light brightness value that gathers the moment gathers the environmental light brightness value in the moment less than upper one, the parameter configuration function of call operation system, the environmental light brightness value in edit the registry are the described current environmental light brightness value constantly that gathers;
The brightness value read module is configured in the backlight control bottom layer driving, is used for calling the parameter function reading of described operating system, reads amended environmental light brightness value from described registration table;
The brightness value adjustment module is configured in the backlight control bottom layer driving, is used for controlling backlight illumination according to the environmental light brightness value of described registration table dimmed.
In the possible implementation of the first of second aspect present invention, the device of described terminal backlight brightness regulation also comprises:
The brightness value sending module, be configured in the bottom layer driving of ambient light sensor, be used for when the current environmental light brightness value that gathers the moment was not less than the environmental light brightness value in a upper collection moment, the described current environmental light brightness value constantly that gathers is offered described operating system;
Described operating system is controlled backlight illumination and is brightened according to the described current environmental light brightness value constantly that gathers.
In the possible implementation of the second of second aspect present invention, the device of described terminal backlight brightness regulation also comprises: the value of enabling modified module and the value of enabling read module, wherein,
The described value of enabling modified module, be configured in the bottom layer driving of ambient light sensor, be used for the parameter configuration function in described brightness value modified module call operation system, environmental light brightness value in edit the registry be described current gather environmental light brightness constantly before, when receiving user's input message, call the unlatching function of described operating system, open described registration table; And call described parameter configuration function and revise adjusting value of enabling backlight in described registration table;
The described value of enabling read module, be configured in the backlight control bottom layer driving, be used for the parameter function reading in brightness value read module call operation system, read amended environmental light brightness value from described registration table before, call the unlatching function of described operating system, open described registration table; And call described parameter function reading and read described adjusting value of enabling backlight from described registration table;
When the described value of enabling read module recognizes described adjusting value of enabling backlight when effective, trigger the operation that described brightness value read module reads described amended environmental light brightness value.
In the third possible implementation of second aspect present invention, described brightness value modified module also is used for, the parameter configuration function in the call operation system, the environmental light brightness value in edit the registry be described current gather environmental light brightness value constantly after,
After postponing the second setting duration, the described current environmental light brightness value constantly that gathers is offered described operating system.
In the 4th kind of possible implementation of second aspect present invention, described brightness value adjustment module specifically is used for, and the comparative result after in described registration table, environmental light brightness value and setting threshold compare satisfies when pre-conditioned, controls backlight illumination dimmed.
In the 4th kind of possible implementation of second aspect present invention, preferred version is that described brightness value adjustment module also is used for:
When comparative result satisfies when pre-conditioned, postpone first set duration after, then it is dimmed to control backlight illumination.
In conjunction with second aspect present invention, and four kinds of possible implementations of the first to the of second aspect, in the 5th kind of possible implementation of second aspect present invention, described upper one gathers the environmental light brightness value that constantly gets is stored in the bottom layer driving of ambient light sensor.
Third aspect present invention provides a kind of terminal, wherein, comprises the terminal backlight brightness regulating apparatus that any embodiment of the present invention provides, and is configured in respectively in the bottom layer driving and backlight control bottom layer driving of ambient light sensor.
The terminal backlight brightness regulation scheme that the embodiment of the present invention provides, after the bottom layer driving of ambient light sensor is obtained the current collection environmental light brightness value constantly of ambient light sensor collection, when the current environmental light brightness value that gathers the moment gathers the environmental light brightness value in the moment less than upper one, the parameter configuration function of call operation system, the environmental light brightness value in edit the registry are the current environmental light brightness value constantly that gathers; Then, the parameter function reading of call operation system reads amended environmental light brightness value from this registration table, controls backlight illumination according to the environmental light brightness value in registration table.By the bottom layer driving edit the registry, and read the mode of registration table, can directly control backlight illumination dimmed, and need not extra software or hardware controls, regulative mode is more flexible.Realized the automatic adjusting of backlight illumination from bright to dark, the terminal backlight brightness that has solved available technology adopting Window8 operating system can only be from secretly to the problem of bright adjusting.The automatic backlight regulatory function is brought more comfortable visual experience to the user when effectively reducing power consumption.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the present invention clearer, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
Fig. 1 is the process flow diagram of terminal backlight brightness adjusting method embodiment one of the present invention.The method is applicable to any mobile terminal, for example: mobile phone, PAD(Personal Digital Assistant, personal digital assistant), panel computer etc., carried out by the terminal backlight brightness regulating apparatus, this device can be realized by the mode of hardware and/or software, is integrated in mobile terminal.Be provided with ambient light sensor and liquid crystal display (Liquid Crystal Display in this mobile terminal, be called for short LCD), be provided with backlight device in LCD, above-mentioned ambient light sensor and backlight device are provided with bottom layer driving software, the embodiment of the present invention is by improving bottom layer driving software, and the registration table of compounding practice system is realized brightness regulation backlight.The type of operating system is not limit, but particularly is applicable to the Window8 operating system of Microsoft.As shown in Figure 1, the terminal backlight brightness adjusting method that provides of the present embodiment comprises the following steps:
The bottom layer driving of step 101, ambient light sensor is obtained the current environmental light brightness value constantly that gathers that ambient light sensor gathers.
Ambient light sensor is used for real-time collection current time environmental light brightness value, and the bottom layer driving of ambient light sensor is obtained the current environmental light brightness value constantly that gathers that ambient light sensor collects.
Step 102, when current gather environmental light brightness value constantly less than upper one gather constantly the environmental light brightness value time, the parameter configuration function of the bottom layer driving call operation system of ambient light sensor, the environmental light brightness value in edit the registry are the current environmental light brightness value constantly that gathers.
Obtain the environmental light brightness value of ambient light sensor collection in the bottom layer driving of ambient light sensor after, when the bottom layer driving of ambient light sensor judge current gather environmental light brightness value constantly less than upper one gather constantly the environmental light brightness value time, the parameter configuration function of the bottom layer driving call operation system of ambient light sensor, the environmental light brightness value in edit the registry are the current environmental light brightness value constantly that gathers.Wherein, the functional function that this parameter configuration function provides for operating system, the WdfRegistryAssignValue () function in the Window8 operating system that for example can provide for Microsoft.The parameter configuration function is used for the environmental light brightness value of edit the registry, and the present invention does not do special restriction to the parameter configuration function, so long as can realize that the function of the environmental light brightness value in edit the registry can.Environmental light brightness value in registration table can be the registration entry value that newly increases.
In the present embodiment, by the parameter configuration function, upper one in registration table gathered environmental light brightness value constantly and be revised as the current environmental light brightness value constantly that gathers, the current environmental light brightness value constantly that gathers is collected by ambient light sensor, and upper one gathers the environmental light brightness value that constantly gets is stored in the bottom layer driving of ambient light sensor.When the current environmental light brightness value that gathers the moment gathers the environmental light brightness value in the moment less than upper one, illustrate that current environmental light brightness by bright dimmed, needs adjusting backlight luminance dimmed.
The parameter function reading of step 103, backlight control bottom layer driving call operation system reads amended environmental light brightness value from registration table.
Parameter configuration function in the bottom layer driving call operation system of ambient light sensor, after the upper one environmental light brightness value that gathers the moment in registration table is revised as current collection environmental light brightness value constantly, the backlight control bottom layer driving is called the parameter function reading of this operating system, by this parameter function reading, read amended environmental light brightness value from registration table, this amended environmental light brightness value is the current environmental light brightness value constantly that gathers.This parameter function reading is also provided by operating system, for example can be the WdfRegistryQueryValue function in Window8 operating system, reads amended environmental light brightness value in registration table by the WdfRegistryQueryValue function.
It is dimmed that step 104, backlight control bottom layer driving are controlled backlight illumination according to the environmental light brightness value in registration table.
The backlight control bottom layer driving is controlled backlight illumination according to the environmental light brightness value that reads from registration table dimmed; make the backlight illumination of display screen of terminal and current environmental light brightness adapt; particularly; in the current environmental light brightness value hour; the control backlight illumination weakens; with the power consumption of reduction mobile phone, and protection user's eyes.
The terminal backlight brightness adjusting method that the present embodiment provides, after the bottom layer driving of ambient light sensor is obtained the current collection environmental light brightness value constantly of ambient light sensor collection, the parameter configuration function of call operation system, the environmental light brightness value in edit the registry is this brightness values; Afterwards, the parameter function reading of backlight control bottom layer driving call operation system reads amended environmental light brightness value from this registration table, controls backlight illumination according to the environmental light brightness value in registration table dimmed.By the bottom layer driving edit the registry, and read the mode of registration table, can directly control backlight illumination dimmed, and need not extra software or hardware controls, make adjusting backlight more flexible.
On the basis of above-described embodiment technical scheme, preferably: in step 104, the backlight control bottom layer driving according to the dimmed specific implementation of environmental light brightness value control backlight illumination in registration table is: the backlight control bottom layer driving compares environmental light brightness value and the setting threshold in this registration table; When comparative result satisfies when pre-conditioned, control backlight illumination dimmed.A kind of preferred embodiment in, when comparative result satisfies when pre-conditioned, postpone first set duration after, then it is dimmed to control backlight illumination.Adjust backlight illumination again after postponing, can avoid dodging the screen phenomenon, first sets duration is preferably 2s.
Adopt the mode of the bottom layer driving edit the registry of ambient light sensor in the present embodiment, then the backlight control bottom layer driving reads the mode of registration table, has realized the transmission of environmental light brightness value between two bottom layer driving, implements simple.If do not adopt the mode of edit the registry, and will realize the exchange of data between direct two bottom layer driving, need special-purpose interface routine, and corresponding function is realized.And in the present embodiment, by revising and read the mode of registration table, do not need special-purpose interface routine and function, directly call existing function and just can realize.
Fig. 2 is the process flow diagram of terminal backlight brightness adjusting method embodiment two of the present invention.The Window8 operating system that provides take operating system as Microsoft in the present embodiment illustrates the solution of the present invention as example.As shown in Figure 2, the terminal backlight brightness adjusting method that the present embodiment provides comprises the following steps:
The bottom layer driving of step 201, ambient light sensor is obtained the current environmental light brightness value constantly that gathers that ambient light sensor gathers.
Ambient light sensor is used for real-time collection current time environmental light brightness value, and the bottom layer driving of ambient light sensor is obtained the current environmental light brightness value constantly that gathers that ambient light sensor collects.
Step 202, when receiving user's input message, the unlatching function of the bottom layer driving call operation system of ambient light sensor is opened registration table.
After the bottom layer driving of ambient light sensor was obtained the environmental light brightness value that ambient light sensor gathers, when receiving user's input message, the unlatching function of the bottom layer driving call operation system of ambient light sensor was opened registration table.Open the functional function that function provides for operating system, the Window8 operating system that for example can provide for Microsoft, this unlatchings function is for opening registration table.
In Window8 operating system, opening function is WdfRegistryOpenKey () function, opens registration table by calling WdfRegistryOpenKey () function.This registration table can be existing registration table, only needs to increase corresponding program and driving in existing registration table, registration table that also can a newly-built special use.Registration table is actually a huge database, wherein hold the incidence relation, explanation, state and attribute and various status information and the data of hardware device of initialization information, application program and document files of whole configuration informations, the application program of application program and computer system, realized controlling application program and driving by calling registration table.
In the present embodiment, this user's input information is user's selection information, when realizing, in Window8 operating system, the adjusting to backlight illumination in setup menu is provided with manual adjustments and automatically regulates two optional functions, the user can open or close automatic regulation function by the corresponding button in the trigger action system, after the user selected automatic regulation function, ambient light sensor was started working, according to user's input message, operating system is called the unlatching function, opens registration table.
The bottom layer driving call parameters configuration function of step 203, ambient light sensor, the adjusting value of enabling backlight in edit the registry.
Unlatching function in the bottom layer driving call operation system of ambient light sensor, after opening registration table, the adjusting value of enabling backlight in the bottom layer driving call parameters configuration function edit the registry of ambient light sensor.In Window8 operating system, this parameter configuration function is WdfRegistryAssignValue (), the bottom layer driving of ambient light sensor is by calling the adjusting value of enabling backlight in WdfRegistryAssignValue () function edit the registry, adjusting value of enabling backlight is used for representing whether regulatory function backlight opens, adjusting value of enabling backlight can represent with 1 or 0,1 expression value of enabling is effective, and 0 expression value of enabling is invalid.
In the present embodiment, step 202 and step 203 are option, when realizing, also adjusting value of enabling backlight can be set to 1, i.e. this adjusting value of enabling continuously effective backlight.
The more current collection constantly of the bottom layer driving of step 204, ambient light sensor gathers with upper one the environmental light brightness value that constantly gets.
The environmental light brightness value of the current time that the bottom layer driving of ambient light sensor collects according to ambient light sensor, the more current collection constantly gathers with upper one the environmental light brightness value that constantly gets.When the bottom layer driving of ambient light sensor judge current gather environmental light brightness constantly less than upper one gather constantly environmental light brightness the time, order execution in step 205,207,208,209,210,211; Judge the current environmental light brightness constantly that gathers when the bottom layer driving of ambient light sensor and be not less than upper one when gathering the environmental light brightness in the moment, execution in step 206.In the present embodiment, upper one initial value that gathers environmental light brightness value constantly is set to 0, and upper one gathers environmental light brightness value constantly is stored in the bottom layer driving of ambient light sensor.
Step 205, when the bottom layer driving of ambient light sensor judge current gather environmental light brightness constantly less than upper one gather constantly environmental light brightness the time, the parameter configuration function of call operation system, environmental light brightness value in edit the registry is the current environmental light brightness value constantly that gathers, and after postponing the second setting duration, the environmental light brightness value is offered operating system.
The bottom layer driving of ambient light sensor is judged the current environmental light brightness constantly that gathers and is gathered environmental light brightness constantly less than upper one, illustrates that surrounding environment is transferred to secretly by bright, need to weaken mobile phone backlight brightness.In Window8 operating system, the parameter configuration function is WdfRegistryAssignValue () function, the bottom layer driving of ambient light sensor gathers with upper one in registration table the environmental light brightness value that constantly gets and is revised as the current environmental light brightness value constantly that gathers by call parameters configuration function WdfRegistryAssignValue ().And extend second and set duration, the environmental light brightness value is offered operating system, extending this, second to set duration be in order to guarantee the consistance of sequential, to make the function of follow-up adjusting backlight have time enough to carry out in order, and this second is set duration and be preferably 4s.After extending the second setting duration, it is a kind of mechanism commonly used that the environmental light brightness value is offered operating system, system may carry out other operations according to this environmental light brightness value, the present invention also is not particularly limited, be understandable that, the environmental light brightness value offered operating system adjusting backlight is not had any impact.
Step 206, judge the current environmental light brightness constantly that gathers when the bottom layer driving of ambient light sensor and be not less than upper one when gathering the environmental light brightness in the moment, the environmental light brightness value is offered operating system, operating system is controlled backlight illumination and is brightened according to the current environmental light brightness value constantly that gathers.
The bottom layer driving of ambient light sensor judge current gather environmental light brightness constantly be not less than one gather constantly environmental light brightness the time, be current gather environmental light brightness constantly more than or equal to upper one gather constantly environmental light brightness the time, illustrate that surrounding environment is bright by blackout, need to strengthen mobile phone backlight brightness.In Window8 operating system, system self can realize the adjusting that backlight illumination grows from weak to strong, after the environmental light brightness value is offered Window8 operating system, operating system is controlled backlight illumination by the system function that calls self and is brightened, realize backlight illumination by dark to bright adjusting, this is prior art, therefore repeat no more.
The unlatching function of step 207, backlight control bottom layer driving call operation system is opened registration table.
In this step, opening function is also WdfRegistryOpenKey () function, opens registration table by calling this function.
Step 208, backlight control bottom layer driving call parameters function reading read adjusting value of enabling backlight from registration table.
In this Window8 system, the parameter function reading is WdfRegistryQueryValue (), after opening registration table, reads adjusting value of enabling backlight in registration table by WdfRegistryQueryValue () function.
Step 209, when the backlight control bottom layer driving recognizes adjusting value of enabling backlight when effective, trigger the operation of reading the environment brightness values.
Particularly, when backlight control bottom layer driving call parameters function reading read adjusting value of enabling backlight from registration table after, if the value of enabling is 1, the backlight control bottom layer driving recognized this adjusting value of enabling backlight effectively, the operation of environment brightness values is read in triggering, and namely execution in step 210.If the value of enabling is 0, it is invalid that the backlight control bottom layer driving recognizes this adjusting value of enabling backlight, do not carry out any operation.
The parameter function reading of step 210, backlight control bottom layer driving call operation system reads amended environmental light brightness value from registration table.
When the backlight control bottom layer driving recognize adjusting value of enabling backlight effectively after, the backlight control bottom layer driving is the parameter function reading of call operation system further, reads amended environmental light brightness value from registration table.In Window8 operating system, this parameter function reading is WdfRegistryQueryValue () function, the backlight control bottom layer driving is by calling this parameter function reading WdfRegistryQueryValue (), read amended environmental light brightness value from registration table, the amended environmental light brightness value that reads from registration table is the current environmental light brightness value constantly that gathers.
It is dimmed that step 211, backlight control bottom layer driving are controlled backlight illumination according to environmental light brightness value in registration table.
Read the environment brightness values from registration table after, the backlight control bottom layer driving is controlled backlight illumination according to the environmental light brightness value.Be specially, the backlight control bottom layer driving compares environmental light brightness value and setting threshold; When comparative result satisfies default the adjusting, control backlight illumination dimmed.In a kind of attainable preferred implementation, when comparative result satisfied default the adjusting, after postponing the first setting duration, then it was dimmed to control backlight illumination.Set duration by delay, can avoid dodging the screen phenomenon, first sets duration is preferably 2S.
In the present embodiment, number and the threshold size of setting threshold are not done special restriction.For example, this setting threshold is A, B, three threshold values of C, and A, B, C are respectively three environmental light brightness values, and A ﹤ B ﹤ C, and A is than dark situation luminance brightness threshold value, and B is general environment luminance brightness threshold value, the highlighted environmental light brightness threshold value of C.The backlight control bottom layer driving compares the current threshold value that gathers moment environmental light brightness value and setting, in current collection when the environmental light brightness value is less than A constantly, current collection is described, and environmental light brightness is low constantly, after postponing the first setting duration, the control backlight illumination weakens, adjusting backlight luminance is a suitable value, so that the backlight illumination of terminal display screen and current environmental light brightness adapt to; When this environmental light brightness value during greater than A and less than B, postpone first set duration after, control backlight illumination.For the environmental light brightness value that drops on different threshold stage, be provided with the backlight brightness values of coupling, after which threshold stage was environmental light brightness value that bottom layer driving backlight is judged current time be positioned at, the adjusting backlight luminance value was the backlight brightness values with this threshold stage coupling.
Need to prove, in this enforcement, adjusting value of enabling backlight and environmental light brightness value write on the different list items in same registration table, the registration entry value for newly increasing of the adjusting value of enabling backlight in registration table and environmental light brightness value.Be understandable that, adjusting value of enabling backlight and environmental light brightness value also can write respectively in different registration tablies, for example adjusting value of enabling backlight is write in registration table A, the environmental light brightness value is write in registration table B, registration table A and B can use existing registration table, can be also the registration tablies of depositing adjusting value of enabling backlight and environmental light brightness value that is specifically designed to that newly increases.
The terminal backlight control method that the present embodiment provides, by ambient light sensor bottom layer driving and backlight control bottom layer driving edit the registry, and read the mode of registration table, can automatically adjust backlight illumination according to the current environmental light brightness value dimmed, the terminal backlight brightness that has solved available technology adopting Window8 operating system can only from secretly to the problem of bright adjusting, can realize the adjusting of backlight illumination from bright to dark.further, the terminal backlight control method that the present embodiment provides can also realize that backlight illumination is from dark to bright adjusting, and realize in the present embodiment from dark different with prior art to bright mode, in prior art when ambient light sensor obtain current gather environmental light brightness value constantly after, directly offer operating system, in the present embodiment, obtain by the bottom layer driving of ambient light sensor the environmental light brightness value that ambient light sensor gathers, and when the current environmental light brightness value that gathers the moment is not less than the environmental light brightness in a collection moment, the current environmental light brightness value constantly that gathers is offered operating system, controlling backlight illumination by operating system brightens.The method that the present embodiment provides has increased the dirigibility that backlight illumination is regulated, and brings more comfortable visual experience to the user when effectively reducing power consumption.
Fig. 3 is the process flow diagram of terminal backlight regulating device embodiment one of the present invention.As shown in Figure 3, the terminal backlight brightness regulating apparatus that the present embodiment provides comprises: brightness value acquisition module 301, brightness value modified module 302, brightness value read module 303 and brightness value adjustment module 304.
Wherein, brightness value acquisition module 301 is configured in the bottom layer driving of ambient light sensor, is used for obtaining the current environmental light brightness value constantly that gathers that ambient light sensor gathers.Ambient light sensor is used for real-time collection current time environmental light brightness value, and brightness value acquisition module 301 obtains the current environmental light brightness value constantly that gathers that ambient light sensor collects.
Brightness value modified module 302, be configured in the bottom layer driving of ambient light sensor, be used for when the current environmental light brightness value that gathers the moment gathers the environmental light brightness value in the moment less than upper one, the parameter configuration function of call operation system, the environmental light brightness value in edit the registry are the current environmental light brightness value constantly that gathers.Brightness value modified module 302 is after brightness value acquisition module 301 gets the environmental light brightness value, judge the current environmental light brightness value constantly that gathers, current gather environmental light brightness value constantly less than on one gather constantly the environmental light brightness value time, the parameter configuration function of call operation system, the functional function that the parameter configuration function provides for operating system, the WdfRegistryAssignValue () function in the Window8 operating system that for example can provide for Microsoft.This parameter configuration function is used for the environmental light brightness value of edit the registry.Environmental light brightness value in this registration table can be the registration entry value that newly increases.
Brightness value read module 303 is configured in the backlight control bottom layer driving, is used for the parameter function reading of call operation system, reads amended environmental light brightness value from registration table.Parameter configuration function in brightness value modified module 302 call operation systems, after the upper one environmental light brightness value that gathers the moment in registration table is revised as current collection environmental light brightness value constantly, brightness value read module 303 calls the parameter function reading of this operating system, by this parameter function reading, read amended environmental light brightness value from this registration table.This parameter function reading is also provided by operating system, is for example the WdfRegistryQueryValue function in Window8 operating system.
Brightness value adjustment module 304 is configured in the backlight control bottom layer driving, is used for controlling backlight illumination according to the environmental light brightness value of registration table dimmed.The environmental light brightness value that brightness value adjustment module 304 reads from registration table according to brightness value read module 303 is controlled backlight illumination dimmed, makes the backlight illumination of display screen of terminal and current environmental light brightness adapt.Brightness value adjustment module 304 specifically is used for, and the comparative result after the environmental light brightness value in registration table and setting threshold compare satisfies when pre-conditioned, controls backlight illumination dimmed.Preferably, when comparative result satisfies when pre-conditioned, postpone first set duration after, then it is dimmed to control backlight illumination.Backlight by adjusting again after postponing, can avoid dodging the screen phenomenon, this first setting duration is preferably 2s.
The terminal backlight brightness regulating apparatus that the present embodiment provides is used for the method for manner of execution embodiment one.
The terminal backlight brightness regulating apparatus that the present embodiment provides, after the brightness value acquisition module obtains the current collection environmental light brightness value constantly of ambient light sensor collection, when the current environmental light brightness value that gathers the moment gathers the environmental light brightness value in the moment less than upper one, the parameter configuration function of brightness value modified module call operation system, the environmental light brightness value in edit the registry are the current brightness values constantly that gathers; Then, the parameter function reading of brightness value read module call operation system reads amended environmental light brightness value from this registration table, and it is dimmed that the brightness value adjustment module is controlled backlight illumination according to environmental light brightness value in registration table.By the bottom layer driving edit the registry, and read the mode of registration table, can directly control backlight illumination dimmed, and need not extra software or hardware controls.
Fig. 4 is the process flow diagram of terminal backlight regulating device embodiment two of the present invention.As shown in Figure 4, the terminal backlight brightness regulating apparatus that the present embodiment provides comprises with lower module: brightness value acquisition module 401, the value of enabling modified module 402, brightness value sending module 403, brightness value modified module 404, the value of enabling read module 405, brightness value read module 406 and brightness value adjustment module 407.
Wherein, brightness value acquisition module 401 is configured in the bottom layer driving of ambient light sensor, is used for obtaining the current environmental light brightness value constantly that gathers that ambient light sensor gathers.
The value of enabling modified module 402, be configured in the bottom layer driving of ambient light sensor, be used for the parameter configuration function in brightness value modified module 404 call operation systems, environmental light brightness value in edit the registry be current gather environmental light brightness constantly before, when receiving user's input message, the unlatching function of call operation system is opened registration table; And adjusting value of enabling backlight in call parameters configuration function edit the registry.
Under Window8 operating system, this opens function can be WdfRegistryOpenKey () function, opens registration table by calling WdfRegistryOpenKey () function.This registration table can be existing registration table, only needs to increase corresponding program and driving in existing registration table, registration table that also can a newly-built special use.This parameter configuration function can be WdfRegistryAssignValue (), the bottom layer driving of ambient light sensor is by calling the adjusting value of enabling backlight in WdfRegistryAssignValue () function edit the registry, this adjusting value of enabling backlight can represent with 1 or 0,1 expression value of enabling is effective, and 0 expression value of enabling is invalid.
Brightness value modified module 404 is used for, when the current environmental light brightness that gathers the moment gathers the environmental light brightness in the moment less than upper one, the parameter configuration function of call operation system, the environmental light brightness value in edit the registry are the current environmental light brightness value constantly that gathers.Preferably, brightness value modified module 404 also is used for, the parameter configuration function in the call operation system, the environmental light brightness value in edit the registry be current gather environmental light brightness value constantly after, after postponing the second setting duration, the environmental light brightness value is offered operating system.Wherein, when the current environmental light brightness that gathers the moment gathers the environmental light brightness in the moment less than upper one, illustrate that the environmental light brightness value is transferred to secretly by bright, need to weaken mobile phone backlight brightness.In Window8 operating system, this parameter configuration function is WdfRegistryAssignValue () function.The bottom layer driving of ambient light sensor gathers with upper one in registration table the environmental light brightness value that constantly gets and is revised as the current environmental light brightness value constantly that gathers by call parameters configuration function WdfRegistryAssignValue ().Preferably, this second duration is 4s, and extending this second duration is in order to guarantee the consistance of sequential, to make the function of adjusting backlight to carry out in order.
Brightness value sending module 403 is used for, when the current environmental light brightness that gathers the moment was not less than the environmental light brightness in a upper collection moment, the environmental light brightness value is offered operating system, and operating system is controlled backlight illumination and is brightened according to the current environmental light brightness value constantly that gathers.When the current environmental light brightness that gathers the moment is not less than the environmental light brightness in a collection moment, be current gather environmental light brightness constantly more than or equal to upper one gather constantly environmental light brightness the time, illustrate that surrounding environment is bright by blackout, need to strengthen mobile phone backlight brightness.In Window8 operating system, system self can realize the adjusting that backlight illumination grows from weak to strong, after the environmental light brightness value is offered Window8 operating system, operating system realizes by the system function that calls self adjusting that backlight illumination grows from weak to strong, this is prior art, therefore repeat no more.
The value of enabling read module 405 is configured in the backlight control bottom layer driving, is used for the parameter function reading in brightness value read module 406 call operation systems, and read the environment brightness values from registration table before, the unlatching function of call operation system is opened registration table; And the call parameters function reading reads adjusting value of enabling backlight from registration table.This opens function is also WdfRegistryOpenKey () function, opens registration table by calling this function.The parameter function reading is WdfRegistryQueryValue (), after opening registration table, reads adjusting value of enabling backlight in registration table by WdfRegistryQueryValue () function.
Particularly, when the adjusting value of enabling backlight that reads when the value of enabling read module 405 is 1, identify this adjusting value of enabling backlight effective, trigger brightness value read module 406 and read amended environmental light brightness value.If adjusting value of enabling backlight is 0, the value of enabling read module 405 these adjusting values of enabling backlight of identification are invalid, do not carry out any operation.
Brightness value read module 406 is configured in the backlight control bottom layer driving, is used for the parameter function reading of call operation system, reads the environment brightness values from registration table.Particularly, when the value of enabling read module 406 recognizes adjusting value of enabling backlight when effective, trigger the operation that brightness value read module 406 reads the environment brightness values.When the value of enabling read module 406 recognize adjusting value of enabling backlight effectively after, the parameter function reading of call operation system further, in Window8 operating system, this parameter function reading is WdfRegistryQueryValue () function, brightness value read module 406 reads the environment brightness values by calling this parameter function reading WdfRegistryQueryValue () from registration table.The environmental light brightness value that reads from registration table is amended environmental light brightness value.
It is dimmed that brightness value adjustment module 407 is used for controlling backlight illumination according to the environmental light brightness value of registration table.Be specially, the comparative result after the environmental light brightness value in the registration table that brightness value read module 406 reads and setting threshold compare satisfies when pre-conditioned, and brightness value adjustment module 407 is controlled backlight illumination dimmed.Preferably, brightness value adjustment module 407 also is used for, when comparative result satisfies when pre-conditioned, postpone first set duration after, the regulating and controlling backlight illumination is dimmed.Postponing the first setting duration is for fear of the problem of dodging screen.Preferably, this first setting duration is 2 seconds.
The terminal backlight brightness regulating apparatus that the present embodiment provides can be used for carrying out the method that any embodiment of the present invention provides.
The terminal backlight regulating device that the present embodiment provides, by ambient light sensor bottom layer driving and backlight control bottom layer driving edit the registry, and read the mode of registration table, can automatically adjust backlight illumination according to the current environmental light brightness value, the terminal backlight brightness that has solved available technology adopting Window8 operating system can only from secretly to the problem of bright adjusting, can realize the adjusting of backlight illumination from bright to dark.
further, the terminal backlight regulating device that the present embodiment provides can also realize that backlight illumination is from dark to bright adjusting, and realize in the present embodiment from dark different with prior art to bright mode, in prior art when ambient light sensor obtain current gather environmental light brightness value constantly after, directly offer operating system, in the present embodiment, obtain by the bottom layer driving of ambient light sensor the environmental light brightness value that ambient light sensor gathers, and when the current environmental light brightness value that gathers the moment is not less than the environmental light brightness in a collection moment, the current environmental light brightness value constantly that gathers is offered operating system, controlling backlight illumination by operating system brightens.The method that the present embodiment provides has increased the dirigibility that backlight illumination is regulated, and brings more comfortable visual experience to the user when effectively reducing power consumption.
Fig. 5 is the structural representation of terminal backlight regulating device embodiment three of the present invention.The terminal backlight regulating device that the present embodiment provides can be used for implementing the method for the arbitrary embodiment of the present invention, for convenience of explanation, only show the part relevant to the embodiment of the present invention, concrete ins and outs do not disclose, and please refer to the description of the inventive method embodiment.This terminal can be for comprising mobile phone, panel computer, PDA, POS(Pointof Sales, point-of-sale terminal), the terminal device such as vehicle-mounted computer.The present embodiment take terminal as example as mobile phone, as shown in Figure 5, the terminal backlight regulating device that the present embodiment provides comprises: the handset structure shown in processor 501, storer 502, ambient light sensor 503, liquid crystal display 504, Fig. 5 does not consist of the restriction to mobile phone, can comprise the parts more more or less than diagram, perhaps make up some parts, perhaps different arrangements of components.Although not shown, can also comprise power supply, RF(Radio Frequency, radio frequency) circuit, WiFi (Wireless fidelity, Wireless Fidelity) module, voicefrequency circuit, camera and bluetooth module etc., do not repeat them here.
In the present embodiment, concrete, processor 501 is control centers of mobile phone, utilize the various piece of various interface and the whole mobile phone of connection, be stored in storer 502 interior software program and/or module by operation or execution, and call the data that are stored in storer 502, carry out the various functions of mobile phone 500 and deal with data.Storer 502 can be used for storing software program and module, and processor 501 realizes by software program and the module that operation is stored in storer 502 the terminal backlight brightness adjusting method that the embodiment of the present invention provides.
Be provided with ambient light sensor 503 and liquid crystal display 504 in mobile phone 500, be provided with backlight device in liquid crystal display 504, this ambient light sensor and backlight device are provided with bottom layer driving software, are stored in storer 502.
In the present embodiment, the bottom layer driving of ambient light sensor 503 is obtained the current environmental light brightness value constantly that gathers that ambient light sensor 503 gathers; When the current environmental light brightness value that gathers the moment gathers the environmental light brightness value in the moment less than upper one, the parameter configuration function of the bottom layer driving call operation system of ambient light sensor 503, the environmental light brightness value in edit the registry are the current environmental light brightness value constantly that gathers; The parameter function reading of backlight control bottom layer driving call operation system reads amended environmental light brightness value from registration table; It is dimmed that the backlight control bottom layer driving is controlled backlight illumination according to the environmental light brightness value in registration table.
Further, when the current environmental light brightness that gathers the moment was not less than the environmental light brightness in a upper collection moment, the bottom layer driving of ambient light sensor 503 offered operating system with the current environmental light brightness value constantly that gathers.Operating system is controlled backlight illumination and is brightened according to the current environmental light brightness value constantly that gathers.Wherein, the environmental light brightness value that on this, collection gets constantly is stored in the bottom layer driving of ambient light sensor 503.After the environmental light brightness value in the bottom layer driving edit the registry of ambient light sensor 503 is current collection environmental light brightness value constantly, after also being used for postponing the second setting duration, the environmental light brightness value is offered operating system.
Parameter configuration function in the bottom layer driving call operation system of ambient light sensor 503, environmental light brightness value in edit the registry be described current gather environmental light brightness value constantly before, when receiving user's input message, the unlatching function of call operation system, open described registration table, and the adjusting value of enabling backlight in call parameters configuration function edit the registry.
Correspondingly, the parameter function reading in backlight control bottom layer driving call operation system read amended environmental light brightness value from registration table before, also is used for the unlatching function of call operation system, opens registration table; And the call parameters function reading reads adjusting value of enabling backlight from registration table.When the backlight control bottom layer driving recognizes adjusting value of enabling backlight when effective, trigger the operation of reading amended environmental light brightness value.
Particularly, the backlight control bottom layer driving controls according to the environmental light brightness value in registration table that backlight illumination is dimmed to be realized in the following manner: the backlight control bottom layer driving compares environmental light brightness value and the setting threshold in registration table; When comparative result satisfies when pre-conditioned, control backlight illumination dimmed.Preferred implementation is, when comparative result satisfies when pre-conditioned, postpone first set often after, then it is dimmed to control backlight illumination.
In the present embodiment, parameter configuration function, parameter function reading and open function and all be stored in storer 502 call these functions by processor 501 and realize operation to registration table.
The present embodiment provides a kind of terminal, this terminal comprises the terminal backlight brightness regulating apparatus that any embodiment of the present invention provides, the terminal backlight brightness regulating apparatus is realized by the mode of hardware and/or software, also be provided with ambient light sensor and LCD in this terminal device, be provided with backlight device in LCD, this ambient light sensor and backlight device are provided with bottom layer driving software, the present embodiment is by improving bottom layer driving software, and the registration table of compounding practice system is realized brightness regulation backlight.
One of ordinary skill in the art will appreciate that: all or part of step that realizes above-mentioned each embodiment of the method can be completed by the hardware that programmed instruction is correlated with.Aforesaid program can be stored in a computer read/write memory medium.This program is carried out the step that comprises above-mentioned each embodiment of the method when carrying out; And aforesaid storage medium comprises: the various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
It should be noted that at last: above each embodiment is not intended to limit only in order to technical scheme of the present invention to be described; Although with reference to aforementioned each embodiment, the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme that aforementioned each embodiment puts down in writing, and perhaps some or all of technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the scope of various embodiments of the present invention technical scheme.