Fan Control Method, Device, Electronic Device and Storage Medium
By collecting and analyzing the computer's environmental status data, calculating the Euclidean distance and similarity, and dynamically adjusting the working status of the fan, the problem of the fan in the existing technology being unable to dissipate heat in time, and efficient heat dissipation and energy management are achieved.
Patent Information
- Application Number
- CN202510443515.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-04-10
AI Technical Summary
The prior art cannot dynamically adjust the working status of the fan according to the real-time condition of the computer, resulting in the computer's heat dissipation in time and affecting the operating speed.
By collecting the environmental state data set, determining whether it is within the preset safety temperature threshold range, calculating the Euclidean distance, obtaining the control parameters of the historical data set with the highest similarity, and adjusting the operating status of the fan according to these parameters, or obtaining emergency control parameters when the threshold exceeds the threshold.
It realizes precise adjustment of fan status according to environmental changes, improves energy utilization efficiency, ensures good heat dissipation, and ensures that the computer operates in a suitable environment.
Smart Images

Figure CN119934066B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fan control, and in particular, to a fan control method, device, electronic device, and storage medium. Background Art
[0002] Since a computer generates a certain amount of heat during operation, if the computer is not cooled in time, resulting in too high a computer fan, it will affect the operating speed of the computer. The current technology cannot dynamically adjust the fan in the computer according to the real-time condition of the computer. Summary of the Invention
[0003] To solve the above technical problems, embodiments of the present invention provide a fan control method, device, electronic device, and storage medium.
[0004] In a first aspect, an embodiment of the present invention provides a fan control method, the method including:
[0005] Collect an environmental status data set, and determine whether the environmental status data set is within a preset safe temperature threshold range;
[0006] If it is within the preset safe temperature threshold range, respectively obtain the Euclidean distance between each historical data set and the environmental status data set, and obtain a target Euclidean distance less than a preset distance threshold among the Euclidean distances, and determine the historical data sets corresponding to the target Euclidean distances as target historical data sets;
[0007] Respectively obtain the historical control parameters and similarities in the target historical data sets, and calculate a target control parameter according to the historical control parameters and the similarities;
[0008] If it is outside the preset safe temperature threshold range, obtain an emergency control parameter according to the environmental status data set;
[0009] Adjust the working state of the fan according to the target control parameter or the emergency control parameter.
[0010] In an embodiment, calculate the Euclidean distance between each historical data set and the environmental status data set respectively through a distance calculation formula.
[0011] In an embodiment, obtain the similarity between each historical data set and the environmental status data set according to the Euclidean distances;
[0012] Obtain the sum value of the Euclidean distance and a preset constant, and determine the reciprocal of the sum value as the similarity.
[0013] In one embodiment, the historical control parameters include: historical fan speed control parameters and historical start / stop time control parameters;
[0014] Determine the target fan speed control parameter according to each of the similarities and each of the historical fan speed control parameters;
[0015] Determine the target start / stop time control parameter according to each of the similarities and each of the historical start / stop time control parameters.
[0016] In one embodiment, obtain the product of each of the similarities and each of the historical fan speed control parameters, and sum the products to obtain a first sum value;
[0017] Obtain a second sum value of each of the similarities, and determine the ratio of the first sum value to the second sum value as the target fan speed control parameter;
[0018] Obtain the product of each of the similarities and each of the historical start / stop time control parameters, and sum the products to obtain a third sum value;
[0019] Determine the ratio of the third sum value to the second sum value as the target start / stop time control parameter.
[0020] In one embodiment, the emergency control parameters include: a first emergency control parameter and a second emergency control parameter; the environmental state data set includes: a machine temperature value;
[0021] If the machine temperature value is greater than the preset maximum safe temperature value, obtain the first emergency control parameter according to the machine temperature value;
[0022] If the machine temperature value is less than the preset minimum safe temperature value, obtain the second emergency control parameter according to the machine temperature value.
[0023] In one embodiment, the first emergency control parameter includes: a first emergency fan speed control parameter and a first emergency start / stop time control parameter;
[0024] The second emergency control parameter includes: a second emergency fan speed control parameter and a second emergency start / stop time control parameter;
[0025] Obtain the temperature deviation value between the machine temperature value and the preset maximum safe temperature value;
[0026] Obtain the first product of the temperature deviation value and a first preset temperature coefficient, and determine the sum value of the first product and the preset conventional fan speed control parameter as the first emergency fan speed control parameter;
[0027] Obtain the second product of the temperature deviation value and the first preset time coefficient, and determine the sum value of the second product and the preset conventional start-stop time control parameter as the first emergency start-stop time control parameter;
[0028] Obtain the third product of the preset conventional fan speed control parameter and the second preset temperature coefficient, and determine the third product as the second emergency fan speed control parameter;
[0029] Obtain the fourth product of the preset conventional start-stop time control parameter and the second preset time coefficient, and determine the fourth product as the second emergency start-stop time control parameter.
[0030] In a second aspect, an embodiment of the present invention provides a fan control device, which includes:
[0031] A judgment module, configured to collect an environmental status data set and judge whether the environmental status data set is within a preset safe temperature threshold range;
[0032] A first acquisition module, configured to, if it is within the preset safe temperature threshold range, respectively obtain the Euclidean distance between each historical data set and the environmental status data set, and obtain a target Euclidean distance less than a preset distance threshold among the Euclidean distances, and determine the historical data sets corresponding to the target Euclidean distances as target historical data sets;
[0033] A calculation module, configured to respectively obtain the historical control parameters and similarities in the target historical data sets, and calculate target control parameters according to the historical control parameters and the similarities;
[0034] A second acquisition module, configured to, if it is outside the preset safe temperature threshold range, obtain emergency control parameters according to the environmental status data set;
[0035] An adjustment module, configured to adjust the working state of the fan according to the target control parameter or the emergency control parameter.
[0036] In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory is used to store a computer program, and the computer program executes the fan control method provided in the first aspect when running on the processor.
[0037] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program, and the computer program executes the fan control method provided in the first aspect when running on a processor.
[0038] The fan control method, device, electronic device, and storage medium provided by the present invention described above, wherein the method includes: collecting an environmental status data set, and determining whether the environmental status data set is within a preset safe temperature threshold range; if it is within the preset safe temperature threshold range, respectively obtaining the Euclidean distances between each historical data set and the environmental status data set, and obtaining target Euclidean distances less than a preset distance threshold among the Euclidean distances, and determining the historical data sets corresponding to the target Euclidean distances as target historical data sets; respectively obtaining the historical control parameters and similarities in the target historical data sets, and calculating a target control parameter according to the historical control parameters and the similarities; if it is outside the preset safe temperature threshold range, obtaining an emergency control parameter according to the environmental status data set; adjusting the working state of the fan according to the target control parameter or the emergency control parameter. The present invention collects the current environmental status data set, obtains multiple target historical data sets with the highest similarity to the current environmental status data set in the historical data set, obtains the target control parameter according to the target historical data set and the similarity, and adjusts the working state of the fan according to the target control parameter, so as to accurately adapt to environmental changes, improve the overall energy utilization efficiency, and ensure good heat dissipation. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] To more clearly illustrate the technical solutions of the present invention, the accompanying drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention, and thus should not be regarded as limiting the protection scope of the present invention. In each drawing, similar components are numbered similarly.
[0040] Figure 1 FIG. shows a flowchart of the fan control method provided by an embodiment of the present invention;
[0041] Figure 2 FIG. shows another flowchart of the fan control method provided by an embodiment of the present invention;
[0042] Figure 3 FIG. shows a structural diagram of a fan control device provided by an embodiment of the present invention;
[0043] Figure 4 FIG. shows a structural diagram of an electronic device provided by an embodiment of the present invention.
[0044] Icons: 300 - fan control device, 301 - judgment module, 302 - first acquisition module, 303 - calculation module, 304 - second acquisition module, 305 - adjustment module, 400 - electronic device, 401 - transceiver, 402 - processor, 403 - memory. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0045] Next, in combination with the accompanying drawings in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments.
[0046] Generally, the components of the embodiments of the present invention described and illustrated herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed present invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.
[0047] Unless otherwise limited, all terms (including technical terms and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art to which the various embodiments of the present invention belong. The terms (such as those defined in a commonly used dictionary) will be interpreted as having the same meaning as the contextual meaning in the relevant technical field and will not be interpreted as having an idealized meaning or an overly formal meaning unless clearly defined in the various embodiments of the present invention.
[0048] Embodiment 1
[0049] The embodiment of the present invention provides a fan control method.
[0050] See Figure 1 , the fan control method includes:
[0051] S101, collect an environmental state data set, and determine whether the environmental state data set is within a preset safe temperature threshold range.
[0052] In this embodiment, the environmental temperature, computer temperature, CPU load, CPU main frequency, and power consumption are collected in real time and stored in the current data memory. And it is determined whether the computer temperature is within the preset safe temperature threshold range, and whether the CPU load is within the safe load threshold range.
[0053] By obtaining the judgment results of the computer temperature and CPU load, corresponding control instructions are sent to the fan to realize dynamic adjustment of the control strategy.
[0054] S102, if it is within the preset safe temperature threshold range, respectively obtain the Euclidean distances between each historical data set and the environmental state data set, and obtain the target Euclidean distances less than the preset distance threshold among the Euclidean distances, and determine the historical data sets corresponding to the target Euclidean distances as target historical data sets.
[0055] It should be noted that by normalizing various data, it is ensured that they are compared on the same scale. According to the distribution of historical data and the sensitivity of the system to different parameters, a reasonable distance threshold is set. If the Euclidean distance is less than the distance threshold, it is considered that the historical record is similar to the current record, and the N records with the highest similarity are selected for subsequent processing.
[0056] In this embodiment, the Euclidean distance is used to measure the similarity between the current real-time data and the historical record data, so as to determine which historical records are closest to the current state. The Euclidean distance threshold can be set as a percentage of the maximum distance. For example, the Euclidean distance threshold = maximum distance × 0.2, that is, only historical data with a distance less than 20% of the maximum distance from the current data is considered. In other embodiments, the Euclidean distance threshold can be dynamically adjusted according to the feedback of the system, which is not limited here.
[0057] In one embodiment, the Euclidean distances between each of the historical data sets and the environmental state data set are calculated respectively through a distance calculation formula.
[0058] It should be noted that the current data and the historical data are substituted into the distance calculation formula to calculate the distance between each historical record and the current data point. The distance calculation formula is: Euclidean distance = . For example, the currently collected environmental temperature is 26°C, the machine temperature is 61°C, the CPU load is 43, the CPU main frequency is 2.1 GHz, and the power consumption data is 16 W. A certain piece of historical data obtained includes: environmental temperature is 25°C, machine temperature is 60°C, CPU load is 40, CPU main frequency is 2.0 GHz, and power consumption data is 15 W. Then the calculated Euclidean distance = , and the obtained Euclidean distance value is 3.47. By analogy, the Euclidean distance values between multiple pieces of historical data and the current data are obtained, and the Euclidean distance values less than the preset distance threshold are retained, as shown in Table 1. Table 1 is an example table of the historical environmental state data set.
[0059] Table 1. Example Table of Historical Environmental State Data Set
[0060]
[0061] In one embodiment, as Figure 2 shown, S1031, obtain the similarity between each of the historical data sets and the environmental state data set according to each of the Euclidean distances; S1032, obtain the sum value of the Euclidean distance and a preset constant, and determine the reciprocal of the sum value as the similarity.
[0062] It should be noted that by calculating the similarity of each similar record, the reciprocal of the Euclidean distance is used as the weight. The higher the similarity, the greater the weight. The specific formula is as follows:
[0063]
[0064] where is a small constant to prevent the denominator from being zero.
[0065] Furthermore, by calculating the Euclidean distance between the historical data set and the environmental state data set to obtain the similarity, the historical data most similar to the current environmental state can be accurately found. By determining the control parameters for the fan in the historical data, an effective reference basis can be provided for the current fan control, and thus the operation of the fan can be controlled more accurately.
[0066] S103, respectively obtain the historical control parameters and similarities in the target historical data set, and calculate the target control parameters according to the historical control parameters and each of the similarities.
[0067] In an embodiment, the historical control parameters include: historical fan speed control parameters and historical start / stop time control parameters; determine the target fan speed control parameters according to each of the similarities and each of the historical fan speed control parameters; determine the target start / stop time control parameters according to each of the similarities and each of the historical start / stop time control parameters.
[0068] For example, if the temperature inside the computer is collected as 65°C, the CPU load is 50%, the CPU main frequency is 2.0 GHz, and the current power consumption is 20 W, and these real-time data are stored in the current data memory. By comparing the current data with the historical data. A historical data similar to the current conditions is obtained, and the historical data includes: environmental temperature of 27°C, machine temperature of 64°C, CPU load of 49%, CPU main frequency of 2.1 GHz, and power consumption of 19 W.
[0069] According to the found historical record, the control strategy to be adopted currently is deduced through weighted calculation: adjust the working state of the fan to 80% speed and set the start / stop time to 4 minutes. At this time, the fan works at a higher speed to ensure that the temperature of the device is within an acceptable range.
[0070] In one embodiment, obtain the product of each of the similarities and each of the historical fan speed control parameters, and sum up the products to obtain a first sum value; obtain a second sum value of each of the similarities, and determine the ratio of the first sum value to the second sum value as the target fan speed control parameter; obtain the product of each of the similarities and each of the historical start-stop time control parameters, and sum up the products to obtain a third sum value; determine the ratio of the third sum value to the second sum value as the target start-stop time control parameter.
[0071] It should be noted that the target fan speed control parameter is calculated by extracting the historical fan speed control parameters and similarities, and the specific formula is as follows:
[0072]
[0073] The target fan start-stop time control parameter is calculated by extracting the historical fan start-stop time control parameters and similarities, and the specific formula is as follows:
[0074]
[0075] S104, if it is outside the preset safety temperature threshold range, obtain the emergency control parameter according to the environmental state data set.
[0076] It can be understood that when the current environmental temperature or CPU load exceeds the safety threshold, a higher fan speed and a longer start-stop time are adopted to ensure the heat dissipation effect of the system. If in a low-load and low-temperature environment, the fan speed can be selected to be reduced to reduce power consumption. The fan is dynamically adjusted according to the current state of the fan, so as to achieve precise control of the fan, reduce unnecessary loss of energy consumption, and ensure the heat dissipation effect, enabling the computer to operate in a suitable working environment.
[0077] In one embodiment, the emergency control parameter includes: a first emergency control parameter and a second emergency control parameter; the environmental state data set includes: a machine temperature value; if the machine temperature value is greater than the preset maximum safety temperature value, obtain the first emergency control parameter according to the machine temperature value; if the machine temperature value is less than the preset minimum safety temperature value, obtain the second emergency control parameter according to the machine temperature value.
[0078] It should be noted that when the system temperature or CPU load exceeds the safety threshold, emergency heat dissipation needs to be achieved by increasing the fan speed and extending the start-stop time. This process requires precise calculation to ensure that the system temperature returns to normal within a reasonable time.
[0079] When the temperature exceeds the threshold, the fan needs to increase its speed to quickly reduce the temperature. The increase in fan speed can be calculated based on the temperature deviation. The start-stop time needs to be extended to ensure that the fan has enough time for effective heat dissipation. The increase in start-stop time can also be dynamically adjusted according to the temperature deviation.
[0080] When the ambient temperature drops below the set low-temperature threshold, the system can automatically enter the low-power mode. In this case, the fan does not need to run excessively, so the speed and start-stop time of the fan will be reduced to reduce the system power consumption.
[0081] In one embodiment, the first emergency control parameter includes: the first emergency fan speed control parameter and the first emergency start-stop time control parameter; the second emergency control parameter includes: the second emergency fan speed control parameter and the second emergency start-stop time control parameter; obtain the temperature deviation value between the machine temperature value and the preset maximum safe temperature value; obtain the first product of the temperature deviation value and the first preset temperature coefficient, and determine the sum value of the first product and the preset conventional fan speed control parameter as the first emergency fan speed control parameter; obtain the second product of the temperature deviation value and the first preset time coefficient, and determine the sum value of the second product and the preset conventional start-stop time control parameter as the first emergency start-stop time control parameter.
[0082] Obtain the third product of the preset conventional fan speed control parameter and the second preset temperature coefficient, and determine the third product as the second emergency fan speed control parameter; obtain the fourth product of the preset conventional start-stop time control parameter and the second preset time coefficient, and determine the fourth product as the second emergency start-stop time control parameter.
[0083] It should be noted that the increase in fan speed can be calculated based on the temperature deviation between the current temperature and the preset maximum safe temperature value. The calculation of the first emergency fan speed control parameter is as follows: Fan_speed = Fan_base_speed + a×(T_current - T_threshold). Where, T_current is the current machine temperature value, T_threshold is the preset maximum safe temperature value, Fan_speed is the first emergency fan speed control parameter, Fan_base_speed is the preset conventional fan speed control parameter, and a is the first preset temperature coefficient.
[0084] Among them, the preset conventional fan speed control parameter can be set according to the actual situation, generally 50%, and the first preset temperature coefficient is used to control the influence of the temperature deviation on the fan speed, which can be adjusted according to the heat dissipation capacity of the system, and is usually set as a constant, such as 10 or 20.
[0085] For example, if the preset conventional fan speed control parameter is 50%, the preset maximum safe temperature is 70 °C, the machine temperature value is 75 °C, and a is 10, then: Fan_speed = 50 + 10 x (75 - 70) = 100%. If the calculated first emergency fan speed control parameter is greater than 100%, then the first emergency fan speed control parameter is limited to 100%.
[0086] Furthermore, it should be noted that the increase in start-stop time can also be controlled by the temperature deviation. The calculation method of the first emergency start-stop time control parameter is as follows: On_time = On_base_time + β × (T_current - T_threshold).
[0087] Wherein, On_base_time is the preset conventional start-stop time control parameter. β is the first preset time coefficient, which is used to control the influence of temperature deviation on the start-stop time. The fan maintains heat dissipation for a longer time by extending the start-stop time.
[0088] It should be understood that it is determined by judging whether the machine temperature is lower than the preset minimum safe temperature. If the temperature is lower than this value, the fan is controlled to enter the low-power mode. By setting the second preset temperature coefficient and the second preset time coefficient, the start of the fan in the low-power mode is controlled.
[0089] For example, when the machine temperature is 40 °C, the preset minimum safe temperature is 50 °C, the preset conventional fan speed control parameter is 60%, and the preset conventional start-stop time control parameter is 10 minutes. By setting the second preset temperature coefficient to 0.5 and the second preset time coefficient to 0.2, the obtained second emergency fan speed control parameter is the product of the preset conventional fan speed control parameter and the second preset temperature coefficient, that is, 30%. The obtained second emergency start-stop time control parameter is the product of the preset conventional start-stop time control parameter and the second preset time coefficient, that is, 2 minutes. Then, the speed of the fan is controlled to drop to 30%, and the start-stop time is 2 minutes.
[0090] The present invention reduces power consumption by reducing the fan speed and start-stop time. When the temperature gradually rises back to the normal working range, the control of the fan speed and start-stop time will smoothly return to the normal working state. This control strategy not only ensures energy savings in a low-temperature environment but also provides the necessary heat dissipation capacity at high temperatures, enhancing the adaptability of the system.
[0091] S105, adjust the working state of the fan according to the target control parameter or the emergency control parameter.
[0092] It should be noted that the fan method provided by the present invention is applied to an embedded control system, where the embedded control system includes: a memory, a collector, a processor, and a comparator.
[0093] The memory includes: a historical data memory and a current data memory. The historical data memory is used to store the ambient temperature, machine temperature, CPU load, CPU main frequency, power consumption, and corresponding heat dissipation control parameters (such as fan speed, start / stop duration, etc.) under different conditions. The current data memory is used to store in real time data such as the current ambient temperature, machine temperature, CPU load, CPU main frequency, and power consumption.
[0094] The collector includes a temperature collector, a CPU load collector, a CPU main frequency collector, and a power consumption collector. The temperature collector is used to collect the current ambient temperature and machine temperature. The CPU load collector is used to collect the CPU load situation in real time. The CPU main frequency collector is used to collect the current CPU main frequency in real time. The power consumption collector is used to collect the system power consumption data in real time. The comparator includes: a first comparator and a second comparator. The first comparator is used to compare the current data with the historical data and output the historical record most similar to the current data. The second comparator is used to deduce the control strategy to be adopted under the current conditions based on the temperature, power consumption, and control parameters in the historical record. The low-power processor is used to adjust the working state of the fan according to the output of the second comparator to ensure system stability and minimize energy consumption as much as possible.
[0095] Furthermore, as time goes by, the system can adapt to environmental changes and machine characteristic changes. When the heat dissipation capacity of the device decreases, the system will automatically adjust the control strategy and increase the fan speed to ensure stability. At the same time, the system can adjust the control strategy according to the feedback results. For example, if under the same environmental conditions, the new control strategy causes the temperature to rise, the system will reduce the fan speed to avoid ineffective heat dissipation operations. Through real-time monitoring and self-learning, the system can form a closed-loop control system, continuously optimize its control strategy. After each adjustment, the system will record the results and use them as the basis for the next decision, gradually improving its efficiency and reliability to ensure that the system can adapt to the new working environment and conditions.
[0096] The fan control method provided by this embodiment collects the current ambient state data set, obtains multiple target historical data sets with the highest similarity to the current ambient state data set in the historical data set, obtains the target control parameters according to the target historical data set and the similarity, and adjusts the working state of the fan according to the target control parameters, so as to accurately adapt to environmental changes, improve the overall energy utilization efficiency, and ensure good heat dissipation.
[0097] Embodiment 2
[0098] In addition, an embodiment of the present invention provides a fan control device.
[0099] As Figure 3 shown, the fan control device 300 includes:
[0100] A judgment module 301, configured to collect an environmental status data set and determine whether the environmental status data set is within a preset safe temperature threshold range;
[0101] A first acquisition module 302, configured to, if it is within the preset safe temperature threshold range, respectively acquire the Euclidean distances between each historical data set and the environmental status data set, and acquire the target Euclidean distances that are less than a preset distance threshold among the Euclidean distances, and determine the historical data sets corresponding to the target Euclidean distances as target historical data sets;
[0102] A calculation module 303, configured to respectively acquire the historical control parameters and similarities in the target historical data sets, and calculate target control parameters according to the historical control parameters and the similarities;
[0103] A second acquisition module 304, configured to, if it is outside the preset safe temperature threshold range, acquire emergency control parameters according to the environmental status data set;
[0104] An adjustment module 305, configured to adjust the working state of the fan according to the target control parameter or the emergency control parameter.
[0105] The fan control device 300 provided in this embodiment can implement the fan control method provided in Embodiment 1. To avoid repetition, it will not be elaborated here.
[0106] The fan control device provided in this embodiment collects the current environmental status data set, obtains multiple target historical data sets with the highest similarity to the current environmental status data set in the historical data sets, obtains target control parameters according to the target historical data sets and the similarities, and adjusts the working state of the fan according to the target control parameters, so as to accurately adapt to environmental changes, improve the overall energy utilization efficiency, and ensure good heat dissipation.
[0107] Embodiment 3
[0108] In addition, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory stores a computer program, and when the computer program runs on the processor, it executes the fan control method provided in Embodiment 1.
[0109] Specifically, refer to Figure 4, the electronic device 400 includes: a transceiver 401, a bus interface, and a processor 402. The processor 402 is configured to: collect an environmental status data set, and determine whether the environmental status data set is within a preset safe temperature threshold range; if it is within the preset safe temperature threshold range, respectively obtain the Euclidean distances between each historical data set and the environmental status data set, and obtain the target Euclidean distances less than a preset distance threshold among the Euclidean distances, and determine the historical data sets corresponding to the target Euclidean distances as target historical data sets; respectively obtain the historical control parameters and similarities in the target historical data sets, and calculate a target control parameter according to the historical control parameters and the similarities; if it is outside the preset safe temperature threshold range, obtain an emergency control parameter according to the environmental status data set; adjust the working state of the fan according to the target control parameter or the emergency control parameter.
[0110] In one embodiment, the processor 402 is further configured to: calculate the Euclidean distances between each historical data set and the environmental status data set respectively through a distance calculation formula.
[0111] In one embodiment, the processor 402 is further configured to: obtain the similarities between each historical data set and the environmental status data set according to the Euclidean distances; obtain the sum value of the Euclidean distance and a preset constant, and determine the reciprocal of the sum value as the similarity.
[0112] In one embodiment, the processor 402 is further configured to: the historical control parameters include: a historical fan speed control parameter and a historical start / stop time control parameter; determine a target fan speed control parameter according to the similarities and the historical fan speed control parameters; determine a target start / stop time control parameter according to the similarities and the historical start / stop time control parameters.
[0113] In one embodiment, the processor 402 is further configured to: obtain the product of the similarities and the historical fan speed control parameters, and sum the products to obtain a first sum value; obtain a second sum value of the similarities, and determine the ratio of the first sum value to the second sum value as the target fan speed control parameter; obtain the product of the similarities and the historical start / stop time control parameters, and sum the products to obtain a third sum value; determine the ratio of the third sum value to the second sum value as the target start / stop time control parameter.
[0114] In one embodiment, the processor 402 is further configured to: The emergency control parameters include: a first emergency control parameter and a second emergency control parameter; the environmental status data set includes: a machine temperature value; if the machine temperature value is greater than a preset maximum safe temperature value, obtain the first emergency control parameter according to the machine temperature value; if the machine temperature value is less than a preset minimum safe temperature value, obtain the second emergency control parameter according to the machine temperature value.
[0115] In one embodiment, the processor 402 is further configured to: The first emergency control parameter includes: a first emergency fan speed control parameter and a first emergency start / stop time control parameter; the second emergency control parameter includes: a second emergency fan speed control parameter and a second emergency start / stop time control parameter; obtain a temperature deviation value between the machine temperature value and the preset maximum safe temperature value; obtain a first product of the temperature deviation value and a first preset temperature coefficient, and determine a sum value of the first product and a preset normal fan speed control parameter as the first emergency fan speed control parameter; obtain a second product of the temperature deviation value and a first preset time coefficient, and determine a sum value of the second product and a preset normal start / stop time control parameter as the first emergency start / stop time control parameter; obtain a third product of the preset normal fan speed control parameter and a second preset temperature coefficient, and determine the third product as the second emergency fan speed control parameter; obtain a fourth product of the preset normal start / stop time control parameter and a second preset time coefficient, and determine the fourth product as the second emergency start / stop time control parameter.
[0116] In an embodiment of the present invention, the electronic device 400 further includes: a memory 403. In Figure 4 this case, the bus architecture may include any number of interconnected buses and bridges, and various circuits represented by one or more processors represented by the processor 402 and a memory represented by the memory 403 are specifically connected together. The bus architecture may also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art, and thus will not be further described herein. The bus interface provides an interface. The transceiver 401 may be a plurality of components, that is, including a transmitter and a receiver, and provides a unit for communicating with various other devices on a transmission medium. The processor 402 is responsible for managing the bus architecture and general processing, and the memory 403 may store data used by the processor 402 when performing operations.
[0117] The electronic device 400 provided in the embodiment of the present invention may execute the steps of the fan control method provided in the above method embodiment 1. To avoid repetition, it will not be elaborated herein.
[0118] The electronic device provided in this embodiment collects the current environmental state dataset, obtains multiple target historical datasets with the highest similarity to the current environmental state dataset in the historical dataset, obtains the target control parameters according to the target historical datasets and the similarity, and adjusts the working state of the fan according to the target control parameters, so as to accurately adapt to environmental changes, improve the overall energy utilization efficiency, and ensure good heat dissipation.
[0119] Embodiment 4
[0120] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the fan control method provided in Embodiment 1 is implemented.
[0121] In this embodiment, the computer-readable storage medium can be a read-only memory (ROM for short), a random access memory (RAM for short), a magnetic disk, or an optical disc, etc.
[0122] The computer-readable storage medium provided in this embodiment can implement the fan control method provided in Embodiment 1. To avoid repetition, it will not be elaborated here.
[0123] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions for causing a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in various embodiments of the present invention.
[0124] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can also make many forms without departing from the purpose and scope protected by the claims of the present invention, and all of them belong to the protection scope of the present invention.
Claims
1. A fan control method, characterized in that, The method includes: Collecting an environmental status data set and determining whether the environmental status data set is within a preset safe temperature threshold range; If it is within the preset safe temperature threshold range, respectively obtain the Euclidean distances between each historical data set and the environmental status data set, and obtain the target Euclidean distances less than a preset distance threshold among the Euclidean distances, and determine the historical data sets corresponding to the target Euclidean distances as target historical data sets; Respectively obtain the historical control parameters and similarities in the target historical data sets, and calculate the target control parameters according to the historical control parameters and the similarities; If it is outside the preset safe temperature threshold range, obtain emergency control parameters according to the environmental status data set; Adjust the working state of the fan according to the target control parameters or the emergency control parameters; The historical control parameters include: a historical fan speed control parameter and a historical start / stop time control parameter; the respectively obtaining the historical control parameters and similarities in the target historical data sets and calculating the target control parameters according to the historical control parameters and the similarities includes: determining the target fan speed control parameter according to the similarities and the historical fan speed control parameters; determining the target start / stop time control parameter according to the similarities and the historical start / stop time control parameters.
2. The fan control method according to claim 1, wherein, The respectively obtaining the Euclidean distances between each historical data set and the environmental status data set includes: Calculating the Euclidean distances between each historical data set and the environmental status data set respectively through a distance calculation formula.
3. The fan control method according to claim 2, characterized in that, The respectively obtaining the similarities in the target historical data sets includes: Obtaining the similarities between each historical data set and the environmental status data set according to the Euclidean distances; Obtaining the sum value of the Euclidean distance and a preset constant, and determining the reciprocal of the sum value as the similarity.
4. The fan control method according to claim 1, characterized in that The determining the target fan speed control parameter according to the similarities and the historical fan speed control parameters includes: Obtaining the product of the similarities and the historical fan speed control parameters, and summing the products to obtain a first sum value; Obtaining a second sum value of the similarities, and determining the ratio of the first sum value and the second sum value as the target fan speed control parameter; The determining the target start / stop time control parameter according to the similarities and the historical start / stop time control parameters includes: Obtaining the product of the similarities and the historical start / stop time control parameters, and summing the products to obtain a third sum value; Determining the ratio of the third sum value and the second sum value as the target start / stop time control parameter.
5. The fan control method according to claim 1, wherein, The emergency control parameters include: a first emergency control parameter and a second emergency control parameter; the environmental status data set includes: a machine temperature value; The if it is outside the preset safe temperature threshold range, obtaining the emergency control parameters according to the machine temperature value includes: If the machine temperature value is greater than the preset safe temperature maximum value, obtaining the first emergency control parameter according to the machine temperature value; If the machine temperature value is less than the minimum preset safe temperature, the second emergency control parameter is obtained according to the machine temperature value.
6. The fan control method according to claim 5, wherein The first emergency control parameter includes: a first emergency fan speed control parameter and a first emergency start / stop time control parameter; The second emergency control parameter includes: a second emergency fan speed control parameter and a second emergency start / stop time control parameter; The obtaining the first emergency control parameter according to the machine temperature value includes: Obtaining the temperature deviation value between the machine temperature value and the maximum preset safe temperature value; Obtaining the first product of the temperature deviation value and the first preset temperature coefficient, and determining the sum value of the first product and the preset conventional fan speed control parameter as the first emergency fan speed control parameter; Obtaining the second product of the temperature deviation value and the first preset time coefficient, and determining the sum value of the second product and the preset conventional start / stop time control parameter as the first emergency start / stop time control parameter; The obtaining the second emergency control parameter according to the machine temperature value includes: Obtaining the third product of the preset conventional fan speed control parameter and the second preset temperature coefficient, and determining the third product as the second emergency fan speed control parameter; Obtaining the fourth product of the preset conventional start / stop time control parameter and the second preset time coefficient, and determining the fourth product as the second emergency start / stop time control parameter.
7. A fan control device, characterized in that, The device includes: A judgment module, configured to collect an environmental state data set and judge whether the environmental state data set is within the preset safe temperature threshold range; A first obtaining module, configured to, if it is within the preset safe temperature threshold range, respectively obtain the Euclidean distances between each historical data set and the environmental state data set, obtain the target Euclidean distances less than the preset distance threshold among the Euclidean distances, and determine the historical data sets corresponding to the target Euclidean distances as the target historical data sets; A calculation module, configured to respectively obtain the historical control parameters and similarities in the target historical data sets, and calculate the target control parameter according to the historical control parameters and the similarities; A second obtaining module, configured to, if it is outside the preset safe temperature threshold range, obtain the emergency control parameter according to the environmental state data set; An adjustment module, configured to adjust the working state of the fan according to the target control parameter or the emergency control parameter; The historical control parameter includes: a historical fan speed control parameter and a historical start / stop time control parameter; the respectively obtaining the historical control parameters and similarities in the target historical data sets, and calculating the target control parameter according to the historical control parameters and the similarities includes: determining the target fan speed control parameter according to the similarities and the historical fan speed control parameters; determining the target start / stop time control parameter according to the similarities and the historical start / stop time control parameters.
8. An electronic device, characterized in that, It includes a memory and a processor, the memory stores a computer program, and the computer program executes the fan control method according to any one of claims 1 to 6 when running on the processor.
9. A computer-readable storage medium, characterized in that, It stores a computer program which, when running on a processor, executes the fan control method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Air conditioner control method and device and air conditioner
CN116928850A
Outer rotor fan safety braking system based on automatic induction
CN118912025A