Switching method and device of air intake passage, processor and electronic equipment
Patent Information
- Application Number
- CN202310916449.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-24
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-07-24
AI Technical Summary
[0005]本申请的主要目的在于提供一种进气通道的切换方法、装置、处理器以及电子设备,以解决相关技术中液体调料投放机在切换投送不同的调料时,耗电量大、耗时长的问题
[0016] This application employs the following steps: During the operation of the discharge device, the sub-intake channel currently connected to the main intake channel is designated as the first sub-intake channel; the target liquid to be discharged is determined, and the sub-intake channel connected to the target storage container is designated as the second sub-intake channel, wherein the target storage container is used to store the target liquid; the number value of the first sub-intake channel is used as the first channel number value, and the number value of the second sub-intake channel is used as the second channel number value; the motor direction is determined based on the numerical relationship between the first channel number value and the second channel number value, and the motor operation is controlled based on the direction; during the motor operation, the potentiometer value of the potentiometer connected to the motor is detected, and if the potentiometer value is the same as the potentiometer value associated with the second sub-intake channel, the motor is controlled to stop operating. This solves the problem of high power consumption and long operation time when switching between different seasonings in related technologies. By determining the currently connected sub-intake channel and the sub-intake channel to be switched, and determining the motor direction based on the channel values of the two sub-intake channels, and then controlling the motor operation based on the direction, the switching time of the sub-intake channels is reduced, and the power consumption cost is lowered.
Smart Images

