Temperature control method, electronic device and controller
By dynamically adjusting the target temperature and controlling the cooling fan speed based on the CPU's configuration information, the temperature control problem when the CPU load changes is solved, thus reducing the power consumption of electronic devices.
Patent Information
- Application Number
- CN202211608198.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-14
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2042-12-14
AI Technical Summary
In existing technologies, setting the CPU target temperature too high leads to high cooling fan speed and increased power consumption, making it unable to effectively cope with the problem of a sharp rise in temperature when the CPU load suddenly increases.
By acquiring CPU configuration information, such as the number of cores and frequency, the target temperature of the CPU is dynamically adjusted, and the speed of the cooling fan is controlled according to the target temperature to avoid continuous high speed. The fan speed is calculated using a PID algorithm.
It enables dynamic adjustment based on CPU configuration information, avoiding situations where the CPU target temperature is too low and the cooling fan runs at a continuously high speed, thereby reducing the power consumption of electronic devices.
Smart Images

Figure CN116048155B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a temperature control method, electronic device and controller. Background Technology
[0002] Electronic devices can generate a lot of heat when they are running. The cooling fans inside these devices rotate, creating airflow to dissipate the heat from within the device. For example, electronic devices can be servers.
[0003] Currently, the target temperature of the CPU can be preset according to the specified temperature of the central processing unit (CPU) in electronic devices, and the actual temperature of the CPU can be controlled by the cooling fan to approach the target temperature. However, if the target temperature of the CPU is set too high, the CPU temperature will increase sharply when the CPU load suddenly increases, which may cause the actual temperature of the CPU to exceed the temperature specification.
[0004] In related technologies, to prevent the CPU operating temperature from exceeding the temperature specification, a lower target CPU temperature needs to be set. This results in higher cooling fan speeds and higher power consumption for electronic devices. Summary of the Invention
[0005] This application provides a temperature control method, electronic device, and controller. The method can avoid the situation where the target temperature of the CPU is always low and the speed of the cooling fan is always high, thereby reducing the power consumption of the electronic device.
[0006] In a first aspect, this application provides a temperature control method, the method comprising:
[0007] Obtain CPU configuration information and initial temperature;
[0008] Based on the configuration information, determine the target temperature of the CPU;
[0009] Based on the target temperature and the first temperature, the operating state of the temperature regulator is controlled, and the temperature regulator is used to adjust the temperature of the CPU.
[0010] The above technical solution can determine the CPU's target temperature based on its configuration information, meaning it can adjust the CPU's target temperature promptly according to changes in the CPU configuration. This avoids a situation where the CPU's target temperature remains consistently low, causing the cooling fan speed to remain consistently high, thus resulting in lower power consumption for the electronic device.
[0011] In one possible implementation, the configuration information includes the first number of cores of the CPU; determining the target temperature of the CPU based on the configuration information includes:
[0012] Obtain a first correspondence between the number of CPU cores and the target temperature, wherein the first correspondence includes multiple CPU core counts and the temperature corresponding to each CPU core count;
[0013] The target temperature is determined based on the first correspondence and the first number of cores.
[0014] The above technical solution can determine the CPU target temperature based on the number of CPU cores, thus achieving the goal of determining the CPU target temperature based on the CPU configuration information.
[0015] In one possible implementation, the number of CPU cores in the first correspondence is positively correlated with temperature.
[0016] The above technical solution can, according to the first correspondence, set a higher target temperature when the number of CPU cores is large in order to reduce system power consumption; and set a lower target temperature when the number of CPU cores is small in order to avoid temperature overshoot, which would cause the actual temperature of the CPU to exceed the specified temperature.
[0017] In one possible implementation, the configuration information includes a first frequency of the CPU; determining the target temperature of the CPU based on the configuration information includes:
[0018] Obtain a second correspondence between CPU frequency and target temperature, wherein the second correspondence includes multiple CPU frequencies and the temperature corresponding to each CPU frequency;
[0019] The target temperature is determined based on the first correspondence and the first frequency.
[0020] The above technical solution can determine the CPU target temperature based on the CPU frequency, thus achieving the goal of determining the CPU target temperature based on the CPU configuration information.
[0021] In one possible implementation, the CPU frequency in the second correspondence is negatively correlated with temperature.
[0022] The above technical solution can, according to the second correspondence, set a higher target temperature when the CPU frequency is low in order to reduce system power consumption; and set a lower target temperature when the CPU frequency is high in order to avoid temperature overshoot, which would cause the actual temperature of the CPU to exceed the specified temperature.
[0023] In one possible implementation, the temperature regulator is a cooling fan; controlling the operating state of the temperature regulator based on the target temperature and the first temperature includes:
[0024] The target speed of the cooling fan is determined based on the target temperature and the first temperature;
[0025] The speed of the cooling fan is controlled to be adjusted to the target speed, and the operating state includes the speed of the cooling fan.
[0026] In the above technical solution, the temperature regulator can be a cooling fan. The target speed of the cooling fan can be determined based on the CPU's target temperature and the initial temperature, thus achieving the purpose of cooling the electronic device.
[0027] In one possible implementation, obtaining the CPU's configuration information and first temperature includes:
[0028] The configuration information and the first temperature are obtained from the CPU via the I2C bus.
[0029] The above technical solution can obtain configuration information and first temperature from the CPU, thus achieving the purpose of obtaining configuration information and first temperature.
[0030] Secondly, this application provides a controller, which includes an acquisition module, a determination module, and a control module, wherein...
[0031] The acquisition module is used to acquire the CPU's configuration information and first temperature;
[0032] The determining module is used to determine the target temperature of the CPU based on the configuration information;
[0033] The control module is used to control the operating state of the temperature regulator according to the target temperature and the first temperature, and the temperature regulator is used to adjust the temperature of the CPU.
[0034] The above technical solution can determine the CPU's target temperature based on its configuration information, meaning it can adjust the CPU's target temperature promptly according to changes in the CPU configuration. This avoids a situation where the CPU's target temperature remains consistently low, causing the cooling fan speed to remain consistently high, thus resulting in lower power consumption for the electronic device.
[0035] In one possible implementation, the configuration information includes the first number of cores of the CPU; the determining module is specifically used for,
[0036] Obtain a first correspondence between the number of CPU cores and the target temperature, wherein the first correspondence includes multiple CPU core counts and the temperature corresponding to each CPU core count;
[0037] The target temperature is determined based on the first correspondence and the first number of cores.
[0038] The above technical solution can determine the CPU target temperature based on the number of CPU cores, thus achieving the goal of determining the CPU target temperature based on the CPU configuration information.
[0039] In one possible implementation, the number of CPU cores in the first correspondence is positively correlated with temperature.
[0040] The above technical solution can, according to the first correspondence, set a higher target temperature when the number of CPU cores is large in order to reduce system power consumption; and set a lower target temperature when the number of CPU cores is small in order to avoid temperature overshoot, which would cause the actual temperature of the CPU to exceed the specified temperature.
[0041] In one possible implementation, the configuration information includes a first frequency of the CPU; the determining module is specifically used for,
[0042] Obtain a second correspondence between CPU frequency and target temperature, wherein the second correspondence includes multiple CPU frequencies and the temperature corresponding to each CPU frequency;
[0043] The target temperature is determined based on the first correspondence and the first frequency.
[0044] The above technical solution can determine the CPU target temperature based on the CPU frequency, thus achieving the goal of determining the CPU target temperature based on the CPU configuration information.
[0045] In one possible implementation, the CPU frequency in the second correspondence is negatively correlated with temperature.
[0046] The above technical solution can, according to the second correspondence, set a higher target temperature when the CPU frequency is low in order to reduce system power consumption; and set a lower target temperature when the CPU frequency is high in order to avoid temperature overshoot, which would cause the actual temperature of the CPU to exceed the specified temperature.
[0047] In one possible implementation, the temperature regulator is a cooling fan; the control module is specifically used for,
[0048] The target speed of the cooling fan is determined based on the target temperature and the first temperature;
[0049] The speed of the cooling fan is controlled to be adjusted to the target speed, and the operating state includes the speed of the cooling fan.
[0050] In the above technical solution, the temperature regulator can be a cooling fan. The target speed of the cooling fan can be determined based on the CPU's target temperature and the initial temperature, thus achieving the purpose of cooling the electronic device.
[0051] In one possible implementation, the acquisition module is specifically used for,
[0052] The configuration information and the first temperature are obtained from the CPU via the I2C bus.
[0053] The above technical solution allows the acquisition module to communicate with the CPU and obtain configuration information and the first temperature from the CPU, thus achieving the purpose of acquiring configuration information and the first temperature.
[0054] Thirdly, this application provides an electronic device, including a CPU, a temperature regulator, and a controller, wherein the controller is connected to both the CPU and the temperature regulator, wherein...
[0055] The controller is used to acquire the configuration information and first temperature of the CPU, and determine the target temperature of the CPU based on the configuration information;
[0056] The controller is further configured to control the operating state of the temperature regulator based on the target temperature and the first temperature;
[0057] The temperature regulator is used to regulate the temperature of the CPU.
[0058] The above technical solution can determine the CPU's target temperature based on its configuration information, meaning it can adjust the CPU's target temperature promptly according to changes in the CPU configuration. This avoids a situation where the CPU's target temperature remains consistently low, causing the cooling fan speed to remain consistently high, thus resulting in lower power consumption for the electronic device.
[0059] In one possible implementation, the controller is a baseboard controller (BMC).
[0060] In the above technical solution, the target temperature of the CPU can be adjusted in a timely manner through the BMC, thereby achieving the purpose of adjusting the target temperature of the CPU according to the CPU configuration information, resulting in lower power consumption of electronic devices.
[0061] Fourthly, this application provides a temperature control device, including a processor and a memory communicatively connected to the processor;
[0062] The memory stores computer programs;
[0063] The processor executes the computer program to implement the method as described in any one of the first aspects.
[0064] The above technical solution can determine the CPU's target temperature based on its configuration information, meaning it can adjust the CPU's target temperature promptly according to changes in the CPU configuration. This avoids a situation where the CPU's target temperature remains consistently low, causing the cooling fan speed to remain consistently high, thus resulting in lower power consumption for the electronic device.
[0065] Fifthly, this application provides a chip for performing the method described in any of the first aspects.
[0066] In a sixth aspect, this application provides a computer-readable storage medium storing a computer program that, when executed by a computer, implements the method as described in any one of the first aspects.
[0067] The above technical solution can determine the CPU's target temperature based on its configuration information, meaning it can adjust the CPU's target temperature promptly according to changes in the CPU configuration. This avoids a situation where the CPU's target temperature remains consistently low, causing the cooling fan speed to remain consistently high, thus resulting in lower power consumption for the electronic device. Attached Figure Description
[0068] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0069] Figure 1 This is a schematic diagram of the system architecture of a temperature control method provided in an embodiment of this application;
[0070] Figure 2 A schematic diagram of CPU performance based on SST-BF mode is provided for embodiments of this application;
[0071] Figure 3 This is a schematic diagram of a temperature control method provided in an embodiment of this application;
[0072] Figure 4 A schematic flowchart of a temperature control method provided in an embodiment of this application;
[0073] Figure 5 A schematic flowchart illustrating another temperature control method provided in an embodiment of this application;
[0074] Figure 6 A schematic flowchart illustrating another temperature control method provided in an embodiment of this application;
[0075] Figure 7 This is a schematic diagram of the structure of a controller provided in an embodiment of this application;
[0076] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0077] Figure 9 This is a schematic diagram of the hardware structure of a temperature control device provided in an embodiment of this application. Detailed Implementation
[0078] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0079] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0080] To facilitate understanding of this application, the concepts involved in this application will first be explained.
[0081] Temperature overshoot: refers to the phenomenon in electronic devices where the operating temperature of components rises sharply when the load on the components suddenly increases.
[0082] To facilitate understanding, the following will be combined with Figure 1 The system architecture of the temperature control method involved in the embodiments of this application will be described.
[0083] Figure 1 This is a schematic diagram of the system architecture of a temperature control method provided in an embodiment of this application. Please refer to... Figure 1 The electronic device 100 includes a CPU 101, a controller 102, and a temperature regulator 103. The CPU 101, controller 102, and temperature regulator 103 can be connected via wired or wireless means.
[0084] Electronic device 100 includes, but is not limited to, a standalone physical server, a server cluster consisting of multiple physical servers, a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms, and can also be a smartphone, smartwatch, tablet computer, laptop, smart in-vehicle device, desktop computer, laptop computer, or virtual reality / augmented reality / mixed reality device, etc.
[0085] The structure of the electronic device 100 illustrated in this application does not constitute a specific limitation on the electronic device 100. In some embodiments, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0086] CPU101 can be a CPU chip with a variable number of cores and a variable frequency. For example, CPU101 can be a CPU chip that supports Speed Select Technology (SST).
[0087] When the CPU101 operates in Speed Select Technology Base Frequency (SST-BF) mode, the number of cores and frequency of the CPU101 can be changed. That is, users can set the number of cores and operating frequency of the CPU101 according to different application scenarios or application load characteristics.
[0088] like Figure 2 As shown, Figure 2 This diagram illustrates CPU performance based on SST-BF mode, as provided in an embodiment of this application. Please refer to... Figure 2 The horizontal axis represents the number of CPU cores, and the vertical axis represents the CPU frequency. For example... Figure 2 As shown, the number of cores and frequency of a CPU operating in SST-BF mode can vary. Generally speaking, a CPU with fewer cores has a higher frequency, and a CPU with more cores has a lower frequency.
[0089] It should be noted that if the number of cores in CPU101 decreases and the frequency increases, the heat flux density on CPU101 will increase accordingly, causing the temperature of CPU101 to rise sharply. Therefore, the fewer the number of cores and the higher the frequency of CPU101, the faster the temperature of CPU101 will rise.
[0090] The controller 102 can be a management module in the electronic device 100. For example, the controller 102 can be a Baseboard Management Controller (BMC), a temperature control device, or a system management mode (SMM) in the electronic device 100. This application does not limit the specific form of the controller 102; the above is merely illustrative. In the following embodiments, the controller 102 is described as a BMC.
[0091] Temperature regulator 103 can regulate the operating temperature of electronic device 100. For example, temperature regulator 103 can be a fan.
[0092] In the above-mentioned temperature control system, the controller 102 can adjust the operating state of the temperature regulator 103 according to the operating information of the CPU 101 (e.g., the operating temperature of the CPU) so as to adjust the operating temperature of the electronic device 100 through the temperature regulator 103.
[0093] It should be noted that the system architecture and application scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application.
[0094] The following section describes the temperature control methods for electronic devices in related technologies.
[0095] In related technologies, the controller can acquire the real-time temperature of the CPU. Based on the real-time CPU temperature and a preset target CPU temperature, the controller can calculate the speed of the cooling fan. The cooling fan can then rotate at the speed calculated by the controller to cool the electronic device. For example, the controller can calculate the cooling fan speed using a proportional-integral-derivative (PID) control algorithm.
[0096] Generally, the lower the preset target temperature for the CPU, the higher the speed of the cooling fan calculated by the controller, and the higher the power consumption of the cooling fan. However, if the preset target temperature is high, when the CPU load suddenly increases, the real-time temperature of the CPU will rise rapidly, while the cooling fan speed is relatively slow, which may cause the real-time temperature of the CPU to exceed the CPU's specified temperature. Therefore, in order to avoid the real-time temperature of the CPU exceeding the CPU's specified temperature during the operation of electronic devices, a lower target temperature is usually set, resulting in a higher cooling fan speed and higher power consumption of the electronic device.
[0097] In view of this, embodiments of this application provide a temperature control method. The following describes the method in conjunction with... Figure 3 The temperature control method provided in the embodiments of this application will be described.
[0098] Figure 3 This is a schematic diagram of a temperature control method provided in an embodiment of this application. Please refer to... Figure 3 The electronic device 100 includes a CPU 101, a controller 102, and a temperature regulator 103.
[0099] The controller 102 can periodically acquire configuration information of the CPU 101 (e.g., the number of CPU cores or the CPU frequency), and update the target temperature of the CPU 101 based on the configuration information. The controller 102 can also acquire the real-time temperature of the CPU 101, and calculate the rotational speed of the temperature regulator 103 based on the continuously updated target temperature and the real-time temperature of the CPU 101.
[0100] As the number of cores in CPU 101 decreases and its frequency increases, the heat flux density on CPU 101 increases accordingly, causing a sharp rise in CPU 101's temperature. Therefore, in the above temperature control method, if the number of cores in CPU 101 decreases, controller 102 can update the target temperature of CPU 101 to a lower target temperature; if the number of cores in CPU 101 increases, controller 102 can update the target temperature of CPU 101 to a higher target temperature. If the frequency of CPU 101 decreases, controller 102 can update the target temperature of CPU 101 to a higher target temperature. If the frequency of CPU 101 increases, controller 102 can update the target temperature of CPU 101 to a lower target temperature.
[0101] Using the above method, the target temperature of CPU 101 can be adjusted in a timely manner according to changes in the configuration information of CPU 101. This avoids situations where the target temperature of CPU 101 remains consistently low and the rotation speed of temperature regulator 103 remains consistently high, thus resulting in lower power consumption of electronic device 100.
[0102] The technical solutions of this application will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0103] Figure 4 This is a flowchart illustrating a temperature control method provided in an embodiment of this application. The method can be... Figure 1 The controller shown is executing. Please refer to [link / reference]. Figure 4 The method may include:
[0104] S401. Obtain CPU configuration information and initial temperature.
[0105] The execution entity in this embodiment can be an electronic device or a controller within an electronic device. Optionally, the controller can be implemented through software or a combination of software and hardware.
[0106] The configuration information can be the CPU's current operating parameters. For example, the configuration information can be at least one of the following: the number of CPU cores, the CPU frequency, the CPU temperature, and the CPU power.
[0107] The first temperature can be the current operating temperature of the CPU. For example, the first temperature can be 80 degrees Celsius.
[0108] In this embodiment, the CPU includes a management component. The controller can be connected to the CPU via a two-wire serial (Inter-Integrated Circuit, I2C) bus.
[0109] Management components can be used to monitor CPU operating parameters. For example, a management component can be the management engine (ME) on the CPU.
[0110] In this embodiment, the CPU configuration information and first temperature can be obtained from the management component via the I2C bus.
[0111] S402. Determine the target temperature of the CPU based on the configuration information.
[0112] The CPU's target temperature refers to the CPU's expected operating temperature. It should be understood that the CPU's target operating temperature is lower than its specified operating temperature. The specified operating temperature refers to the CPU's maximum operating temperature.
[0113] In this embodiment, the number of CPU cores and / or frequency can be adjusted according to the load requirements of the electronic device.
[0114] Specifically, if the workload running on the electronic device requires a low number of CPU cores, the number of CPU cores can be set to a smaller number; if the workload requires a high number of CPU cores, the number of CPU cores can be set to a larger number. Similarly, if the workload requires a high-frequency CPU, the CPU frequency can be set to a higher frequency; if the workload requires a low-frequency CPU, the CPU frequency can be set to a lower frequency.
[0115] For example, if the load running on the electronic device is a low-latency load, the number of CPU cores can be set to a smaller number and the frequency to a higher number; if the computing throughput on the electronic device is large, the number of CPU cores can be set to a larger number and the frequency to a lower number.
[0116] It should be understood that the heat generated by a CPU can vary depending on its configuration. For example, a CPU with fewer cores or a higher frequency will experience a faster temperature rise.
[0117] Therefore, in this embodiment, the target temperature of the CPU can be adjusted in a timely manner according to the CPU configuration information so that the actual temperature of the CPU does not exceed the specified temperature.
[0118] Specifically, if the CPU has a smaller number of cores and / or a higher frequency, the target temperature can be adjusted to a lower target temperature; conversely, if the CPU has a larger number of cores and / or a lower frequency, the target temperature can be adjusted to a higher target temperature. Detailed methods will be explained later.
[0119] In this embodiment, setting a higher target temperature when the number of CPU cores is large and / or the CPU frequency is low can reduce system power consumption; setting a higher target temperature when the number of CPU cores is small and / or the CPU frequency is high can prevent temperature overshoot from causing the actual CPU temperature to exceed the specified temperature.
[0120] S403. Based on the target temperature and the first temperature, control the operating state of the temperature regulator, which is used to regulate the temperature of the electronic equipment.
[0121] In this embodiment, the temperature regulator can be a cooling fan.
[0122] The operating status of the temperature regulator includes the speed of the cooling fan.
[0123] In this embodiment, the target speed of the cooling fan can be determined based on the target temperature and the first temperature; the speed of the cooling fan can be adjusted to the target speed.
[0124] The target speed can be defined as the speed at which the cooling fan needs to reach the target temperature when the CPU's real-time temperature drops to that temperature.
[0125] Specifically, the controller can calculate the target speed of the cooling fan based on the CPU's target temperature and the first temperature, and can adjust the cooling fan speed to the target speed.
[0126] For example, the controller can calculate the target speed of the cooling fan using a proportional-integral-differential (PID) algorithm and control the cooling fan to run at the calculated speed.
[0127] It should be noted that the implementation method of the PID algorithm can be found in existing related technologies, and will not be elaborated here.
[0128] In the temperature control method provided in this embodiment, the controller can obtain the CPU's configuration information and a first temperature, determine the CPU's target temperature based on the configuration information, and control the operating state of the temperature regulator based on the target temperature and the first temperature. Through this method, the CPU's target temperature can be adjusted promptly according to changes in the CPU's configuration. This avoids a situation where the CPU's target temperature remains consistently low and the fan speed remains consistently high, thus reducing the power consumption of the electronic device.
[0129] Based on any of the above embodiments, the CPU configuration information can be the number of CPU cores, or the CPU configuration information can be the CPU frequency. Depending on the different configuration information, the temperature control method provided in this application embodiment includes at least the following two cases:
[0130] Case 1: The configuration information is the number of CPU cores.
[0131] In this case, the target temperature can be determined based on the number of CPU cores.
[0132] Case 2: The configuration information is the CPU frequency.
[0133] In this case, the target temperature can be determined based on the CPU frequency.
[0134] To facilitate understanding, the following will be combined with Figure 5 The above situation 1 will be explained in detail.
[0135] Figure 5 This is a flowchart illustrating another temperature control method provided in an embodiment of this application. The method can be... Figure 1 The controller shown is executing. Please refer to [link / reference]. Figure 5 The method may include:
[0136] S501, obtain the first number of CPU cores and the first temperature.
[0137] The first core number can be the current number of CPU cores. For example, the first core number can be 8 cores, 16 cores, or 24 cores, etc.
[0138] In this embodiment, the controller can access the management device corresponding to the CPU via the I2C bus, and can obtain the current number of CPU cores and the first temperature from the management device.
[0139] It should be understood that users can configure the number of CPU cores according to the operational needs of their electronic devices. Management devices can monitor the number of CPU cores in real time.
[0140] S502, Obtain the first correspondence between the number of CPU cores and the target temperature.
[0141] The first correspondence can be a graph showing the relationship between the number of CPU cores and the target temperature. The first correspondence can include multiple CPU cores and the temperature / temperature range corresponding to each CPU core.
[0142] In this embodiment, the first correspondence can be stored in the controller or in a storage space accessible to the controller.
[0143] The first correlation shows a positive correlation between the number of CPU cores and temperature. That is, the target temperature can increase as the number of CPU cores increases.
[0144] For example, assuming the CPU's specified temperature is 100℃, the first correspondence includes multiple CPU core counts and the temperature corresponding to each CPU core count. The first correspondence can be shown in Table 1:
[0145] Table 1
[0146]
[0147] Alternatively, the first correspondence can also include multiple CPU core counts and the temperature range corresponding to each CPU core count. The first correspondence can be shown in Table 2:
[0148] Table 2
[0149]
[0150] In the specific implementation process, the number of CPU cores includes, but is not limited to, 8, 16, or 24 cores as shown in Table 1 / Table 2. In this embodiment, the target temperature / target temperature range corresponding to each number of CPU cores can be tested experimentally. The testing method includes, but is not limited to, overshoot testing. It should be noted that the specific implementation method of overshoot testing can refer to existing related technologies, which will not be elaborated here.
[0151] S503. Determine the target temperature based on the first correspondence and the first number of cores. In this embodiment, after obtaining the first number of cores and the first correspondence, the target temperature corresponding to the first number of cores can be determined through the first correspondence. It is understood that when the first correspondence includes a temperature range, the target temperature can be a temperature falling within the temperature range.
[0152] For example, assuming the first correspondence is as shown in Table 1, and the first number of cores is 16, then the target temperature corresponding to the first number of cores can be determined to be 85℃. Assuming the first correspondence is as shown in Table 2, and the first number of cores is 16, then the target temperature corresponding to the first number of cores can be any temperature between 85℃ and 90℃, for example, it could be 85℃, 86℃, or 90℃.
[0153] S504. Control the operating status of the temperature regulator according to the target temperature and the first temperature.
[0154] It should be noted that the specific implementation of S504 can be found in S403, and will not be repeated here.
[0155] In the temperature control method provided in this embodiment, the controller can obtain the first number of CPU cores and the first temperature, determine the target temperature of the CPU based on the first number of cores, and determine the target speed of the temperature regulator based on the target temperature and the first temperature, so as to control the temperature regulator to run at the target speed. Through the above method, the target temperature of the CPU can be adjusted in a timely manner according to changes in the number of CPU cores, avoiding a situation where the target temperature of the CPU remains low and the fan speed remains high, thus reducing the power consumption of the electronic device.
[0156] Below, through specific examples, we will... Figure 5 The temperature control method shown will be explained.
[0157] Assuming the controller obtains the first CPU core count as 8 cores and the first temperature as 90℃, the first correspondence is shown in Table 1. The controller can determine the target temperature corresponding to the first core count (8 cores) as 80℃ based on this correspondence. After determining the target temperature, the controller can use a PID algorithm to calculate the target speed corresponding to the target temperature (80℃) and the first temperature (90℃), and can control the temperature regulator to operate at the calculated target speed.
[0158] To facilitate understanding, the following will be combined with Figure 6 The following is a detailed explanation of situation 2 above.
[0159] Figure 6 This is a flowchart illustrating another temperature control method provided in an embodiment of this application. The method can be... Figure 1 The controller shown is executing. Please refer to [link / reference]. Figure 6 The method may include:
[0160] S601, Obtain the CPU's first frequency and first temperature.
[0161] The first frequency can be the current frequency of the CPU. For example, the first core count can be 2GHz, 2.8GHz, or 3.2GHz, etc.
[0162] In this embodiment, the controller can access the management device corresponding to the CPU via the I2C bus, and can obtain the CPU's current frequency and first temperature from the management device.
[0163] It should be understood that users can set the CPU frequency according to the operating requirements of electronic devices. Management devices can monitor the CPU frequency in real time.
[0164] S602, Obtain the second correspondence between CPU frequency and target temperature.
[0165] The second correspondence can be a graph showing the relationship between CPU frequency and target temperature. The second correspondence can include multiple CPU frequencies and the temperature / temperature range corresponding to each CPU frequency.
[0166] In this embodiment, the second correspondence can be stored in the controller or in a storage space accessible to the controller.
[0167] In the second correlation, CPU frequency and temperature are negatively correlated. That is, the target temperature can decrease as the CPU frequency increases.
[0168] For example, assuming the CPU's specified temperature is 100℃, the second correspondence includes multiple CPU frequencies and the temperature corresponding to each CPU frequency. The second correspondence can be shown in Table 3:
[0169] Table 3
[0170]
[0171] Alternatively, the second correspondence can also include multiple CPU frequencies and the temperature range corresponding to each CPU frequency. The second correspondence can be shown in Table 4:
[0172] Table 4
[0173]
[0174] In the specific implementation process, the CPU frequency includes, but is not limited to, 2.0 GHz, 2.8 GHz or 3.2 GHz as shown in Table 3 / Table 4.
[0175] In this embodiment, the target temperature / target temperature range corresponding to each CPU frequency can be determined experimentally. Testing methods include, but are not limited to, overshoot testing. It should be noted that the specific implementation of overshoot testing can be found in existing related technologies, and will not be elaborated upon here.
[0176] S603. Determine the target temperature based on the second correspondence and the first frequency.
[0177] In this embodiment, after obtaining the first frequency and the second correspondence, the target temperature corresponding to the first frequency can be determined through the second correspondence. It is understood that when the second correspondence includes a temperature range, the target temperature can be a temperature falling within that temperature range.
[0178] For example, assuming the second correspondence is as shown in Table 3, and the first frequency is 3.2 GHz, then the target temperature corresponding to the first frequency can be determined to be 80℃. Assuming the first correspondence is as shown in Table 4, and the first frequency is 3.2 GHz, then the target temperature corresponding to the first frequency can be any temperature between 80℃ and 85℃, for example, it could be 85℃, 86℃, or 90℃.
[0179] S604. Control the operating status of the temperature regulator according to the target temperature and the first temperature.
[0180] It should be noted that the specific implementation of S604 can be found in S403, and will not be repeated here.
[0181] In the temperature control method provided in this embodiment, the controller can obtain the first frequency and first temperature of the CPU, determine the target temperature of the CPU based on the first frequency, and determine the target speed of the temperature regulator based on the target temperature and the first temperature, so as to control the temperature regulator to operate at the target speed. Through the above method, the target temperature of the CPU can be adjusted in a timely manner according to changes in the CPU frequency, avoiding a situation where the target temperature of the CPU remains low and the fan speed remains high, thus reducing the power consumption of the electronic device.
[0182] Below, through specific examples, we will... Figure 6 The temperature control method shown will be explained.
[0183] Assuming the controller obtains a CPU frequency of 2.8GHz and a temperature of 90℃, the second correspondence is shown in Table 2. The controller can determine the target temperature corresponding to the first frequency (2.8GHz) as 85℃ based on this second correspondence. After determining the target temperature, the controller can use a PID algorithm to calculate the target rotational speed corresponding to the target temperature (85℃) and the first temperature (90℃), and control the temperature regulator to operate at the calculated target rotational speed.
[0184] Figure 7 This is a schematic diagram of a controller provided in an embodiment of this application. Please refer to... Figure 7 The controller 10 includes an acquisition module 11, a determination module 12, and a control module 13, wherein...
[0185] The acquisition module 11 is used to acquire the CPU's configuration information and first temperature;
[0186] The determining module 12 is used to determine the target temperature of the CPU based on the configuration information;
[0187] The control module 13 is used to control the operating state of the temperature regulator according to the target temperature and the first temperature, and the temperature regulator is used to adjust the temperature of the CPU.
[0188] The controller provided in this embodiment can be used to execute the technical solutions shown in any of the above method embodiments. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0189] In one possible implementation, the configuration information includes the first number of cores of the CPU; the determining module 12 is specifically used for,
[0190] Obtain a first correspondence between the number of CPU cores and the target temperature, wherein the first correspondence includes multiple CPU core counts and the temperature corresponding to each CPU core count;
[0191] The target temperature is determined based on the first correspondence and the first number of cores.
[0192] In one possible implementation, the number of CPU cores in the first correspondence is positively correlated with temperature.
[0193] In one possible implementation, the configuration information includes the first frequency of the CPU; the determining module 12 is specifically used for,
[0194] Obtain a second correspondence between CPU frequency and target temperature, wherein the second correspondence includes multiple CPU frequencies and the temperature corresponding to each CPU frequency;
[0195] The target temperature is determined based on the first correspondence and the first frequency.
[0196] In one possible implementation, the CPU frequency in the second correspondence is negatively correlated with temperature.
[0197] In one possible implementation, the temperature regulator is a cooling fan; the control module 13 is specifically used for,
[0198] The target speed of the cooling fan is determined based on the target temperature and the first temperature;
[0199] The speed of the cooling fan is controlled to be adjusted to the target speed, and the operating state includes the speed of the cooling fan.
[0200] In one possible implementation, the acquisition module 11 is specifically used for,
[0201] The configuration information and the first temperature are obtained from the CPU via the I2C bus.
[0202] The controller provided in this embodiment can be used to execute the technical solutions shown in any of the above method embodiments. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0203] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Please refer to... Figure 8 The electronic device 20 includes a CPU 21, a temperature regulator 22, and a controller 23. The controller 23 is connected to both the CPU 21 and the temperature regulator 23.
[0204] The controller 23 is used to acquire the configuration information and first temperature of the CPU, and determine the target temperature of the CPU based on the configuration information;
[0205] The controller 23 is further configured to control the operating state of the temperature regulator 22 according to the target temperature and the first temperature;
[0206] The temperature regulator 22 is used to regulate the temperature of the CPU 21.
[0207] The electronic device provided in this embodiment can be used to execute the technical solutions shown in any of the above method embodiments. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0208] Figure 9 This is a schematic diagram of the hardware structure of a temperature control device provided in an embodiment of this application. The temperature control device can be... Figure 1 The controller shown. Please see [link / reference]. Figure 9 The temperature control device 30 may include a processor 31 and a memory 32, wherein the processor 31 and the memory 32 can communicate; for example, the processor 31 and the memory 32 communicate via a communication bus 33, the memory 32 is used to store program instructions, and the processor 31 is used to call the program instructions in the memory to execute the temperature control method shown in any of the above method embodiments.
[0209] Optionally, the temperature control device 30 may also include a communication interface, which may include a transmitter and / or a receiver.
[0210] Optionally, the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0211] This application also provides a chip for executing the temperature control method as described in any of the above method embodiments. The implementation principle and technical effect are similar, and will not be described in detail here.
[0212] This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a computer, it implements the temperature control method as performed in any of the above method embodiments. The implementation principle and technical effect are similar, and will not be described in detail here.
[0213] This application also provides a computer program product, including a computer program. When the computer program is executed by a computer, it implements the temperature control method as performed in any of the above method embodiments. The implementation principle and technical effect are similar, and will not be described in detail here.
[0214] All or part of the steps in the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, it performs the steps of the above method embodiments; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof.
[0215] This application describes embodiments of methods, apparatus (systems), and computer program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable terminal device to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0216] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable terminal device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0217] These computer program instructions can also be loaded onto a computer or other programmable terminal device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable device for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0218] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.
[0219] In this application, the term "comprising" and its variations can refer to non-limiting inclusion; the term "or" and its variations can refer to "and / or". The terms "first", "second", etc., in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
Claims
1. A temperature control method, characterized in that, Applied to BMC, the method includes: The configuration information and first temperature of the CPU are obtained through the management engine of the central processing unit; wherein, the CPU is a CPU chip with a variable number of cores or a variable frequency, and the configuration information includes: the number of cores of the CPU, and / or, the frequency of the CPU; Based on the configuration information, the target temperature of the CPU is determined; wherein the configuration information changes according to the load requirements of the electronic device, and the target temperature is updated when the configuration information changes; wherein the number of CPU cores is positively correlated with the target temperature, and the CPU frequency is negatively correlated with the target temperature; Based on the target temperature and the first temperature, the operating state of the temperature regulator is controlled, and the temperature regulator is used to regulate the temperature of the CPU; wherein, the temperature regulator is a cooling fan; The step of controlling the operating state of the temperature regulator based on the target temperature and the first temperature includes: Based on the target temperature and the first temperature, the target speed of the cooling fan is determined, wherein the target speed is the speed required for the cooling fan to control the first temperature to reach the target temperature; The speed of the cooling fan is adjusted to the target speed.
2. The method according to claim 1, characterized in that, When the configuration information includes the first number of cores of the CPU, determining the target temperature of the CPU based on the configuration information includes: Obtain a first correspondence between the number of CPU cores and the target temperature, wherein the first correspondence includes multiple CPU core counts and the temperature corresponding to each CPU core count; wherein the number of CPU cores in the first correspondence is positively correlated with the temperature; The target temperature is determined based on the first correspondence and the first number of cores.
3. The method according to claim 1, characterized in that, When the configuration information includes the first frequency of the CPU, determining the target temperature of the CPU based on the configuration information includes: A second correspondence between CPU frequency and target temperature is obtained, wherein the second correspondence includes multiple CPU frequencies and the temperature corresponding to each CPU frequency; wherein the CPU frequency in the second correspondence is negatively correlated with the temperature. The target temperature is determined based on the second correspondence and the first frequency.
4. The method according to any one of claims 1-3, characterized in that, The step of obtaining the CPU's configuration information and first temperature includes: The configuration information and the first temperature are obtained from the CPU via a two-wire serial I2C bus.
5. An electronic device, characterized in that, It includes a CPU, a temperature regulator, and a controller, wherein the controller is connected to both the CPU and the temperature regulator, and the controller is a baseboard controller (BMC). The controller is configured to perform the method as described in any one of claims 1-4; The temperature regulator is used to regulate the temperature of the CPU.
6. A controller, characterized in that, The controller includes an acquisition module, a determination module, and a control module, wherein, The acquisition module is used to acquire the CPU's configuration information and a first temperature; wherein the CPU is a CPU chip with a variable number of cores or a variable frequency, and the configuration information includes: the number of cores of the CPU, and / or, the frequency of the CPU; The determining module is used to determine the target temperature of the CPU based on the configuration information; wherein the configuration information changes according to the load requirements of the electronic device, and the target temperature is updated when the configuration information changes; wherein the number of CPU cores is positively correlated with the target temperature, and the CPU frequency is negatively correlated with the target temperature; The control module is used to control the operating state of the temperature regulator according to the target temperature and the first temperature. The temperature regulator is used to adjust the temperature of the CPU. The temperature regulator is a cooling fan. The control module is specifically used for: Based on the target temperature and the first temperature, the target speed of the cooling fan is determined; wherein, the target speed is the speed required for the cooling fan to reach the target temperature when the first temperature is reached; The speed of the cooling fan is adjusted to the target speed.
7. The controller according to claim 6, characterized in that, When the configuration information includes the first number of CPU cores, the determining module is specifically used for: Obtain a first correspondence between the number of CPU cores and the target temperature, wherein the first correspondence includes multiple CPU core counts and the temperature corresponding to each CPU core count; wherein the number of CPU cores in the first correspondence is positively correlated with the temperature; The target temperature is determined based on the first correspondence and the first number of cores.
8. The controller according to claim 6, characterized in that, When the configuration information includes the first frequency of the CPU, the determining module is specifically used for: A second correspondence between CPU frequency and target temperature is obtained, wherein the second correspondence includes multiple CPU frequencies and the temperature corresponding to each CPU frequency; wherein the CPU frequency in the second correspondence is negatively correlated with the temperature. The target temperature is determined based on the second correspondence and the first frequency.
9. The controller according to any one of claims 6-8, characterized in that, The acquisition module is specifically used for: The configuration information and the first temperature are obtained from the CPU via the I2C bus.
Citation Information
Patent Citations
Fan rotating speed automatic adjusting method and system and server
CN110134208A
Abnormal heat dissipation detection method and device, terminal and storage medium
CN110727561A
Server IOT intelligent heat dissipation control method and system
CN115079800A
Cooling device control method and device, electronic equipment and storage medium
CN115390641A