A fan, a fan control method, a device, and a computer equipment.
By calculating the variance of multiple distance values detected by the distance sensor, the stability of the target is determined, thus solving the problem of frequent changes in fan speed and achieving stable and accurate adjustment of the fan speed.
Patent Information
- Application Number
- CN202410828734.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-06-25
AI Technical Summary
The problem of frequent changes in wind speed when the fan uses a distance sensor to detect the distance between the target and the fan.
By acquiring multiple distance values detected by the distance sensor, the variance of the multiple distance values is calculated, and it is determined whether the actual variance value is less than the preset theoretical variance value. When the actual variance value is less than the theoretical variance value, the fan speed is determined based on the multiple distance values, and the fan speed is adjusted after the target stabilizes.
This avoids frequent changes in wind speed, ensures the stability and accuracy of wind speed, adapts to the stable state of the target, and reduces unnecessary adjustments to wind speed.
Smart Images

Figure CN118654014B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electrical equipment technology, specifically to a fan, a fan control method, a device, and a computer device. Background Technology
[0002] Fans generate airflow, which can enhance air circulation in the environment and improve the heat dissipation performance of the air system; they can also accelerate the evaporation of moisture from the surface of the human body, thus achieving a cooling effect.
[0003] Currently, the fan speed is still adjusted manually by the user. If a distance sensor is used to sense the distance between the target and the fan, and the fan speed is automatically adjusted based on the distance, then the fan speed will fluctuate frequently. Summary of the Invention
[0004] In view of this, the present invention provides a fan, a fan control method, an apparatus, and a computer device to solve the problem of frequent changes in fan speed when adjusting the fan speed using the distance between the target detected by a distance sensor and the fan.
[0005] In a first aspect, the present invention provides a fan control method, the method comprising the following steps: acquiring multiple distance values detected by a distance sensor; calculating the variance of the multiple distance values to obtain an actual variance value; determining whether the actual variance value is less than a preset theoretical variance value; and when the actual variance value is less than the theoretical variance value, determining the fan speed based on the multiple distance values.
[0006] The fan control method provided by this invention acquires multiple distance values detected by a distance sensor; calculates the variance of the multiple distance values to obtain the actual variance value; determines whether the actual variance value is less than a preset theoretical variance value; and determines the fan speed based on the multiple distance values when the actual variance value is less than the theoretical variance value. By calculating the actual variance value of multiple distance values, it can determine whether the target is stable. That is, when the actual variance value is less than the theoretical variance value, the target can be considered stable. After the target is stable, the fan speed is determined based on the multiple distance values, thereby avoiding frequent changes in fan speed.
[0007] In one alternative implementation, determining the fan speed based on multiple distance values includes: calculating the average of the multiple distance values; and determining the fan speed based on the average value.
[0008] This is because distance sensors (such as millimeter-wave radar) have high detection sensitivity, and even small movements of the target can cause changes in the distance value detected by the distance sensor. Calculating the average of multiple distance values can reduce numerical fluctuations, ensure the reliability of the distance values, and make the determined fan speed more in line with the target's needs.
[0009] In one optional implementation, acquiring multiple distance values detected by the distance sensor includes: acquiring the current distance value detected by the distance sensor; acquiring the previous distance value of the current distance value; calculating the difference between the current distance value and the previous distance value, and determining whether the difference is greater than a preset mutation value; when the difference is greater than the mutation value, discarding the current distance value.
[0010] This is because when using a distance sensor to sense the distance between a target and the fan within the detection range, if other targets enter the detection range (e.g., other targets pass through the detection range), the distance sensor may detect the distance between those other targets and the fan. By obtaining the previous distance value of the current distance value and calculating the difference between the current distance value and the previous distance value, and determining whether the difference is greater than a preset mutation value, it can be determined whether the current distance value is the distance between another target and the fan. That is, when the difference is greater than the preset mutation value, the current distance value can be considered to be the distance between another target and the fan. In order to ensure that the multiple distance values used to determine the fan speed are all distances between the target and the fan, the current distance value needs to be discarded.
[0011] In one alternative implementation, before removing the distance value, the method further includes the following steps: determining the number of times the difference is greater than the mutation value; when the number is less than or equal to a preset threshold, removing the current distance value.
[0012] This is because the distance sensor detects the distance between other targets and the fan. Besides other targets passing through the detection range, it's also possible that other targets enter and remain within the detection range. If other targets enter and remain within the detection range, the determination of the fan speed also needs to consider these targets. This embodiment distinguishes between other targets passing through the detection range and other targets entering and remaining within the detection range based on the relationship between the difference between the current distance value and the previous distance value and a preset threshold. Specifically, when the number of times the difference is greater than the abrupt change value is less than the preset threshold, it can be considered that other targets have passed through the detection range. To ensure that multiple distance values used to determine the fan speed are all distances between the target and the fan, the current distance value needs to be discarded.
[0013] In one alternative implementation, the fan control method further includes the following step: when the number of times is greater than or equal to a threshold, saving the current distance value.
[0014] As described above, this embodiment can distinguish between other targets passing through the detection range and other targets entering and remaining within the detection range of the distance sensor based on the relationship between the difference between the current distance value and the previous distance value and a preset threshold. Specifically, when the number of times the difference is greater than the abrupt change value exceeds the preset threshold, it can be considered that other targets have entered and remained within the detection range of the distance sensor. In order to ensure that the determined fan speed meets the target's requirements, the current distance value needs to be retained.
[0015] In one alternative implementation, the fan control method further includes the following step: when the difference is less than or equal to the mutation value, saving the current distance value.
[0016] This is because when using a distance sensor to sense the distance between a target and the fan within the detection range, if another target enters the detection range (e.g., another target passes through the detection range), the distance sensor may detect the distance between that other target and the fan. By obtaining the previous distance value of the current distance value and calculating the difference between the current distance value and the previous distance value, and determining whether the difference is greater than a preset mutation value, it can be determined whether the current distance value is the distance between another target and the fan. That is, when the difference is less than the preset mutation value, it can be considered that the current distance value is not the distance between another target and the fan, but the distance between the target and the fan, and therefore needs to be saved.
[0017] Secondly, the present invention also provides a fan control device, the device comprising an acquisition module, a calculation module, a judgment module, and a wind speed adjustment module. The acquisition module is used to acquire multiple distance values detected by a distance sensor; the calculation module is used to calculate the variance of the multiple distance values to obtain an actual variance value; the judgment module is used to determine whether the actual variance value is less than a preset theoretical variance value; and the wind speed adjustment module is used to determine the fan speed based on the multiple distance values when the actual variance value is less than the theoretical variance value.
[0018] Thirdly, the present invention also provides a computer device, including a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the fan control method of the first aspect or any corresponding embodiment described above.
[0019] Fourthly, the present invention also provides a fan, including the computer device of the third aspect.
[0020] Fifthly, the present invention also provides a computer-readable storage medium storing computer instructions for causing a computer to execute the fan control method of the first aspect or any corresponding embodiment thereof.
[0021] In a sixth aspect, the present invention also provides a computer program product, including computer instructions for causing a computer to execute the fan control method of the first aspect or any corresponding embodiment thereof.
[0022] The fan, fan control method, device, and computer equipment provided by this invention have the following beneficial effects:
[0023] (1) Calculate the actual variance of multiple distance values to determine whether the target is stable. That is, when the actual variance is less than the theoretical variance, the target can be considered stable. After the target is stable, the fan speed is determined based on multiple distance values, which can avoid frequent changes in wind speed.
[0024] (2) By obtaining the previous distance value of the current distance value, calculating the difference between the current distance value and the previous distance value, and judging whether the difference is greater than the preset mutation value, it can be determined whether the current distance value is the distance between other targets and the fan. That is, when the difference is greater than the preset mutation value, it can be considered that the current distance value is the distance between other targets and the fan. In order to ensure that the multiple distance values for determining the fan speed are all the distance between the target and the fan, the current distance value needs to be removed.
[0025] (3) Based on the relationship between the difference between the current distance value and the previous distance value and the preset threshold, it is possible to distinguish whether other targets are passing through the detection range or whether other targets have entered and remained within the detection range of the distance sensor. Specifically, when the difference between the current distance value and the previous distance value is less than the preset threshold, it can be considered that other targets have passed through the detection range. In order to ensure that the multiple distance values used to determine the fan speed are all distances between the target and the fan, the current distance value needs to be discarded. When the difference between the current distance value and the previous distance value is greater than the preset threshold, it can be considered that other targets have entered and remained within the detection range of the distance sensor. In order to ensure that the determined fan speed meets the requirements of the target, the current distance value needs to be retained. Attached Figure Description
[0026] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0027] Figure 1 This is a flowchart of a fan control method according to an embodiment of the present invention;
[0028] Figure 2 This is a flowchart of another fan control method according to an embodiment of the present invention;
[0029] Figure 3 This is a flowchart of another fan control method according to an embodiment of the present invention;
[0030] Figure 4 This is a flowchart illustrating an example of a fan control method according to an embodiment of the present invention;
[0031] Figure 5 This is a structural block diagram of a fan control device according to an embodiment of the present invention;
[0032] Figure 6 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0034] According to an embodiment of the present invention, a fan control method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0035] When a distance sensor detects the distance between a target and a fan, and automatically adjusts the fan speed based on this distance, if the target moves within the detection range, the distance value detected by the distance sensor will be different each time. If the fan speed is adjusted based on each distance value detected by the distance sensor, the fan speed will be adjusted frequently. In addition, if there are multiple targets within the detection range, the distance values detected by the distance sensor will also be different, which will also lead to frequent fan speed adjustments.
[0036] Based on this, this embodiment provides a fan control method that can be used in computer equipment. Figure 1 This is a flowchart of a fan control method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:
[0037] Step S101: Acquire multiple distance values detected by the distance sensor.
[0038] For example, the distance sensor could be a millimeter-wave radar. Multiple distance values could be distance values acquired by the distance sensor over a period of time.
[0039] Step S102: Calculate the variance of multiple distance values to obtain the actual variance value.
[0040] Specifically, a formula can be used. The variance is calculated, where S represents the variance and a i This represents the i-th distance value. This represents the average of multiple distance values, where x represents the number of distance values.
[0041] Step S103: Determine whether the actual variance value is less than the preset theoretical variance value.
[0042] The theoretical variance value can be adjusted as needed.
[0043] Step S104: When the actual variance value is less than the theoretical variance value, determine the fan speed based on multiple distance values.
[0044] The fan control method provided in this embodiment acquires multiple distance values detected by a distance sensor; calculates the variance of the multiple distance values to obtain the actual variance value; determines whether the actual variance value is less than a preset theoretical variance value; and determines the fan speed based on the multiple distance values when the actual variance value is less than the theoretical variance value. By calculating the actual variance value of multiple distance values, it can determine whether the target is stable. That is, when the actual variance value is less than the theoretical variance value, the target can be considered stable. After the target is stable, the fan speed is determined based on the multiple distance values, thereby avoiding the problem of frequent changes in wind speed.
[0045] This embodiment provides a fan control method that can be used in computer equipment. Figure 2 This is a flowchart of another fan control method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:
[0046] Step S201: Obtain the current distance value detected by the distance sensor.
[0047] Step S202: Get the previous distance value of the current distance value.
[0048] Step S203: Calculate the difference between the current distance value and the previous distance value.
[0049] Step S204: Determine whether the difference is greater than the preset mutation value. If the difference is greater than the mutation value, proceed to step S205; otherwise, proceed to step S206.
[0050] Step S205: Remove the current distance value.
[0051] This is because, when using a distance sensor to sense the distance between a target and the fan within the detection range, if other targets enter the detection range (e.g., other targets pass through the detection range), the distance sensor may detect the distance between those other targets and the fan. By obtaining the previous distance value of the current distance value and calculating the difference between the current distance value and the previous distance value, and determining whether the difference is greater than a preset abrupt change value, it can be determined whether the current distance value is the distance between another target and the fan. That is, when the difference is greater than the preset abrupt change value, the current distance value can be considered the distance between another target and the fan. To ensure that multiple distance values used to determine the fan speed are all distances between the target and the fan, the current distance value needs to be discarded. Step S206: Save the current distance value and increment the count of distance values by 1.
[0052] Step S207: Obtain the number of distance values.
[0053] Step S208: Determine whether the number of items has reached the preset number threshold. If the number of items reaches the preset number threshold, proceed to step S209; if the number of items has not reached the preset number threshold, return to step S201.
[0054] Step S209: Calculate the variance of multiple distance values to obtain the actual variance value.
[0055] Step S210: Determine whether the actual variance value is less than the preset theoretical variance value; if the actual variance value is less than the theoretical variance value, proceed to step S211; otherwise, proceed to step S212.
[0056] Step S211: Determine the fan speed based on multiple distance values, and proceed to step S201.
[0057] In one alternative implementation, determining the fan speed based on multiple distance values includes: calculating the average of the multiple distance values; and determining the fan speed based on the average value.
[0058] This is because distance sensors (such as millimeter-wave radar) have high detection sensitivity, and even small movements of the target can cause changes in the distance value detected by the distance sensor. Calculating the average of multiple distance values can reduce numerical fluctuations, ensure the reliability of the distance values, and make the determined fan speed more in line with the target's needs.
[0059] Step S212: Do not process multiple distance values and proceed to step S201.
[0060] The fan control method provided in this embodiment determines whether the target is stable by calculating the actual variance of multiple distance values, and then determines the fan speed based on the multiple distance values after the target is stable, thereby avoiding frequent changes in wind speed. Moreover, by obtaining the previous distance value of the current distance value, calculating the difference between the current distance value and the previous distance value, and judging whether the difference is greater than a preset mutation value, it can be determined whether the current distance value is the distance between other targets and the fan. That is, when the difference is greater than the preset mutation value, the current distance value can be considered to be the distance between other targets and the fan and is discarded. This ensures that multiple distance values are all distances between the target and the fan, making the fan speed determined based on multiple distance values more accurate.
[0061] This embodiment provides a fan control method that can be used in computer equipment. Figure 3 This is a flowchart of another fan control method according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps:
[0062] Step S301: Obtain the current distance value detected by the distance sensor.
[0063] Step S302: Get the previous distance value of the current distance value.
[0064] Step S303: Calculate the difference between the current distance value and the previous distance value.
[0065] Step S304: Determine whether the difference is greater than the preset mutation value. If the difference is greater than the mutation value, proceed to step S305; otherwise, proceed to step S309.
[0066] Step S305: Determine the number of times the difference is greater than the mutation value.
[0067] Step S306: Determine whether the number of times is less than a preset threshold. If the number of times is less than the preset threshold, proceed to step S307; otherwise, proceed to step S308.
[0068] This is because the distance sensor detects the distance between other targets and the fan. Besides other targets passing through the detection range, it's also possible that other targets enter and remain within the detection range. If other targets enter and remain within the detection range, the determination of the fan speed also needs to consider these targets. This embodiment distinguishes between other targets passing through the detection range and other targets entering and remaining within the detection range based on the relationship between the difference between the current distance value and the previous distance value and a preset threshold. Specifically, when the number of times the difference is greater than the abrupt change value is less than the preset threshold, it can be considered that other targets have passed through the detection range. To ensure that multiple distance values used to determine the fan speed are all distances between the target and the fan, the current distance value needs to be discarded.
[0069] Step S307: Remove the current distance value.
[0070] Step S308: Remove all distance values before the current distance value, save the current distance value, and increment the count of distance values by 1.
[0071] As described above, this embodiment can distinguish between other targets passing through the detection range and other targets entering and remaining within the detection range of the distance sensor based on the relationship between the difference between the current distance value and the previous distance value and a preset threshold. Specifically, when the number of times the difference is greater than the abrupt change value exceeds the preset threshold, it can be considered that other targets have entered and remained within the detection range of the distance sensor. In order to ensure that the determined fan speed meets the target's requirements, the current distance value needs to be retained.
[0072] Step S309: Save the current distance value and increment the number of distance values by 1.
[0073] This is because when using a distance sensor to sense the distance between a target and the fan within the detection range, if another target enters the detection range (e.g., another target passes through the detection range), the distance sensor may detect the distance between that other target and the fan. By obtaining the previous distance value of the current distance value and calculating the difference between the current distance value and the previous distance value, and determining whether the difference is greater than a preset mutation value, it can be determined whether the current distance value is the distance between another target and the fan. That is, when the difference is less than the preset mutation value, it can be considered that the current distance value is not the distance between another target and the fan, but the distance between the target and the fan, and therefore needs to be saved.
[0074] Step S310: Obtain the number of distance values.
[0075] Step S311: Determine whether the number of items has reached the preset number threshold. If the number of items reaches the preset number threshold, proceed to step S312; if the number of items has not reached the preset number threshold, return to step S301.
[0076] Step S312: Calculate the variance of multiple distance values to obtain the actual variance value;
[0077] Step S313: Determine whether the actual variance value is less than the preset theoretical variance value; if the actual variance value is less than the theoretical variance value, proceed to step S314; otherwise, proceed to step S315.
[0078] Step S314: Determine the fan speed based on multiple distance values, and proceed to step S201.
[0079] Step S315: Do not process multiple distance values and proceed to step S201.
[0080] The fan control method provided in this embodiment determines whether the target is stable by calculating the actual variance of multiple distance values, and then determines the fan speed based on the multiple distance values after the target is stable, thereby avoiding frequent changes in wind speed. Moreover, by obtaining the previous distance value of the current distance value, calculating the difference between the current distance value and the previous distance value, and judging whether the difference is greater than a preset mutation value, it can be determined whether the current distance value is the distance between the fan and other targets. That is, when the difference is greater than the preset mutation value, the current distance value can be considered as the distance between the fan and other targets, and it can be eliminated. This ensures that multiple distance values are the distance between the target and the fan, making the fan speed determined based on multiple distance values more accurate. Furthermore, it also considers the situation where new targets enter the detection range, making the fan adjustment applicable to more application scenarios.
[0081] To illustrate the fan control method of this invention in more detail, a specific example is given. The fan includes fan blades, a DC motor, a distance sensor, and its controller. The distance sensor is installed directly in front of the device to detect the distance between the user and the device in real time, and stores x data points, a1, a2, ... a x The average of this set of data was calculated. and variance Predetermine a minimum mutation value Y, a number of mutations N, and a minimum variance M.
[0082] like Figure 4As shown, the fan control method includes the following steps: The controller receives distance data sent by the distance sensor in real time. This distance data is compared with the previously saved distance data. If they are the same or there is no previously saved distance data, the current data is saved. If there is a change, it is determined whether the difference is greater than the abrupt change value Y. This prevents the received data from being from a distant target when the nearby target is stationary. If the difference is less than the abrupt change value Y, the current data is saved. If the difference is greater than the abrupt change value Y, it is determined whether the number of occurrences exceeds N. This prevents the distance sensor from detecting the proximity issue again, causing frequent changes in wind speed. If the number of occurrences exceeds N, the current distance data is saved. x data points are saved, and the variance is calculated. If the variance is less than the minimum variance M, the corresponding wind speed is adjusted based on the average value of this set of data. If the variance is greater than the minimum variance M, this set of data is not processed to prevent frequent changes in wind speed when other targets pass by the target.
[0083] This embodiment also provides a fan control device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0084] This embodiment provides a fan control device, such as... Figure 5 Shown, including:
[0085] The acquisition module 501 is used to acquire multiple distance values detected by the distance sensor;
[0086] Calculation module 502 is used to calculate the variance of multiple distance values to obtain the actual variance value;
[0087] The judgment module 503 is used to determine whether the actual variance value is less than the preset theoretical variance value;
[0088] The wind speed adjustment module 504 is used to determine the fan speed based on multiple distance values when the actual variance value is less than the theoretical variance value.
[0089] In some alternative implementations, the wind speed adjustment module 504 is specifically used to: calculate the average of multiple distance values when the actual variance value is less than the theoretical variance value; and determine the fan speed based on the average value.
[0090] In some optional implementations, the acquisition module 501 is specifically used to: acquire the current distance value detected by the distance sensor; acquire the previous distance value of the current distance value; calculate the difference between the current distance value and the previous distance value, and determine whether the difference is greater than a preset mutation value; when the difference is greater than the mutation value, discard the current distance value.
[0091] In some optional implementations, before removing the current distance value, the acquisition module 501 is further configured to: determine the number of times the difference is greater than the mutation value; and when the number is less than a preset threshold, perform the step of removing the current distance value.
[0092] In some optional implementations, the acquisition module 501 is also used to: save the current distance value when the number of times is greater than or equal to the threshold.
[0093] In some alternative implementations, the acquisition module 501 is further configured to: save the current distance value when the difference is less than or equal to the mutation value.
[0094] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0095] In this embodiment, the fan control device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0096] This invention also provides a computer device having the above-described features. Figure 5 The fan control device shown.
[0097] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 6 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 6 Take a processor 10 as an example.
[0098] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0099] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.
[0100] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0101] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0102] The computer device also includes an input device 30 and an output device 40. The processor 10, memory 20, input device 30, and output device 40 can be connected via a bus or other means. Figure 6 Taking the example of a connection between China and Israel via a bus.
[0103] Input device 30 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the computer device, such as a touchscreen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 40 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touchscreen.
[0104] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0105] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0106] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A fan control method, characterized in that, The method includes: Acquire multiple distance values detected by the distance sensor; Calculate the variance of the multiple distance values to obtain the actual variance value; Determine whether the actual variance value is less than the preset theoretical variance value; When the actual variance value is less than the theoretical variance value, the fan speed is determined based on the multiple distance values; The process of acquiring multiple distance values detected by the distance sensor includes: acquiring the current distance value detected by the distance sensor; acquiring the previous distance value of the current distance value; calculating the difference between the current distance value and the previous distance value, and determining whether the difference is greater than a preset abrupt change value; when the difference is greater than the abrupt change value, discarding the current distance value. Before removing the current distance value, the method further includes: determining the number of times the difference is greater than the mutation value; when the number is less than a preset threshold, performing the step of removing the current distance value; It also includes: saving the current distance value when the number of times is greater than or equal to the threshold; It also includes: when the difference is less than or equal to the mutation value, saving the current distance value.
2. The method according to claim 1, characterized in that, Determining the fan speed based on the plurality of distance values includes: Calculate the average of the multiple distance values; The fan speed is determined based on the average value.
3. A fan control device, characterized in that, The device includes: The acquisition module is used to acquire multiple distance values detected by the distance sensor; The calculation module is used to calculate the variance of the multiple distance values to obtain the actual variance value; The judgment module is used to determine whether the actual variance value is less than the preset theoretical variance value; A wind speed adjustment module is used to determine the fan speed based on the multiple distance values when the actual variance value is less than the theoretical variance value. The acquisition module is specifically used for: acquiring the current distance value detected by the distance sensor; acquiring the previous distance value of the current distance value; calculating the difference between the current distance value and the previous distance value, and determining whether the difference is greater than a preset abrupt change value; when the difference is greater than the abrupt change value, discarding the current distance value; Before removing the current distance value, the acquisition module is further configured to: determine the number of times the difference is greater than the mutation value; when the number is less than a preset threshold, perform the step of removing the current distance value; The acquisition module is further configured to: save the current distance value when the number of times is greater than or equal to the threshold; The acquisition module is further configured to: save the current distance value when the difference is less than or equal to the mutation value.
4. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the fan control method of any one of claims 1 to 2.
5. A fan, characterized in that, Includes the computer device as described in claim 4.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the fan control method according to any one of claims 1 to 2.
7. A computer program product, characterized in that, Includes computer instructions for causing a computer to perform the fan control method according to any one of claims 1 to 2.
Citation Information
Patent Citations
Device and method of cooler or heater capable of automatically controlling air volume by including sensor sensing existence of men and distance thereto
KR1020140018495A
Smart fan and control method thereof
KR1020140101579A