Nothing Special   »   [go: up one dir, main page]

CN117707243B - Temperature control method of electronic equipment - Google Patents

Temperature control method of electronic equipment Download PDF

Info

Publication number
CN117707243B
CN117707243B CN202310871699.8A CN202310871699A CN117707243B CN 117707243 B CN117707243 B CN 117707243B CN 202310871699 A CN202310871699 A CN 202310871699A CN 117707243 B CN117707243 B CN 117707243B
Authority
CN
China
Prior art keywords
temperature
backlight value
node
target
screen
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310871699.8A
Other languages
Chinese (zh)
Other versions
CN117707243A (en
Inventor
赵和平
劳华剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310871699.8A priority Critical patent/CN117707243B/en
Publication of CN117707243A publication Critical patent/CN117707243A/en
Application granted granted Critical
Publication of CN117707243B publication Critical patent/CN117707243B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D23/00Control of temperature
    • G05D23/19Control of temperature characterised by the use of electric means
    • G05D23/20Control of temperature characterised by the use of electric means with sensing elements having variation of electric or magnetic properties with change of temperature
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/325Power saving in peripheral device
    • G06F1/3265Power saving in display device
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • G09G3/34Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters by control of light from an independent source
    • G09G3/3406Control of illumination source

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Automation & Control Theory (AREA)
  • Liquid Crystal Display Device Control (AREA)
  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)

Abstract

The application provides a temperature control method of electronic equipment, which relates to the technical field of terminals and achieves the purposes of reducing equipment power consumption and overhigh equipment temperature by reducing the interaction times between an application program framework layer and a kernel layer of the electronic equipment. The electronic device includes an application framework layer and a kernel layer, the kernel layer includes a first node, and the method may include: when the application program framework layer determines that the current temperature is greater than or equal to a first temperature threshold value, the application program framework layer determines a target coefficient corresponding to the current temperature according to a plurality of pre-stored temperature values and brightness discount coefficients corresponding to the temperature values, then sends the target coefficient to a first node of the kernel layer, after the first node of the kernel layer obtains the current backlight value of the screen, determines a target backlight value according to the current backlight value and the target coefficient, and then the first node of the kernel layer adjusts the backlight value of the screen to the target backlight value to adjust the current temperature.

Description

