Fan, fan control method and device and computer equipment
By calculating the variance and difference of the distance values detected by the distance sensor, the fan wind speed is determined, which solves the problem of frequent changes in the fan wind speed and achieves stable and accurate adjustment of the wind speed.
Patent Information
- Application Number
- CN202410828734.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-06-25
AI Technical Summary
When the fan uses a distance sensor to detect the distance between the target and the fan, the wind speed frequently changes.
By calculating the variance of multiple distance values detected by the distance sensor, it is judged whether the actual variance value is less than the preset theoretical variance value. If it is less than the preset theoretical variance value, the wind speed of the fan is determined to avoid frequent changes in wind speed, and the distance value is distinguished by eliminating or saving The distance between the target and the fan ensures the accuracy of wind speed adjustment.
It effectively avoids frequent changes in wind speed and ensures the stability and accuracy of the fan speed to meet the target requirements.
Smart Images

Figure CN118654014A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electrical equipment, and in particular to a fan, a fan control method and device, and computer equipment. Background Art
[0002] By generating airflow, fans can not only enhance the air circulation in the environment and improve the heat dissipation performance of the air system, but also accelerate the evaporation of moisture on the surface of the human body to achieve a cooling effect.
[0003] At present, the fan still adjusts the wind speed by manual gear shifting by the user. If the distance between the target and the fan is sensed by a pitch-and-receive distance sensor and the wind speed of the fan is automatically adjusted according to the distance between the target and the fan, the wind speed may change frequently. Summary of the invention
[0004] In view of this, the present invention provides a fan, a fan control method, a fan control device and a computer device to solve the problem of frequent changes in the wind speed of the fan when the wind speed of the fan is adjusted by using the distance between the target and the fan detected by the distance sensor.
[0005] In a first aspect, the present invention provides a method for controlling a fan, the method comprising the following steps: obtaining multiple distance values detected by a distance sensor; calculating the variance of the multiple distance values to obtain an actual variance value; judging whether the actual variance value is less than a preset theoretical variance value; when the actual variance value is less than the theoretical variance value, determining the wind speed of the fan according to the multiple distance values.
[0006] The fan control method provided by the present invention obtains multiple distance values detected by the distance sensor; calculates the variance of the multiple distance values to obtain an actual variance value; determines 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, determines the wind speed of the fan according to the multiple distance values. By calculating the actual variance values of the multiple distance values, it can be determined whether the target is stable, that is, when the actual variance value is less than the theoretical variance value, it can be considered that the target is stable, and after the target is stable, the wind speed of the fan is determined according to the multiple distance values, thereby avoiding frequent changes in the wind speed.
[0007] In an optional implementation, determining the wind speed of the fan according to a plurality of distance values includes: calculating an average value of the plurality of distance values; and determining the wind speed of the fan according to the average value.
[0008] This is because the detection sensitivity of distance sensors (such as millimeter-wave radars) is relatively high, and small movements of the target will also 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 value, and make the determined fan wind speed more in line with the target requirements.
[0009] In an optional embodiment, obtaining multiple distance values detected by the distance sensor includes: obtaining a current distance value detected by the distance sensor; obtaining a previous distance value of the current distance value; calculating a 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 the distance sensor to sense the distance between the target and the fan within the detection range, if other targets enter the detection range (for example, other targets pass through the detection range), the distance sensor may detect the distance between the other targets and the fan; 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 judged whether the current distance value is the distance between the other target 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 the other target and the fan. In order to ensure that the multiple distance values for determining the fan speed are the distance between the target and the fan, the current distance value needs to be eliminated.
[0011] In an optional implementation, before removing the distance value, the following steps are also included: determining the number of times the difference value 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. In addition to other targets passing through the detection range, other targets may also enter and remain within the detection range of the distance sensor. If other targets enter and remain within the detection range of the distance sensor, the determination of the fan speed also needs to take into account other targets that enter and remain within the detection range of the distance sensor. This embodiment can distinguish whether other targets pass through the detection range or other targets enter and remain 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 mutation value is less than the preset threshold, it can be considered that other targets pass through the detection range. In order to ensure that the multiple distance values used to determine the fan speed are all the distances between the target and the fan, the current distance value needs to be eliminated.
[0013] In an optional implementation, the fan control method further includes the following steps: 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 whether other targets pass through the detection range or other targets enter and stay 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 the preset threshold. Specifically, when the number of times the difference is greater than the mutation value is greater than the preset threshold, it can be considered that other targets enter and stay within the detection range of the distance sensor, and in order to make the determined fan speed meet the target requirements, the current distance value needs to be retained.
[0015] In an optional implementation, the fan control method further includes the following steps: when the difference value is less than or equal to the mutation value, saving the current distance value.
[0016] This is because, when the distance sensor is used to sense the distance between the target and the fan within the detection range, if other targets enter the detection range (for example, other targets pass through the detection range), the distance sensor may detect the distance between the other targets and the fan; 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 judged whether the current distance value is the distance between the other 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 the other target and the fan, but the distance between the target and the fan, so it needs to be saved.
[0017] In a second aspect, the present invention also provides a fan control device, which includes 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 the 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 judge whether the actual variance value is less than a preset theoretical variance value; the wind speed adjustment module is used to determine the wind speed of the fan according to the multiple distance values when the actual variance value is less than the theoretical variance value.
[0018] In a third aspect, the present invention further provides a computer device, comprising a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the fan control method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0019] In a fourth aspect, the present invention further provides a fan, comprising the computer device of the third aspect.
[0020] In a fifth aspect, the present invention further provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable 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 further provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable 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 the present invention have the following beneficial effects:
[0023] (1) By calculating the actual variance values of multiple distance values, it is possible to determine whether the target is stable. That is, when the actual variance value is less than the theoretical variance value, it can be considered that the target is stable. After the target is stable, the wind speed of the fan is determined based on the multiple distance values, thereby avoiding 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 judged 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 the distances between the target and the fan, the current distance value needs to be eliminated.
[0025] (3) According to the relationship between the difference between the current distance value and the previous distance value and the preset threshold, it can be distinguished whether other targets have passed through the detection range or other targets have entered and stayed 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 the distances between the target and the fan, the current distance value needs to be eliminated; 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 stayed within the detection range of the distance sensor. In order to ensure that the determined fan speed meets the target requirements, the current distance value needs to be retained. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0027] Figure 1 is a flow chart of a fan control method according to an embodiment of the present invention;
[0028] Figure 2 is a flow chart of another fan control method according to an embodiment of the present invention;
[0029] Figure 3 is a flow chart of yet another fan control method according to an embodiment of the present invention;
[0030] Figure 4 is a flow chart of an example of a fan control method according to an embodiment of the present invention;
[0031] Figure 5 is a structural block diagram of a fan control device according to an embodiment of the present invention;
[0032] Figure 6 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work 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 of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0035] When the distance between the target and the fan is sensed by a transmit-receive distance sensor and the wind speed of the fan is automatically adjusted according to the distance between the target and the fan, if the target moves within the detection range, the distance value detected by the distance sensor each time will be different. If the wind speed is adjusted according to each distance value detected by the distance sensor, the wind speed will be adjusted frequently. In addition, if there are multiple targets within the detection range, each distance value detected by the distance sensor will be different, which will also cause the wind speed to be adjusted frequently.
[0036] Based on this, a fan control method is provided in this embodiment, which can be used in computer equipment. Figure 1 is a flow chart of a fan control method according to an embodiment of the present invention. 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 may be a millimeter wave radar, and the multiple distance values may 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 an actual variance value.
[0040] Specifically, we can use the formula The variance is calculated, where S represents the variance, a i represents the i-th distance value, Represents the average of multiple distance values, and x represents the number of distance values.
[0041] Step S103: determining whether the actual variance value is less than a 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, the wind speed of the fan is determined according to the multiple distance values.
[0044] The fan control method provided in this embodiment obtains multiple distance values detected by the distance sensor; calculates the variance of the multiple distance values to obtain an actual variance value; determines 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, determines the wind speed of the fan according to the multiple distance values. By calculating the actual variance values of the multiple distance values, it can be determined whether the target is stable, that is, when the actual variance value is less than the theoretical variance value, it can be considered that the target is stable. After the target is stable, the wind speed of the fan is determined according to the multiple distance values, thereby avoiding the problem of frequent changes in wind speed.
[0045] In this embodiment, a fan control method is provided, which can be used in computer equipment. Figure 2 is a flow chart of another fan control method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0046] Step S201: Acquire the current distance value detected by the distance sensor.
[0047] Step S202: Obtain 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 a preset mutation value. If the difference is greater than the mutation value, proceed to step S205; otherwise, proceed to step S206.
[0050] Step S205: Eliminate the current distance value.
[0051] This is because, when using the distance sensor to sense the distance between the target and the fan within the detection range, if other targets enter the detection range (for example, other targets pass through the detection range), the distance sensor may detect the distance between the other targets and the fan; 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 judged whether the current distance value is the distance between the other target 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 the other target and the fan. In order to ensure that the multiple distance values for determining the fan speed are the distances between the target and the fan, the current distance value needs to be eliminated. Step S206: Save the current distance value and add 1 to the number of distance values.
[0052] Step S207: Obtain the number of distance values.
[0053] Step S208: Determine whether the number reaches a preset number threshold. When the number reaches the preset number threshold, proceed to step S209; when the number does not reach the preset number threshold, return to step S201.
[0054] Step S209: Calculate the variance of multiple distance values to obtain an actual variance value.
[0055] Step S210: 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, proceed to step S211; otherwise, proceed to step S212.
[0056] Step S211: determine the wind speed of the fan according to the multiple distance values, and proceed to step S201.
[0057] In an optional implementation, determining the wind speed of the fan according to a plurality of distance values includes: calculating an average value of the plurality of distance values; and determining the wind speed of the fan according to the average value.
[0058] This is because the detection sensitivity of distance sensors (such as millimeter-wave radars) is relatively high, and small movements of the target will also 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 value, and make the determined fan wind speed more in line with the target requirements.
[0059] Step S212: Do not process the multiple distance values and go to step S201.
[0060] The fan control method provided in the present embodiment determines whether the target is stable by calculating the actual variance values of multiple distance values, and determines the wind speed of the fan according to the multiple distance values after the target is stable, thereby avoiding frequent changes in the wind speed; and 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 judged 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, and the target is eliminated; thereby ensuring that the multiple distance values are all the distances between the target and the fan, so that the wind speed of the fan determined according to the multiple distance values is more accurate.
[0061] In this embodiment, a fan control method is provided, which can be used in computer equipment. Figure 3 FIG. 1 is a flow chart of another fan control method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:
[0062] Step S301: Acquire the current distance value detected by the distance sensor.
[0063] Step S302: Obtain 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 a 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 value 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. In addition to other targets passing through the detection range, other targets may also enter and remain within the detection range of the distance sensor. If other targets enter and remain within the detection range of the distance sensor, the determination of the fan speed also needs to take into account other targets that enter and remain within the detection range of the distance sensor. This embodiment can distinguish whether other targets pass through the detection range or other targets enter and remain 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 mutation value is less than the preset threshold, it can be considered that other targets pass through the detection range. In order to ensure that the multiple distance values used to determine the fan speed are all the distances between the target and the fan, the current distance value needs to be eliminated.
[0069] Step S307: Eliminate the current distance value.
[0070] Step S308: Eliminate all distance values before the current distance value, save the current distance value, and increase the number of distance values by 1.
[0071] As described above, this embodiment can distinguish whether other targets pass through the detection range or other targets enter and stay 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 the preset threshold. Specifically, when the number of times the difference is greater than the mutation value is greater than the preset threshold, it can be considered that other targets enter and stay within the detection range of the distance sensor, and in order to make the determined fan speed meet the target requirements, the current distance value needs to be retained.
[0072] Step S309: Save the current distance value and increase the number of distance values by 1.
[0073] This is because, when the distance sensor is used to sense the distance between the target and the fan within the detection range, if other targets enter the detection range (for example, other targets pass through the detection range), the distance sensor may detect the distance between the other targets and the fan; 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 judged whether the current distance value is the distance between the other 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 the other target and the fan, but the distance between the target and the fan, so it needs to be saved.
[0074] Step S310: Obtain the number of distance values.
[0075] Step S311: Determine whether the number reaches a preset number threshold. When the number reaches the preset number threshold, proceed to step S312; when the number does not reach the preset number threshold, return to step S301.
[0076] Step S312: Calculate the variance of multiple distance values to obtain an actual variance value;
[0077] Step S313: 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, proceed to step S314; otherwise, proceed to step S315.
[0078] Step S314: determine the wind speed of the fan according to the multiple distance values, and proceed to step S201.
[0079] Step S315: Do not process the multiple distance values and go to step S201.
[0080] The fan control method provided in the present embodiment determines whether the target is stable by calculating the actual variance values of multiple distance values, and determines the wind speed of the fan according to the multiple distance values after the target is stable, thereby avoiding frequent changes in the wind speed; and 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 judged 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, and the other targets are eliminated; thereby ensuring that the multiple distance values are all the distances between the target and the fan, so that the wind speed of the fan determined according to the multiple distance values is more accurate; further, the situation where a new target enters the detection range is also taken into account, so that the adjustment of the fan can be applicable to more application scenarios.
[0081] In order to explain the fan control method of the embodiment of the present invention in more detail, a specific example is given. The fan includes fan blades, a DC motor, a distance sensor and its controller, etc. The distance sensor is installed in front of the whole machine to detect the distance between the person and the whole machine in real time and save x data, a1, a2, ... a x , calculate the average of this set of data and variance Preset a minimum mutation value Y, number of mutations N, and minimum variance M.
[0082] like Figure 4As shown, the control method of the fan includes the following steps: the controller receives the distance data sent by the distance sensor in real time, and compares the distance data with the distance data saved last time: if they are consistent or there is no distance data saved last time, save the data this time; if there is a change, judge whether the difference is greater than the mutation value Y to prevent the nearby target from being stationary and the distant target from moving. The received data is the data of the distant target. If it is less than the mutation value Y, save the data this time; if it is greater than the mutation value Y, judge whether it exceeds N times to prevent the distance sensor from detecting the problem of close distance again and the wind speed from changing frequently. If it exceeds N times, save the distance data this time. Save x data and calculate the variance. If the variance is less than the minimum variance M, adjust the corresponding wind speed according to the average value of this group of data; if the variance is greater than the minimum variance M, do not process this group of data to prevent other targets from passing by around the target and the wind speed from changing frequently.
[0083] In this embodiment, a fan control device is also provided, which is used to implement the above embodiments and preferred implementations, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0084] This embodiment provides a fan control device, such as Figure 5 As shown, including:
[0085] An acquisition module 501 is used to acquire a plurality of distance values detected by a distance sensor;
[0086] A calculation module 502 is used to calculate the variance of multiple distance values to obtain an actual variance value;
[0087] A judgment module 503 is used to judge whether the actual variance value is less than a preset theoretical variance value;
[0088] The wind speed adjustment module 504 is used to determine the wind speed of the fan according to the multiple distance values when the actual variance value is less than the theoretical variance value.
[0089] In some optional implementations, the wind speed adjustment module 504 is specifically used to: when the actual variance value is less than the theoretical variance value, calculate an average value of multiple distance values; and determine the wind speed of the fan according to the average value.
[0090] In some optional embodiments, the acquisition module 501 is specifically used to: obtain the current distance value detected by the distance sensor; obtain 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, eliminate the current distance value.
[0091] In some optional implementations, before eliminating the current distance value, the acquisition module 501 is further used to: determine the number of times the difference value is greater than the mutation value; when the number is less than a preset threshold, execute the step of eliminating the current distance value.
[0092] In some optional implementations, the acquisition module 501 is further configured to: when the number of times is greater than or equal to a threshold, save the current distance value.
[0093] In some optional implementations, the acquisition module 501 is further used to: when the difference value is less than or equal to the mutation value, save the current distance value.
[0094] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0095] The fan control device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0096] The embodiment of the present invention also provides a computer device having the above Figure 5 The fan control device shown.
[0097] See also Figure 6 , Figure 6 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 6 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.
[0098] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0099] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0100] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0101] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a 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, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0103] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0104] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0105] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0106] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for controlling a fan, characterized in that: The method comprises: Get multiple distance values detected by the 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; When the actual variance value is less than the theoretical variance value, the wind speed of the fan is determined according to the multiple distance values.
2. The method according to claim 1, characterized in that Determining the wind speed of the fan according to the multiple distance values includes: Calculating an average of the plurality of distance values; The wind speed of the fan is determined according to the average value.
3. The method according to claim 1, characterized in that: The obtaining of a plurality of distance values detected by the distance sensor comprises: Obtaining a current distance value detected by the distance sensor; Obtain 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, the current distance value is eliminated.
4. The method according to claim 3, characterized in that Before removing the current distance value, the method further includes: Determine the number of times the difference value is greater than the mutation value; When the number is less than a preset threshold, the step of eliminating the current distance value is performed.
5. The method according to claim 4, characterized in that Also includes: When the number is greater than or equal to the threshold, the current distance value is saved.
6. The method according to claim 3, characterized in that Also includes: When the difference is less than or equal to the mutation value, the current distance value is saved.
7. A fan control device, characterized in that: The device comprises: An acquisition module, used to acquire multiple distance values detected by the distance sensor; A calculation module, used for calculating the variance of the plurality of distance values to obtain an actual variance value; A judgment module, used to judge whether the actual variance value is less than a preset theoretical variance value; The wind speed adjustment module is used to determine the wind speed of the fan according to the multiple distance values when the actual variance value is less than the theoretical variance value.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the fan control method according to any one of claims 1 to 6 by executing the computer instructions.
9. A fan, characterized in that: A computer device comprising the method of claim 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the fan control method according to any one of claims 1 to 6.
11. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to cause a computer to execute the fan control method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Fan controlling method and notebook thereof
CN103967820A
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
Control of smart fan by sensor
KR1020170097442A
Fan speed control
US20120078420A1
