Oscillating device control method and device, equipment, storage medium and oscillating device
By detecting the rotation angle and direction of the shaking head structure and determining the shaking head control parameters, the problem that the market devices cannot adjust the shaking head angle and direction is solved, and flexible control and personalized settings of the shaking head device are realized to meet user needs.
Patent Information
- Application Number
- CN202411269111.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-12-13
AI Technical Summary
The shaking head device on the market cannot flexibly adjust the shaking head control parameters, resulting in the inability to meet the user's personalized shaking angle and direction needs.
By receiving the shaking head opening command, the rotation angle and direction of the shaking head structure are detected, the shaking head angle and direction of the shaking head device are determined, and after the rotation is stopped, it is used as a control parameter, and the shaking head of the shaking head device is controlled according to these parameters. If no rotation is detected, use history or default parameters to control the head.
It realizes flexible adjustment of the shaking head device to meet the user's shaking head needs for any angle and direction, without the need to develop additional remote control programs, reducing development costs.
Smart Images

Figure CN119126636A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of shaking head device control, and in particular to a shaking head device control method, device, computer equipment, storage medium, computer program product and shaking head device. Background Art
[0002] Currently, there are many devices (shaking head devices) on the market that have the shaking head function, such as electric fans, air conditioning fans, heaters, etc. that can shake their heads to increase the blowing area and improve air flow. However, most of the shaking head devices on the market shake their heads according to fixed control parameters, such as 30°, 60°, 90°, 120° or 360° surround wind in the fixed shaking head mode, and the shaking head control parameters of the shaking head device cannot be flexibly adjusted. Summary of the invention
[0003] Based on this, it is necessary to provide a shaking head device control method, device, computer equipment, computer readable storage medium, computer program product and shaking head device to address the technical problem that the traditional technology cannot flexibly adjust the shaking head control parameters of the shaking head device.
[0004] In a first aspect, the present application provides a method for controlling an oscillating head device, comprising:
[0005] receiving a shaking head start instruction, and within a first preset time period after receiving the shaking head start instruction, if the rotation of the shaking head structure of the shaking head device is detected, determining the shaking head angle and the shaking head direction of the shaking head device according to the rotation angle and the rotation direction of the shaking head structure;
[0006] In the case where the shaking structure stops rotating, if the rotation of the shaking structure is not detected within a second preset time period after the shaking structure stops rotating, the shaking angle and shaking direction determined when the shaking structure stops rotating are used as shaking control parameters of the shaking device;
[0007] The shaking device is controlled to shake according to the shaking control parameters.
[0008] In one embodiment, the shaking head device control method further includes:
[0009] If the rotation of the shaking structure is not detected within the first preset time period, and the historical shaking control parameters determined in the historical period are stored, the shaking device is controlled to shake according to the historical shaking control parameters.
[0010] In one embodiment, determining the shaking angle and shaking direction of the shaking device according to the rotation angle and the rotation direction of the shaking structure includes:
[0011] Determine the target shaking direction of the shaking device and the target shaking angle of the shaking device in the target shaking direction according to the rotation angle and the rotation direction of the shaking structure;
[0012] If the target shaking angle is greater than or equal to the shaking angle threshold of the shaking device, the shaking angle threshold is used as the shaking angle of the shaking device;
[0013] If the target shaking angle is less than the shaking angle threshold, the target shaking angle is used as the shaking angle of the shaking device.
[0014] In one embodiment, the shaking head device control method further includes:
[0015] During the shaking process of the shaking device, if a shaking control parameter clearing instruction is received, the shaking device is controlled to stop running;
[0016] If the rotation of the shaking head structure is detected within a third preset time period after the shaking head device stops operating, determining the detected rotation angle and rotation direction;
[0017] According to the detected rotation angle and rotation direction, the shaking control parameters of the shaking device are updated, and the shaking device is controlled to shake according to the updated shaking control parameters.
[0018] In one embodiment, the shaking head device control method further includes:
[0019] If the rotation of the shaking head structure is not detected within the third preset time period after the shaking head device stops running, the default shaking head control parameters are obtained, and the shaking head device is controlled to shake according to the default shaking head control parameters.
[0020] In a second aspect, the present application also provides a shaking head device control device, comprising:
[0021] A rotation detection module, for receiving a shaking head start instruction, and within a first preset time period after receiving the shaking head start instruction, if the rotation of the shaking head structure of the shaking head device is detected, determining the shaking head angle and the shaking head direction of the shaking head device according to the rotation angle and the rotation direction of the shaking head structure;
[0022] a control parameter determination module, for, when the shaking structure stops rotating, if the rotation of the shaking structure is not detected within a second preset time after the shaking structure stops rotating, using the shaking angle and shaking direction determined when the shaking structure stops rotating as the shaking control parameters of the shaking device;
[0023] The shaking head control module is used to control the shaking head device to shake according to the shaking head control parameters.
[0024] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0025] receiving a shaking head start instruction, and within a first preset time period after receiving the shaking head start instruction, if the rotation of the shaking head structure of the shaking head device is detected, determining the shaking head angle and the shaking head direction of the shaking head device according to the rotation angle and the rotation direction of the shaking head structure;
[0026] In the case where the shaking structure stops rotating, if the rotation of the shaking structure is not detected within a second preset time period after the shaking structure stops rotating, the shaking angle and shaking direction determined when the shaking structure stops rotating are used as shaking control parameters of the shaking device;
[0027] The shaking device is controlled to shake according to the shaking control parameters.
[0028] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0029] receiving a shaking head start instruction, and within a first preset time period after receiving the shaking head start instruction, if the rotation of the shaking head structure of the shaking head device is detected, determining the shaking head angle and the shaking head direction of the shaking head device according to the rotation angle and the rotation direction of the shaking head structure;
[0030] In the case where the shaking structure stops rotating, if the rotation of the shaking structure is not detected within a second preset time period after the shaking structure stops rotating, the shaking angle and shaking direction determined when the shaking structure stops rotating are used as shaking control parameters of the shaking device;
[0031] The shaking device is controlled to shake according to the shaking control parameters.
[0032] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0033] receiving a shaking head start instruction, and within a first preset time period after receiving the shaking head start instruction, if the rotation of the shaking head structure of the shaking head device is detected, determining the shaking head angle and the shaking head direction of the shaking head device according to the rotation angle and the rotation direction of the shaking head structure;
[0034] In the case where the shaking structure stops rotating, if the rotation of the shaking structure is not detected within a second preset time period after the shaking structure stops rotating, the shaking angle and shaking direction determined when the shaking structure stops rotating are used as shaking control parameters of the shaking device;
[0035] The shaking device is controlled to shake according to the shaking control parameters.
[0036] The above-mentioned shaking head device control method, device, computer equipment, storage medium and computer program product receive a shaking head start instruction. Within the first preset time after receiving the shaking head start instruction, if the rotation of the shaking head structure of the shaking head device is detected, the shaking head angle and the shaking head direction of the shaking head device can be determined according to the rotation angle and the rotation direction of the shaking head structure. In the case where the shaking head structure stops rotating, if the rotation of the shaking head structure is not detected within the second preset time after the shaking head structure stops rotating, the shaking head angle and the shaking head direction determined when the shaking head structure stops rotating are used as the shaking head control parameters of the shaking head device, so as to control the shaking of the shaking head device according to the shaking head control parameters. During the whole process, the shaking head control parameters of the shaking head device can be flexibly adjusted according to the detected rotation direction and rotation angle of the shaking head structure.
[0037] In a sixth aspect, the present application further provides a shaking head device, comprising:
[0038] A shaking structure, used to set the shaking angle and shaking direction of the shaking device;
[0039] The gear on the encoder shaft is connected to the gear on the shaft of the shaking structure; when the shaking structure rotates, the shaft of the shaking structure drives the shaft of the encoder to rotate, so that the encoder outputs a pulse signal, and calculates the shaking angle and shaking direction of the shaking device based on the pulse signal;
[0040] The controller is used to receive the shaking angle and shaking direction calculated by the encoder, and use the shaking angle and shaking direction as shaking control parameters of the shaking structure, and transmit the shaking control parameters to the stepping motor;
[0041] The stepper motor is used to drive the shaking structure to operate according to the shaking control parameters, so that the shaking device shakes.
[0042] In one embodiment, the number of gears on the shaft of the shaking head structure is greater than the number of gears on the shaft of the encoder.
[0043] In one embodiment, the shaking head device further includes: a memory connected to the controller; the controller writes the shaking head control parameters into the memory for storage.
[0044] In one embodiment, the shaking device includes at least one of a fan, an air conditioning fan, and a heater.
[0045] The above-mentioned shaking head device includes: a shaking head structure, an encoder, a controller and a stepper motor. The shaking head angle and shaking direction of the shaking head device can be set by the shaking head structure. Specifically, when the shaking head structure rotates, the axis of the encoder can be driven to rotate by the axis of the shaking head structure, so that the encoder outputs a pulse signal, and calculates the shaking head angle and shaking direction of the shaking head device based on the pulse signal. Furthermore, the controller can receive the shaking head angle and shaking head direction calculated by the encoder, use the shaking head angle and shaking head direction as shaking head control parameters of the shaking head structure, and transmit the shaking head control parameters to the stepper motor. The stepper motor drives the shaking head structure to operate according to the shaking head control parameters, so that the shaking head device shakes, that is, it can flexibly adjust the shaking head control parameters of the shaking head device according to the rotation direction and rotation angle of the shaking head structure. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] FIG1 is a diagram showing an application environment of a method for controlling a shaking head device according to an embodiment;
[0047] FIG2 is a schematic flow chart of a method for controlling an oscillating device in one embodiment;
[0048] FIG3 is a schematic diagram of a flow chart of controlling the shaking of the shaking device based on historical shaking control parameters or default shaking control parameters in one embodiment;
[0049] FIG4 is a schematic diagram of a flow chart of controlling a shaking device to shake its head based on a shaking angle threshold in one embodiment;
[0050] FIG5 is a flow chart of a method for controlling a head shaking device that supports resetting head shaking control parameters in one embodiment;
[0051] FIG6 is a schematic diagram of a flow chart of controlling a fan to shake its head in one embodiment;
[0052] FIG7 is a block diagram of a shaking head device in one embodiment;
[0053] FIG8 is a schematic diagram showing a gear on a shaking head structure shaft connected to a gear on an encoder shaft in one embodiment;
[0054] FIG9 is a structural block diagram of an oscillating device in another embodiment;
[0055] FIG10 is a block diagram of a control device for an oscillating device in one embodiment;
[0056] FIG. 11 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0058] The head shaking device control method provided in the embodiment of the present application can be applied to the application environment shown in FIG. 1 , wherein in the application environment shown in FIG. 1 , the user does not need to control the head shaking device with the help of an APP, but can flexibly and conveniently adjust the head shaking control parameters of the head shaking device 100 through manual operation, such as manually rotating the head shaking structure of the head shaking device 100 , thereby meeting the personalized head shaking control parameter needs of users who are not good at using APP or electronic devices. Based on this, the product provider of the head shaking device 100 does not need to develop an additional remote control program / APP for the head shaking device 100 , and can provide users with a head shaking device 100 that can flexibly and conveniently adjust the head shaking control parameters without increasing excessive development costs, so that users can conveniently control the head shaking device 100 to achieve head shaking at any angle and direction.
[0059] Specifically, in the application environment shown in FIG. 1 , after the shaking device 100 is powered on, the user can trigger the shaking start instruction by short pressing the shaking key set on the shaking device 100, and the shaking device 100 can receive the shaking start instruction. Within the first preset time after receiving the shaking start instruction, if the user manually rotates the shaking structure set on the shaking device 100, the shaking device 100 can automatically detect the rotation of the shaking structure of the shaking device 100, and determine the shaking angle and shaking direction of the shaking device 100 according to the detected rotation angle and rotation direction of the shaking structure. Further, if the user stops rotating the shaking structure, the shaking device 100 can also automatically detect that the shaking structure stops rotating, and in the case of detecting that the shaking structure stops rotating, if the shaking device 100 does not detect the rotation of the shaking structure within the second preset time after the shaking structure stops rotating, that is, the user does not rotate the shaking structure again, then the shaking device 100 can use the shaking angle and shaking direction determined when the shaking structure stops rotating as the shaking control parameters of the shaking device 100, and control the shaking of the shaking device 100 according to the shaking control parameters.
[0060] Among them, the shaking head device 100 is a device with a shaking head function, including but not limited to an electric fan, an air conditioning fan, a heater, etc. that can shake its head. Common shaking head structures include lever type, slide plate type and push-pull type, which can realize shaking head up and down, and can also realize shaking head left and right. The common shaking head structure currently on the market can be composed of a reduction mechanism and a connecting rod mechanism. The reduction mechanism can be composed of a worm gear, a worm, a tooth rod, and a shaking head gear. The connecting rod mechanism can be designed as a double rocker mechanism, a crank rocker mechanism, a crank slider mechanism, etc. Taking the realization of shaking head back and forth left and right as an example, the shaking head structure can be engaged with the matching worm gear through the worm gear. There is an eccentric shaft on the worm gear. Driven by the motor, the eccentric shaft drives the connecting rod to move back and forth, thereby driving the shaking head device to swing back and forth left and right.
[0061] It should be noted that the head shaking device 100 in the application environment shown in FIG. 1 can also develop a remote control function to be compatible with remote control and manual control. For example, a user who is not good at using APP or electronic devices can use the above-mentioned head shaking device control method to manually rotate the head shaking structure to achieve flexible and convenient control of the head shaking angle of the head shaking device 100, and a user who can use APP or electronic devices can use the corresponding APP or mini program to achieve flexible and convenient control of the head shaking angle of the head shaking device 100. During the process of the head shaking device 100 shaking its head, if the user does not need to continue to use the head shaking function of the head shaking device 100, the user can either trigger the head shaking off command by short pressing the head shaking key set on the head shaking device 100, or remotely trigger the head shaking off command with one click through the APP or mini program.
[0062] In one embodiment, as shown in FIG. 2 , a method for controlling an oscillating head device is provided, and the method is described by taking the oscillating head device 100 in FIG. 1 as an example, and includes the following steps:
[0063] Step 202, receiving a shaking head start instruction. Within the first preset time after receiving the shaking head start instruction, if the rotation of the shaking head structure of the shaking head device is detected, the shaking head angle and the shaking head direction of the shaking head device are determined according to the rotation angle and the rotation direction of the shaking head structure.
[0064] Among them, the first preset duration can be flexibly configured according to the actual scenario, such as 2 seconds, 3 seconds, 5 seconds, etc.
[0065] Optionally, after the shaking head device is powered on, the user can trigger the shaking head start instruction by short pressing the shaking head button set on the shaking head device. The shaking head device can receive the shaking head start instruction and automatically start timing when receiving the shaking head start instruction. Within the first preset time period after receiving the shaking head start instruction, if the user manually rotates the shaking head structure set on the shaking head device, the shaking head device can automatically detect the rotation of the shaking head structure of the shaking head device, and determine the shaking head angle and direction of the shaking head device according to the detected rotation angle and rotation direction of the shaking head structure. Among them, the user can also trigger the shaking head start instruction with one click through the APP or mini program, but in the subsequent process of personalized setting of the shaking head control parameters, the user can achieve it by manually rotating the shaking head structure, so as to avoid the elderly who are not good at using the APP or mini program from being unable to conveniently and flexibly control the shaking head angle and direction of the shaking head device after triggering the shaking head start instruction.
[0066] Exemplarily, after the shaking device is powered on, the user can trigger the shaking start instruction by short pressing the shaking key set on the shaking device, and the encoder of the shaking device can receive the shaking start instruction and start timing when the shaking start instruction is received. Within the first preset time after receiving the shaking start instruction, if the user manually rotates the shaking structure set on the shaking device, the axis of the shaking structure can drive the axis of the encoder to rotate, so that the encoder outputs a pulse signal (that is, the encoder detects the rotation of the shaking structure). Further, after the encoder detects the rotation of the shaking structure within the first preset time, the encoder can detect the rotation angle and rotation direction of the encoder axis based on the number of pulses and pulse frequency of the output pulse signal, thereby deriving the rotation angle and rotation direction of the axis of the shaking structure connected to the encoder axis, that is, calculating the rotation angle and rotation direction of the shaking structure, and then determining the shaking angle and shaking direction of the shaking device. Among them, gears are arranged on the circumference of the encoder axis, and the number of gears is known; gears are also arranged on the circumference of the axis of the shaking structure, and the number of gears is known; the gears on the axis of the shaking structure are connected to the gears on the axis of the encoder.
[0067] Exemplarily, the encoder in this embodiment is specifically a rotary encoder, which can also be called a shaft encoder, which is mainly used to measure the mechanical operating parameters such as the angle, speed, direction or displacement of a rotating object. The mechanical motion parameters of the rotating object can be converted into corresponding pulse signal outputs, and then the rotation angle and rotation direction of the shaft can be detected by processing the pulse signal. Among them, the rotary encoder usually works on the photoelectric or magnetoelectric principle. The photoelectric rotary encoder can use the grating disk and the photoelectric detector to produce light and dark changes during the rotation process, and then generate electrical signals; the magnetoelectric rotary encoder can use the magnetic field induction changes during the rotation of the shaft to generate electrical signals. The rotary encoder can also be divided into two types: incremental encoder and absolute encoder. The incremental encoder can generate a series of periodic pulse signals (two pulse signals) as the encoder shaft rotates. The number of pulses can be used to determine the rotation angle of the shaft, and the phase relationship between the two pulse signals can be used to determine the rotation direction of the shaft.
[0068] Step 204, when the shaking structure stops rotating, if the rotation of the shaking structure is not detected within a second preset time after the shaking structure stops rotating, the shaking angle and shaking direction determined when the shaking structure stops rotating are used as shaking control parameters of the shaking device.
[0069] Among them, the second preset duration can be flexibly configured according to the actual scenario, such as 2 seconds, 3 seconds, 5 seconds, etc.
[0070] Optionally, if the user stops rotating the shaking structure, the shaking device may also automatically detect that the shaking structure has stopped rotating. When the shaking device detects that the shaking structure has stopped rotating, it may start timing. If the shaking device does not detect the rotation of the shaking structure within a second preset time after the shaking structure stops rotating, that is, the user does not rotate the shaking structure again, the shaking device may use the shaking angle and shaking direction determined when the shaking structure stops rotating as the shaking control parameters of the shaking device.
[0071] For example, if the user stops rotating the shaking head structure, the axis of the shaking head structure in the shaking head device will stop driving the axis of the encoder in the shaking head device to rotate, causing the encoder to stop outputting pulse signals, that is, allowing the encoder to automatically detect that the shaking head structure has stopped rotating. When it is detected that the shaking head structure has stopped rotating, the encoder can automatically start timing. If the encoder does not detect the rotation of the shaking head structure again within a second preset time after the shaking head structure stops rotating, that is, the user does not rotate the shaking head structure again, the encoder can transmit the shaking head angle and shaking head direction determined when the shaking head structure stops rotating to the controller in the shaking head device, and the controller can use the received shaking head angle and shaking head direction as shaking head control parameters of the shaking head structure.
[0072] Step 206, controlling the shaking device to shake according to the shaking control parameters.
[0073] Exemplarily, the controller in the shaking head device can transmit the determined shaking head control parameters of the shaking head structure to the stepper motor in the shaking head device, so that the stepper motor drives the shaking head structure to operate according to the shaking head control parameters, that is, drives the axis of the shaking head structure to start rotating, thereby causing the shaking head device to shake.
[0074] For example, taking an oscillating head device with fan blades as an example, after receiving the oscillating head control parameters, the stepper motor in the oscillating head device can drive the fan blades to rotate and drive the oscillating head structure to start running, so that the oscillating head device can blow air while shaking its head.
[0075] It should be noted that, during the process of controlling the shaking head device to shake its head, the user can control the shaking head device to stop shaking its head at any time by short pressing the shaking head key on the shaking head device, so that the shaking head device can continue to work normally without shaking its head.
[0076] The above-mentioned method for controlling a shaking head device receives a shaking head start instruction. Within a first preset time period after receiving the shaking head start instruction, if the rotation of the shaking head structure of the shaking head device is detected, the shaking head angle and the shaking head direction of the shaking head device can be determined according to the rotation angle and the rotation direction of the shaking head structure. In the case where the shaking head structure stops rotating, if the rotation of the shaking head structure is not detected within a second preset time period after the shaking head structure stops rotating, the shaking head angle and the shaking head direction determined when the shaking head structure stops rotating are used as the shaking head control parameters of the shaking head device, thereby controlling the shaking of the shaking head of the shaking head device according to the shaking head control parameters. During the whole process, the shaking head control parameters of the shaking head device can be flexibly adjusted according to the detected rotation direction and rotation angle of the shaking head structure.
[0077] In one embodiment, the shaking head device control method further includes:
[0078] If the rotation of the shaking structure is not detected within the first preset time period, and the historical shaking control parameters determined in the historical period are stored, the shaking device is controlled to shake according to the historical shaking control parameters.
[0079] Optionally, if the shaking device does not detect the rotation of the shaking structure within the first preset time after receiving the shaking start instruction, that is, the user has triggered the shaking start instruction but has not rotated the shaking structure, then if the historical shaking control parameters determined in the historical period are stored, the shaking device can control its own shaking according to the historical shaking control parameters. If the historical shaking control parameters determined in the historical period are not stored, the shaking device can obtain the default shaking control parameters, and then control its own shaking according to the default shaking control parameters. Among them, the historical shaking control parameters can specifically be the shaking control parameters personalized by the user in the historical period, and the default shaking control parameters are the shaking control parameters that come with the shaking device in the factory settings, such as the fixed angles of 30°, 60°, 120°, and 150° surround wind shaking.
[0080] Exemplarily, after the shaking head device is powered on, the user can trigger the shaking head start command by short pressing the shaking head key set on the shaking head device. The encoder of the shaking head device can receive the shaking head start command and start timing when the shaking head start command is received. If the encoder does not detect the rotation of the shaking head structure within the first preset time length, the encoder will not pass the shaking head control parameters to the controller in the shaking head device. At this time, the controller can determine whether the historical shaking head control parameters are stored in the memory of the shaking head device. If the historical shaking head control parameters are stored in the memory, the controller can pass the historical shaking head control parameters to the stepper motor so that the stepper motor controls the shaking head of the shaking head device according to the historical shaking head control parameters. If the historical shaking head control parameters are not stored in the memory, the controller can read the default shaking head control parameters from the memory and pass the default shaking head control parameters to the stepper motor so that the stepper motor controls the shaking head of the shaking head device according to the default shaking head control parameters.
[0081] Based on the above embodiments, as shown in FIG3, a flow chart of controlling the shaking of the shaking device based on the historical shaking control parameters or the default shaking control parameters is provided, which mainly includes the following steps:
[0082] Step 302, the shaking device is turned on;
[0083] If no shaking head start instruction is received after the device is turned on, step 304 is executed, and the shaking head device works without shaking the head;
[0084] If a shaking head start command is received after the power-on, and within the first preset time after receiving the shaking head start command, the rotation of the shaking head structure of the shaking head device is not detected, it is determined whether the historical shaking head control parameters are stored; if the historical shaking head control parameters are stored, step 306 is executed to obtain the historical shaking head control parameters, and the shaking head device is controlled to shake according to the historical shaking head control parameters; if the historical shaking head control parameters are not stored, step 308 is executed to obtain the default shaking head control parameters, and the shaking head device is controlled to shake according to the default shaking head control parameters;
[0085] If a shaking start command is received after the device is turned on, and the rotation of the shaking structure of the shaking device is detected within a first preset time after the shaking start command is received, step 310 is executed to determine the shaking angle and the shaking direction of the shaking device according to the rotation angle and the rotation direction of the shaking structure;
[0086] If the shaking structure does not stop the current rotation, then return to step 310;
[0087] In the case where the shaking structure stops rotating, if the rotation of the shaking structure is detected within the second preset time after the shaking structure stops rotating, the process also returns to step 310 to update the determined shaking angle and shaking direction; wherein the updated shaking angle and shaking direction will automatically overwrite the previously determined shaking angle and shaking direction;
[0088] When the shaking head structure stops rotating, if the rotation of the shaking head structure is not detected within the second preset time length after the shaking head structure stops rotating, step 312 is executed, and the shaking head angle and shaking direction determined when the shaking head structure stops rotating are used as the shaking head control parameters of the shaking head device; then step 314 is executed to control the shaking head of the shaking head device according to the shaking head control parameters.
[0089] In this embodiment, after the shaking head device is turned on, if the user does not choose to personalize the shaking head control parameters, the shaking head device can be controlled to shake according to the stored historical shaking head control parameters or the default shaking head control parameters to meet the different usage requirements of the user.
[0090] In a possible implementation, based on FIG. 3 , a flow chart of controlling the shaking device to shake its head based on the shaking angle threshold is provided, as shown in FIG. 4 , step 310 further includes steps 402 to 406, wherein:
[0091] Step 402, determining the target shaking direction of the shaking device and the target shaking angle of the shaking device in the target shaking direction according to the rotation angle and the rotation direction of the shaking structure.
[0092] Optionally, each time the user rotates the shaking head structure, on the one hand, before the rotation, the shaking head structure may have a certain rotation angle relative to the default position (a preset position without angle deflection), and on the other hand, the user may rotate the shaking head structure back and forth. Based on this, on the basis of the position of the shaking head structure before the rotation, the shaking head device can determine the target shaking direction of the shaking head structure relative to the default position at the end of this rotation, and the target shaking angle in the target shaking direction relative to the default position according to the rotation angle and rotation direction when the user rotates the shaking head structure, that is, determine the target shaking direction of the shaking head device and the target shaking angle of the shaking head device in the target shaking direction.
[0093] Exemplarily, when the default position of the shaking device has been recorded in the encoder, during the shaking process of the shaking device (whether the user manually rotates the head or the shaking device automatically shakes during operation), the encoder in the shaking device can determine the shaking direction and shaking angle of the shaking device when it stops shaking by the rotation of the shaking structure during the shaking process. Based on this, if before the user rotates the shaking structure a certain time, the encoder has determined that the shaking structure has rotated 40 degrees to the right relative to the default position, and during the user's rotation of the shaking structure, the user first manually rotates 30° to the right, then rotates 20° to the left, and then stops the rotation, then the encoder can determine that the final target shaking direction of the shaking device is "right", and the target shaking angle in the target shaking direction is 40°+30°-20°=50°.
[0094] If the target shaking angle is greater than or equal to the shaking angle threshold of the shaking device, step 404 is executed to use the shaking angle threshold as the shaking angle of the shaking device.
[0095] Among them, the shaking angle threshold can be flexibly configured according to the actual application scenario.
[0096] Optionally, if the target shaking angle reached by the user rotating the shaking structure of a shaking device is greater than or equal to the shaking angle threshold of the shaking device, the encoder in the shaking device may use the shaking angle threshold as the shaking angle of the shaking device.
[0097] For example, take the example that the shaking angle threshold of a certain shaking device in one direction is set to 150° (150° in each direction of the left and right directions), but the shaking structure of the shaking device supports 360° shaking, that is, it supports 180° rotation in each direction of the left and right directions. If the user manually rotates the shaking structure of the shaking device, so that the target shaking direction calculated by the encoder in the shaking device is "right", and the target shaking angle in the target shaking direction is 155°, then the encoder can compare the target shaking angle of 155° with the shaking angle threshold of 150°, and because the target shaking angle of 155° is greater than the shaking angle threshold of 150°, the shaking angle threshold of 150° is used as the shaking angle of the shaking device.
[0098] If the target shaking angle is less than the shaking angle threshold, step 406 is executed to use the target shaking angle as the shaking angle of the shaking device.
[0099] Optionally, if the target shaking angle reached by the user rotating the shaking structure of a shaking device is less than the shaking angle threshold of the shaking device, the encoder in the shaking device may use the target shaking angle as the shaking angle of the shaking device.
[0100] For example, taking the example of a shaking device with a single-direction shaking angle threshold set to 180° (180° in each direction), if the user manually rotates the shaking structure of the shaking device, so that the target shaking direction calculated by the encoder in the shaking device is "right", and the target shaking angle in the target shaking direction is 140°, the encoder can compare the target shaking angle of 140° with the shaking angle threshold of 150°, and because the target shaking angle of 140° is less than the shaking angle threshold of 180°, the target shaking angle of 140° is used as the shaking angle of the shaking device.
[0101] In this embodiment, considering the limitation of the shaking angle threshold of the shaking device, the shaking angle for controlling the shaking device to shake can be determined in combination with the actual situation of the shaking angle threshold.
[0102] In an exemplary embodiment, based on FIG. 4 , a flow chart of a method for controlling a shaking device supporting resetting shaking control parameters is provided, as shown in FIG. 5 , further comprising steps 502 to 506, wherein:
[0103] (1) When the shaking device shakes its head, if a shaking control parameter clearing instruction is received, step 502 is executed to control the shaking device to stop running.
[0104] Among them, the shaking head control parameters personalized set by the user at the current time, or the historical shaking head control parameters personalized set by the user in the historical period, can be cleared. However, the default shaking head control parameters configured when the shaking head device leaves the factory cannot be cleared.
[0105] Optionally, after the controller in the shaking head device obtains the shaking head control parameter, if the historical shaking head control parameter is not stored in the memory of the shaking head device, the controller will automatically write the shaking head control parameter into the memory for storage; if the historical shaking head control parameter is stored in the memory, the controller will automatically write the newly determined shaking head control parameter into the memory to automatically overwrite the historical shaking head control parameter. Based on this, in the process of the shaking head device shaking its head, if the shaking head device is controlled to shake its head based on the newly acquired shaking head control parameter, and the controller in the shaking head device receives a shaking head control parameter clearing instruction, the controller will automatically control the shaking head device to stop running and delete the shaking head control parameter stored in the memory. If the shaking head device is controlled to shake its head based on the historical shaking head control parameter, and the controller in the shaking head device receives a shaking head control parameter clearing instruction, the controller will automatically control the shaking head device to stop running and delete the historical shaking head control parameter stored in the memory. Among them, if the shaking head device is equipped with fan blades, stopping operation means: the shaking head device stops shaking its head, and the fan blades in the shaking head device stop rotating.
[0106] For example, the user can trigger the head shaking control parameter clearing instruction by long pressing the head shaking key set on the head shaking device (a short press can be used to trigger the head shaking on instruction or the head shaking off instruction). If the head shaking device is compatible with the remote control function, the user can also trigger the head shaking control parameter clearing instruction through remote control, and then manually rotate the head shaking structure to personalize the new head shaking control parameters.
[0107] (2) If the rotation of the oscillating head structure is not detected within the third preset time period after the oscillating head device stops running, return to step 308, that is, obtain the default oscillating head control parameters, and control the oscillating head device to oscillate according to the default oscillating head control parameters.
[0108] For example, if the user does not re-personalize the head shaking control parameters after clearing the personalized head shaking control parameters / historical head shaking control parameters, the controller can obtain the default head shaking control parameters from the memory and pass the default head shaking control parameters to the stepper motor, so that the stepper motor drives the head shaking structure to operate according to the default head shaking control parameters, thereby controlling the head shaking device to shake.
[0109] (3) If the rotation of the oscillating structure is detected within the third preset time period after the oscillating device stops running, execute step 504 to determine the detected rotation angle and rotation direction.
[0110] Among them, the third preset duration can be flexibly configured according to the actual scenario, such as 2 seconds, 3 seconds, 5 seconds, etc.
[0111] Optionally, when the controller controls the shaking head device to stop running, the encoder can automatically start timing. If the encoder detects the rotation of the shaking head structure within a third preset time period after the shaking head device stops running, the rotation angle and rotation direction of the detected shaking head structure are further determined.
[0112] (4) Step 506: Update the shaking control parameters of the shaking device according to the detected rotation angle and rotation direction, and control the shaking device to shake according to the updated shaking control parameters.
[0113] Optionally, the encoder can determine the shaking angle and shaking direction of the shaking device based on the detected rotation angle and rotation direction, and send the newly determined shaking angle and shaking direction to the controller. The controller can use the received shaking angle and shaking direction as new shaking control parameters, write them into the controller, and pass them to the stepper motor, so that the stepper motor drives the shaking structure to operate according to the updated shaking control parameters, thereby controlling the shaking of the shaking device.
[0114] In this embodiment, during the shaking process of the shaking device, the user can clear the personalized shaking control parameters and continue to control the shaking of the shaking device according to the new shaking control parameters set by the user, which can fully meet the user's personalized needs for the shaking control parameters.
[0115] In a specific application, as shown in FIG6 , taking the shaking device as a shaking fan as an example, based on the various embodiments of the shaking device control method, a flow chart of controlling the shaking of the fan is provided, which mainly includes the following process:
[0116] (1) Turn on the fan.
[0117] (2) Determine whether the user chooses to control the fan to shake. If not, control the fan to operate without shaking. If yes, determine whether the fan's shaking structure rotates within 5 seconds through the encoder in the fan.
[0118] (3) If rotation occurs, the encoder first determines the target swing direction caused by the rotation, takes the target swing direction as the swing direction of the fan, and determines whether the target swing angle at the target swing angle reaches the swing angle threshold. If not, the target swing angle is used as the fan's swing angle. If it is reached, the swing angle threshold is used as the fan's swing angle. That is, the encoder in the fan can output the fan's swing angle and swing direction.
[0119] Furthermore, the encoder sends the shaking angle and shaking direction to the controller, and the controller uses the received shaking angle and shaking direction as shaking control parameters, updates the shaking control parameters in the memory, and transmits the shaking control parameters to the stepper motor.
[0120] (4) If no rotation occurs and historical swing control parameters are stored in the memory, the controller reads the historical swing control parameters from the memory and transmits the historical swing control parameters to the stepper motor.
[0121] If the historical oscillating head control parameters are not stored in the memory, the controller reads the default oscillating head control parameters from the memory and transmits the default oscillating head control parameters to the stepper motor.
[0122] (5) The stepper motor controls the fan to move according to the received parameters.
[0123] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0124] The embodiment of the present application further provides a shaking head device 700 capable of executing the shaking head control method, as shown in FIG7 , comprising:
[0125] The shaking structure 702 is used to set the shaking angle and shaking direction of the shaking device 700;
[0126] The encoder 704, the gear on the shaft of the encoder 704, is connected to the gear on the shaft of the oscillating structure 702; when the oscillating structure 702 rotates, the shaft of the oscillating structure 702 drives the shaft of the encoder 704 to rotate, so that the encoder 704 outputs a pulse signal, and calculates the oscillating angle and oscillating direction of the oscillating device 700 based on the pulse signal;
[0127] The controller 706 is used to receive the swing angle and swing direction calculated by the encoder 704, and use the swing angle and swing direction as the swing control parameters of the swing structure 702, and transmit the swing control parameters to the stepping motor 708;
[0128] The stepper motor 708 is used to drive the oscillating structure 702 to operate according to the oscillating control parameters, so that the oscillating device 700 oscillates.
[0129] Exemplarily, the above-mentioned shaking head device 700 performs each step in the above-mentioned shaking head device control method as an example for explanation, the encoder 704 can receive a shaking head start instruction, and start timing after receiving the shaking head start instruction. Within the first preset time after receiving the shaking head start instruction, if the encoder 704 detects the rotation of the shaking head structure 702 of the shaking head device 700, the encoder 704 can detect the rotation angle and rotation direction of the shaking head structure 702, and determine the shaking head angle and shaking head direction of the shaking head device 700 according to the rotation angle and rotation direction of the shaking head structure 702. Further, in the case where the encoder 704 detects that the shaking head structure 702 stops rotating, if the rotation of the shaking head structure 702 is not detected within the second preset time after the shaking head structure 702 stops rotating, the encoder 704 can send the shaking head angle and shaking head direction determined when the shaking head structure 702 stops rotating to the controller 706. The controller 706 can use the received shaking angle and shaking direction as the shaking control parameters of the shaking device 700, and pass the shaking control parameters to the stepper motor 708, so that the stepper motor 708 drives the axis of the shaking structure 702 to rotate according to the shaking control parameters, thereby controlling the shaking of the shaking device 700.
[0130] The above-mentioned shaking device 700 includes: a shaking structure 702, an encoder 704, a controller 706 and a stepper motor 708. The shaking angle and shaking direction of the shaking device 700 can be set through the shaking structure 702. Specifically, when the shaking structure 702 rotates, the axis of the encoder 704 can be driven to rotate through the axis of the shaking structure 702, so that the encoder 704 outputs a pulse signal, and the shaking angle and shaking direction of the shaking device 700 are calculated based on the pulse signal. Further, the controller 706 can receive the shaking angle and shaking direction calculated by the encoder 704, and use the shaking angle and shaking direction as the shaking control parameters of the shaking structure 702, and transmit the shaking control parameters to the stepper motor 708. The stepper motor 708 drives the shaking structure 702 to operate according to the shaking control parameters, so that the shaking device 700 shakes, that is, the shaking control parameters of the shaking device 700 can be flexibly adjusted according to the rotation direction and rotation angle of the shaking structure 702.
[0131] In one embodiment, the number of gears on the shaft of the shaking head structure 702 is greater than the number of gears on the shaft of the encoder 704 .
[0132] Exemplarily, as shown in FIG8 , a schematic diagram of the gears on the shaft of the shaking head structure 702 and the gears on the shaft of the encoder 704 are connected. When the shaft of the shaking head structure 702 rotates, the shaft of the encoder 704 is driven to rotate. Among them, the number of gears on the shaft of the shaking head structure 702 is greater than the number of gears on the shaft of the encoder 704, which can reduce the calculation output error of the encoder 704. The reduction ratio between the gears on the shaft of the shaking head structure 702 and the gears on the shaft of the encoder 704 can be flexibly configured according to actual needs. For example, the scale plate on the encoder 704 can be set with 60 scales. If the encoder 704 rotates coaxially with the shaking head structure 702, the error of one scale on the encoder 704 is 1 / 60. If the encoder 704 and the shaking head structure 702 do not rotate coaxially, the reduction ratio can be set to 1:2, so that the error of one scale on the encoder 704 is reduced to 1 / 120.
[0133] In this embodiment, the gear on the shaft of the shaking structure 702 can be set as a large gear, and the gear on the shaft of the encoder 704 can be set as a small gear, so as to reduce the output error of the encoder 704 and ensure that the shaking control parameters of the shaking device 700 can be accurately calculated.
[0134] In one embodiment, as shown in FIG. 9 , the shaking head device 700 further includes: a memory 710 connected to the controller 706 ; the controller 706 writes the shaking head control parameters into the memory 710 for storage.
[0135] For example, whenever the controller 706 receives the calculated shaking angle and shaking parameter sent by the encoder 704, the controller 706 can use the received shaking angle and shaking parameter as shaking control parameters and write them into the memory 710 for storage. If the memory 710 stores historical shaking control parameters, the newly written shaking control parameters will automatically overwrite the historical shaking control parameters.
[0136] For example, if the controller 706 receives a head shaking control parameter clearing instruction, the controller 706 will automatically clear the head shaking control parameters / historical head shaking control parameters in the memory 710 .
[0137] In this embodiment, the head shaking control parameters may be stored in the memory 710 for subsequent use.
[0138] In one embodiment, the shaking device 700 includes at least one of a fan, an air conditioning fan, and a heater.
[0139] Based on the same inventive concept, the embodiment of the present application also provides a shaking head device control device for implementing the shaking head device control method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more shaking head device control device embodiments provided below can refer to the limitations of the shaking head device control method above, and will not be repeated here.
[0140] In one embodiment, as shown in FIG. 10 , a shaking device control device is provided, comprising: a rotation detection module 1002 , a control parameter determination module 1004 and a shaking device control module 1006 , wherein:
[0141] A rotation detection module, for receiving a shaking head start instruction, and within a first preset time period after receiving the shaking head start instruction, if the rotation of the shaking head structure of the shaking head device is detected, determining the shaking head angle and the shaking head direction of the shaking head device according to the rotation angle and the rotation direction of the shaking head structure;
[0142] a control parameter determination module, for, when the shaking structure stops rotating, if the rotation of the shaking structure is not detected within a second preset time after the shaking structure stops rotating, using the shaking angle and shaking direction determined when the shaking structure stops rotating as the shaking control parameters of the shaking device;
[0143] The shaking head control module is used to control the shaking head device to shake according to the shaking head control parameters.
[0144] The above-mentioned shaking head device control device receives a shaking head start instruction. Within the first preset time after receiving the shaking head start instruction, if the rotation of the shaking head structure of the shaking head device is detected, the shaking head angle and the shaking head direction of the shaking head device can be determined according to the rotation angle and the rotation direction of the shaking head structure. In the case where the shaking head structure stops rotating, if the rotation of the shaking head structure is not detected within the second preset time after the shaking head structure stops rotating, the shaking head angle and the shaking head direction determined when the shaking head structure stops rotating are used as the shaking head control parameters of the shaking head device, so as to control the shaking of the shaking head device according to the shaking head control parameters. In the whole process, the shaking head control parameters of the shaking head device can be flexibly adjusted according to the detected rotation direction and rotation angle of the shaking head structure.
[0145] In one embodiment, the rotation detection module is further used to: if no rotation of the shaking structure is detected within a first preset time period, and historical shaking control parameters determined in a historical period are stored, control the shaking device to shake according to the historical shaking control parameters.
[0146] In one of the embodiments, the rotation detection module is also used to: determine the target shaking direction of the shaking device and the target shaking angle of the shaking device in the target shaking direction based on the rotation angle and rotation direction of the shaking structure; if the target shaking angle is equal to the shaking angle threshold of the shaking device, use the shaking angle threshold as the shaking angle of the shaking device; if the target shaking angle is less than the shaking angle threshold, use the target shaking angle as the shaking angle of the shaking device.
[0147] In one of the embodiments, the head shaking device control device also includes a parameter clearing module, which is used to: during the head shaking process of the head shaking device, if a head shaking control parameter clearing instruction is received, control the head shaking device to stop running; if within a third preset time period after the head shaking device stops running, the rotation of the head shaking structure is detected, determine the detected rotation angle and rotation direction; update the head shaking control parameters of the head shaking device according to the detected rotation angle and rotation direction, and control the head shaking device to shake according to the updated head shaking control parameters.
[0148] In one embodiment, the parameter clearing module is also used to: if the rotation of the shaking head structure is not detected within a third preset time period after the shaking head device stops running, obtain the default shaking head control parameters, and control the shaking head device to shake according to the default shaking head control parameters.
[0149] Each module in the above-mentioned head shaking device control device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0150] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG11. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store shaking device control data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a shaking device control method is implemented.
[0151] Those skilled in the art will understand that the structure shown in FIG. 11 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0152] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0153] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0154] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0155] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0156] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0157] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0158] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for controlling a shaking device, It is characterized in that The method comprises: receiving a shaking head start instruction, and within a first preset time period after receiving the shaking head start instruction, if the rotation of the shaking head structure of the shaking head device is detected, determining the shaking head angle and the shaking head direction of the shaking head device according to the rotation angle and the rotation direction of the shaking head structure; In the case where the shaking head structure stops rotating, if the rotation of the shaking head structure is not detected within a second preset time period after the shaking head structure stops rotating, the shaking angle and shaking direction determined when the shaking head structure stops rotating are used as shaking control parameters of the shaking head device; The shaking device is controlled to shake according to the shaking control parameter.
2. The method according to claim 1, It is characterized in that The method further comprises: If the rotation of the shaking structure is not detected within the first preset time period, and historical shaking control parameters determined in a historical period are stored, the shaking device is controlled to shake according to the historical shaking control parameters.
3. The method according to claim 1, It is characterized in that The step of determining the shaking angle and the shaking direction of the shaking device according to the rotation angle and the rotation direction of the shaking structure comprises: Determining a target shaking direction of the shaking device and a target shaking angle of the shaking device in the target shaking direction according to the rotation angle and the rotation direction of the shaking structure; If the target shaking angle is greater than or equal to the shaking angle threshold of the shaking device, the shaking angle threshold is used as the shaking angle of the shaking device; If the target shaking angle is less than the shaking angle threshold, the target shaking angle is used as the shaking angle of the shaking device.
4. The method according to claim 1, It is characterized in that The method further comprises: During the process of the shaking of the head device, if a shaking control parameter clearing instruction is received, the shaking of the head device is controlled to stop running; If the rotation of the shaking structure is detected within a third preset time period after the shaking device stops running, determining the detected rotation angle and rotation direction; According to the detected rotation angle and rotation direction, the shaking control parameters of the shaking device are updated, and the shaking device is controlled to shake according to the updated shaking control parameters.
5. The method according to claim 4, It is characterized in that The method further comprises: If the rotation of the shaking head structure is not detected within a third preset time period after the shaking head device stops running, a default shaking head control parameter is obtained, and the shaking head device is controlled to shake according to the default shaking head control parameter.
6. A shaking head device, It is characterized in that The shaking head device comprises: A shaking structure, used to set the shaking angle and shaking direction of the shaking device; An encoder, wherein the gear on the shaft of the encoder is connected to the gear on the shaft of the oscillating structure; when the oscillating structure rotates, the shaft of the oscillating structure drives the shaft of the encoder to rotate, so that the encoder outputs a pulse signal, and calculates the oscillating angle and oscillating direction of the oscillating device based on the pulse signal; A controller, used for receiving the shaking angle and shaking direction calculated by the encoder, and using the shaking angle and shaking direction as shaking control parameters of the shaking structure, and transmitting the shaking control parameters to the stepping motor; The stepper motor is used to drive the oscillating structure to operate according to the oscillating control parameters, so that the oscillating device oscillates.
7. The oscillating head device according to claim 6, It is characterized in that The number of gears on the shaft of the shaking head structure is greater than the number of gears on the shaft of the encoder.
8. The oscillating head device according to claim 6, It is characterized in that The shaking head device also includes: A memory connected to the controller; the controller writes the head shaking control parameters into the memory for storage.
9. A shaking device control device, It is characterized in that The device comprises: A rotation detection module, for receiving a shaking head start instruction, and within a first preset time period after receiving the shaking head start instruction, if the rotation of the shaking head structure of the shaking head device is detected, determining the shaking head angle and the shaking head direction of the shaking head device according to the rotation angle and the rotation direction of the shaking head structure; a control parameter determination module, configured to, when the oscillating structure stops rotating, use the oscillating angle and oscillating direction determined when the oscillating structure stops rotating as the oscillating control parameters of the oscillating device if the rotation of the oscillating structure is not detected within a second preset time period after the oscillating structure stops rotating; The shaking control module is used to control the shaking device to shake according to the shaking control parameters.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
11. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
12. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