Temperature control method of electronic equipment
Technical Field
The embodiment of the application relates to the technical field of terminals, in particular to a temperature control method of electronic equipment.
Background
With the development of the internet, electronic devices have become more powerful, and more people use electronic devices in work and life. In the operation process of the electronic equipment, the over-high temperature of the electronic equipment not only easily damages the hardware and corresponding functions of the equipment, but also causes the over-high power consumption of the equipment. Therefore, temperature regulation during use of the electronic device is of paramount importance.
Disclosure of Invention
The embodiment of the application provides a temperature control method of electronic equipment, which is used for adjusting the backlight value of a screen through a kernel layer of the electronic equipment so as to achieve the purpose of reducing the equipment temperature, reduce the interaction times between an upper layer and a bottom layer of the electronic equipment, reduce the equipment power consumption and reduce the condition of overhigh equipment temperature.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme:
In a first aspect, the present application provides a temperature control method for an electronic device, where the electronic device includes an application framework layer and a kernel layer, and the kernel layer includes a first node, where the temperature control method may include:
When the application program framework layer determines that the current temperature is greater than or equal to a first temperature threshold value, the application program framework layer sends a target coefficient corresponding to the current temperature to a first node of the kernel layer, and after the first node of the kernel layer obtains the current backlight value of the screen, the target backlight value is determined according to the current backlight value and the target coefficient; the first node of the kernel layer adjusts the backlight value of the screen to a target backlight value to adjust the current temperature.
The application program framework layer is pre-stored with a plurality of temperature values and brightness discount coefficients corresponding to the temperature values, and the target coefficients are brightness discount coefficients corresponding to the current temperature of the electronic equipment.
In the embodiment of the application, the application program frame layer can be pre-stored with the brightness discount coefficients corresponding to different temperature values, or the application program frame layer is pre-stored with the brightness discount coefficients corresponding to different temperature value intervals, or the application program frame layer is pre-stored with the linear relation between the temperature values and the brightness discount coefficients. For example, the application framework layer stores different temperature values and luminance discount coefficients corresponding to the temperature values as (40, 0.9;41,0.85;42, 0.8), or the application framework layer stores different temperature value intervals and luminance discount coefficients corresponding to the temperature value intervals as ([ 40, 42],0.9 ] (42, 45], 0.8).
In the embodiment of the application, after the application framework layer sends the target coefficient to the kernel layer, the kernel layer executes the whole process of adjusting the brightness of the screen. It can be seen that the application framework layer only issues the target coefficient once to the kernel layer, and the system only generates uevent events once, so that the interaction times between the application framework layer and the kernel layer are reduced, a large number of uevent events are avoided, the energy consumption of the mobile phone is reduced, and the performance of the mobile phone is improved.
In a possible implementation manner of the first aspect, the adjusting, by the first node of the kernel layer, the backlight value of the screen to the target backlight value includes:
After the first node of the kernel layer determines a plurality of first backlight values according to the current backlight value, the target backlight value and the first preset value, the first node of the kernel layer adjusts the backlight value of the screen according to the sequence from the large first backlight value to the small first backlight value in sequence according to each first backlight value until the backlight value of the screen is the target backlight value.
In the embodiment of the application, the first node of the kernel layer gradually reduces the backlight value of the screen from the current backlight value to the target backlight value by adopting a slow-down strategy so as to avoid the phenomenon that the brightness of the screen is suddenly changed and the use experience of a user is influenced because the backlight value of the screen is directly adjusted to the target backlight value.
In another possible implementation manner of the first aspect, the determining, by the first node of the kernel layer, a plurality of first backlight values according to the current backlight value, the target backlight value, and the first preset value may include:
and the first node of the kernel layer determines a plurality of first backlight values with equal difference values according to the current backlight value, the target backlight value and the first preset value.
For example, the first node determines that the current backlight value is 200, the target backlight value is 180, and the first preset value is 2, and the first node determines that the plurality of first backlight values are 200, 198, 196, …, 184, 182, 180, respectively.
In the embodiment of the application, after the first node determines a plurality of first backlight values, the first backlight values are sequentially sent to the LCD driver, and the LCD driver adjusts the backlight value of the screen according to each first backlight value until the LCD driver adjusts the backlight value of the screen to be a target backlight value. Therefore, the first node reduces the screen brightness in a mode of slowly reducing the backlight value of the screen, and the purpose of reducing the device temperature by reducing the power consumption of the device is achieved.
In another possible implementation manner of the first aspect, the kernel layer includes an LCD driver, and the first node of the kernel layer adjusts a backlight value of the screen according to each first backlight value in order from the top to the bottom in turn until the backlight value of the screen is a target backlight value, including:
The first node of the kernel layer sequentially sends each first backlight value to the LCD driver according to the sequence of the plurality of first backlight values from large to small, and the LCD driver adjusts the backlight value of the screen to the first backlight value until the LCD driver adjusts the backlight value of the screen to the target backlight value.
It is understood that the LCD driver adjusts the backlight value of the screen according to each of the received first backlight values until the LCD driver adjusts the backlight value of the screen to the target backlight value. Therefore, the first node reduces the screen brightness in a mode of slowly reducing the backlight value of the screen, and the purpose of reducing the device temperature by reducing the power consumption of the device is achieved.
In another possible implementation manner of the first aspect, after the first node of the kernel layer adjusts the backlight value of the screen to the target backlight value, the temperature control method may further include:
After the application framework layer determines that the current temperature is the first temperature, if the application framework layer determines that the first temperature is greater than or equal to a first temperature threshold, the application framework layer sends a first coefficient corresponding to the first temperature to a first node of the kernel layer, the first node of the kernel layer obtains the current backlight value of the screen, and then determines a first target backlight value according to the current backlight value and the first coefficient, and the first node of the kernel layer adjusts the backlight value of the screen to the first target backlight value to adjust the current temperature.
It can be understood that after the first node of the kernel layer adjusts the backlight value of the screen to the target backlight value, the application program framework layer acquires the current temperature of the electronic device detected by the temperature sensor again, the application program framework layer determines that the current temperature is still greater than the first temperature threshold, the application program framework layer determines the first coefficient corresponding to the current temperature according to the prestored multiple temperature values and the brightness discount coefficients corresponding to the temperature values, and then sends the first coefficient to the first node of the kernel layer, and the first node of the kernel layer executes the process of adjusting the backlight value of the screen again. That is, the application framework layer determines that the current temperature of the electronic device is greater than or equal to the first temperature threshold, and the kernel layer continues to perform the process of adjusting the backlight value of the screen.
In another possible implementation manner of the first aspect, after the first node of the kernel layer adjusts the backlight value of the screen to the target backlight value, the temperature control method may further include:
After the application framework layer determines that the current temperature is the first temperature, the application framework layer determines that the first temperature is less than a first temperature threshold.
It can be understood that after the first node of the kernel layer adjusts the backlight value of the screen to the target backlight value, the application framework layer acquires the current temperature of the electronic device detected by the temperature sensor again, and the application framework layer determines that the current temperature is smaller than the first temperature threshold value, and the kernel layer does not need to execute the process of adjusting the backlight value of the screen.
In another possible implementation manner of the first aspect, after the application framework layer sends the target coefficient corresponding to the current temperature to the first node of the kernel layer, the method may further include:
The first node calls a reading function to read a character string corresponding to the target coefficient from the first node; and the first node calls an analysis function to analyze the character string corresponding to the target coefficient to obtain the target coefficient.
It can be understood that the first node obtains the target coefficient by calling the parsing function, so that the first node determines the target backlight value according to the target coefficient and the current backlight value of the screen. Therefore, the bottom layer of the electronic equipment analyzes to obtain the target coefficient so as to determine the target backlight value at the bottom layer, the interaction times of the upper layer and the bottom layer are reduced, and the power consumption of the equipment is reduced.
In another possible implementation manner of the first aspect, determining the target backlight value according to the current backlight value and the target coefficient includes:
The first node calls an analysis function to analyze the character string of the current backlight value read by the reading function, and after the current backlight value is obtained, the first node calls the analysis function to send the current backlight value and the target coefficient to the brightness function; and the first node calls a brightness function and calculates a target backlight value according to the current backlight value and the target coefficient.
Therefore, the bottom layer of the electronic equipment executes the process of determining the target backlight value according to the current backlight value and the target coefficient of the screen, so that the interaction times of the upper layer and the bottom layer are reduced, and the power consumption of the equipment is reduced.
In a second aspect, the present application provides another method for controlling temperature of an electronic device, where the electronic device includes an application framework layer and a kernel layer, and the method may include:
In response to the starting operation of the electronic equipment, the application program framework layer sends thermal control parameters to the kernel layer, and when the kernel layer determines that the current temperature of the electronic equipment is greater than or equal to a second temperature threshold value, the kernel layer determines a target coefficient corresponding to the current temperature according to a plurality of temperature values and brightness discount coefficients corresponding to the temperature values; the kernel layer determines a target backlight value according to the current backlight value and the target coefficient of the screen; the kernel layer adjusts the backlight value of the screen to a target backlight value to adjust the current temperature.
The thermal control parameters comprise a plurality of temperature thresholds and brightness discount coefficients corresponding to the temperature thresholds.
It can be understood that after the system of the electronic device is started, the application program framework layer sends the thermal control parameters to the kernel layer, and when the kernel layer determines that the current temperature of the mobile phone reaches the second temperature threshold, the kernel layer directly controls the screen brightness without interaction with the application program framework layer, so that the situation of generating a large number of uevent events is avoided, the load of the mobile phone is reduced, the energy consumption of the mobile phone is reduced, and the performance of the mobile phone is improved.
In a possible implementation manner of the second aspect, the kernel layer includes a first node, and the kernel layer adjusts a backlight value of the screen to a target backlight value, including:
the first node of the kernel layer determines a plurality of second backlight values according to the current backlight value, the target backlight value and the second preset value; the first node of the kernel layer adjusts the backlight value of the screen according to the sequence from the large to the small of the second backlight values in turn according to each second backlight value until the backlight value of the screen is the target backlight value.
In the embodiment of the application, the first node of the kernel layer gradually reduces the backlight value of the screen from the current backlight value to the target backlight value by adopting a slow-down strategy so as to avoid the phenomenon that the brightness of the screen is suddenly changed and the use experience of a user is influenced because the backlight value of the screen is directly adjusted to the target backlight value.
In another possible implementation manner of the second aspect, the determining, by the first node of the kernel layer, a plurality of second backlight values according to the current backlight value, the target backlight value, and the second preset value includes:
The first node of the kernel layer determines a plurality of second backlight values with equal difference values according to the current backlight value, the target backlight value and the second preset value.
The second preset value may be the same as or different from the first preset value, which is not limited herein. For example, the first preset value is 1, and the second preset value is 2. Also, for example, the first preset value and the second preset value are both 1 or 2.
For example, the first node determines that the current backlight value is 200, the target backlight value is 180, and the second preset value is 1, and the first node determines that the plurality of second backlight values are 200, 199, 198, …, 182, 181, 180, respectively.
In the embodiment of the application, after the first node determines a plurality of second backlight values, the plurality of second backlight values are sequentially sent to the LCD driver, and the LCD driver adjusts the backlight value of the screen according to each second backlight value until the LCD driver adjusts the backlight value of the screen to be a target backlight value. Therefore, the first node reduces the screen brightness in a mode of slowly reducing the backlight value of the screen, and the purpose of reducing the device temperature by reducing the power consumption of the device is achieved.
In another possible implementation manner of the second aspect, after the kernel layer adjusts the backlight value of the screen to the target backlight value, the method may further include:
If the core layer determines that the current temperature is greater than or equal to the second temperature threshold, the core layer determines a second coefficient corresponding to the current temperature according to the plurality of temperature values and brightness discount coefficients corresponding to the temperature values, and the core layer determines a second target backlight value according to the current backlight value and the second coefficient of the screen, and adjusts the backlight value of the screen to the second target backlight value.
It can be understood that after the kernel layer adjusts the backlight value of the screen to the target backlight value, the kernel layer acquires the current temperature of the electronic device detected by the temperature sensor again, the kernel layer determines that the current temperature is still greater than the second temperature threshold, and after the kernel layer determines the target coefficient corresponding to the current temperature according to the prestored multiple temperature values and the brightness discount coefficients corresponding to the temperature values, the kernel layer performs the process of adjusting the backlight value of the screen again. That is, the kernel layer determines that the current temperature of the electronic device is greater than or equal to the first temperature threshold, and the kernel layer continues to perform the process of adjusting the backlight value of the screen.
In another possible implementation manner of the second aspect, after the kernel layer adjusts the backlight value of the screen to the target backlight value, the method may further include:
the kernel layer determines that the current temperature is less than the second temperature threshold.
It can be understood that, after the kernel layer adjusts the backlight value of the screen to the target backlight value, the kernel layer acquires the current temperature of the electronic device detected by the temperature sensor again, and the kernel layer determines that the current temperature is less than the second temperature threshold, and does not need to execute the process of adjusting the backlight value of the screen.
In another possible implementation manner of the second aspect, the kernel layer includes a first node, and after the application framework layer sends the thermal control parameter to the kernel layer, the method further includes:
the first node calls a reading function to read a character string corresponding to the thermal control parameter from the first node; and the first node calls an analysis function to analyze the character string corresponding to the thermal control parameter to obtain a plurality of temperature values and brightness discount coefficients corresponding to the temperature values.
Therefore, after the first node of the kernel layer calls the analysis function to analyze the character string corresponding to the thermal control parameter to obtain a plurality of temperature thresholds and brightness discount coefficients corresponding to the temperature thresholds, the first node executes the purpose of reducing the equipment temperature by adjusting the screen brightness, the kernel layer does not need to interact with the application program framework layer, the situation of generating a large number of uevent events is avoided, the load of the mobile phone is reduced, the energy consumption of the mobile phone is reduced, and the performance of the mobile phone is improved.
In another possible implementation manner of the second aspect, the kernel layer includes a first node, and the kernel layer determines a target coefficient corresponding to the current temperature, including:
when the first node determines that the current temperature is greater than or equal to the second temperature threshold, the first node calls a callback function to determine a target coefficient corresponding to the current temperature;
The kernel layer determines a target backlight value according to the current backlight value and the target coefficient of the screen, and the method comprises the following steps:
and the first node calls a callback function, and calculates a target backlight value according to the current backlight value and the target coefficient.
In a third aspect, the present application provides an electronic device having a function of implementing the method described in the first aspect and a function of implementing the method described in the second aspect. The functions can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. For example, the electronic device may include a temperature control management module. The temperature control management module can be used for controlling the temperature of the electronic equipment. The temperature control management module can monitor the temperature of the electronic equipment in real time to determine whether to trigger the regulation and control of the temperature of the electronic equipment. For example, when the temperature control management module determines that the temperature of the electronic device is less than a certain temperature threshold, the temperature control management module determines to raise the temperature of the electronic device, and at this time, the electronic device triggers to execute a process of raising the temperature. When the temperature control management module determines that the temperature of the electronic equipment is greater than a certain temperature threshold, the temperature control management module determines to reduce the temperature of the electronic equipment, and at the moment, the electronic equipment triggers and executes the temperature reduction process.
In one possible implementation manner of the embodiment of the present application, when the temperature control management module determines that the current temperature of the electronic device is greater than or equal to the first temperature threshold, the temperature control management module sends a target coefficient corresponding to the current temperature to the kernel layer.
In another possible implementation manner of the embodiment of the present application, when the system of the electronic device is started, the temperature control management module may send a thermal control parameter to the kernel layer, where the thermal control parameter includes a plurality of temperature thresholds and brightness discount coefficients corresponding to the temperature thresholds.
In a fourth aspect, the present application provides an electronic device comprising: a touch screen including a touch sensor and a display screen; one or more processors; a memory; wherein the memory stores one or more computer programs, the one or more computer programs comprising instructions, which when executed by the electronic device, cause the electronic device to perform the temperature control method of any of the first aspects or the temperature control method of any of the second aspects.
In a fifth aspect, the present application provides a computer readable storage medium having instructions stored therein, which when run on an electronic device, cause the electronic device to perform the temperature control method according to any one of the first aspects or to perform the temperature control method according to any one of the second aspects.
In a sixth aspect, the present application provides a computer program product comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the temperature control method according to any one of the first aspects or to perform the temperature control method according to any one of the second aspects.
It will be appreciated that the electronic device according to the third aspect and the fourth aspect provided above, the computer storage medium according to the fifth aspect, and the computer program product according to the sixth aspect are all configured to perform the corresponding methods provided above, and therefore, the advantages achieved by the method are referred to the advantages in the corresponding methods provided above, and will not be repeated herein.
Drawings
FIG. 1 is a flow chart for adjusting the brightness of a screen according to the related art;
Fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
Fig. 3 is a layered structure diagram of an electronic device according to an embodiment of the present application;
FIG. 4 is a graph showing the relationship between the temperature of the casing and the luminance discount coefficient of the mobile phone according to the embodiment of the present application;
FIG. 5 is a schematic flow chart of a temperature control method according to an embodiment of the present application;
FIG. 6 is a second flow chart of a temperature control method according to an embodiment of the present application;
FIG. 7 is an exemplary diagram of a first node of a kernel layer determining a target backlight value according to an embodiment of the present application;
Fig. 8 is a schematic flow chart III of a temperature control method according to an embodiment of the present application;
fig. 9 is a flow chart diagram of a temperature control method according to an embodiment of the present application;
FIG. 10 is a second exemplary diagram of determining a target backlight value by a first node of a kernel layer according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. Wherein, in the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B; "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone.
The terms "first" and "second" are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the embodiments of the present application, unless otherwise indicated, the meaning of "a plurality" is two or more.
In embodiments of the application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the running process of the electronic equipment, the electronic equipment can control the temperature of the electronic equipment in a mode of adjusting the screen brightness, so that the situation that the performance of the equipment is influenced due to the fact that the temperature of the equipment is too high or too low is avoided. For example, when the temperature of the electronic device increases to a certain temperature threshold, most device manufacturers achieve the purpose of reducing the device temperature by adopting a thermally controlled brightness discount method, that is, by adopting a mode of adjusting the brightness value of the screen, so as to avoid the situation that the device performance is affected by the too high device temperature.
For example, in the process of capturing video by using the camera function of the electronic device, when the temperature of the electronic device reaches a certain temperature threshold (for example, the temperature threshold is 40 ℃), the electronic device may reduce the temperature of the device by adjusting the brightness of the screen.
In the related art, as a system of an electronic device is started, a thermal control system of the electronic device is initialized, and when the thermal control system is initialized, the electronic device loads a control node related to a Liquid Crystal Display (LCD) of a screen and an interface of an initialization uevent. When the temperature of the electronic equipment reaches a certain temperature threshold, the thermal (temperature control management module) of the electronic equipment reads the current brightness information of the screen from the brightness driving node, and then determines target brightness information according to the current brightness information. And the temperature control management module of the electronic equipment sends the target brightness information to the brightness driving node. The luminance driving node transmits the target luminance information to the LCD driver so that the LCD driver adjusts the luminance of the screen according to the target luminance information. The following describes the above process in detail with reference to fig. 1, and fig. 1 is a schematic flow chart for adjusting screen brightness provided in the related art, and as shown in fig. 1, the process may include the following steps:
s1, a temperature control management module of an application program framework layer determines that the current temperature reaches a temperature threshold value, and determines to adjust screen brightness.
After the system of the electronic equipment is started, the temperature control management module of the electronic equipment monitors the temperature of the electronic equipment in real time. When the temperature control management module determines that the current temperature of the electronic equipment reaches the temperature threshold (for example, 40 ℃), the temperature control management module determines to adjust the screen brightness of the electronic equipment so as to achieve the purpose of reducing the temperature of the electronic equipment by adjusting the screen brightness.
S2, the temperature control management module of the application program framework layer reads the current backlight value of the screen from the brightness driving node of the kernel layer.
S3, the temperature control management module of the application program framework layer determines a target backlight value, and determines a plurality of backlight values for adjusting the screen according to a slow-down strategy.
Optionally, the temperature control management module determines the target backlight value of the screen according to a pre-stored screen brightness adjustment scheme in the electronic device, and then determines a plurality of backlight values for adjusting the screen according to a slow-down adjustment strategy. The slow-down adjustment strategy refers to a method for slowly reducing the backlight value of the screen according to the current backlight value of the screen. In the scheme, the electronic equipment adjusts the screen brightness by adopting the slow-down strategy, so that the problem that the screen brightness suddenly lightens or suddenly darkens to influence the use experience of a user can be avoided.
For example, assuming that the current backlight value of the screen read by the temperature control management module from the luminance driving node is 200, the target backlight value of the screen is determined to be 180, and the plurality of backlight values for adjusting the screen are determined to be 199, 198, 197, 181, 180, respectively, according to the ramp down adjustment policy.
S4, the temperature control management module of the application program framework layer writes a plurality of backlight values into the brightness driving nodes respectively until the target backlight values are written.
S5, the brightness driving node of the kernel layer sends a backlight value to the LCD driver; accordingly, the LCD driver receives the backlight value.
S6, the LCD drive adjusts the screen brightness according to the backlight value.
Optionally, after the temperature control management module determines a plurality of backlight values, the temperature control management module writes the backlight value into the brightness driving node of the kernel layer for each backlight value. And after receiving the backlight value, the brightness driving node sends the backlight value to the LCD driver, and the LCD driver adjusts the brightness of the screen according to the received backlight value.
The temperature control management module circularly writes the backlight value into the brightness driving node, the brightness driving node receives each backlight value and then sends the backlight value to the LCD driver, the LCD driver adjusts the brightness of the screen according to the received backlight value until the temperature control management module writes the target backlight value into the brightness driving node, and the temperature control management module stops writing the backlight value into the brightness driving node. And if the temperature control management module determines that the current temperature of the electronic equipment is less than the temperature threshold value, stopping adjusting the screen brightness. If the temperature management module determines that the current temperature of the electronic device is still greater than or equal to the temperature threshold, the process of adjusting the screen brightness in S2 to S6 is continuously executed until the temperature control management module determines that the current temperature of the electronic device is less than the temperature threshold.
For example, assuming that the current backlight value of the screen read by the temperature control management module from the luminance driving node is 200, the backlight value written by the temperature control management module to the luminance driving node is 199, the luminance driving node sends the backlight value 199 to the LCD driver after receiving the backlight value 199, and the LCD driver adjusts the luminance of the screen from the backlight value 200 to 199 after receiving the backlight value 199. Then, the temperature control management module writes the backlight value 198 to the luminance driving node, and after the luminance driving node receives the backlight value 198, the backlight value 198 is sent to the LCD driver, and the LCD driver adjusts the luminance of the screen from the backlight value 199 to 198. The temperature control management module continues to write the backlight value to the luminance driving node until the target backlight value 180 is written to the luminance driving node, and the temperature control management module stops writing the backlight value to the luminance driving node.
Therefore, in the whole brightness adjustment process, the temperature control management module writes the backlight value into the brightness driving node for 20 times, the temperature control management module writes the backlight value into the brightness driving node once, and the kernel layer reports the uevent events to the application framework layer once. Wherein uevent event is a communication mechanism for the kernel layer to notify the upper layer. That is, the application framework layer sends a backlight value to the kernel layer once, and the kernel layer reports uevent events once.
As can be seen from fig. 1, when the electronic device adopts the slow-down policy to adjust the brightness of the screen, the temperature control management module writes the backlight value into the brightness driving node for multiple times, and the temperature control management module frequently reads and writes the brightness driving node, so that the kernel layer reports uevent events to the application framework layer for multiple times, and the reporting of uevent events for multiple times not only causes an increase in system load, but also causes an increase in power consumption of the device, thereby affecting the performance of the system.
For example, the temperature control management module generates uevent events once in the process of writing the first backlight value into the brightness driving node; the temperature control management module writes the second backlight value into the brightness driving node to generate uevent events once. And the temperature control management module circularly writes the backlight value determined by the slow-down strategy into the brightness driving node until the target backlight value is written into the brightness driving node. Each time the temperature control management module writes a backlight value to the brightness driving node, a uevent event is generated, so that a large number of uevent events are generated in the process that the temperature control management module adjusts the screen brightness of the device.
It should be explained that, by analyzing the running log of the electronic device, the manufacturer of the electronic device finds that when the electronic device adopts the slow-down strategy to adjust the brightness of the screen, a large number of uevent events are generated, and the uevent events in all processes take the longest time. In addition, the manufacturer of the electronic device determines that the frequency of writing the backlight value to the brightness driving node by the temperature control management module is the same as the frequency of generating uevent events. That is, in the process of adjusting the brightness by the temperature control management module of the electronic device, frequent reading and writing of the brightness driving node may generate a large number of uevent events. For example, a large number of uevent events with backlight brightness in an electronic device are reported to an upper layer in a certain test period, for example, 356 events with uevent generated by the bottom layer are reported to the upper layer, which results in excessive power consumption of the device.
When the electronic equipment is in an automatic backlight scene, the electronic equipment automatically adjusts the brightness of the screen according to the brightness of the light source, so that the frequency and the times of adjusting the brightness of the screen by the electronic equipment are more frequent, and the phenomenon that a temperature control management module of the electronic equipment frequently reads and writes brightness driving nodes and causes uevent events to be generated in a large quantity is caused. Therefore, in the process of regulating and controlling the temperature of the equipment by the electronic equipment through a method of regulating the screen brightness, partial process load is increased, the power consumption is improved, and the high-load process occupies CPU resources, so that the performance of the equipment is seriously deteriorated.
In addition, along with regulation and control of the extreme temperature of the electronic device by the 3C security authentication, for example, the extreme temperature of the electronic device is reduced from 50 ℃ to 48 ℃, and in the operation process of the electronic device, the regulation and control of the temperature of the electronic device are more frequent, so that the electronic device frequently reads and writes the brightness driving nodes, a large number of uevent events are generated, and the performance of the electronic device is deteriorated.
In addition, when the electronic device adopts the front camera or the rear camera to collect the portrait, along with the temperature rise of the electronic device, a great amount of uevent processes are generated by the electronic device, for example, when the electronic device adopts the front camera to collect the portrait, the uevent process in the electronic device takes up to 5730.37ms, and when the electronic device adopts the rear camera to collect the portrait, the uevent process in the electronic device takes up to 3765.94ms. Therefore, a large number of medium uevent processes are generated in the running process of the camera of the electronic equipment, so that the load of the electronic equipment is increased, the power consumption of the electronic equipment is provided, and the performance of the equipment is reduced.
Therefore, in the temperature control method of the electronic device, when the application program framework layer determines that the current temperature of the electronic device is greater than or equal to the first temperature threshold, the application program framework layer sends a target coefficient corresponding to the current temperature to the first node of the kernel layer, and after the first node of the kernel layer determines the target backlight value according to the current backlight value and the target coefficient of the screen, the first node adjusts the backlight value of the screen to the target backlight value to adjust the current temperature. Therefore, after the application framework layer sends the target coefficient to the first node of the kernel layer, the first node of the kernel layer adjusts the backlight value of the screen to the target backlight value, so that the aim of reducing the temperature of the equipment is achieved, the phenomenon of generating a large number of uevent events is avoided by reducing the interaction times between the application framework layer and the kernel layer, the power consumption of the equipment is reduced, and the condition of overhigh temperature of the equipment is reduced.
Exemplary, the method for controlling the temperature of the electronic device according to the embodiment of the present application may be applied to an electronic device having a display screen, such as a mobile phone, a tablet computer, a personal computer (personal computer, PC), a personal digital assistant (personal DIGITAL ASSISTANT, PDA), a smart watch, a netbook, a wearable electronic device, an augmented reality (augmented reality, AR) device, a Virtual Reality (VR) device, a vehicle-mounted device, a smart car, and a smart sound device, which is not limited in the embodiment of the present application.
Fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present application, as shown in fig. 2.
The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (IMAGE SIGNAL processor, ISP), a controller, a memory, a video codec, a digital signal processor (DIGITAL SIGNAL processor, DSP), a baseband processor, and/or a neural Network Processor (NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and a command center of the electronic device 100, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it may be called directly from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-INTEGRATED CIRCUIT, I2C) interface, an integrated circuit built-in audio (inter-INTEGRATED CIRCUIT SOUND, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and is not meant to limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also employ different interfacing manners in the above embodiments, or a combination of multiple interfacing manners.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (WIRELESS FIDELITY, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation SATELLITE SYSTEM, GNSS), frequency modulation (frequency modulation, FM), near field communication (NEAR FIELD communication, NFC), infrared (IR), etc., applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques. The wireless communication techniques can include a global system for mobile communications (global system for mobile communications, GSM), general packet radio service (GENERAL PACKET radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation SATELLITE SYSTEM, GLONASS), a beidou satellite navigation system (beidou navigation SATELLITE SYSTEM, BDS), a quasi zenith satellite system (quasi-zenith SATELLITE SYSTEM, QZSS) and/or a satellite based augmentation system (SATELLITE BASED AUGMENTATION SYSTEMS, SBAS).
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a Liquid Crystal Display (LCD) CRYSTAL DISPLAY, an organic light-emitting diode (OLED), an active-matrix organic LIGHT EMITTING diode (AMOLED), a flexible light-emitting diode (FLED), miniled, microLed, micro-oLed, a quantum dot LIGHT EMITTING diode (QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, so that the electrical signal is converted into an image visible to naked eyes. ISP can also perform algorithm optimization on noise and brightness of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent awareness of the electronic device 100 may be implemented through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer-executable program code that includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The electronic device 100 may listen to music, or to hands-free conversations, through the speaker 170A.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When electronic device 100 is answering a telephone call or voice message, voice may be received by placing receiver 170B in close proximity to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four, or more microphones 170C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal.
The gyro sensor 180B may be used to determine a motion gesture of the electronic device 100.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip cover using the magnetic sensor 180D.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 100 is stationary. The electronic equipment gesture recognition method can also be used for recognizing the gesture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, the electronic device 100 may range using the distance sensor 180F to achieve quick focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode.
The ambient light sensor 180L is used to sense ambient light level. The electronic device 100 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. Ambient light sensor 180L may also cooperate with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent false touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 may utilize the collected fingerprint feature to unlock the fingerprint, access the application lock, photograph the fingerprint, answer the incoming call, etc.
The temperature sensor 180J is for detecting temperature. In some embodiments, the electronic device 100 performs a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 performs a reduction in the performance of a processor located in the vicinity of temperature sensor 180J in order to reduce power consumption to implement thermal protection.
In the embodiment of the present application, when the electronic device 100 determines that the temperature reported by the temperature sensor 180J exceeds the temperature threshold, the electronic device adjusts the brightness of the screen to reduce the temperature of the electronic device detected by the temperature sensor 180J.
The number of the temperature sensors 180J provided in the electronic device is not limited, and the temperature sensors 180J may be plural, for example, the electronic device is provided with the temperature sensors 180J for measuring the battery, the circuit board, and the casing of the electronic device, respectively.
Also for example, in an embodiment of the present application, the electronic device 100 may acquire the temperature of the screen of the electronic device based on the plurality of temperature sensors 180J mounted on the screen; the plurality of temperature sensors 180J are mainly attached to and distributed on the peripheral area of the screen of the electronic device 100, but in the embodiment of the application, the temperature sensors 180J can be installed at the left and right lower corners of the screen, and the two temperature sensors 180J are attached to the screen, so that the temperature of the screen can be accurately detected.
In other embodiments, when the temperature is below another threshold, the electronic device 100 heats the battery 142 to avoid the low temperature causing the electronic device 100 to be abnormally shut down. In other embodiments, when the temperature is below a further threshold, the electronic device 100 performs boosting of the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperatures.
The touch sensor 180K, also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen".
The bone conduction sensor 180M may acquire a vibration signal.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195, or removed from the SIM card interface 195 to enable contact and separation with the electronic device 100. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 195 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, i.e.: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The software system of the electronic device may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the invention takes a system with a layered architecture as an example, and illustrates the software structure of the electronic equipment.
Fig. 3 is a layered structure diagram of an electronic device according to an embodiment of the present application.
It will be appreciated that the layered architecture divides the software into several layers, each with a clear role and division. The layers communicate with each other through a software interface. In some embodiments, a software system may include an application layer (abbreviated as application layer), an application framework layer (abbreviated as framework layer), a system library, and a kernel layer.
The application layer may include a series of application packages.
As shown in fig. 3, the application package may include a system application. The system application refers to an application which is set in the electronic equipment before the electronic equipment leaves a factory. By way of example, system applications may include programs for cameras, gallery, calendar, music, short messages, memos, and weather.
The application package may also include a third party application, which refers to an application installed after a user downloads the installation package from an application store (or application marketplace). For example, a map class application, a take-away class application, a reading class application (e.g., e-book), a social class application, a travel class application, and the like.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for the application of the application layer. The application framework layer includes a number of predefined functions.
As shown in fig. 3, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, a temperature control management module (Thermal), and the like.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is for providing communication functions of the electronic device. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the mobile phone vibrates, and an indicator light blinks.
The temperature control management module is used for controlling the temperature of the electronic equipment. The temperature control management module can monitor the temperature of the electronic equipment in real time to determine whether to trigger the regulation and control of the temperature of the electronic equipment. For example, when the temperature control management module determines that the temperature of the electronic device is less than a certain temperature threshold, the temperature control management module determines to raise the temperature of the electronic device, and at this time, the electronic device triggers a scheme for raising the temperature. When the temperature control management module determines that the temperature of the electronic equipment is greater than a certain temperature threshold, the temperature control management module determines to reduce the temperature of the electronic equipment, and at the moment, the electronic equipment triggers a scheme for reducing the temperature.
In one possible implementation manner of the embodiment of the application, when the temperature control management module determines that the current temperature of the electronic device reaches a certain temperature threshold, the temperature control management module sends a brightness discount coefficient corresponding to the current temperature to the kernel layer, so that after the kernel layer receives the brightness discount coefficient, the kernel layer slowly adjusts the brightness of the screen according to the slow-down strategy after determining the target backlight value according to the current backlight value and the brightness discount coefficient of the electronic device until the brightness value of the screen is adjusted to the target backlight value.
In another possible implementation manner of the embodiment of the present application, when a system of an electronic device is started, a temperature control management module sends a plurality of temperature thresholds and brightness discount coefficients corresponding to the temperature thresholds to a kernel layer, so that the kernel layer determines the brightness discount coefficient corresponding to the current temperature when the current temperature of the electronic device reaches a certain temperature threshold. And then, the inner core layer slowly adjusts the brightness of the screen according to the slow-down strategy after determining the target backlight value according to the current backlight value and the corresponding brightness discount coefficient until the brightness value of the screen is adjusted to the target backlight value.
Android run time includes a core library and virtual machines. Android run is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), two-dimensional graphics engines (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of two-dimensional and three-dimensional layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
A two-dimensional graphics engine is a drawing engine that draws two-dimensional drawings.
The kernel layer is a layer between hardware and software. The kernel layer comprises at least a first node (i.e., a luminance discount coefficient node), an LCD driver, a display driver, a camera driver, an audio driver, and a sensor driver.
In one possible case of the embodiment of the present application, the first node may be configured to determine the target backlight value according to the current backlight value and the luminance discount coefficient of the electronic device after receiving the luminance discount coefficient corresponding to the current temperature of the electronic device sent by the temperature control management module. And then, the first node adopts a slow-down strategy to send the backlight value to the LCD drive for a plurality of times, so that the LCD drive adjusts the screen brightness of the electronic equipment according to the received backlight value until the first node sends the target backlight value to the LCD drive, and the sending of the backlight value to the LCD drive is stopped.
In another possible scenario of the embodiment of the present application, the first node may be further configured to receive a plurality of temperature values sent by the application framework layer and a luminance discount coefficient corresponding to each temperature value. When the current temperature of the electronic equipment obtained by the first node reaches a certain temperature threshold, the first node can determine a brightness discount coefficient corresponding to the current temperature, and the first node determines a target backlight value according to the current backlight value and the brightness discount coefficient of the electronic equipment. And then, the first node adopts a slow-down strategy to send the backlight value to the LCD drive for a plurality of times, so that the LCD drive adjusts the screen brightness of the electronic equipment according to the received backlight value until the first node sends the target backlight value to the LCD drive, and the sending of the backlight value to the LCD drive is stopped.
The LCD driver is used for adjusting the screen brightness according to the received backlight value after receiving the backlight value sent by the first node.
The temperature control method of the electronic device according to the embodiment of the application is described below by taking the electronic device as an example of a mobile phone with reference to the accompanying drawings.
In the embodiment of the application, the temperature sensor of the equipment in the mobile phone can detect the current temperature of the mobile phone in real time in the running process of the mobile phone. When the current temperature of the mobile phone reaches the temperature threshold, the mobile phone can adjust the brightness of the screen so as to adjust the temperature of the mobile phone in a mode of adjusting the brightness of the screen.
The temperature of the mobile phone can be the temperature of a battery in the mobile phone, the temperature of a circuit board and the temperature of a shell, and hardware equipment of the current temperature of the mobile phone detected by the temperature sensor is not limited in the embodiment of the application. For example, the mobile phone may be provided with 4 temperature sensors for detecting temperatures at different positions of the housing, and then, after the mobile phone obtains temperature values detected by the 4 temperature sensors, the mobile phone may determine the housing temperature of the mobile phone according to an average value of the housing temperatures at different positions detected by the 4 temperature sensors.
Optionally, when the mobile phone determines that the current temperature detected by the temperature sensor reaches the temperature threshold, the mobile phone may determine the luminance discount coefficient corresponding to the current temperature according to the corresponding relationship between the temperature value and the luminance discount coefficient. Then, after the mobile phone determines a target backlight value for adjusting the brightness of the screen according to the brightness discount coefficient, a slow-down strategy is adopted to determine a plurality of backlight values for adjusting the screen, and the brightness of the screen is gradually reduced according to the plurality of backlight values, so that the temperature of the mobile phone is reduced in a mode of reducing the brightness of the screen, and the problems that the temperature of the mobile phone is too high and the performance of equipment is affected are solved.
Fig. 4 is a graph illustrating a relationship between a case temperature and a luminance discount coefficient of a mobile phone according to an embodiment of the present application. As can be seen from fig. 4, when the temperature of the casing of the mobile phone is less than 40 ℃, the screen brightness does not need to be adjusted, and the brightness discount coefficient is 1; when the shell temperature of the mobile phone is equal to 42 ℃, the mobile phone adjusts the brightness of the screen by adopting a backlight value determined by a brightness discount coefficient, and at the moment, the brightness discount coefficient is 0.9; when the temperature of the shell of the mobile phone is equal to 44 ℃, the corresponding brightness discount coefficient is 0.8.
Also, for example, as shown in table 1 below, when the temperature of the casing of the mobile phone is less than 40 ℃, there is no need to adjust the brightness of the screen, and the brightness discount coefficient is 1; when the temperature of the shell of the mobile phone is greater than or equal to 40 ℃ and less than or equal to 42 ℃, the mobile phone adjusts the brightness of the screen by adopting a backlight value determined by a brightness discount coefficient, and at the moment, the brightness discount coefficient is 0.9; when the temperature of the shell of the mobile phone is more than 42 ℃ and less than or equal to 44 ℃, the corresponding brightness discount coefficient is 0.8.
TABLE 1
Shell temperature (. Degree. C.) Coefficient of luminance discount
(0,40) 1
[40,42] 0.9
(42,44] 0.8
It should be noted that, in table 1 and fig. 4, the correspondence between the housing temperature and the luminance discount coefficient is described as an example, and the temperature of the mobile phone described in the embodiment of the present application is not limited to the housing temperature, and the correspondence between the temperature of different hardware and the luminance discount coefficient may be the same or different, which is not limited in the embodiment of the present application. For example, when the battery temperature of the mobile phone is greater than or equal to 38 ℃ and less than 40 ℃, the corresponding brightness discount coefficient is 0.9; when the battery temperature of the mobile phone is greater than or equal to 40 ℃ and less than 43 ℃, the corresponding luminance discount coefficient is 0.8, and so on. In practical application, the mobile phone can determine the corresponding brightness discount coefficient according to the temperatures of different hardware, which is not limited in the embodiment of the application.
In the embodiment of the application, after the application program framework layer of the mobile phone acquires the current temperature of the mobile phone detected by the temperature sensor, the current temperature is determined to reach the first temperature threshold value, and the application program framework layer determines to adjust the screen brightness. The application program framework layer of the mobile phone transmits a brightness discount coefficient corresponding to the current temperature to the kernel layer, and the kernel layer determines a target backlight value according to the current backlight value of the mobile phone screen and the brightness discount coefficient after receiving the brightness discount coefficient. And then, the kernel layer adopts a slow-down strategy to slowly adjust the brightness of the screen to a target backlight value. The above process is described in detail with reference to fig. 5, and fig. 5 is a schematic flow chart of a temperature control method according to an embodiment of the present application.
As shown in fig. 5, the method may include the steps of:
In step 510, the application framework layer of the mobile phone determines that the current temperature of the mobile phone reaches the first temperature threshold, and determines to adjust the screen brightness.
The temperature threshold is preset in the mobile phone, and triggers the temperature value of the mobile phone for adjusting the screen brightness. For example, the temperature threshold may be 38 ℃, 40 ℃, 42 ℃, or the like. Different mobile phone manufacturers may or may not set the same first temperature threshold, which is not limited herein. The first temperature threshold may be a minimum temperature threshold of a plurality of temperature thresholds preset in the mobile phone.
In the embodiment of the application, the application program framework layer can acquire the current temperature of the mobile phone detected by the temperature sensor in real time, and when the current temperature of the mobile phone detected by the temperature sensor acquired by the application program framework layer reaches the first temperature threshold value, the application program framework layer determines to execute the process of adjusting the screen brightness. Namely, the application program framework layer determines that the aim of reducing the temperature of the mobile phone is fulfilled by adjusting the brightness of the screen.
For example, assuming that the first temperature threshold set in the mobile phone is 42 ℃, when the application framework layer obtains that the current temperature of the mobile phone detected by the temperature sensor is 43 ℃, the application framework layer determines to adjust the screen brightness.
In step 520, the application framework layer determines a target coefficient corresponding to the current temperature according to the prestored temperature values and the brightness discount coefficient corresponding to each temperature value.
In step 530, the application framework layer sends the target coefficient corresponding to the current temperature to the kernel layer. Correspondingly, the kernel layer receives the target coefficient sent by the application framework layer.
The target coefficient refers to a brightness discount coefficient corresponding to the current temperature of the mobile phone. For example, when the current temperature of the mobile phone is 42 ℃, the application framework layer may determine that the target coefficient corresponding to the current temperature is 0.9 according to the corresponding relationship between the temperature and the luminance discount coefficient in table 1. For example, when the current temperature of the mobile phone is 44 ℃, the application framework layer may determine that the target coefficient corresponding to the current temperature is 0.8 according to the corresponding relationship between the temperature and the luminance discount coefficient in table 1.
In the embodiment of the application, when the application program framework layer determines to adjust the screen brightness, the application program framework layer sends the target coefficient to the kernel layer after determining the target coefficient corresponding to the current temperature of the mobile phone according to a plurality of temperature values stored in advance and brightness discount coefficients corresponding to the temperature values. For example, the application framework layer determines that the target coefficient corresponding to the current temperature of 42 ℃ of the mobile phone is 0.9, and the application framework layer sends the target coefficient of 0.9 to the kernel layer.
In step 540, the kernel layer determines a target backlight value according to the current backlight value and the target coefficient.
The target backlight value refers to a backlight value finally reached after the screen brightness of the mobile phone is adjusted.
In the embodiment of the application, the kernel layer can calculate the target backlight value according to the current backlight value of the mobile phone screen and the target coefficient. For example, assume that the current backlight value of the mobile phone screen obtained by the kernel layer is 200, the target coefficient is 0.9, and the kernel layer calculates the target backlight value according to the current backlight value and the target coefficient to be 200×0.9=180.
In step 550, the kernel layer adjusts the brightness of the screen by adopting a slow-down strategy until the brightness value of the screen reaches the target backlight value.
The slow-down strategy is that after the kernel layer determines the target backlight value, the backlight value for adjusting the brightness of the screen is sent to the LCD driver in a gradually decreasing manner, so that the LCD driver gradually reduces the brightness of the screen according to the received multiple backlight values.
In the embodiment of the application, after the kernel layer determines the target backlight value according to the current backlight value and the target coefficient of the screen, the kernel layer can sequentially issue a plurality of backlight values to the LCD driver by adopting a slow-down strategy until the target backlight value is issued to the LCD driver. After the LCD driver receives the backlight value sent by the kernel layer each time, the brightness of the screen is adjusted according to the received backlight value, so that the purposes of reducing the power consumption of the equipment and the temperature of the equipment are realized by gradually reducing the brightness of the screen, and the situation that the use of a user is influenced due to abrupt change of the brightness of the screen is avoided.
In the embodiment of the application, after the kernel layer determines a plurality of first backlight values according to the current backlight value, the target backlight value and the first preset value, the kernel layer issues the first backlight values to the LCD driver from the big to the small according to the sequence of the first backlight values until the target backlight value is issued to the LCD driver. The LCD driver adjusts the brightness of the screen according to the received first backlight value after receiving the first backlight value sent by the kernel layer each time. For example, assuming that the current backlight value of the mobile phone screen obtained by the kernel layer is 200, the target backlight value is 180, the first preset value is 1, the kernel layer determines that the plurality of first backlight values are [199,198,197, …,182,181,180], and the kernel layer may send the backlight values to the LCD driver by adopting a step-down method. For example, the kernel layer sequentially sends the following first backlight values [199,198,197, …,182,181,180] to the LCD driver, and after the LCD driver receives the first backlight value issued by the kernel layer, the LCD driver adjusts the brightness of the mobile phone screen to the first backlight value until the LCD driver receives the target backlight value sent by the kernel layer, and then the LCD driver adjusts the brightness of the mobile phone screen to the target backlight value.
In the embodiment of the application, after the LCD driver adjusts the screen brightness of the mobile phone to the target backlight value, the application program framework layer can continuously acquire the current temperature of the mobile phone detected by the temperature sensor, and the application program framework layer determines the acquired current temperature of the mobile phone as the first temperature.
In one possible case, if the application framework layer determines that the first temperature is less than the first temperature threshold, the process of adjusting the screen brightness of the mobile phone is stopped. For example, assuming that the first temperature threshold is 40 ℃, if the current temperature of the mobile phone acquired by the application framework layer again is 37 ℃, the process of adjusting the screen brightness of the mobile phone is stopped.
In another possible case, if the application framework layer determines that the first temperature is still greater than or equal to the first temperature threshold, the mobile phone continues to execute the implementation process of steps 520 to 540 until the current temperature of the mobile phone acquired by the application framework layer is less than the first temperature threshold, and the mobile phone stops executing the process of adjusting the screen brightness of the mobile phone.
For example, if the first temperature threshold is assumed to be 40 ℃, and the current temperature of the mobile phone acquired by the application framework layer for the first time is 44 ℃, the application framework layer determines that the target coefficient corresponding to the current temperature is 0.9 according to a plurality of temperature values stored in advance and brightness discount coefficients corresponding to the temperature values, and the application framework layer sends the target coefficient to the kernel layer. And the kernel layer adjusts the brightness of the screen by adopting a slow-down strategy after determining the target backlight value according to the current backlight value and the target coefficient until the brightness value of the screen reaches the target backlight value. Then, the application program framework layer acquires the current temperature of the mobile phone again, if the current temperature of the mobile phone acquired by the application program framework layer again is 42 ℃, the application program framework layer determines that a first coefficient corresponding to the current temperature is 0.8 according to a plurality of temperature values stored in advance and brightness discount coefficients corresponding to the temperature values, and the application program framework layer sends the target coefficient to the kernel layer. And the kernel layer adjusts the brightness of the screen by adopting a slow-down strategy after determining a first target backlight value according to the current backlight value and the first coefficient until the brightness value of the screen reaches the first target backlight value so as to reduce the temperature of the mobile phone, and until the current temperature of the mobile phone acquired by the application framework layer is smaller than a first temperature threshold value.
It may be understood that, during the operation of the mobile phone, the application framework layer may acquire the current temperature of the mobile phone detected by the temperature sensor in real time, and when the current temperature of the mobile phone acquired by the application framework layer is greater than or equal to the first temperature threshold, the application framework layer triggers the implementation process of steps 510 to 550 to be executed until the current temperature of the mobile phone acquired by the application framework layer is less than the first temperature threshold, and the mobile phone stops executing the process of adjusting the screen brightness of the mobile phone.
As can be seen from fig. 5 and the above description, the whole process of controlling the temperature of the mobile phone by adjusting the brightness of the screen is performed by the kernel layer after the application framework layer of the mobile phone issues the target coefficient to the kernel layer. It can be seen that the application framework layer only issues the target coefficient once to the kernel layer, and the system only generates uevent events once, so that the interaction times between the application framework layer and the kernel layer are reduced, a large number of uevent events are avoided, the energy consumption of the mobile phone is reduced, and the performance of the mobile phone is improved.
In the embodiment of the application, when the system of the mobile phone is started, the brightness discount coefficient node is newly added in the kernel layer. For convenience of description, a newly added luminance discount coefficient node in the kernel layer is hereinafter referred to as a first node. When the temperature control management module in the application program framework layer of the mobile phone determines that the current temperature of the mobile phone reaches the first temperature threshold value, the temperature control management module determines to adjust the screen brightness of the mobile phone. And the temperature control management module sends the brightness discount coefficient corresponding to the current temperature to a first node in the kernel layer. After the first node receives the brightness discount coefficient corresponding to the current temperature sent by the temperature control management module, the first node can determine a target backlight value according to the current backlight value and the brightness discount coefficient of the mobile phone screen. And then, the first node sequentially sends backlight values to the LCD driver by adopting a slow-down strategy, so that the LCD driver adjusts the screen brightness of the mobile phone according to the received backlight values until the backlight value of the screen brightness reaches a target backlight value. The above process is described in detail below with reference to fig. 6, and fig. 6 is a schematic flow chart of a temperature control method according to an embodiment of the present application.
As shown in fig. 6, the method may include the steps of:
In step 610, the temperature control management module of the application framework layer of the mobile phone determines that the current temperature of the mobile phone reaches the first temperature threshold, and determines to adjust the screen brightness.
In the embodiment of the present application, the temperature control management module of the application framework layer determines that the current temperature of the mobile phone reaches the minimum temperature threshold, and determines the implementation process of adjusting the brightness of the screen, which can be referred to the implementation process of step 510, and will not be described herein.
In step 620, the temperature control management module determines a target coefficient corresponding to the current temperature according to the plurality of temperature values and the luminance discount coefficient corresponding to each temperature value.
In step 630, the temperature control management module transmits a target coefficient corresponding to the current temperature to the first node. Correspondingly, the first node receives the target coefficient sent by the temperature control management module.
When the system of the mobile phone is started for the first time, the kernel layer can generate a first node. For example, the first node generated by the kernel layer execution code "device_attr_rw (bl_scale_ PERCENT)" is bl_scale_ PERCENT. The first node bl_scale_ PERCENT is used to perform a process of adjusting screen brightness.
When the temperature control management module of the application program framework layer determines that the current temperature of the mobile phone reaches a first temperature threshold value, the temperature control management module determines a target coefficient corresponding to the current temperature of the mobile phone according to a plurality of temperature values stored in advance and brightness discount coefficients corresponding to the temperature values, and then the temperature control management module sends the target coefficient to the first node. After the first node receives the target coefficient sent by the temperature control management module, the first node executes a process of adjusting the screen brightness. Here, the implementation process of determining the target coefficient corresponding to the current temperature of the mobile phone by the temperature control management module may refer to the implementation process in step 530, which is not described herein again.
That is, in the whole process of adjusting the screen brightness of the mobile phone, after the temperature control management module of the application program framework layer of the mobile phone transmits the target coefficient to the first node of the kernel layer once, the first node of the kernel layer executes the subsequent process of adjusting the screen brightness, and the first node executes the process of adjusting the screen brightness and does not interact with the application program framework layer any more, so that the interaction times between the upper layer and the bottom layer of the mobile phone are reduced.
In step 640, the first node triggers the parsing function to execute calculation to obtain the target backlight value according to the current backlight value and the target coefficient.
In the embodiment of the application, the behavior of the temperature control management module for sending the target coefficient to the first node triggers the process of obtaining the target backlight value by calculating the target backlight value according to the current backlight value and the target coefficient after the reading function performs analysis from the first node to obtain the target coefficient.
Fig. 7 is an exemplary diagram of determining a target backlight value by a first node of a kernel layer according to an embodiment of the present application, and after a target coefficient is written into the first node by a temperature control management module, as shown in fig. 7, a reading function is triggered to read a character string corresponding to the target coefficient from the first node. Then, the analysis function analyzes the character string read by the reading function to obtain a target coefficient. The analysis function analyzes the obtained current backlight value of the mobile phone, the analysis function sends the current backlight value and the target coefficient to the brightness function, and the brightness function calculates the target backlight value according to the current backlight value and the target coefficient after the current backlight value of the mobile phone is obtained and stored.
Assuming that the first node is BL_SCALE_ PERCENT, the read function is BL_SCALE_ PERCENT _SHOW, the parse function is BL_SCALE_ PERCENT _STORE, and the luminance function is backlight_device_set_bright. And returning the character string from the BL_SCALE_ PERCENT _SHOW to read and obtain the character string corresponding to the target coefficient in a file reading and writing mode from the BL_SCALE_ PERCENT. And the BL_SCALE_ PERCENT _STORE analyzes the character string corresponding to the target coefficient to obtain the target coefficient. Then, the BL_SCALE_ PERCENT _STORE analyzes the obtained current backlight value of the mobile phone to obtain the current backlight value of the mobile phone, and after the current backlight value is stored, the BL_SCALE_ PERCENT _STORE sends the current backlight value to a backlight_device_set_bright, and the backlight_device_set_bright is calculated according to the current backlight value and a target coefficient to obtain a target backlight value.
In step 650, the first node sequentially transmits the plurality of first backlight values to the LCD driver until the target backlight value is transmitted. Correspondingly, the LCD driver sequentially receives a plurality of first backlight values sent by the first node.
In step 660, the LCD driver adjusts the screen brightness according to the first backlight value.
In the embodiment of the application, after the first node determines the target backlight value for adjusting the screen brightness, the first node sequentially sends a plurality of first backlight values to the LCD driver until the target backlight value is sent to the LCD driver. The LCD driver adjusts the brightness of the screen according to the received first backlight value after receiving the first backlight value sent by the kernel layer each time. For example, after determining the target backlight value, the first node sequentially transmits backlight value 1 and backlight value 2 to the LCD driver until the target backlight value is transmitted to the LCD driver. The LCD driver adjusts the screen brightness of the mobile phone according to the received first backlight values.
In the embodiment of the application, after determining a plurality of first backlight values according to the current backlight value, the target backlight value and the first preset value, the first node of the kernel layer issues the plurality of first backlight values to the LCD driver from the big to the small according to the sequence of the plurality of first backlight values until the target backlight value is issued to the LCD driver. The LCD driver adjusts the brightness of the screen according to the received first backlight value after receiving the first backlight value sent by the first node each time.
For example, assuming that the current backlight value of the mobile phone screen acquired by the first node is 200, the target backlight value is 180, the first preset value is 1, the first node determines that the plurality of first backlight values are [199,198,197, …,182,181,180], and the first node may send the plurality of first backlight values to the LCD driver in a step-down method. For example, the first node sequentially sends the following first backlight values [199,198,197, …,182,181,180] to the LCD driver, and after the LCD driver receives the first backlight value sent by the first node, the LCD driver adjusts the brightness of the mobile phone screen to the first backlight value until the LCD driver receives the target backlight value sent by the first node, and then the LCD driver adjusts the brightness of the mobile phone screen to the target backlight value.
As can be seen from fig. 6 and the above description, in the whole process of controlling the temperature of the mobile phone by adjusting the brightness of the screen, the temperature control management module of the application framework layer issues the target coefficient to the first node of the kernel layer, and then the first node of the kernel layer executes the whole process of adjusting the brightness of the screen. It can be seen that the temperature control management module issues a target coefficient to the first node, and the system only generates uevent events once, so that the interaction times between the application framework layer and the kernel layer are reduced, a large number of uevent events are avoided, the energy consumption of the mobile phone is reduced, and the performance of the mobile phone is improved.
In the embodiment of the application, after the first node achieves the purpose of reducing the temperature of the mobile phone by adjusting the brightness of the screen to the target backlight value, the temperature control management module of the application program framework layer continuously acquires the current temperature of the mobile phone detected by the temperature sensor, and when the temperature control management module determines that the current temperature of the mobile phone is lower than the first temperature threshold value and the current backlight value of the mobile phone screen acquired by the first node is the target backlight value, the first node can restore the brightness of the screen to the backlight value before brightness adjustment, so that the situation that the screen brightness of the mobile phone is too low and the application use experience is influenced is avoided.
For example, assuming that the current backlight value of the mobile phone is determined to be 180 by the temperature control management module, the backlight value is determined to be the backlight value after the brightness of the screen is adjusted by the temperature control management module, the backlight value of the mobile phone screen before the brightness is adjusted is determined to be 200 by the temperature control management module, and the brightness discount coefficient for improving the brightness of the screen is determined to be 200/180 by the temperature control management module. The temperature control management module sends the brightness discount coefficient to a first node, and the first node determines that the target backlight value is 180×200/180=200 according to the brightness discount coefficient and the current backlight value of the mobile phone. The first node sequentially issues a plurality of backlight values to the LCD drive until a target backlight value is sent to the LCD drive. The first node sends the following backlight values [181,182,183, …,198,199,200] to the LCD driver in sequence, and after the LCD driver receives the backlight value once issued by the first node, the LCD driver adjusts the brightness of the mobile phone screen to the backlight value until the LCD driver receives the backlight value 200 sent by the first node, and then the LCD driver adjusts the brightness of the mobile phone screen to the backlight value 200.
In the embodiment of the application, when the system of the mobile phone is started, the application program framework layer of the mobile phone can send different temperature values and corresponding brightness discount coefficients to the kernel layer, and the kernel layer executes the process of adjusting the screen brightness of the mobile phone. The above process is described in detail below with reference to fig. 8, and fig. 8 is a schematic flow chart III of a temperature control method according to an embodiment of the present application.
As shown in fig. 8, the method may include the steps of:
Step 810, when the system of the mobile phone is started, the application framework layer sends thermal control parameters to the kernel layer; correspondingly, the kernel layer receives the thermal control parameters sent by the application framework layer.
Wherein the thermal control parameters include, but are not limited to, a plurality of temperature values and brightness discount coefficients corresponding to the temperature values.
In the embodiment of the application, when the mobile phone is started and the system is started, the application program framework layer can send the brightness discount coefficients corresponding to the temperature values to the kernel layer. After receiving the different temperature values and the corresponding brightness discount coefficients sent by the application program framework layer, the kernel layer stores the different temperature values and the brightness discount coefficients corresponding to the temperature values.
For example, assuming a temperature of 40 ℃, the corresponding luminance discount coefficient is 0.9; when the temperature value is 42 ℃, the corresponding brightness discount coefficient is 0.8. The application framework layer may send values (40, 0.9;42, 0.8) to the kernel layer. After the kernel layer receives the values (40, 0.9;42, 0.8) sent by the application framework layer, the received values may be stored.
For example, if the temperature value is greater than or equal to 40 ℃ and less than or equal to 42 ℃, the corresponding luminance discount coefficient is 0.9; when the temperature value is more than 42 ℃ and less than or equal to 45 ℃, the corresponding brightness discount coefficient is 0.8. The application program framework layer can send the numerical value (40, 42, 0.9; 42,45, 0.8) to the kernel layer, and the kernel layer stores the received numerical value after receiving the different temperature value intervals and the corresponding brightness discount coefficients sent by the application program framework layer.
In step 820, the kernel layer determines that the current temperature of the handset reaches a second temperature threshold.
In step 830, the kernel layer determines a target coefficient corresponding to the current temperature according to the plurality of temperature values and the luminance discount coefficients corresponding to the temperature values.
In the embodiment of the application, the inner core layer can acquire the current temperature of the mobile phone detected by the temperature sensor in real time, and when the inner core layer determines that the current temperature of the mobile phone reaches the second temperature threshold, the inner core layer can determine the target coefficient corresponding to the current temperature according to the prestored brightness discount coefficients corresponding to different temperature values and temperature values.
For example, the current temperature of the mobile phone detected by the temperature sensor acquired by the core layer is 40 ℃, and the core layer can determine that the target coefficient corresponding to the current temperature is 0.9 according to the prestored temperature value and the corresponding brightness discount coefficient (40, 0.9;42, 0.8) or according to the prestored temperature value interval and the corresponding brightness discount coefficient ([ 40, 42],0.9; 42, 45; 0.8).
For example, the current temperature of the mobile phone detected by the temperature sensor acquired by the core layer is 43 ℃, and the core layer can determine that the target coefficient corresponding to the current temperature is 0.8 according to the prestored temperature value and the corresponding brightness discount coefficient ([ 40, 42],0.9 ] (42, 45], 0.8).
In step 840, the kernel layer calculates a target backlight value according to the current backlight value and the target coefficient.
In the embodiment of the application, when the kernel layer determines to adjust the brightness of the screen, the kernel layer can acquire the current backlight value of the mobile phone screen. And then, the kernel layer calculates a target backlight value according to the current backlight value and the target coefficient.
For example, assume that the current backlight value of the mobile phone screen obtained by the kernel layer is 200, the target coefficient is 0.8, and the kernel layer calculates the target backlight value according to the current backlight value and the target coefficient to be 200×0.8=160.
In step 850, the kernel layer adjusts the brightness of the screen by adopting a slow-down strategy until the brightness value of the screen reaches the target backlight value.
In the embodiment of the present application, the process of adjusting the brightness of the screen by the kernel layer in step 850 using the slow-down policy may refer to the implementation process of step 550, which is not described herein.
In the embodiment of the application, after the LCD driver adjusts the brightness of the mobile phone screen to the target backlight value, the kernel layer can continuously acquire the current temperature of the mobile phone detected by the temperature sensor.
In one possible case, if the current temperature of the mobile phone acquired again by the kernel layer is smaller than the second temperature threshold, the kernel layer stops executing the process of adjusting the screen brightness of the mobile phone. For example, if the second temperature threshold is 40 ℃, and the current temperature of the mobile phone acquired again by the kernel layer is 37 ℃, the process of adjusting the screen brightness of the mobile phone is stopped.
In another possible case, if the current temperature of the mobile phone acquired by the kernel layer again is still greater than or equal to the second temperature threshold, the kernel layer continues to execute the implementation process of steps 830 to 850 until the current temperature of the mobile phone acquired by the kernel layer is less than the second temperature threshold, and stops executing the process of adjusting the screen brightness of the mobile phone.
For example, if the second temperature threshold is set to 40 ℃, and the current temperature of the mobile phone acquired by the kernel layer for the first time is set to 44 ℃, the kernel layer determines that the target coefficient corresponding to the current temperature is 0.9 according to a plurality of temperature values stored in advance and brightness discount coefficients corresponding to the temperature values, and after the kernel layer determines the target backlight value according to the current backlight value and the target coefficient, the kernel layer adjusts the brightness of the screen by adopting a slow-down strategy until the brightness value of the screen reaches the target backlight value. And then, the inner core layer acquires the current temperature of the mobile phone again, if the current temperature of the mobile phone acquired by the inner core layer is 42 ℃, the inner core layer determines a second coefficient corresponding to the current temperature to be 0.8 according to a plurality of temperature values stored in advance and brightness discount coefficients corresponding to the temperature values, and after the inner core layer determines a second target backlight value according to the current backlight value and the second coefficient, the inner core layer adjusts the brightness of the screen by adopting a slow-down strategy until the brightness value of the screen reaches the second target backlight value so as to reduce the temperature of the mobile phone until the current temperature of the mobile phone acquired by the inner core layer is smaller than a second temperature threshold value.
It may be understood that, during the operation of the mobile phone, the core layer may acquire the current temperature of the mobile phone detected by the temperature sensor in real time, and when the current temperature of the mobile phone acquired by the core layer is greater than or equal to the second temperature threshold, the core layer executes the implementation process of steps 830 to 850 until the current temperature of the mobile phone acquired by the core layer is less than the second temperature threshold, and the core layer stops executing the process of adjusting the screen brightness of the mobile phone.
As can be seen from fig. 8 and the above description, when the mobile phone system is started, the application framework layer issues different temperature values and corresponding luminance discount coefficients to the kernel layer. When the inner core layer determines that the current temperature of the mobile phone reaches the second temperature threshold value, the inner core layer directly controls the screen brightness without interaction with the application program framework layer, so that the situation of generating a large number of uevent events is avoided, the load of the mobile phone is reduced, the energy consumption of the mobile phone is reduced, and the performance of the mobile phone is improved.
In the embodiment of the application, when the system of the mobile phone is started, the temperature control management module in the application program framework layer of the mobile phone sends different temperature values and corresponding brightness discount coefficients to the newly added first node in the kernel layer, and the first node executes the process of adjusting the screen brightness of the mobile phone. The above process is described in detail below with reference to fig. 9, and fig. 9 is a schematic flow chart of a temperature control method according to an embodiment of the present application.
As shown in fig. 9, the method may include the steps of:
in step 910, when the system of the mobile phone is started, the temperature control management module of the application framework layer transmits the thermal control parameters to the first node of the kernel layer. Correspondingly, the first node receives the thermal control parameters sent by the temperature control management module.
Wherein the thermal control parameters include, but are not limited to, a plurality of temperature values and brightness discount coefficients corresponding to the temperature values.
In the embodiment of the application, when the mobile phone is started and the system is started, the temperature control management module of the application program framework layer sends a plurality of temperature values and brightness discount coefficients corresponding to the temperature values to the first node of the kernel layer. After receiving each temperature value and the corresponding brightness discount coefficient sent by the application program framework layer, the first node stores each temperature value and the corresponding brightness discount coefficient. For example, the first node may store the luminance discount coefficients corresponding to the plurality of temperature values and the respective temperature values to a certain partition of the memory.
For example, assume that the format of the thermal control parameters sent by the temperature control management module to the first node is (temperature value, luminance discount coefficient, 0). When the temperature value is 40 ℃, the corresponding brightness discount coefficient is 0.9; when the temperature value is 42 ℃, the corresponding brightness discount coefficient is 0.8. That is, the thermal control parameters sent by the temperature control management module to the first node are as follows: (40, 0.9;42, 0.8). After the first node receives the thermal control parameters (40, 0.9;42, 0.8) sent by the temperature control management module, the received values may be stored.
Also for example, assume that the format of the thermal control parameters transmitted to the first node by the thermal control management module is ([ first temperature value, second temperature value ], luminance discount coefficient ], (second temperature value, third temperature value ]), luminance discount coefficient. When the temperature value is more than or equal to 40 ℃ and less than or equal to 42 ℃, the corresponding brightness discount coefficient is 0.9; when the temperature value is more than 42 ℃ and less than or equal to 45 ℃, the corresponding brightness discount coefficient is 0.8. That is, the thermal control parameters sent by the temperature control management module to the first node are as follows: and (40, 42, 0.9, 42, 45, 0.8) the first node stores the received thermal control parameters after receiving the different temperature value intervals and the corresponding brightness discount coefficients sent by the temperature control management module.
It can be understood that after the first node stores the plurality of temperature values and the brightness discount coefficients corresponding to the temperature values in the bottom layer, the bottom layer does not need to interact with the upper layer in the process of controlling the brightness of the screen by the bottom layer, so that the problem that a large number of uevent events are generated due to excessive interaction times between the bottom layer and the upper layer in the related technology is solved, the load of the mobile phone is too high, and the power consumption of the mobile phone is reduced.
In step 920, the first node in the kernel layer triggers the parsing function to execute the parsing process, and registers the callback function.
In the embodiment of the application, after the first node receives the thermal control parameter, the first node triggers the analysis function to analyze the thermal control parameter so as to obtain a plurality of temperature values contained in the thermal control parameter and brightness discount coefficients corresponding to the temperature values.
In addition, the first node registers a callback function (e.g., a callback function of cb_backlight) with a thermal sensor (thermal sensor). And the callback function is used for calculating a target backlight value according to the brightness discount coefficient corresponding to the temperature threshold and the current backlight value of the mobile phone when the current temperature of the mobile phone reaches a certain temperature threshold.
In step 930, the first node of the kernel layer determines that the current temperature reaches the second temperature threshold, and determines to adjust the screen brightness.
In the embodiment of the application, the first node can acquire the current temperature of the mobile phone detected by the temperature sensor in real time, and when the current temperature of the mobile phone acquired by the first node reaches the second temperature threshold value, the first node determines to adjust the screen brightness of the mobile phone.
For example, the temperature values stored in advance in the first node are 40 ℃, 42 ℃ and 45 ℃. Assuming that the current temperature of the mobile phone detected by the temperature sensor acquired by the first node is 42 ℃, the first node determines to adjust the screen brightness of the mobile phone.
Step 940, the callback function calculates the target coefficient according to the current temperature and the brightness discount coefficients corresponding to different temperature values.
In the embodiment of the application, when the first node determines that the current temperature of the mobile phone reaches the second temperature threshold, the callback function determines the target coefficient according to the current temperature and the brightness discount coefficients corresponding to different temperature values.
For example, assume that each temperature value and the corresponding luminance discount coefficient are as follows: and when the first node determines that the current temperature of the mobile phone is 42 ℃, the callback function determines that the target coefficient corresponding to the current temperature of the mobile phone is 0.9 according to the temperature values and the corresponding brightness discount coefficients.
In step 950, the callback function calculates the target backlight value according to the current backlight value and the target coefficient.
In the embodiment of the application, after determining the target coefficient corresponding to the current temperature of the mobile phone, the callback function obtains the current backlight value of the mobile phone screen so as to calculate and obtain the target backlight value according to the current backlight value and the target coefficient.
For example, the current backlight value of the mobile phone screen obtained by the callback function is 200, the target coefficient determined by the callback function is 0.9, and the callback function calculates the target backlight value according to the current backlight value and the target coefficient to obtain 200×0.9=180.
Fig. 10 is a second exemplary diagram of determining a target backlight value by a first node according to an embodiment of the present application, as shown in fig. 10,
Assuming that the first node is BL_SCALE_ PERCENT, the read function is BL_SCALE_ PERCENT _SHOW, the parse function is BL_SCALE_ PERCENT _STORE, and the luminance function is backlight_device_set_bright. Assuming that the format of sending a plurality of temperature values and brightness discount coefficients corresponding to the temperature values to the bl_scale_ PERCENT by the temperature control management module is (temperature value, brightness discount coefficient, 0), after the bl_scale_ PERCENT receives each temperature value and the corresponding brightness discount coefficient, the bl_scale_ PERCENT triggers the bl_scale_ PERCENT _showto execute the return of the character string from the bl_scale_ PERCENT according to the mode of reading and writing the file, so as to read and obtain the character string corresponding to the brightness discount coefficient corresponding to the temperature values. The analysis function BL_SCALE_ PERCENT _STORE analyzes the plurality of temperature values and the character strings corresponding to the brightness discount coefficients corresponding to the temperature values, and STOREs the plurality of temperature values and the brightness discount coefficients corresponding to the temperature values after obtaining the plurality of temperature values and the brightness discount coefficients corresponding to the temperature values.
When the first node determines that the current temperature of the mobile phone reaches the second temperature threshold, the callback function cb_backlight calculates a target backlight value according to the current backlight value and the target coefficient of the mobile phone screen after determining the target coefficient corresponding to the current temperature from a plurality of temperature values and brightness discount coefficients corresponding to the temperature values stored in advance.
In step 960, the first node sequentially transmits the plurality of second backlight values to the LCD driver until the target backlight value is transmitted. Correspondingly, the LCD driver sequentially receives a plurality of second backlight values sent by the first node.
In step 970, the LCD driver adjusts the screen brightness according to the second backlight value.
In the embodiment of the present application, the implementation process of the step 960 and the step 970 may refer to the implementation process of the step 650 and the step 660, which are not described herein.
In the embodiment of the application, after the LCD driver adjusts the screen brightness of the mobile phone to the target backlight value, the first node can continuously acquire the current temperature of the mobile phone detected by the temperature sensor. And if the current temperature of the mobile phone acquired by the first node is smaller than the second temperature threshold value, stopping executing the process of adjusting the screen brightness of the mobile phone. If the current temperature of the mobile phone acquired by the first node is still greater than or equal to the second temperature threshold, the mobile phone continues to execute the implementation process of the steps 930 to 970 until the current temperature of the mobile phone acquired by the first node is less than the second temperature threshold, and the mobile phone stops executing the process of adjusting the screen brightness of the mobile phone.
As can be seen from the above, the temperature control management module in the application framework layer sends the different temperature values and the corresponding brightness discount coefficients to the newly added first node in the kernel layer, and when the first node determines that the current temperature of the mobile phone reaches the second temperature threshold, the first node executes the whole process of adjusting the screen brightness, so as to achieve the purpose of reducing the temperature of the mobile phone by adjusting the screen brightness of the mobile phone. Because the upper layer and the lower layer of the mobile phone only interact once in the whole process of regulating the temperature of the mobile phone, the mobile phone executes the process of regulating the screen brightness by adopting a slow-descent strategy at the bottom layer, not only solves the problems that in the related art, the application program framework layer of the mobile phone transmits a plurality of backlight values for regulating the screen brightness to the inner core layer, so that the interaction times between the application program framework layer and the inner core layer are excessive, the reporting phenomenon of a plurality of uevent events occurs, and the problem of increasing the power consumption and the load of the mobile phone is caused, thereby reducing the interaction times between the application program framework layer and the inner core layer, avoiding generating a large number of uevent events, not only reducing the energy consumption of the mobile phone, but also improving the performance of the mobile phone.
In the embodiment of the application, after the first node achieves the purpose of reducing the temperature of the mobile phone by adjusting the brightness of the screen to the target backlight value, the first node continuously acquires the current temperature of the mobile phone detected by the temperature sensor, and when the first node determines that the current temperature of the mobile phone is lower than the second temperature threshold value and the current backlight value of the mobile phone screen acquired by the first node is the target backlight value, the first node can restore the brightness of the screen to the backlight value before brightness adjustment, so that the situation that the screen brightness of the mobile phone is too low and the application and use experience is influenced is avoided.
For example, assuming that the first node determines that the current backlight value of the mobile phone is 180, the first node determines that the backlight value is a backlight value after the brightness of the screen is adjusted, the first node determines that the backlight value of the mobile phone screen before the brightness adjustment is 200, and the first node determines that the brightness discount coefficient for improving the brightness of the screen is 200/180. The first node determines that the target backlight value is 180×200/180=200 according to the luminance discount coefficient and the current backlight value of the mobile phone. The first node sequentially issues a plurality of backlight values to the LCD drive until a target backlight value is sent to the LCD drive. The first node sends the following backlight values [181,182,183, …,198,199,200] to the LCD driver in sequence, and after the LCD driver receives the backlight value once issued by the first node, the LCD driver adjusts the brightness of the mobile phone screen to the backlight value until the LCD driver receives the backlight value 200 sent by the first node, and then the LCD driver adjusts the brightness of the mobile phone screen to the backlight value 200.
As shown in fig. 11, the embodiment of the application discloses an electronic device, which may be the mobile phone. The electronic device may specifically include: a touch screen 1101, the touch screen 1101 including a touch sensor 1106 and a display screen 1107; one or more processors 1102; a memory 1103; one or more applications (not shown); and one or more computer programs 1104, each of which may be connected via one or more communication buses 1105. Wherein the one or more computer programs 1104 are stored in the memory 1103 and configured to be executed by the one or more processors 1102, the one or more computer programs 1104 include instructions that can be used to perform the relevant steps in the embodiments described above.
It will be appreciated that the electronic device or the like may include hardware structures and/or software modules that perform the functions described above. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present application.
The embodiment of the application can divide the functional modules of the electronic device and the like according to the method example, for example, each functional module can be divided corresponding to each function, and two or more functions can be integrated in one processing module. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
In the case of dividing the respective functional modules with the respective functions, one possible composition diagram of the electronic device involved in the above-described embodiment may include: a display unit, a transmission unit, a processing unit, etc. It should be noted that, all relevant contents of each step related to the above method embodiment may be cited to the functional description of the corresponding functional module, which is not described herein.
The embodiment of the application also provides electronic equipment which comprises one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, the one or more memories being configured to store computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to perform the related method steps described above to implement the temperature control method of the above embodiments.
Embodiments of the present application also provide a computer-readable storage medium having stored therein computer instructions that, when executed on an electronic device, cause the electronic device to perform the above-described related method steps to implement the temperature control method in the above-described embodiments.
Embodiments of the present application also provide a computer program product comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the above-described related method steps to implement the temperature control method of the above-described embodiments.
In addition, embodiments of the present application also provide an apparatus, which may be embodied as a chip, component or module, which may include a processor and a memory coupled to each other; the memory is configured to store computer-executable instructions, and when the apparatus is running, the processor may execute the computer-executable instructions stored in the memory, so that the apparatus executes the temperature control method executed by the electronic device in the above method embodiments.
The electronic device, the computer readable storage medium, the computer program product or the apparatus provided in this embodiment are configured to execute the corresponding method provided above, and therefore, the advantages achieved by the electronic device, the computer readable storage medium, the computer program product or the apparatus can refer to the advantages in the corresponding method provided above, which are not described herein.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be implemented by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above. The specific working processes of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which are not described herein.
The functional units in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard disk, read-only memory, random access memory, magnetic or optical disk, and the like.
The foregoing is merely illustrative of specific embodiments of the present application, and the scope of the present application is not limited thereto, but any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (17)

