Bean grinder adaptive quantitative control method and system based on deep learning
By collecting weight data in real time in the coffee grinder and calculating the powder rate using a trend fitting algorithm, combined with dynamic adaptive safety threshold control of motor operation, the problems of poor dynamic adaptability and insufficient inertia compensation in the coffee grinder during the grinding process are solved, achieving precise quantitative control and convenient operation.
Patent Information
- Application Number
- CN202511623719.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2026-02-10
AI Technical Summary
Existing coffee grinders have poor dynamic adaptability during the grinding process and cannot adjust the powder output rate in real time, resulting in a large deviation between the predicted time and the actual stopping time. In addition, insufficient inertia compensation causes the actual powder output to exceed the target value.
Weighing sensors are used to collect weight data in real time. The powder rate is calculated through a trend fitting algorithm. Combined with dynamic adaptive safety threshold control, the motor operation is controlled. Deep learning is used to optimize the control process and achieve precise quantitative control.
It improves the accuracy of coffee grinder output control, reduces the deviation between the actual output and the target output, simplifies the operation process, and enhances ease of use.
Smart Images

Figure CN121500752A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of coffee grinder control technology, specifically to an adaptive quantitative control method and system for coffee grinders based on deep learning. Background Technology
[0002] A coffee grinder is a common kitchen appliance primarily used for grinding coffee beans to make coffee. During the grinder's operation, the position of the coffee basket and the control of the amount of coffee grounds are two key factors that directly affect the taste and quality of the coffee.
[0003] The shortcomings of existing technologies are: 1. Poor dynamic adaptability: Traditional methods do not consider the real-time changes in powder output rate during the grinding process, resulting in a large deviation between the predicted time and the actual stopping time; 2. Insufficient inertia compensation: After the motor stop command is issued, the rotor continues to rotate for 0.5-1 seconds due to inertia, causing the actual powder output to exceed the target value. Existing technologies compensate for this with a fixed delay (such as stopping 0.6 seconds in advance), but this cannot adapt to the differences in inertia between different motor models or load conditions. Summary of the Invention
[0004] To address the aforementioned technical problems, a deep learning-based adaptive quantitative control method and system for coffee grinders is provided. This technical solution solves the problems mentioned in the background section.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: In a first aspect of the present invention, a deep learning-based adaptive quantitative control method for a coffee grinder is provided, comprising: Weighing sensors are used to collect weight data at a fixed frequency during the grinding process of the coffee grinder. Each weight data point corresponds to a specific acquisition time, forming a weight data sequence. ,in For a point in time, This represents the weight value at that moment; Based on N consecutive weight data points collected in real time, the powder output rate at the current moment is calculated using a trend fitting algorithm. Based on the calculated real-time powder output rate and the target weight value retrieved from the database, the time required to reach the target weight value is calculated using a preset calculation formula to obtain the predicted time. The predicted time is compared with the dynamically adaptive safety threshold time to control the operation of the grinder's motor; After the grinding cycle is completed, the final stable weight value is recorded as the actual achieved weight. The grinding weight error is calculated, and the safety threshold time is updated based on this error for the next grinding control.
[0006] Preferably, the powder dispensing rate at the current moment is calculated using a trend fitting algorithm based on N consecutive weight data points collected in real time. Specifically, it includes: Obtain the collected weight data sequence Select the latest and continuous N weight data points from them. , ... ; Linear regression was used as the trend fitting algorithm. Linear regression was performed on the selected N weight data points to construct... The fitted straight line, the The first weight value among N weight data points, The slope is, and The powder output rate at the current moment ; The slope is calculated using the least squares method, and the formula is as follows: .
[0007] Preferably, the step of calculating the time required to reach the target weight value based on the calculated real-time powder output rate and the target weight value retrieved from the database, using a preset calculation formula, to obtain the predicted time, specifically includes: Determine the current time Obtain from the collected weight data sequence corresponding ,Should The weight value at the current moment. ; Retrieve the target weight value from the database. , target weight value Weight value at the current moment Perform the subtraction and obtain the difference value; Divide the difference by Corresponding powder output rate To obtain the predicted time; The formula for calculating the predicted time is: .
[0008] Preferably, the step of comparing the predicted time with the dynamically adaptive safety threshold time to control the operation of the grinder's motor specifically includes: Obtain the calculated prediction time And retrieve the dynamically adaptive security threshold from the database. ; Predict time With dynamic adaptive safety threshold Perform a comparison; If the predicted time Less than or equal to When this happens, a stop command is sent to the motor of the coffee grinder; If the predicted time Greater than When necessary, the coffee grinder motor will continue to operate normally.
[0009] Preferably, the dynamic adaptive safety threshold time determination step includes: Under standard operating conditions, including identical temperature, humidity, and bean type, the flour extraction rate is kept constant. Multiple grinding experiments were conducted, and the response delay time of the motor from receiving the stop command to actually stopping completely was recorded. ; For multiple experiments The initial baseline delay time is obtained by taking the arithmetic mean: ; in, For the number of experiments, and ≥5; Under the same standard operating conditions, change the powder output rate to ( =1, 2, ..., K, K≥3), repeat the experiment and record the corresponding delay time. ; A model relating delay time to powder output rate was established using linear regression fitting. ; in, The rate correction coefficient is calculated using the least squares method; Real-time acquisition of current ambient temperature and humidity; correction of baseline delay time using lookup tables or formulas: ; in, and These are the compensation coefficients for temperature and humidity, respectively. and These are the real-time ambient temperature and humidity, respectively. Delay time adjusted based on the current powder dispensing rate A dynamic safety threshold is generated based on a preset buffer time ΔT, where ΔT ranges from 0.2s to 0.5s. .
[0010] Preferably, after the grinding cycle is completed, the final stable weight value is recorded as the actual achieved weight, the grinding weight error is calculated, and the safety threshold time is updated based on this error for the next grinding control, specifically including: After the grinding cycle is completed, the actual weight achieved in the current grinding cycle is acquired and recorded by a weighing sensor. ; Based on the preset target weight value The weight error of this grinding process is calculated as follows: ; If the calculation yields If >0, it indicates insufficient grinding. If the value is less than 0, it indicates that the grinding process is too heavy; The safe threshold time for the next grinding based on the weight error. The update will be performed, and the update rules are as follows: ; in, This is the safety threshold adjustment factor, with a value of 0.05. Set upper and lower limits for the updated security threshold time: ≤ ; in, and These are the preset minimum and maximum safety threshold times, respectively; Updated security threshold time Motor stop control applied to the next grinding cycle.
[0011] Preferably, the system stores the corresponding ( ) for different types of coffee beans preset by the user. , The mapping table uses a neural network for self-learning to achieve precise control over different types of coffee beans.
[0012] Preferably, when the weighing sensor acquires weight data sequences in real time, it further includes filtering the acquired weight data, specifically including: Dynamic noise analysis is performed on the weight data sequence to calculate the instantaneous rate of change between adjacent sampling points. And determine the type of noise: like If the noise type is determined to be impulse noise, then the noise type is determined to be impulse noise. If so, the noise type is determined to be high-frequency random noise, and the... This is the preset noise threshold; Median filtering algorithm is used for window data containing impulse noise. The window length is 2 +1, replace with the median value .
[0013] In a second aspect of the invention, a deep learning-based adaptive quantitative control system for a coffee grinder is also provided, comprising: The data acquisition module uses a weighing sensor to collect weight data at a fixed frequency during the grinding process of the coffee grinder. Each weight data point corresponds to a specific acquisition time, forming a weight data sequence. ,in For a point in time, This represents the weight value at that moment; The first calculation module is used to calculate the powder output rate at the current moment based on N consecutive weight data points collected in real time using a trend fitting algorithm. The second calculation module is used to calculate the time required to reach the target weight value based on the calculated real-time powder output rate and the target weight value retrieved from the database, and to obtain the predicted time. The control module is used to compare the predicted time with the dynamically adaptive safety threshold time to control the operation of the grinder's motor. The update module is used to record the final stable weight value as the actual achieved weight after the grinding cycle ends, calculate the weight error of grinding, and update the safety threshold time based on the error for the next grinding control.
[0014] In a third aspect of the invention, an electronic device is also provided. The electronic device includes at least one processor; and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect of the invention.
[0015] Compared with existing technologies, this invention provides an adaptive quantitative control method for coffee grinders based on deep learning, which has the following beneficial effects: This invention uses a weighing sensor to collect weight data at a fixed frequency, forming a weight data sequence. Based on real-time data, a trend fitting algorithm is used to calculate the current coffee powder dispensing rate, thereby accurately predicting the time required to reach the target weight value. This dynamic, real-time data acquisition and analysis method allows the coffee grinder to more accurately control the amount of coffee powder dispensed, effectively reducing the deviation between the actual and target dispensing amounts, improving the precision of quantitative control, and meeting the precise coffee powder quantity requirements in different scenarios. The predicted time is compared with a dynamically adaptive safety threshold time to control the grinder's motor operation, enabling the grinder to automatically adjust the motor's operating state based on the real-time dispensing situation. For example, if the predicted time to reach the target weight approaches the safety threshold time too early, the motor speed can be appropriately reduced to avoid excessive dispensing; conversely, the speed can be maintained or appropriately increased to ensure that the target weight is reached on time. The entire control process is highly automated. Users only need to set the target weight value, and the system can automatically complete a series of operations from data acquisition, dispensing rate calculation, predicted time acquisition to motor operation control, without the need for frequent manual intervention by the user. This greatly simplifies the operation process and improves ease of use, making it especially suitable for home users or non-professionals in commercial settings. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the method flow for S101-S105 in this invention; Figure 2 This is a schematic diagram of the method flow for S201-S203 in this invention; Figure 3 This is a schematic diagram of the method flow of S301-S303 in this invention; Figure 4 This is a schematic diagram of the method flow for S401-S404 in this invention. Detailed Implementation
[0017] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art. Example
[0018] Please refer to Figure 1 As shown, in a first aspect of the present invention, a deep learning-based adaptive quantitative control method for a coffee grinder is provided, comprising: S101. A weighing sensor is used to collect weight data during the grinding process of the coffee grinder at a fixed frequency. Each weight data point corresponds to a specific collection time, forming a weight data sequence. ,in For a point in time, This represents the weight value at that moment; S102. Based on N consecutive weight data points collected in real time, the powder output rate at the current moment is calculated using a trend fitting algorithm. S103. Based on the calculated real-time powder output rate and the target weight value retrieved from the database, the time required to reach the target weight value is calculated using a preset calculation formula to obtain the predicted time. S104. Compare the predicted time with the dynamically adaptive safety threshold time to control the operation of the grinder's motor. S105. After the grinding cycle is completed, record the final stable weight value as the actual achieved weight, calculate the grinding weight error, and update the safety threshold time based on the error for the next grinding control.
[0019] As will be understood by those skilled in the art, this invention uses a weighing sensor to collect weight data at a fixed frequency, forming a weight data sequence. Based on real-time data, a trend fitting algorithm is used to calculate the current coffee powder output rate, thereby accurately predicting the time required to reach the target weight value. This dynamic and real-time data acquisition and analysis method enables the coffee grinder to more accurately control the amount of coffee powder output, effectively reducing the deviation between the actual output and the target output, improving the accuracy of quantitative control, and meeting the precise requirements for coffee powder quantity in different scenarios. The predicted time is compared with the dynamically adaptive safety threshold time to control the operation of the coffee grinder's motor, allowing the coffee grinder to automatically adjust the motor's operating state according to the real-time coffee powder output. For example, if the predicted time to reach the target weight approaches the safety threshold too early, the motor speed can be appropriately reduced to avoid excessive powder output; conversely, the speed can be maintained or appropriately increased to ensure that the target weight is reached on time. The entire control process is highly automated. Users only need to set the target weight value, and the system can automatically complete a series of operations from data acquisition, powder output rate calculation, prediction time acquisition to motor operation control, without the need for frequent manual intervention by users. This greatly simplifies the operation process and improves the ease of use, making it especially suitable for home users or non-professionals in commercial settings.
[0020] Please refer to Figure 2 As shown, based on N consecutive weight data points collected in real time, the powder output rate at the current moment is calculated using a trend fitting algorithm. Specifically, it includes: S201. Obtain the collected weight data sequence. Select the latest and continuous N weight data points from them. , ... ; S202. Using linear regression as the trend fitting algorithm, linear regression is performed on the selected N weight data points to construct... The fitted straight line, The first weight value among N weight data points. The slope is, and The powder output rate at the current moment ; S203. Calculate the slope using the least squares method. The formula is: .
[0021] Please refer to Figure 3 As shown, based on the calculated real-time powder output rate and the target weight value retrieved from the database, a preset calculation formula is used to calculate the time required to reach the target weight value, thus obtaining the predicted time. Specifically, this includes: S301. Determine the current time. Obtain from the collected weight data sequence corresponding ,Should The weight value at the current moment. ; S302. Retrieve the target weight value from the database. , target weight value Weight value at the current moment Perform the subtraction and obtain the difference value; S303, Divide the difference by Corresponding powder output rate To obtain the predicted time; The formula for calculating the predicted time is: .
[0022] Please refer to Figure 4 As shown, the predicted time is compared with the dynamically adaptive safety threshold time to control the operation of the grinder's motor, specifically including: S401. Obtain the calculated prediction time. And retrieve the dynamically adaptive security threshold from the database. ; S402, Predicting Time With dynamic adaptive safety threshold Perform a comparison; S403, If the predicted time Less than or equal to When this happens, a stop command is sent to the motor of the coffee grinder; S404, If the predicted time Greater than When necessary, the coffee grinder motor will continue to operate normally.
[0023] The steps for determining the dynamic adaptive safety threshold time include: Under standard operating conditions, including the same temperature, humidity, and bean type, the flour extraction rate is kept constant. Multiple grinding experiments were conducted, and the response delay time of the motor from receiving the stop command to actually stopping completely was recorded. ; For multiple experiments The initial baseline delay time is obtained by taking the arithmetic mean: ; in, For the number of experiments, and ≥5; Under the same standard operating conditions, change the powder output rate to ( =1, 2, ..., K, K≥3), repeat the experiment and record the corresponding delay time. ; A model relating delay time to powder output rate was established using linear regression fitting. ; in, The rate correction coefficient is calculated using the least squares method; Real-time acquisition of current ambient temperature and humidity; correction of baseline delay time using lookup tables or formulas: ; in, and These are the compensation coefficients for temperature and humidity, respectively. and These are the real-time ambient temperature and humidity, respectively. Delay time adjusted based on the current powder dispensing rate A dynamic safety threshold is generated based on a preset buffer time ΔT, where ΔT ranges from 0.2s to 0.5s. .
[0024] After the grinding cycle is completed, the final stable weight value is recorded as the actual achieved weight. The grinding weight error is calculated, and the safety threshold time is updated based on this error for the next grinding control. Specifically, this includes: After the grinding cycle is completed, the actual weight achieved in the current grinding cycle is acquired and recorded by a weighing sensor. ; Based on the preset target weight value The weight error of this grinding process is calculated as follows: ; If the calculation yields If >0, it indicates insufficient grinding. If the value is less than 0, it indicates that the grinding process is too heavy; Safety threshold time for the next grinding based on weight error The update will be performed, and the update rules are as follows: ; in, This is the safety threshold adjustment factor, with a value of 0.05. Set upper and lower limits for the updated security threshold time: ≤ ; in, and These are the preset minimum and maximum safety threshold times, respectively; Updated security threshold time Motor stop control applied to the next grinding cycle.
[0025] The system stores the corresponding ( ) for different types of coffee beans preset by the user. , The mapping table uses a neural network for self-learning to achieve precise control over different types of coffee beans.
[0026] When the weighing sensor acquires weight data sequences in real time, it also performs filtering processing on the acquired weight data, specifically including: Dynamic noise analysis is performed on the weight data sequence to calculate the instantaneous rate of change between adjacent sampling points. And determine the type of noise: like If the noise type is determined to be impulse noise, then the noise type is determined to be impulse noise. If so, the noise type is determined to be high-frequency random noise, and This is the preset noise threshold; Median filtering algorithm is used for window data containing impulse noise. The window length is 2 +1, replace with the median value .
[0027] In a second aspect of the invention, a deep learning-based adaptive quantitative control system for a coffee grinder is also provided, comprising: The data acquisition module uses a weighing sensor to collect weight data at a fixed frequency during the grinding process of the coffee grinder. Each weight data point corresponds to a specific acquisition time, forming a weight data sequence. ,in For a point in time, This represents the weight value at that moment; The first calculation module is used to calculate the powder output rate at the current moment based on N consecutive weight data points collected in real time using a trend fitting algorithm. The second calculation module is used to calculate the time required to reach the target weight value based on the calculated real-time powder output rate and the target weight value retrieved from the database, and to obtain the predicted time. The control module compares the predicted time with the dynamically adaptive safety threshold time to control the operation of the grinder's motor. The update module records the final stable weight value as the actual achieved weight after the grinding cycle ends, calculates the grinding weight error, and updates the safety threshold time based on the error for the next grinding control.
[0028] In a third aspect of the invention, an electronic device is also provided. The electronic device includes at least one processor; and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect of the invention.
[0029] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. A deep learning-based adaptive quantitative control method for a coffee grinder, characterized in that, include: Weighing sensors are used to collect weight data at a fixed frequency during the grinding process of the coffee grinder. Each weight data point corresponds to a specific acquisition time, forming a weight data sequence. ,in For a point in time, This represents the weight value at that moment; Based on N consecutive weight data points collected in real time, the powder output rate at the current moment is calculated using a trend fitting algorithm. Based on the calculated real-time powder output rate and the target weight value retrieved from the database, the time required to reach the target weight value is calculated using a preset calculation formula to obtain the predicted time. The predicted time is compared with the dynamically adaptive safety threshold time to control the operation of the grinder's motor; After the grinding cycle is completed, the final stable weight value is recorded as the actual achieved weight. The grinding weight error is calculated, and the safety threshold time is updated based on this error for the next grinding control.
2. The adaptive quantitative control method for a coffee grinder based on deep learning according to claim 1, characterized in that, The powder dispensing rate at the current moment is calculated using a trend fitting algorithm based on N consecutive weight data points collected in real time. Specifically, it includes: Obtain the collected weight data sequence Select the latest and continuous N weight data points from them. , ... ; Linear regression was used as the trend fitting algorithm. Linear regression was performed on the selected N weight data points to construct... The fitted straight line, the The first weight value among N weight data points, The slope is, and The powder output rate at the current moment ; The slope is calculated using the least squares method, and the formula is as follows: 。 3. The adaptive quantitative control method for a coffee grinder based on deep learning according to claim 2, characterized in that, The process involves calculating the real-time powder output rate and retrieving the target weight value from the database, then using a preset calculation formula to calculate the time required to reach the target weight value, and obtaining the predicted time. Specifically, this includes: Determine the current time Obtain from the collected weight data sequence corresponding ,Should The weight value at the current moment ; Retrieve the target weight value from the database. , target weight value Weight value at the current moment Perform the subtraction and obtain the difference value; Divide the difference by Corresponding powder output rate To obtain the predicted time; The formula for calculating the predicted time is: 。 4. The adaptive quantitative control method for a coffee grinder based on deep learning according to claim 3, characterized in that, The process of comparing the predicted time with the dynamically adaptive safety threshold time to control the operation of the grinder's motor includes: Obtain the calculated prediction time And retrieve the dynamically adaptive security threshold from the database. ; Predict time With dynamic adaptive safety threshold Perform a comparison; If the predicted time Less than or equal to When this happens, a stop command is sent to the motor of the coffee grinder; If the predicted time Greater than When necessary, the coffee grinder motor will continue to operate normally.
5. The adaptive quantitative control method for a coffee grinder based on deep learning according to claim 4, characterized in that, The dynamic adaptive safety threshold time determination step includes: Under standard operating conditions, including identical temperature, humidity, and bean type, the flour extraction rate is kept constant. Multiple grinding experiments were conducted, and the response delay time of the motor from receiving the stop command to actually stopping completely was recorded. ; For multiple experiments The initial baseline delay time is obtained by taking the arithmetic mean: ; in, For the number of experiments, and ≥5; Under the same standard operating conditions, change the powder output rate to ( =1, 2, ..., K, K≥3), repeat the experiment and record the corresponding delay time. ; A model relating delay time to powder output rate was established using linear regression fitting. ; in, The rate correction coefficient is calculated using the least squares method; Real-time acquisition of current ambient temperature and humidity; correction of baseline delay time using lookup tables or formulas: ; in, and These are the compensation coefficients for temperature and humidity, respectively. and These are the real-time ambient temperature and humidity, respectively. Delay time adjusted based on the current powder dispensing rate A dynamic safety threshold is generated based on a preset buffer time ΔT, where ΔT ranges from 0.2s to 0.5s. 。 6. The adaptive quantitative control method for a coffee grinder based on deep learning according to claim 5, characterized in that, After the grinding cycle ends, the final stable weight value is recorded as the actual achieved weight. The grinding weight error is calculated, and the safety threshold time is updated based on this error for the next grinding control. Specifically, this includes: After the grinding cycle is completed, the actual weight achieved in the current grinding cycle is acquired and recorded by a weighing sensor. ; Based on the preset target weight value The weight error of this grinding process is calculated as follows: ; If the calculation yields If >0, it indicates insufficient grinding. If the value is less than 0, it indicates that the grinding process is too heavy; The safe threshold time for the next grinding based on the weight error. The update will be performed, and the update rules are as follows: ; in, This is the safety threshold adjustment factor, with a value of 0.
05. Set upper and lower limits for the updated security threshold time: ≤ ; in, and These are the preset minimum and maximum safety threshold times, respectively; Updated security threshold time Motor stop control applied to the next grinding cycle.
7. The adaptive quantitative control method for a coffee grinder based on deep learning according to claim 6, characterized in that, The system stores the corresponding ( ) for different types of coffee beans preset by the user. , The mapping table uses a neural network for self-learning to achieve precise control over different types of coffee beans.
8. The adaptive quantitative control method for a coffee grinder based on deep learning according to claim 7, characterized in that, When the weighing sensor acquires weight data sequences in real time, it also includes filtering the acquired weight data, specifically including: Dynamic noise analysis is performed on the weight data sequence to calculate the instantaneous rate of change between adjacent sampling points. And determine the type of noise: like If the noise type is determined to be impulse noise, then the noise type is determined to be impulse noise. If so, the noise type is determined to be high-frequency random noise, and the... This is the preset noise threshold; Median filtering algorithm is used for window data containing impulse noise. The window length is 2 +1, replace with the median value .
9. A deep learning-based adaptive quantitative control system for a coffee grinder, used to implement the deep learning-based adaptive quantitative control method for a coffee grinder as described in any one of claims 1-8, characterized in that, include: The data acquisition module uses a weighing sensor to collect weight data at a fixed frequency during the grinding process of the coffee grinder. Each weight data point corresponds to a specific acquisition time, forming a weight data sequence. ,in For a point in time, This represents the weight value at that moment; The first calculation module is used to calculate the powder output rate at the current moment based on N consecutive weight data points collected in real time using a trend fitting algorithm. The second calculation module is used to calculate the time required to reach the target weight value based on the calculated real-time powder output rate and the target weight value retrieved from the database, and to obtain the predicted time. The control module is used to compare the predicted time with the dynamically adaptive safety threshold time to control the operation of the grinder's motor. The update module is used to record the final stable weight value as the actual achieved weight after the grinding cycle ends, calculate the weight error of grinding, and update the safety threshold time based on the error for the next grinding control.
10. An electronic device, comprising at least one processor; and a memory communicatively connected to said at least one processor; characterized in that, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.