Figure CN117530609B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart devices, and more specifically, to a method, apparatus, processor, and electronic device for switching air intake channels. Background Technology
[0002] With the fast pace of life, the use of smart devices in the cooking process has become a development trend. Among them, adding seasonings is a crucial step, requiring proper timing and precise quantity control. The market demand for liquid seasoning dispensers is increasing, and the energy consumption requirements for small appliances such as liquid seasoning dispensers are also becoming more stringent.
[0003] However, current liquid seasoning dispensers on the market require the seasoning box to be reset to the origin position of the positioning sensor each time a different seasoning is dispensed. Then, the seasoning box is rotated at the corresponding angle according to the position number of the seasoning to be dispensed. Furthermore, the entire seasoning box must be rotated each time a different seasoning is dispensed. The rotation process requires a high-power motor to provide the corresponding torque. Therefore, liquid seasoning dispensers also need to be designed with circuits that can withstand higher power.
[0004] There is currently no effective solution to the problem of high power consumption and long time consumption when switching between different seasonings in liquid seasoning dispensers in related technologies. Summary of the Invention
[0005] The main objective of this application is to provide a method, device, processor, and electronic device for switching air intake channels, in order to solve the problems of high power consumption and long time consumption when switching between different seasonings in related technologies.
[0006] To achieve the above objectives, according to one aspect of this application, a method for switching air intake channels is provided. The method includes: during the operation of the discharge device, determining a sub-air intake channel currently connected to the main air intake channel as a first sub-air intake channel; determining the target liquid to be discharged, and determining a sub-air intake channel connected to a target storage container as a second sub-air intake channel, wherein the target storage container is used to store the target liquid; using the number value of the first sub-air intake channel as a first channel number value, and the number value of the second sub-air intake channel as a second channel number value; determining the direction of rotation of the motor based on the numerical relationship between the first channel number value and the second channel number value, and controlling the motor to operate based on the direction of rotation; during the operation of the motor, detecting the potentiometer value of a potentiometer connected to the motor, and controlling the motor to stop operating when the potentiometer value is the same as the potentiometer value associated with the second sub-air intake channel.
[0007] Optionally, determining the motor's direction of rotation based on the numerical relationship between the first channel number value and the second channel number value, and controlling the motor's operation based on this rotation, includes: determining whether the first channel number value is greater than the second channel number value; if the first channel number value is greater than the second channel number value, calculating the difference between the first and second channel number values to obtain a first difference, and determining the motor's direction of rotation based on the first difference; if the first channel number value is less than the second channel number value, calculating the difference between the second and first channel number values to obtain a second difference, and determining the motor's direction of rotation based on the second difference; if the first channel number value is equal to the second channel number value, controlling the motor to stop rotating. By determining the relationship between the two channel number values, and then determining whether the motor needs to rotate and the direction of rotation based on this numerical relationship, and controlling the motor to rotate according to the corresponding direction, a low-energy-consumption rotation trajectory can be obtained, thereby reducing energy consumption.
[0008] Optionally, determining the motor's rotation direction based on the first difference includes: determining whether the first difference is greater than a preset threshold, wherein the preset threshold is determined by the number of sub-intake channels; if the first difference is greater than the preset threshold, setting the motor's rotation direction to clockwise; if the first difference is less than the preset threshold, setting the motor's rotation direction to counterclockwise; if the first difference is equal to the preset threshold, setting the motor's rotation direction to counterclockwise, or setting the motor's rotation direction to clockwise. By judging the relationship between the difference between the first channel number value and the second channel number value and the preset threshold, the motor's rotation direction is accurately determined based on the judgment result, so that when the motor rotates in the changed direction to switch sub-intake channels, a shorter channel switching time is obtained.
[0009] Optionally, determining the motor's rotation direction based on the second difference includes: determining whether the second difference is greater than a preset threshold, wherein the preset threshold is determined by the number of sub-intake channels; if the second difference is greater than the preset threshold, setting the motor's rotation direction to counterclockwise; if the second difference is less than the preset threshold, setting the motor's rotation direction to clockwise; if the second difference is equal to the preset threshold, setting the motor's rotation direction to counterclockwise, or setting the motor's rotation direction to clockwise. By judging the relationship between the difference between the second channel number value and the first channel number value and the preset threshold, the motor's rotation direction is accurately determined based on the judgment result, resulting in a shorter channel switching time when the motor rotates in the changed direction to switch sub-intake channels.
[0010] Optionally, the preset threshold is determined as follows: The total number of sub-intake channels included in the channel switching module is determined; if the total number is even, the ratio of the total number to two is determined as the preset threshold; if the total number is odd, the ratio of the total number to two is rounded down, and the rounded value is determined as the preset threshold. By setting a reasonable preset threshold and using it as a control condition for motor steering, a foundation is laid for switching sub-intake channels in a short time.
[0011] Optionally, before obtaining the number values of the first sub-intake channel and the second channel, the method further includes: determining the position of each sub-intake channel in the channel switching module, determining the channel number value of each sub-intake channel based on its position, and determining the potentiometer value associated with each sub-intake channel based on its channel number value. By determining the channel number value and potentiometer value for each sub-intake channel, a data basis is provided for channel switching.
[0012] Optionally, after the control motor stops running, the method further includes: inflating the target storage container through the main air intake channel and the second sub-air intake channel; and stopping the inflation when the inflation time reaches the target working time. By using the main air intake channel to inflate the container, a rapid discharge effect is achieved.
[0013] To achieve the above objectives, according to another aspect of this application, an air intake channel switching device is provided. The device includes: a first determining unit, configured to determine a sub-air intake channel currently connected to the main air intake channel as a first sub-air intake channel during the operation of the discharge device; a second determining unit, configured to determine the target liquid to be discharged and determine a sub-air intake channel connected to a target storage container as a second sub-air intake channel, wherein the target storage container is used to store the target liquid; a third determining unit, configured to use the number value of the first sub-air intake channel as a first channel number value and the number value of the second sub-air intake channel as a second channel number value; a fourth determining unit, configured to determine the direction of rotation of the motor based on the numerical relationship between the first channel number value and the second channel number value, and control the motor operation based on the direction of rotation; and a detection unit, configured to detect the potentiometer value of a potentiometer connected to the motor during motor operation, and control the motor to stop operation when the potentiometer value is the same as the potentiometer value associated with the second sub-air intake channel.
[0014] According to another aspect of the present invention, a processor is also provided, which is used to run a program, wherein the program controls a device containing a non-volatile storage medium to perform an intake channel switching method during runtime.
[0015] According to another aspect of the present invention, an electronic device is also provided, comprising one or more processors and a memory; the memory stores computer-readable instructions, and the processor is configured to execute the computer-readable instructions, wherein the computer-readable instructions, when executed, perform an intake channel switching method.
[0016] This application employs the following steps: During the operation of the discharge device, the sub-intake channel currently connected to the main intake channel is designated as the first sub-intake channel; the target liquid to be discharged is determined, and the sub-intake channel connected to the target storage container is designated as the second sub-intake channel, wherein the target storage container is used to store the target liquid; the number value of the first sub-intake channel is used as the first channel number value, and the number value of the second sub-intake channel is used as the second channel number value; the motor direction is determined based on the numerical relationship between the first channel number value and the second channel number value, and the motor operation is controlled based on the direction; during the motor operation, the potentiometer value of the potentiometer connected to the motor is detected, and if the potentiometer value is the same as the potentiometer value associated with the second sub-intake channel, the motor is controlled to stop operating. This solves the problem of high power consumption and long operation time when switching between different seasonings in related technologies. By determining the currently connected sub-intake channel and the sub-intake channel to be switched, and determining the motor direction based on the channel values of the two sub-intake channels, and then controlling the motor operation based on the direction, the switching time of the sub-intake channels is reduced, and the power consumption cost is lowered. Attached Figure Description
[0017] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0018] Figure 1 This is a schematic diagram of the discharge device provided according to the embodiments of this application;
[0019] Figure 2 This is a flowchart of an intake channel switching method provided according to an embodiment of this application;
[0020] Figure 3 This is a schematic diagram of the channel conversion module of the discharge device provided according to an embodiment of this application;
[0021] Figure 4 This is a schematic diagram of an optional air intake channel switching method provided according to an embodiment of this application;
[0022] Figure 5 This is a schematic diagram of an air intake channel switching device provided according to an embodiment of this application;
[0023] Figure 6This is a schematic diagram of an electronic device provided according to an embodiment of this application.
[0024] Among them, 101 is the pump body; 102 is the pressure sensor; 103 is the channel switching module; 104 is the liquid storage container; 105 is the discharge port; 106 is the first pipe; 107 is the second pipe; 108 is the third pipe; 109 is the motor; and 110 is the liquid outlet motor. Detailed Implementation
[0025] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] It should be noted that all information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are information and data authorized by the user or fully authorized by all parties.
[0029] Figure 1 This is a schematic diagram of the discharge device provided according to the embodiments of this application, such as... Figure 1As shown, the discharge device includes: a pump body 101, a pressure sensor 102, a channel switching module 103, multiple liquid storage containers 104, and a discharge port 105. The pump body 101 and the inlet of the channel switching module 103 are connected by a first pipe 106. The multiple outlets of the channel switching module 103 are connected to different liquid storage containers 104 by second pipes 107, and the different liquid storage containers 104 are connected to the discharge port 105 by third pipes 108. The first pipe 106 can be a main air inlet channel, the second pipe 107 can be a sub-air inlet channel, and the third pipe 108 can be a liquid outlet channel.
[0030] The pump body 101 can be an air pump, with both blowing and suction functions. The pump body 101 is connected to a switching module via a first pipe 106. The switching module 103 includes multiple sub-intake channels, connected to the outlets of different sub-intake channels and different liquid storage containers 104 via a second pipe 107. The switching of the sub-intake channels can be controlled by a motor 109, which can be a stepper motor. The liquid storage containers 104 can be seasoning storage tanks, with different tanks storing different liquid seasonings. A third pipe 108 connects the different seasoning storage tanks to a discharge port 105, which is a dispensing tap. The dispensing tap motor 110 controls the rotation of the dispensing tap. During operation, the switching module 103 switches the sub-intake channels and controls the air pump to blow air, thereby using the blowing pressure to transport the seasonings from the corresponding seasoning storage tanks to the dispensing tap and add them to the dish. The pressure sensor 102 can be installed inside the first pipe 106. When the air pump blows air, the liquid depth decreases after the liquid is discharged, and the required air supply pressure decreases. The pressure sensor 102 can convert the measured pressure value into the current weight of the seasoning.
[0031] The present invention will now be described in conjunction with preferred implementation steps. Figure 2 This is a flowchart of the intake channel switching method provided according to an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:
[0032] Step S201: During the operation of the discharge device, the sub-inlet channel currently connected to the main inlet channel is determined as the first sub-inlet channel.
[0033] It should be noted that the discharging device can store various liquid seasonings or beverages. When the stored liquid needs to be retrieved, the discharging device is activated, and the discharging device outputs different types of liquids by switching the sub-inlet channel.
[0034] When discharging liquid through the discharge device, the motor 109 is needed to provide power for switching the sub-inlet channel. With the power support, the discharge device switches from the currently connected sub-inlet channel to the sub-inlet channel corresponding to the liquid required this time. Before discharging liquid, the currently connected sub-inlet channel needs to be obtained first to get the first sub-inlet channel.
[0035] Step S202: Determine the target liquid to be discharged, and designate the sub-inlet channel connected to the target storage container as the second sub-inlet channel, wherein the target storage container is used to store the target liquid.
[0036] Specifically, when the dispensing device is a condiment dispensing device, the target liquid may include liquid condiments such as cooking oil, soy sauce, and vinegar. When the dispensing device is a beverage dispensing device, the target liquid may also include beverages such as fruit juice and soft drinks. For example, when the dispensing device is a condiment dispensing device, the user uses cooking oil and then soy sauce to season the food. Therefore, the first sub-intake channel is the channel for dispensing cooking oil, and the second sub-intake channel is the channel for dispensing soy sauce. The target liquid is soy sauce. After determining the sub-intake channels connected to the main intake channel of the current dispensing device, the sub-intake channel corresponding to the target storage container for storing the target liquid can be determined according to the required target liquid, that is, the second sub-intake channel is determined.
[0037] Step S203: Use the number value of the first sub-intake channel as the first channel number value, and use the number value of the second sub-intake channel as the second channel number value.
[0038] When switching sub-intake channels using motor 109, it is necessary to determine the sub-intake channel to be switched and the currently connected sub-intake channel. Therefore, it is necessary to determine the number value of the currently connected sub-intake channel and the number value of the sub-intake channel to be switched.
[0039] Step S204: Determine the direction of rotation of motor 109 based on the numerical relationship between the first channel number value and the second channel number value, and control motor 109 to operate based on the direction of rotation.
[0040] The direction of rotation of motor 109 is determined by the numerical relationship between the number values. Optionally, in the intake channel switching method provided in this application embodiment, determining the direction of rotation of motor 109 based on the numerical relationship between the first channel number value and the second channel number value, and controlling the operation of motor 109 based on the direction of rotation includes: determining whether the first channel number value is greater than the second channel number value; if the first channel number value is greater than the second channel number value, calculating the difference between the first channel number value and the second channel number value to obtain a first difference, and determining the direction of rotation of motor 109 based on the first difference; if the first channel number value is less than the second channel number value, calculating the difference between the second channel number value and the first channel number value to obtain a second difference, and determining the direction of rotation of motor 109 based on the second difference; if the first channel number value is equal to the second channel number value, controlling motor 109 to stop rotating.
[0041] Specifically, when the first channel number value of the first sub-intake channel is equal to the second channel number value of the second sub-intake channel, it indicates that the currently connected sub-intake channel is the sub-intake channel required by the user, and there is no need to control the motor 109 to rotate.
[0042] If the first channel number of the first sub-intake channel is not equal to the second channel number of the second sub-intake channel, it indicates that the currently connected sub-intake channel is different from the sub-intake channel required by the user, and the sub-intake channel needs to be switched. The motor 109 needs to be controlled to rotate. By judging the size relationship between the first and second sub-intake channels, the direction with the shorter switching distance is determined, and the direction of rotation of the motor 109 is further determined. The sub-intake channel can be switched in a clockwise or counterclockwise direction. When the switching distance is shorter in the clockwise direction, the direction of rotation of the motor 109 is clockwise. When the switching distance is shorter in the counterclockwise direction, the direction of rotation of the motor 109 is counterclockwise.
[0043] This embodiment determines the relationship between the two channel number values, and then determines whether the motor 109 needs to rotate and the direction of rotation based on the numerical relationship. By controlling the motor 109 to rotate according to the corresponding direction, a rotation trajectory with low energy consumption can be obtained, thereby reducing power consumption.
[0044] In step S205, during the operation of motor 109, the potentiometer value of the potentiometer connected to motor 109 is detected. If the potentiometer value is the same as the potentiometer value associated with the second sub-intake channel, motor 109 is controlled to stop operating.
[0045] After determining the switching direction of motor 109 based on the first and second channel number values, motor 109 starts and controls the main air intake channel switching according to the direction of rotation. Simultaneously, the potentiometer value in the discharge device is detected. When the potentiometer value matches the value associated with the second sub-intake channel, it indicates that the main air intake channel of the discharge device is now connected to the second sub-intake channel of the target liquid to be discharged, and motor 109 can be stopped.
[0046] The air intake channel switching method provided in this application embodiment involves, during the operation of the discharge device, determining the sub-air intake channel currently connected to the main air intake channel as the first sub-air intake channel; determining the target liquid to be discharged and determining the sub-air intake channel connected to the target storage container as the second sub-air intake channel, wherein the target storage container is used to store the target liquid; using the number value of the first sub-air intake channel as the first channel number value and the number value of the second sub-air intake channel as the second channel number value; determining the direction of rotation of the motor 109 based on the numerical relationship between the first channel number value and the second channel number value, and controlling the motor 109 based on the direction of rotation. 9. Operation: During the operation of motor 109, the potentiometer value of the potentiometer connected to motor 109 is detected. If the potentiometer value is the same as the potentiometer value associated with the second sub-intake channel, motor 109 is controlled to stop operating. This solves the problem of high power consumption and long operation time when switching between different seasonings in related technologies. By determining the currently connected sub-intake channel and the sub-intake channel to be switched, the direction of motor 109 is determined based on the channel values of the two sub-intake channels. Then, the operation of motor 109 is controlled based on the direction of rotation, thereby reducing the switching time of sub-intake channels and reducing power consumption costs.
[0047] When the first channel number value is greater than the second channel number value, the direction of rotation can be determined based on the difference between the two and a preset threshold. Optionally, in the intake channel switching method provided in this application embodiment, determining the direction of rotation of the motor 109 based on the first difference includes: determining whether the first difference is greater than a preset threshold, wherein the preset threshold is determined by the number of sub-intake channels; if the first difference is greater than the preset threshold, setting the direction of rotation of the motor 109 to clockwise; if the first difference is less than the preset threshold, setting the direction of rotation of the motor 109 to counterclockwise; if the first difference is equal to the preset threshold, setting the direction of rotation of the motor 109 to counterclockwise, or setting the direction of rotation of the motor 109 to clockwise.
[0048] Specifically, if the currently connected sub-inlet channel is different from the sub-inlet channel required by the user, since the channel numbers representing the sub-inlet channels on the channel conversion module of the discharge device are arranged in a circular pattern, when controlling the motor 109 to switch the sub-inlet channel, the distance when the first sub-inlet channel represented by the first channel number value turns to the second sub-inlet channel represented by the second channel number value is first determined, that is, the relationship between the difference between the first channel number value and the second channel number value and the preset threshold is determined, and then the direction of rotation of the motor 109 is determined according to the relationship.
[0049] Since the circumference of the control panel of the discharge device is 360 degrees, when the two sub-inlet channels are in opposite positions, that is, when the angle formed by the two sub-inlet channels and the main inlet channel is 180 degrees, the power consumed when the direction of rotation of the motor 109 is set to counterclockwise or clockwise is equal. Therefore, the direction of rotation of the motor 109 can be either one. Thus, the preset threshold can be half of the total number of sub-inlet channels.
[0050] For example, Figure 3 This is a schematic diagram of the channel conversion module of the discharge device provided in the embodiments of this application, as shown below. Figure 3 As shown, the discharge device's container holds seven liquids, each corresponding to a sub-inlet channel. The channel numbers of the seven sub-inlet channels are arranged clockwise on the control panel of the discharge device. If the current sub-inlet channel is the fifth sub-inlet channel, it needs to switch to the first sub-inlet channel. The relationship between the channel number values of the two sub-inlet channels and a preset threshold is calculated. Switching from the fifth sub-inlet channel clockwise to the first sub-inlet channel consumes less energy than switching from the fifth sub-inlet channel counterclockwise to the first sub-inlet channel. Therefore, rotating the motor 109 clockwise saves more energy. So, when the first difference is greater than the preset threshold, the direction of rotation of the motor 109 is set to clockwise.
[0051] Furthermore, if the current sub-intake channel is the third sub-intake channel, and it is necessary to switch to the second sub-intake channel, the energy consumption of motor 109 is lower when switching from the third sub-intake channel to the second sub-intake channel in a clockwise direction compared to switching from the third sub-intake channel to the second sub-intake channel in a counterclockwise direction. Therefore, when the first difference is less than the preset threshold, the rotation direction of motor 109 is set to clockwise.
[0052] This embodiment determines the direction of motor 109 by judging the relationship between the difference between the first channel number value and the second channel number value and a preset threshold. This results in a shorter channel switching time when motor 109 rotates in the changed direction to switch the sub-intake channel.
[0053] When the first channel number value is less than the second channel number value, the direction of rotation can be determined based on the relationship between the difference and a preset threshold. Optionally, in the intake channel switching method provided in this application embodiment, determining the direction of rotation of the motor 109 based on the second difference includes: determining whether the second difference is greater than a preset threshold, wherein the preset threshold is determined by the number of sub-intake channels; if the second difference is greater than the preset threshold, setting the direction of rotation of the motor 109 to counterclockwise; if the second difference is less than the preset threshold, setting the direction of rotation of the motor 109 to clockwise; if the second difference is equal to the preset threshold, setting the direction of rotation of the motor 109 to counterclockwise, or setting the direction of rotation of the motor 109 to clockwise.
[0054] Specifically, when the first channel number value of the first sub-intake channel is less than the second channel number value of the second sub-intake channel, it indicates that the currently connected sub-intake channel is different from the sub-intake channel required by the user. It is necessary to determine the relationship between the difference between the second channel number value and the first channel number value and the preset threshold, and then determine the direction of rotation of the motor 109 based on the relationship.
[0055] For example, the discharging device's container holds seven liquids, each corresponding to a sub-inlet channel. The channel numbers of the seven sub-inlet channels are arranged clockwise on the control panel of the discharging device. If the current sub-inlet channel is the second sub-inlet channel, and it is necessary to switch to the sixth sub-inlet channel, the relationship between the channel numbers of the two sub-inlet channels and a preset threshold is calculated. Switching from the second sub-inlet channel clockwise to the sixth sub-inlet channel consumes less energy than switching from the second sub-inlet channel counterclockwise to the sixth sub-inlet channel. In other words, rotating the motor 109 counterclockwise saves more energy. Therefore, when the first difference is greater than the preset threshold, the direction of rotation of the motor 109 is set to counterclockwise.
[0056] Furthermore, if the current sub-intake channel is the third sub-intake channel, and it is necessary to switch to the sixth sub-intake channel, switching from the third sub-intake channel clockwise to the sixth sub-intake channel consumes less energy than switching from the third sub-intake channel counterclockwise to the sixth sub-intake channel. Therefore, when the first difference is less than a preset threshold, the rotation direction of the motor 109 is set to clockwise. This embodiment determines the direction of rotation of the motor 109 accurately based on the relationship between the difference between the second channel number value and the first channel number value and the preset threshold, so that when the motor 109 rotates in the changed direction to switch sub-intake channels, a shorter channel switching time is obtained.
[0057] The preset threshold is determined by the total number of sub-intake channels. Optionally, in the intake channel switching method provided in this application embodiment, the preset threshold is determined by the following method: determining the total number of sub-intake channels included in the channel switching module 103; when the total number is even, determining the ratio of the total number to two as the preset threshold; when the total number is odd, rounding down the ratio of the total number to two, and determining the rounded value as the preset threshold.
[0058] It should be noted that when the total number is even, half of the total number is an integer, so half of the total number can be directly determined as the preset threshold. When the total number is odd, half of the total number is a finite decimal, so this decimal needs to be rounded down to obtain the preset threshold. For example, when the total number of sub-intake channels is 6, the preset threshold can be 3, and when the total number of sub-intake channels is 7, since the ratio of the total number to two is 3.5, the preset threshold can also be 3. This embodiment lays the foundation for switching sub-intake channels in a short time by setting a reasonable preset threshold and using the preset threshold as the control condition for the rotation of motor 109.
[0059] Optionally, in the intake channel switching method provided in the embodiments of this application, before obtaining the number value of the first sub-intake channel and the number value of the second channel, the method further includes: determining the position of each sub-intake channel in the channel switching module 103, determining the channel number value of each sub-intake channel according to the position, and determining the potentiometer value associated with each sub-intake channel according to the channel number value of each sub-intake channel.
[0060] Specifically, before switching sub-intake channels, to accurately locate the sub-intake channel to be switched, the channel number value of each sub-intake channel needs to be determined based on its position in the discharge device. Furthermore, to accurately determine whether the switching of motor 109 is complete, a potentiometer with a variable resistor can be connected to motor 109, and a unique potentiometer value can be assigned to each sub-intake channel. When motor 109 switches to a certain sub-intake channel, the specific sub-intake channel can be determined based on the potentiometer value indicated by the connected potentiometer. This embodiment provides a data basis for channel switching by determining the channel number value and potentiometer value for each sub-intake channel.
[0061] Optionally, in the air intake channel switching method provided in the embodiments of this application, after the control motor 109 stops running, the method further includes: filling the target storage container with air through the main air intake channel and the second sub-air intake channel; and stopping the filling when the filling time reaches the target working time.
[0062] Specifically, during the channel switching process of the discharge device, the pump body 101 stops working. After the discharge device switching is completed, the pump body 101 starts to inflate the liquid storage container 104. The target working time of the pump body 101 needs to be calculated using the required liquid volume and the inflating flow rate of the pump body 101. As the pump body 101 inflates the liquid storage container 104, the internal pressure of the liquid storage container 104 gradually exceeds the external atmospheric pressure. Under the action of pressure, the liquid inside the container will enter the liquid outlet channel from the bottom and finally flow out of the liquid outlet. When the pump body 101 reaches the target working time, it indicates that the output liquid volume has reached the required liquid volume. This embodiment achieves the effect of rapid discharge by using the main air inlet channel to inflate the container.
[0063] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0064] This application also provides a method for switching air intake channels. Figure 4 This is a schematic diagram of an optional intake channel switching method provided according to an embodiment of this application, such as... Figure 4 As shown, the method includes:
[0065] When discharging liquid using the discharge device, motor 109 is needed to provide power for switching sub-inlet channels. With this power, the discharge device switches from the previous sub-inlet channel to the sub-inlet channel corresponding to the liquid required this time. During the operation of the discharge device, the sub-inlet channel currently connected to the main inlet channel is first determined, resulting in the first sub-inlet channel. Then, the sub-inlet channel connected to the target liquid to be discharged and the target storage container storing that target liquid is determined, resulting in the second sub-inlet channel.
[0066] Furthermore, after determining the number values of the first sub-intake channel and the second sub-intake channel, the direction of rotation of the motor 109 is determined based on the numerical relationship between the first channel number value and the second channel number value. That is, when the first channel number value is greater than the second channel number value, the relationship between the difference between the first channel number value and the second channel number value and a preset threshold is judged. If the first difference is greater than the preset threshold, the direction of rotation of the motor 109 is set to clockwise; if the first difference is less than the preset threshold, the direction of rotation of the motor 109 is set to counterclockwise.
[0067] When the first channel number value is less than the second channel number value, the relationship between the difference between the second channel number value and the first channel number value and a preset threshold is calculated. If the second difference is greater than the preset threshold, the direction of rotation of the motor 109 is set to counterclockwise. If the second difference is less than the preset threshold, the direction of rotation of the motor 109 is set to clockwise. In this way, the operation of the motor 109 is controlled according to the direction of rotation of the motor 109.
[0068] Based on the operation of the steering control motor 109, after the motor 109 rotates, the main air inlet channel in the discharge device is connected to the second sub-air inlet channel, and the target storage container is filled with air based on the connection between the main air inlet channel and the second sub-air inlet channel. When the filling time reaches the target working time, the required liquid can be obtained.
[0069] This embodiment determines the currently connected sub-intake channel and the sub-intake channel to be switched, determines the direction of rotation of motor 109 based on the channel values of the two sub-intake channels, and then controls the operation of motor 109 based on the direction of rotation, thereby reducing the switching time of sub-intake channels and reducing power consumption costs.
[0070] This application also provides a sub-intake channel switching device. It should be noted that the sub-intake channel switching device of this application can be used to execute the intake channel switching method provided in this application. The intake channel switching device provided in this application will be described below.
[0071] Figure 5 This is a schematic diagram of an intake channel switching device provided according to an embodiment of this application, such as... Figure 5 As shown, the device includes: a first determining unit 50, a second determining unit 51, a third determining unit 52, a fourth determining unit 53, and a detection unit 54.
[0072] The first determining unit 50 is used to determine the sub-inlet channel currently connected to the main inlet channel as the first sub-inlet channel during the operation of the discharge device.
[0073] The second determining unit 51 is used to determine the target liquid that needs to be discharged, and to determine the sub-inlet channel connected to the target storage container as the second sub-inlet channel, wherein the target storage container is used to store the target liquid;
[0074] The third determining unit 52 is used to take the number value of the first sub-intake channel as the first channel number value and the number value of the second sub-intake channel as the second channel number value.
[0075] The fourth determining unit 53 is used to determine the direction of the motor based on the numerical relationship between the first channel number value and the second channel number value, and to control the operation of the motor based on the direction of the motor.
[0076] The detection unit 54 is used to detect the potentiometer value of the potentiometer connected to the motor during motor operation, and to control the motor to stop operating when the potentiometer value is the same as the potentiometer value associated with the second sub-intake channel.
[0077] Optionally, in the intake channel switching device provided in this application embodiment, the fourth determining unit 53 includes: a first determining module, used to determine whether the first channel number value is greater than the second channel number value; a first calculating module, used to calculate the difference between the first channel number value and the second channel number value when the first channel number value is greater than the second channel number value, to obtain a first difference, and to determine the direction of motor rotation based on the first difference; a second calculating module, used to calculate the difference between the second channel number value and the first channel number value when the first channel number value is less than the second channel number value, to obtain a second difference, and to determine the direction of motor rotation based on the second difference; and a control module, used to control the motor to stop rotating when the first channel number value is equal to the second channel number value.
[0078] Optionally, in the intake channel switching device provided in this application embodiment, the fourth determining unit 53 includes: a second determining module, used to determine whether the first difference is greater than a preset threshold, wherein the preset threshold is determined by the number of sub-intake channels; a first setting module, used to set the direction of motor rotation to clockwise when the first difference is greater than the preset threshold; a second setting module, used to set the direction of motor rotation to counterclockwise when the first difference is less than the preset threshold; and a third setting module, used to set the direction of motor rotation to counterclockwise or clockwise when the first difference is equal to the preset threshold.
[0079] Optionally, in the intake channel switching device provided in this application embodiment, the fourth determining unit 53 includes: a third judging module, used to judge whether the second difference is greater than a preset threshold, wherein the preset threshold is determined by the number of sub-intake channels; a fourth setting module, used to set the direction of motor rotation to counterclockwise when the second difference is greater than the preset threshold; a fifth setting module, used to set the direction of motor rotation to clockwise when the second difference is less than the preset threshold; and a sixth setting module, used to set the direction of motor rotation to counterclockwise or clockwise when the second difference is equal to the preset threshold.
[0080] Optionally, in the intake channel switching device provided in this application embodiment, the fourth determining unit 53 includes: a preset threshold determined by the following methods: a first determining module, used to determine the total number of sub-intake channels included in the channel switching module; a second determining module, used to determine the ratio of the total number to two as the preset threshold when the total number is even; and a third determining module, used to round down the ratio of the total number to two when the total number is odd, and determine the rounded value as the preset threshold.
[0081] Optionally, in the intake channel switching device provided in the embodiments of this application, the device further includes: a fifth determining unit, used to determine the position of each sub-intake channel in the channel switching module before obtaining the number value of the first intake channel and the number value of the second channel, determine the channel number value of each sub-intake channel according to the position, and determine the potentiometer value associated with each sub-intake channel according to the channel number value of each sub-intake channel.
[0082] Optionally, in the sub-intake channel switching device provided in the embodiments of this application, the device further includes: an inflation unit, used to inflate the target storage container through the main intake channel and the second sub-intake channel after the control motor stops running; and a stop unit, used to stop inflation when the inflation time reaches the target working time.
[0083] The air intake channel switching device provided in this application embodiment includes a first determining unit 50, used to determine the sub-air intake channel currently connected to the main air intake channel as the first sub-air intake channel during the operation of the discharge device; a second determining unit 51, used to determine the target liquid to be discharged and to determine the sub-air intake channel connected to the target storage container as the second sub-air intake channel, wherein the target storage container is used to store the target liquid; a third determining unit 52, used to use the number value of the first sub-air intake channel as the first channel number value and the number value of the second sub-air intake channel as the second channel number value; and a fourth determining unit 53, used to determine the relationship between the first channel number value and the second channel number value. The numerical relationship is used to determine the direction of the motor and control the motor operation based on the direction of rotation. The detection unit 54 is used to detect the potentiometer value of the potentiometer connected to the motor during the motor operation. When the potentiometer value is the same as the potentiometer value associated with the second sub-intake channel, the motor is controlled to stop. This solves the problem of high power consumption and long time consumption when switching between different seasonings in related technologies. By determining the currently connected sub-intake channel and the sub-intake channel to be switched, the direction of the motor is determined according to the channel values of the two sub-intake channels, and then the motor operation is controlled according to the direction of rotation. This achieves the effect of reducing the switching time of the sub-intake channel and reducing power consumption costs.
[0084] The intake channel switching device includes a processor and a memory. The first determining unit 50, the second determining unit 51, the third determining unit 52, the fourth determining unit 53, the detection unit 54, etc. are all stored in the memory as program units. The processor executes the program units stored in the memory to realize the corresponding functions.
[0085] The processor contains a kernel, which retrieves the corresponding program unit from memory. One or more kernels can be configured, and adjusting kernel parameters can address the issues of high power consumption and long processing times in liquid condiment dispensers when switching between different condiments.
[0086] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0087] This invention provides a computer-readable storage medium storing a program that, when executed by a processor, implements a method for switching air intake channels.
[0088] This invention provides a processor for running a program, wherein the program executes an intake channel switching method during runtime.
[0089] Figure 6 This is a schematic diagram of an electronic device provided according to an embodiment of this application, such as... Figure 6 As shown, this embodiment of the invention provides an electronic device 60, which includes a processor, a memory, and a program stored in the memory and executable on the processor. The processor is used to execute computer-readable instructions, wherein the computer-readable instructions execute an intake channel switching method. The device described herein may be a server, PC, PAD, mobile phone, etc.
[0090] This application also provides a computer program product that, when executed on a data processing device, is suitable for performing an intake channel switching method.
[0091] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0092] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0093] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0094] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0095] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0096] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0097] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0098] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0099] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0100] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for switching intake channels, characterized in that, The method is applied in a channel switching module of a discharge device. The channel switching module includes a main air inlet channel and multiple sub-air inlet channels. The channel switching module controls the connection between the main air inlet channel and the inlet of one of the multiple sub-air inlet channels. The outlet of each sub-air inlet channel is connected to a liquid storage container via a liquid outlet channel. During the operation of the discharge device, the sub-intake channel currently connected to the main air intake channel is designated as the first sub-intake channel; The target liquid to be discharged is determined, and the sub-inlet channel connected to the target storage container is designated as the second sub-inlet channel, wherein the target storage container is used to store the target liquid; The number value of the first sub-intake channel is used as the first channel number value, and the number value of the second sub-intake channel is used as the second channel number value; The direction of the motor is determined based on the numerical relationship between the first channel number value and the second channel number value, and the operation of the motor is controlled based on the direction of the motor. During the operation of the motor, the potentiometer value of the potentiometer connected to the motor is detected. If the potentiometer value is the same as the potentiometer value associated with the second sub-intake channel, the motor is controlled to stop operating.
2. The method according to claim 1, characterized in that, Determining the motor's direction of rotation based on the numerical relationship between the first channel number value and the second channel number value, and controlling the motor's operation based on the direction of rotation, includes: Determine whether the first channel number value is greater than the second channel number value; If the first channel number value is greater than the second channel number value, calculate the difference between the first channel number value and the second channel number value to obtain a first difference, and determine the direction of rotation of the motor based on the first difference; If the first channel number value is less than the second channel number value, calculate the difference between the second channel number value and the first channel number value to obtain a second difference, and determine the direction of rotation of the motor based on the second difference; When the first channel number value is equal to the second channel number value, the motor is controlled to stop rotating.
3. The method according to claim 2, characterized in that, Determining the direction of rotation of the motor based on the first difference includes: Determine whether the first difference is greater than a preset threshold, wherein the preset threshold is determined by the number of sub-intake channels; If the first difference is greater than the preset threshold, the direction of the motor rotation is set to clockwise. If the first difference is less than the preset threshold, the direction of the motor rotation is set to counterclockwise. If the first difference is equal to the preset threshold, the direction of the motor rotation is set to counterclockwise or clockwise.
4. The method according to claim 2, characterized in that, Determining the direction of rotation of the motor based on the second difference includes: Determine whether the second difference is greater than a preset threshold, wherein the preset threshold is determined by the number of sub-intake channels; If the second difference is greater than the preset threshold, the direction of the motor rotation is set to counterclockwise. If the second difference is less than the preset threshold, the direction of the motor rotation is set to clockwise. If the second difference is equal to the preset threshold, the direction of the motor rotation is set to counterclockwise or clockwise.
5. The method according to claim 3 or 4, characterized in that, The preset threshold is determined in the following way: Determine the total number of sub-intake channels included in the channel switching module; When the total number is even, the ratio of the total number to two is determined as the preset threshold. When the total number is odd, the ratio of the total number to two is rounded down, and the rounded value is determined as the preset threshold.
6. The method according to claim 1, characterized in that, Before obtaining the number value of the first sub-intake channel and the number value of the second channel, the method further includes: The position of each sub-intake channel in the channel switching module is determined, the channel number value of each sub-intake channel is determined based on the position, and the potentiometer value associated with each sub-intake channel is determined based on the channel number value of each sub-intake channel.
7. The method according to claim 1, characterized in that, After controlling the motor to stop operating, the method further includes: The target storage container is filled with air through the main air intake channel and the second sub-air intake channel; Stop inflating once the target working time has been reached.
8. An intake channel switching device, characterized in that, include: The first determining unit is used to determine the sub-inlet channel currently connected to the main inlet channel as the first sub-inlet channel during the operation of the discharge device. The second determining unit is used to determine the target liquid that needs to be discharged, and to determine the sub-inlet channel connected to the target storage container as the second sub-inlet channel, wherein the target storage container is used to store the target liquid; The third determining unit is used to take the number value of the first sub-intake channel as the first channel number value and the number value of the second sub-intake channel as the second channel number value. The fourth determining unit is used to determine the direction of the motor based on the numerical relationship between the first channel number value and the second channel number value, and to control the operation of the motor based on the direction of the motor. The detection unit is used to detect the potentiometer value of the potentiometer connected to the motor during the operation of the motor, and to control the motor to stop operating when the potentiometer value is the same as the potentiometer value associated with the second sub-intake channel.
9. A processor, characterized in that, The processor is used to run a program, wherein the program executes the intake channel switching method according to any one of claims 1 to 7.
10. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the intake channel switching method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Control method, feeding method, feeding device and cooking equipment
CN113974417A
Cooking utensil control method, cooking device, storage medium and processor
CN114947567A