1. A method for controlling temperature of an electronic device, the electronic device comprising an application framework layer and a kernel layer, the kernel layer comprising a first node, the method comprising:
when the application framework layer determines that the current temperature is greater than or equal to a first temperature threshold, the application framework layer sends a target coefficient corresponding to the current temperature to the first node of the kernel layer, a plurality of temperature values and brightness discount coefficients corresponding to the temperature values are prestored in the application framework layer, and the target coefficient is the brightness discount coefficient corresponding to the current temperature;
After the first node of the kernel layer obtains the current backlight value of the screen, determining a target backlight value according to the current backlight value and the target coefficient;
The first node of the kernel layer adjusts a backlight value of the screen to the target backlight value to adjust the current temperature.
2. The method of claim 1, wherein the first node of the kernel layer adjusting the backlight value of the screen to the target backlight value comprises:
The first node of the kernel layer determines a plurality of first backlight values according to the current backlight value, the target backlight value and a first preset value;
and the first node of the kernel layer adjusts the backlight value of the screen according to the sequence from the first backlight values to the second backlight values in sequence until the backlight value of the screen is the target backlight value.
3. The method of claim 2, wherein the first node of the kernel layer determining a plurality of first backlight values from the current backlight value, the target backlight value, and a first preset value comprises:
and the first node of the kernel layer determines a plurality of first backlight values with equal difference values according to the current backlight value, the target backlight value and the first preset value.
4. A method according to claim 2 or 3, wherein the core layer includes an LCD driver, and the first node of the core layer sequentially adjusts the backlight value of the screen according to each of the first backlight values in order of the plurality of first backlight values from the top to the bottom until the backlight value of the screen is the target backlight value, comprising:
And the first node of the kernel layer sequentially sends each first backlight value to the LCD driver according to the sequence from the large to the small of the plurality of first backlight values, and the LCD driver adjusts the backlight value of the screen to the first backlight value until the LCD driver adjusts the backlight value of the screen to the target backlight value.
5. The method of any of claims 1-4, wherein after the first node of the kernel layer adjusts the backlight value of the screen to the target backlight value, the method further comprises:
The application framework layer determines that the current temperature is a first temperature;
If the application framework layer determines that the first temperature is greater than or equal to the first temperature threshold, the application framework layer sends a first coefficient corresponding to the first temperature to the first node of the kernel layer, the first node of the kernel layer obtains a current backlight value of a screen, and then determines a first target backlight value according to the current backlight value and the first coefficient, and the first node of the kernel layer adjusts the backlight value of the screen to the first target backlight value to adjust the current temperature.
6. The method of any of claims 1-4, wherein after the first node of the kernel layer adjusts the backlight value of the screen to the target backlight value, the method further comprises:
The application framework layer determines that the current temperature is a first temperature;
The application framework layer determines that the first temperature is less than the first temperature threshold.
7. The method of any of claims 1-6, wherein after the application framework layer sends a target coefficient corresponding to the current temperature to the first node of the kernel layer, the method further comprises:
The first node calls a reading function to read a character string corresponding to the target coefficient from the first node;
and the first node calls an analysis function to analyze the character string corresponding to the target coefficient to obtain the target coefficient.
8. The method according to any one of claims 1-7, wherein said determining a target backlight value from said current backlight value and said target coefficient comprises:
the first node calls an analysis function to analyze the character string of the current backlight value read by the reading function to obtain the current backlight value;
the first node calls the analysis function to send the current backlight value and the target coefficient to a brightness function;
And the first node calls the brightness function to calculate the target backlight value according to the current backlight value and the target coefficient.
9. A method for controlling temperature of an electronic device, wherein the electronic device comprises an application framework layer and a kernel layer, the method comprising:
in response to a start operation of the electronic device, the application framework layer sends thermal control parameters to the kernel layer, wherein the thermal control parameters comprise a plurality of temperature values and brightness discount coefficients corresponding to the temperature values;
When the kernel layer determines that the current temperature of the electronic equipment is greater than or equal to a second temperature threshold, the kernel layer determines a target coefficient corresponding to the current temperature according to the plurality of temperature values and brightness discount coefficients corresponding to the temperature values;
The kernel layer determines a target backlight value according to the current backlight value of the screen and the target coefficient;
and the kernel layer adjusts the backlight value of the screen to the target backlight value so as to adjust the current temperature.
10. The method of claim 9, wherein the kernel layer comprises a first node, wherein the kernel layer adjusts a backlight value of the screen to the target backlight value, comprising:
The first node of the kernel layer determines a plurality of second backlight values according to the current backlight value, the target backlight value and a second preset value;
And the first node of the kernel layer adjusts the backlight value of the screen according to the sequence from the plurality of second backlight values to the small value in turn according to each second backlight value until the backlight value of the screen is the target backlight value.
11. The method of claim 9, wherein the first node of the kernel layer determining a plurality of second backlight values from the current backlight value, the target backlight value, and a second preset value comprises:
And the first node of the kernel layer determines a plurality of second backlight values with equal difference values according to the current backlight value, the target backlight value and the second preset value.
12. The method of any of claims 9-11, wherein after the kernel layer adjusts the backlight value of the screen to the target backlight value, the method further comprises:
If the core layer determines that the current temperature is greater than or equal to the second temperature threshold, the core layer determines a second coefficient corresponding to the current temperature according to the plurality of temperature values and brightness discount coefficients corresponding to the temperature values, the core layer determines a second target backlight value according to the current backlight value and the second coefficient of the screen, and the core layer adjusts the backlight value of the screen to the second target backlight value.
13. The method of any of claims 9-11, wherein after the kernel layer adjusts the backlight value of the screen to the target backlight value, the method further comprises:
the core layer determines that the current temperature is less than a second temperature threshold.
14. The method of any of claims 9-13, wherein the kernel layer comprises a first node, and wherein after the application framework layer sends the thermal parameters to the kernel layer, the method further comprises:
The first node calls a reading function to read a character string corresponding to the thermal control parameter from the first node;
And the first node calls an analysis function to analyze the character string corresponding to the thermal control parameter, so as to obtain the plurality of temperature values and the brightness discount coefficient corresponding to each temperature value.
15. The method of any of claims 9-13, wherein the kernel layer comprises a first node, wherein the kernel layer determines a target coefficient corresponding to the current temperature, comprising:
When the first node determines that the current temperature is greater than or equal to the second temperature threshold, the first node calls a callback function to determine the target coefficient corresponding to the current temperature;
the kernel layer determines a target backlight value according to the current backlight value of the screen and the target coefficient, and the method comprises the following steps:
and the first node calls the callback function, and calculates the target backlight value according to the current backlight value and the target coefficient.
16. An electronic device, comprising:
A display screen;
One or more processors;
A memory;
Wherein the memory has stored therein one or more computer programs, the one or more computer programs comprising instructions, which when executed by the electronic device, cause the electronic device to perform the temperature control method of any of claims 1-8, or to perform the temperature control method of any of claims 9-15.
17. A computer readable storage medium having instructions stored therein, which when run on an electronic device, cause the electronic device to perform the temperature control method of any one of claims 1-8 or to perform the temperature control method of any one of claims 9-15.
CN202310871699.8A 2023-07-14 2023-07-14 Temperature control method of electronic equipment Active CN117707243B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310871699.8A CN117707243B (en) 2023-07-14 2023-07-14 Temperature control method of electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310871699.8A CN117707243B (en) 2023-07-14 2023-07-14 Temperature control method of electronic equipment

Publications (2)

Publication Number Publication Date
CN117707243A CN117707243A (en) 2024-03-15
CN117707243B true CN117707243B (en) 2024-08-23

Family

ID=90150329

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310871699.8A Active CN117707243B (en) 2023-07-14 2023-07-14 Temperature control method of electronic equipment

Country Status (1)

Country Link
CN (1) CN117707243B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103995766A (en) * 2014-06-06 2014-08-20 山东超越数控电子有限公司 Method for detecting and controlling temperatures of processor
CN113612882A (en) * 2021-08-17 2021-11-05 RealMe重庆移动通信有限公司 Screen brightness adjusting method and device, storage medium and terminal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114008560A (en) * 2019-05-21 2022-02-01 惠普发展公司,有限责任合伙企业 Computing device fan adjustment based on environment and temperature
CN115909930A (en) * 2022-12-27 2023-04-04 广州朗国电子科技股份有限公司 Method, system, equipment and medium for detecting and controlling screen temperature of terminal equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103995766A (en) * 2014-06-06 2014-08-20 山东超越数控电子有限公司 Method for detecting and controlling temperatures of processor
CN113612882A (en) * 2021-08-17 2021-11-05 RealMe重庆移动通信有限公司 Screen brightness adjusting method and device, storage medium and terminal

Also Published As

Publication number Publication date
CN117707243A (en) 2024-03-15

Similar Documents

Publication Publication Date Title
CN113362783B (en) Refresh rate switching method and electronic equipment
CN112789651B (en) Frequency adjustment method and device applied to terminal and electronic equipment
CN115473957B (en) Image processing method and electronic equipment
CN114650363B (en) Image display method and electronic equipment
CN113778641B (en) Method for controlling camera, electronic device and computer readable storage medium
EP4280586A1 (en) Point light source image detection method and electronic device
CN115333941B (en) Method for acquiring application running condition and related equipment
CN116051351B (en) Special effect processing method and electronic equipment
CN117234398B (en) Screen brightness adjusting method and electronic equipment
CN116048831B (en) Target signal processing method and electronic equipment
CN116048217B (en) Electronic equipment operation method and device and electronic equipment
CN115695640B (en) Shutdown prevention protection method and electronic equipment
CN116662130A (en) Method for counting application use time length, electronic equipment and readable storage medium
CN115482143B (en) Image data calling method and system for application, electronic equipment and storage medium
CN117707243B (en) Temperature control method of electronic equipment
CN117496391A (en) Image processing method and electronic equipment
CN113467821A (en) Application program repairing method, device, equipment and readable storage medium
CN116233599B (en) Video mode recommendation method and electronic equipment
CN116719376B (en) Voltage control method, device, equipment and storage medium
CN116095512B (en) Photographing method of terminal equipment and related device
CN116048629B (en) System service switching method, control device, electronic equipment and storage medium
CN116709609B (en) Message delivery method, electronic device and storage medium
CN116703741B (en) Image contrast generation method and device and electronic equipment
CN118524295A (en) Determination method of light source color and electronic equipment
CN116414493A (en) Image processing method, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant