Method and equipment for controlling extraction pressure of coffee machine based on machine learning

By integrating machine learning modules and feedforward neural network models in the coffee machine, optimizing PID parameters, the problem that coffee machines in the existing technology is difficult to adapt to environmental changes and user needs, and the precise control of coffee machine extraction pressure and user satisfaction are achieved. Improved degree.

CN119087785APending Publication Date: 2024-12-06SHANGHAI NEWKA INTELLIGENT TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411226194.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

When facing environmental changes and user needs, existing coffee machines are difficult to adjust extraction pressure in time, resulting in pressure control not matching user needs. The PID algorithm parameters require testing and adjustment by a large number of engineering and technical personnel, and are inefficient.

Method used

Using a machine learning-based method, the PID calculation module and the machine learning module work together, and using a pre-trained feedforward neural network model to calculate the optimized PID setting parameters based on the actual pressure and target pressure value, and adjust the water pump pump by driving the motor speed. The amount of water injected can realize real-time adjustment of the pressure in the coffee machine pipeline, and obtain user feedback and data through handheld wireless terminals for learning and adjustment.

Benefits of technology

It realizes precise control of the extraction pressure of the coffee machine, adapts to environmental changes and user preferences, reduces the testing work of engineering and technicians, and improves the adaptability and pressure control effect of the coffee machine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119087785A_ABST
    Figure CN119087785A_ABST
Patent Text Reader

Abstract

The invention provides a coffee machine extraction pressure control method and equipment based on machine learning, which are used for collecting relevant parameters of the extraction pressure of a coffee machine, periodically sending the relevant parameters to a machine learning module in a handheld wireless terminal, and continuously learning, adjusting and optimizing PID (Proportion Integration Differentiation) setting parameters so as to adapt to an actual use scene and improve the extraction pressure of the coffee machine. And the optimal extraction pressure control effect of the coffee machine is achieved. According to the invention, the PID setting parameters can be continuously adjusted by using a machine learning technology, so that the coffee machine adapts to environment changes and user preferences, and the test work of engineering technicians can be reduced; and meanwhile, the limitation of the calculation performance of the coffee machine can be considered to meet actual requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method and device for controlling the extraction pressure of a coffee machine based on machine learning. Background Art

[0002] A coffee machine is a device that passes pressurized hot water through ground coffee powder to obtain coffee liquid. The water pressure when extracting coffee liquid is the key factor that determines the taste of coffee. In high-end coffee machine equipment at home and abroad, the PID algorithm is generally used to adjust the speed of the water pump motor to achieve the purpose of adjusting the extraction pressure. The parameters used in the PID algorithm are determined by engineering and technical personnel after a large number of tests.

[0003] The coffee machine system is generally composed of water pumps, pipelines, boilers, etc., and contains a large number of non-standard parts. The source of pipeline pressure is the continuous rotation of the water pump to pump water into the pipeline inlet, that is, the front end of the system, and the location for extracting the extraction pressure signal, that is, the brewing head, is located at the end of the entire system, which is a large inertia nonlinear system; and the user's use environment often changes, such as differences in municipal water supply pressure in different cities and seasonal changes; more practically, with the continuous use of the machine, there are problems such as aging of parts and performance degradation. The calibrated PID setting parameters cannot be adjusted in time according to these changes, resulting in differences in the control of extraction pressure and actual user needs. Summary of the invention

[0004] The object of the present invention is to provide a method and device for controlling the extraction pressure of a coffee machine based on machine learning.

[0005] In order to solve the above problems, the present invention provides a method for controlling the extraction pressure of a coffee machine based on machine learning, comprising:

[0006] The PID calculation module of the coffee machine controller calculates a control speed signal for controlling the rotation of a driving motor of the coffee machine based on the current PID setting parameters and the difference between a preset target pressure value and a current actual pressure value in the pipeline of the coffee machine, so as to adjust the amount of water pumped into the pipeline by the water pump by adjusting the speed of the driving motor, thereby changing the current actual pressure value in the pipeline of the coffee machine;

[0007] The machine learning module of the handheld wireless terminal obtains the target pressure value Pset, the current actual pressure value P after the drive motor speed is adjusted, and the corresponding pressure deviation Pd; the machine learning module obtains the optimized PID setting parameters based on the target pressure value Pset, the current actual pressure value P after the drive motor speed is adjusted, and the corresponding pressure deviation Pd, wherein the machine learning module integrates a feedforward neural network model that has been pre-trained and optimized on a high-performance computer;

[0008] The PID calculation module of the coffee machine controller calculates a control speed signal for controlling the rotation of a drive motor of the coffee machine based on the optimized current PID setting parameters and according to the difference between a preset target pressure value and a current actual pressure value in the pipeline of the coffee machine, so as to adjust the amount of water pumped into the pipeline by the water pump by adjusting the speed of the drive motor, thereby changing the current actual pressure value in the pipeline of the coffee machine.

[0009] Furthermore, in the above method, the machine learning module of the handheld wireless terminal obtains the target pressure value Pset, the current actual pressure value P after the drive motor speed is adjusted, and the corresponding pressure deviation Pd, including:

[0010] The human-computer interaction module of the handheld wireless terminal obtains the evaluation results input by the user based on the current actual pressure value P, flow rate value and total flow value at each time point after the speed adjustment of the driving motor, and the evaluation results include: determining that the current PID setting parameters need to be adjusted or determining that the current PID setting parameters do not need to be adjusted;

[0011] The machine learning module of the handheld wireless terminal calculates the boost speed, overpressure value and pressure fluctuation degree after reaching the target pressure value based on the target pressure value Pset, the current actual pressure value P at each time point after the drive motor speed is adjusted and the corresponding pressure deviation Pd;

[0012] If the evaluation result is that it is determined that the current PID setting parameters need to be adjusted, and / or one of the indicators including the boost speed, overpressure value and the degree of pressure fluctuation after reaching the target pressure value does not meet the standards, the machine learning module of the handheld wireless terminal obtains the optimized PID setting parameters based on the target pressure value Pset, the current actual pressure value P after the drive motor speed is adjusted and the corresponding pressure deviation Pd.

[0013] Furthermore, in the above method, if the evaluation result is to determine that the current PID setting parameters need to be adjusted, or / and one of the indicators among the boost speed, the overpressure value, and the pressure fluctuation degree after reaching the target pressure value does not meet the standard, the machine learning module of the handheld wireless terminal obtains the optimized PID setting parameters based on the target pressure value Pset, the current actual pressure value P after the drive motor speed is adjusted, and the corresponding pressure deviation Pd, including:

[0014] Based on the corresponding score of the boost speed, the corresponding score of the overpressure value, the corresponding score of the pressure fluctuation degree after reaching the target pressure value, and the corresponding score of determining that the current PID setting parameters need to be adjusted, the weight Q of the learning rate adjustment is calculated;

[0015] The original learning rate α of the feedforward neural network model is multiplied by the weight Q to obtain a new learning rate α, wherein when the new learning rate α is greater than 0.1, the new learning rate α is equal to 0.1;

[0016] The machine learning module uses the target pressure value of this cycle, the current actual pressure value and the corresponding pressure deviation as the input of the feedforward neural network model, and based on the new learning rate α, calls the feedforward neural network model to perform calculations to obtain the optimized PID setting parameters.

[0017] Furthermore, in the above method, based on the corresponding score of the boost speed, the corresponding score of the overpressure value, the corresponding score of the pressure fluctuation degree after reaching the target pressure value, and the corresponding score of determining that the current PID setting parameter needs to be adjusted, before calculating the weight Q of the learning rate adjustment, it includes:

[0018] The human-computer interaction module of the handheld wireless terminal presents the coffee extraction data including: the current PID setting parameters, the target pressure value Pset, the current actual pressure value P at each time point after the drive motor speed is adjusted and the corresponding pressure deviation Pd, the flow rate value and the total flow value on the user interface, prompting the user whether the data of this coffee extraction is valid. If it is valid, the user will be reminded to rate the displayed data, which is recorded as the user score S0, that is, the corresponding score that determines the current PID setting parameters that need to be adjusted, indicating whether the user still hopes that the pressure control effect is better. The user score S0 can be 11 points: 10 points means that no adjustment is required; 0 points means that the current pressure control is very unsatisfactory; from 9 points to 0 points, the intensity of pressure optimization adjustment is from small to large, among which 9 points means that it is available but a small degree of optimization is desired; the user score S0 is sent to the machine learning module by the upper computer data processing module of the wireless handheld terminal;

[0019] The corresponding score S1 of the boost speed is: the time taken by the current actual pressure value P to reach the target pressure value Pset after a certain target pressure value is set. If the time is less than the preset boost setting value, the boost speed score S1 is 10 points; if it is greater than the boost setting value or the target pressure value has not been reached, the boost speed score S1 is 0 points;

[0020] The corresponding score S2 of the overpressure value is: after reaching the target pressure value Pset and within the preset first time period t, the data group obtained by subtracting the target pressure value Pset from the current actual pressure value P, the maximum value is taken out, if the absolute value of the maximum value is less than the preset overpressure setting value, it is up to standard, that is, 10 points, if the absolute value of the maximum value is greater than the setting value, 0 points;

[0021] The corresponding score S3 of the pressure fluctuation degree after reaching the target pressure value is: after reaching the target pressure value Pset, within the preset second time period, take the variance of 20 current actual pressure values ​​P1 to P20, that is, ((M-P1)2+(M-P2)2…(M-P20)2) / 20, where the average of P1 to P20 is M. If the variance is less than the preset variance setting value, it meets the standard, that is, 10 points; if it is greater than the setting value, the score is 0 points.

[0022] Furthermore, in the above method, calculating the weight Q of the learning rate adjustment includes:

[0023] Calculate the weight Q of learning rate adjustment based on the current total score S = S0 + S1 + S2 + S3:

[0024] If the total score S is equal to 0, the weight Q = 1.1

[0025] The total score S is equal to 1 to 30, then the weight Q = 1 + S / 1000;

[0026] The total score S is equal to 31 to 39, then the weight Q = 1 + (S-30) / 1000;

[0027] The total score S is equal to 40, so the weight Q=1.

[0028] Furthermore, in the above method, before the machine learning module obtains the optimized PID setting parameters based on the target pressure value Pset, the current actual pressure value P after the drive motor speed is adjusted, and the corresponding pressure deviation Pd, the machine learning module includes:

[0029] Utilize the existing historical experience data, including: historical PID setting parameters and historical actual pressure values, use the historical PID setting parameters as input, and the historical actual pressure values ​​as output, to fit a mathematical function as the mathematical model of the coffee machine in a high-performance computer. The more historical experience data there is, the more accurate the mathematical model is. The historical experience data contains multiple sets of real coffee making data, each set of data contains historical PID setting parameters and historical actual pressure values ​​P;

[0030] A set of PID setting parameters is randomly generated as initial values, and provided to the mathematical model corresponding to the coffee machine in the high-performance computer, to obtain the target pressure value Pset, the actual pressure value P, and the pressure deviation Pd, and the target pressure value Pset, the actual pressure value P, and the pressure deviation Pd are used as inputs of the feedforward neural network model on the high-performance computer, and a new set of PID setting parameters is output after calculation on the feedforward neural network model as the next set of inputs provided to the mathematical model corresponding to the coffee machine in the high-performance computer; this cycle is repeated until the set target value is reached, that is, the pressure deviation Pd is less than 0.02;

[0031] After the feedforward neural network model is trained, the feedforward neural network model is quantized and compressed, and the corresponding data type and storage method of the feedforward neural network model are adjusted according to the specific hardware platform of the handheld wireless terminal, wherein the original learning rate α of the feedforward neural network model is changed to 0.01 to obtain an optimized feedforward neural network model; the feedforward neural network model that has been pre-trained and optimized on a high-performance computer is integrated into the machine learning module.

[0032] Furthermore, in the above method, the machine learning module, before integrating the feedforward neural network model that has been pre-trained and optimized on a high-performance computer, further includes:

[0033] The number of input layer neurons of the feedforward neural network model is set to correspond to the target pressure value Pset, the actual pressure value P and the pressure deviation Pd respectively;

[0034] Set the hidden layer neurons and output layer neurons, corresponding to the PID setting parameters respectively;

[0035] Use random numbers to generate the initial weight matrix W and bias b;

[0036] Set the learning rate α for gradient descent, use the loss function and activation function;

[0037] The training is set to end when the pressure deviation Pd is less than or equal to the preset pressure deviation.

[0038] Furthermore, in the above method, before prompting the user whether the data of the current coffee extraction is valid, the following steps may be further included:

[0039] After the upper computer data processing module receives the coffee extraction data, it determines whether the coffee extraction data is valid.

[0040] If the coffee extraction time does not exceed the preset first specified value, it will be regarded as invalid data;

[0041] If the total flow value does not exceed the preset second specified value, it will be regarded as invalid data;

[0042] If the actual pressure value exceeds the preset third specified value, it will be regarded as invalid data;

[0043] If the flow rate value exceeds the preset fourth specified value within the preset time, it will be regarded as invalid data;

[0044] The data sets of coffee extraction of a preset number of times are continuously received, and the data sets whose deviation from the average value is greater than a preset fifth specified value are regarded as invalid data.

[0045] Furthermore, in the above method, the machine learning module of the handheld wireless terminal obtains the target pressure value Pset, the current actual pressure value P after the driving motor speed is adjusted, and the corresponding pressure deviation Pd.

[0046] The machine learning module of the handheld wireless terminal can obtain the data of effective coffee extraction determined by the host computer data processing module, the corresponding target pressure value Pset, the current actual pressure value P after the driving motor speed is adjusted, and the corresponding pressure deviation Pd.

[0047] According to another aspect of the present invention, there is further provided a computer-readable storage medium having computer-executable instructions stored thereon, wherein when the computer-executable instructions are executed by a processor, the processor is caused to: execute any of the methods described above.

[0048] Compared with the prior art, the present invention calculates a control speed signal for controlling the rotation of a driving motor of the coffee machine based on the current PID setting parameters through a PID calculation module of a coffee machine controller according to the difference between a preset target pressure value and a current actual pressure value in the pipeline of the coffee machine, so as to adjust the amount of water pumped into the pipeline by a water pump by adjusting the speed of the driving motor, thereby changing the current actual pressure value in the pipeline of the coffee machine; a machine learning module of a handheld wireless terminal obtains a target pressure value Pset, a current actual pressure value P after the driving motor speed is adjusted, and a corresponding pressure deviation Pd; the machine learning module obtains optimized PID setting parameters based on the target pressure value Pset, the current actual pressure value P after the driving motor speed is adjusted, and the corresponding pressure deviation Pd, wherein the machine The learning module integrates a feedforward neural network model that has been pre-trained and optimized on a high-performance computer; the PID calculation module of the coffee machine controller calculates the control speed signal for controlling the rotation of the drive motor of the coffee machine based on the optimized current PID setting parameters and the difference between the preset target pressure value and the current actual pressure value in the pipeline of the coffee machine, so as to adjust the amount of water pumped into the pipeline by adjusting the speed of the drive motor, thereby changing the current actual pressure value in the pipeline of the coffee machine. The relevant parameters of the extraction pressure of the coffee machine can be collected and periodically sent to the machine learning module in the handheld wireless terminal. By continuously learning and adjusting the optimized PID setting parameters, it can adapt to the actual usage scenarios and achieve the optimal extraction pressure control effect of the coffee machine.

[0049] The present invention can use machine learning technology to continuously adjust PID setting parameters to adapt the coffee machine to environmental changes and user preferences, and can also reduce the testing work of engineering and technical personnel; at the same time, it can take into account the limitations of the coffee machine's own computing performance to meet actual needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 is a schematic diagram of a control system for coffee machine extraction pressure based on machine learning according to an embodiment of the present invention;

[0051] Figure 2 is a schematic diagram of an interface showing the effect of coffee extraction according to an embodiment of the present invention;

[0052] Figure 3 It is a flow chart of using a feedforward neural network to adjust PID setting parameters according to an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The present invention is further described in detail below in conjunction with the accompanying drawings.

[0054] In a typical configuration of the present application, the terminal, the device of the service network and the trusted party all include one or more processors (CPU), input / output interfaces, network interfaces and memories.

[0055] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0056] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules 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 technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory media such as modulated data signals and carrier waves.

[0057] Machine learning is an application subset of artificial intelligence technology. It can learn from existing data, thereby continuously improving and optimizing the algorithm. The most widely used machine learning methods include artificial neural networks, reinforcement learning, decision tree learning, support vector machines, etc. Among them, as a branch of the artificial neural network model, the feedforward neural network has the characteristics of three layers of neuron distribution, namely the input layer, the hidden layer (intermediate layer) and the output layer. Each layer of neurons only accepts input from the previous layer of neurons, and finally outputs the calculation results from the output layer, which is called forward propagation; at the same time, it calculates the error between the actual system output and the expected output, and feeds the error forward from the last layer layer by layer, so as to obtain the error learning result (signal) of each layer, and then correct the weight of each layer of neurons according to the error learning result. When this neural network performs calculations over and over again and continuously adjusts the weights, the error becomes smaller and smaller, and finally reaches the expected value, which is very suitable for fitting nonlinear functions. If this technology is applied to the extraction pressure control of coffee machines, it is possible to overcome the shortcomings of the above-mentioned PID algorithm by virtue of its ability to continuously improve the algorithm or algorithm parameters. However, the current application of machine learning technology requires a large amount of computing resources, which is difficult to achieve for coffee machines that generally use embedded chips, namely single-chip microcomputers, as the control core.

[0058] In view of the deficiencies in the prior art and in accordance with the requirements of actual usage scenarios of coffee machines, the present invention provides a method and device for controlling the extraction pressure of a coffee machine based on machine learning. The method and device can use machine learning technology to continuously adjust PID setting parameters to adapt the coffee machine to environmental changes and user preferences, and can also reduce the testing work of engineering and technical personnel; at the same time, the limitations of the computing performance of the coffee machine itself can be taken into account to meet actual needs.

[0059] like Figure 1 As shown, the present invention provides a control system for coffee machine extraction pressure based on machine learning, comprising:

[0060] A water pump and a drive motor, a pressure sensor and a flow sensor are connected in series in the pipes of the coffee machine;

[0061] A coffee machine controller, comprising: a signal output module, a PID calculation module, a signal processing module, a timing module, a data storage and processing module and a wireless communication module; wherein the signal output module is connected to the water pump and the drive motor signal; the PID calculation module is respectively connected to the signal output module, the signal processing module and the data storage and processing module; the data storage and processing module is respectively connected to the timing module and the first wireless communication module;

[0062] A handheld wireless terminal, comprising: a human-computer interaction module, a machine learning module, a host computer data processing module and a second wireless communication module; wherein the second wireless communication module communicates with the first wireless communication module, and the host computer data processing module is connected to the human-computer interaction module, the machine learning module and the second wireless communication module respectively;

[0063] The extraction pressure setting device, wherein the signal processing module is connected to the pressure sensor, the flow sensor and the extraction pressure setting device respectively.

[0064] Here, the water pump and drive motor, pressure sensor and flow sensor are connected in series in the pipeline of the coffee machine. The pipeline is filled with water. Water is an incompressible substance, and the pressure at any point in the pipeline is equal.

[0065] A water pump and a driving motor, a pressure sensor, a flow sensor, an extraction pressure setting device, a coffee machine controller and a handheld wireless terminal. The water pump and the driving motor are connected to the coffee machine controller through electrical signals, the pressure sensor is connected to the coffee machine controller through electrical signals, the extraction pressure setting device is connected to the coffee machine controller through electrical signals, and the coffee machine controller is connected to the handheld wireless terminal through radio signals.

[0066] The coffee machine controller, in some embodiments, can be a printed circuit board and electronic components attached thereto, and can independently run a program. The coffee machine controller is functionally divided into a data storage and processing module, a PID calculation module, a signal processing module, a signal output module, a timing module, and a wireless communication module.

[0067] The handheld wireless terminal may be a tablet computer with Bluetooth function in some embodiments, and may run the current mainstream wireless operating system. The host computer software program running in the operating system integrates a machine learning module, a host computer data processing module and a Bluetooth communication module.

[0068] like Figure 1 As shown, the present invention provides a method for controlling the extraction pressure of a coffee machine based on machine learning, adopting the above-mentioned coffee machine extraction pressure system based on machine learning, and the method includes: steps S1 to S3.

[0069] Step S1, the PID calculation module of the coffee machine controller calculates a control speed signal for controlling the rotation of a driving motor of the coffee machine based on current PID setting parameters and according to a difference between a preset target pressure value and a current actual pressure value in a pipeline of the coffee machine, so as to adjust the amount of water pumped into the pipeline by a water pump by adjusting the speed of the driving motor, thereby changing the current actual pressure value in the pipeline of the coffee machine;

[0070] Here, if Figure 1As shown, the target pressure value Pset input by the user can be obtained through the extraction pressure setting device, and the signal is sent to the signal processing module in the coffee machine controller for processing; the current actual pressure value in the pipeline is obtained through the pressure sensor connected to the pipeline of the coffee machine, and the signal is sent to the signal processing module in the coffee machine controller for processing; the signal processing module sends the processed current actual pressure value signal to the PID calculation module;

[0071] Specifically, the current PID setting parameters play a decisive role in the extraction of coffee. At the same time, according to the difference between the preset target pressure value and the current actual pressure value in the pipeline of the coffee machine, the corresponding PWM pulse signal can be obtained to control the water pump and the drive motor. Then, combined with the timing module of the coffee controller content, the actual pressure value after adjustment corresponding to each time point can be obtained.

[0072] Preferably, the PID calculation module of the coffee machine controller obtains the current PID setting parameters from the data storage and processing module; the signal processing module of the coffee machine controller obtains the target pressure value Pset sent by the extraction pressure setting device, and obtains the current actual pressure value P sent by the pressure sensor in the pipeline connected to the coffee machine; the PID calculation module of the coffee machine controller obtains the pressure deviation Pd based on the target pressure value Pset and the actual pressure value P, calculates according to the difference between the target pressure value and the current actual pressure value, obtains the control speed signal for controlling the rotation of the drive motor, and sends the control speed signal to the signal output module; the signal output module processes the signal into a PWM pulse signal and sends it to the water pump and the drive motor to adjust the speed of the drive motor, and adjusts the amount of water pumped into the pipeline by adjusting the speed of the drive motor, thereby changing the current actual pressure value;

[0073] Step S2, the machine learning module of the handheld wireless terminal obtains the target pressure value Pset, the current actual pressure value P after the drive motor speed is adjusted, and the corresponding pressure deviation Pd; the machine learning module obtains the optimized PID setting parameters based on the target pressure value Pset, the current actual pressure value P after the drive motor speed is adjusted, and the corresponding pressure deviation Pd, wherein the machine learning module integrates a feedforward neural network model that has been pre-trained and optimized on a high-performance computer;

[0074] Here, the signal processing module of the coffee machine controller obtains the target pressure value Pset, the current actual pressure value P after the speed adjustment of the driving motor, and the corresponding pressure deviation Pd, and transmits them to the machine learning module of the handheld wireless terminal;

[0075] Preferably, a signal processing module of the coffee machine controller obtains a target pressure value Pset sent by the extraction pressure setting device, and obtains a current actual pressure value P in the pipeline of the coffee machine sent by the pressure sensor; a PID calculation module of the coffee machine controller obtains a pressure deviation Pd based on the target pressure value Pset and the actual pressure value P; the target pressure value Pset, the current actual pressure value P after the speed of the driving motor is adjusted, and the corresponding pressure deviation Pd are sent to a machine learning module of the handheld wireless terminal in sequence through a data storage and processing module of the coffee machine controller, a first wireless communication module of the coffee machine controller, a second wireless communication module of the handheld wireless terminal, and a host computer data processing module of the handheld wireless terminal, and the machine learning module obtains optimized PID setting parameters based on the target pressure value Pset, the current actual pressure value P after the speed of the driving motor is adjusted, and the corresponding pressure deviation Pd;

[0076] Step S3, the PID calculation module of the coffee machine controller calculates a control speed signal for controlling the rotation of a drive motor of the coffee machine based on the optimized current PID setting parameters and according to the difference between a preset target pressure value and a current actual pressure value in the pipeline of the coffee machine, so as to adjust the amount of water pumped into the pipeline by the water pump by adjusting the speed of the drive motor, thereby changing the current actual pressure value in the pipeline of the coffee machine.

[0077] In the one-cycle optimization process of the PID setting parameters from step S1 to step S3, the preset target pressure value remains the same.

[0078] Preferably, the data storage and processing module of the coffee machine controller stores the optimized PID setting parameters; the PID calculation module of the coffee machine controller calculates the control speed signal of the drive motor that controls the coffee machine based on the optimized PID setting parameters, and sends it to the signal output module; the signal output module processes the signal into a PWM pulse signal and sends it to the water pump and the drive motor to adjust the speed of the drive motor. By adjusting the change in the speed of the drive motor, the amount of water pumped into the pipeline by the water pump will be adjusted, thereby changing the current actual pressure value.

[0079] Here, the adjusted and optimized PID setting parameters are transferred and finally assigned to the PID calculation module of the coffee machine controller, and take effect in the next coffee machine extraction.

[0080] The machine learning module sends the optimized PID setting parameters to the upper computer data processing module. The upper computer data processing module sends the optimized PID setting parameters to the data storage and processing module in the coffee machine controller through the second wireless communication module and the first wireless communication module in turn. The data storage and processing module sends the optimized PID setting parameters to the PID calculation module. At this time, the PID setting parameters in the PID calculation module are updated to the optimized PID setting parameters, and the actual effect will be reflected in the next pressure control process of the coffee machine.

[0081] The present invention can collect relevant parameters of the extraction pressure of the coffee machine and periodically send them to the machine learning module in the handheld wireless terminal. By continuously learning and adjusting the optimized PID setting parameters, it can adapt to the actual usage scenarios and achieve the optimal extraction pressure control effect of the coffee machine.

[0082] In one embodiment of the method for controlling the extraction pressure of a coffee machine based on machine learning of the present invention, in step S2, the machine learning module obtains optimized PID setting parameters based on the target pressure value Pset, the current actual pressure value P after the speed of the driving motor is adjusted, and the corresponding pressure deviation Pd, including:

[0083] Step S211, the human-computer interaction module of the handheld wireless terminal obtains the evaluation result input by the user based on the current PID setting parameters, the target pressure value Pset, the current actual pressure value P at each time point after the drive motor speed is adjusted, and the corresponding pressure deviation Pd, wherein the evaluation result includes: determining that the current PID setting parameters need to be adjusted or determining that the current PID setting parameters do not need to be adjusted;

[0084] Step S212, the machine learning module of the handheld wireless terminal calculates the boost speed, the overpressure value, and the pressure fluctuation degree after reaching the target pressure value based on the target pressure value Pset, the current actual pressure value P at each time point after the drive motor speed is adjusted, and the corresponding pressure deviation Pd;

[0085] Here, the current PID setting parameters play a decisive role in coffee extraction, and can obtain corresponding PWM pulse signals to control the water pump and the drive motor, and then combined with the timing module of the coffee controller content, the actual pressure value corresponding to each time point can be obtained; based on the actual pressure value corresponding to each time point collected, the corresponding coffee extraction pressure increase speed, overpressure value, and pressure fluctuation degree after reaching the target pressure value can be further obtained;

[0086] Through the data storage and processing module of the coffee machine controller, the time signal sent by the timing module can be obtained and stored in real time. The role of this time signal includes: cooperating with the flow sensor in the pipeline of the coffee machine to obtain the current real-time flow rate value, cooperating with the pressure sensor in the pipeline of the coffee machine to obtain the speed of pressure rise, that is, the pressure increase speed, and obtaining the total time of each coffee extraction; the current actual pressure value, target pressure value and current real-time flow value sent by the signal processing module of the coffee machine controller are pre-processed and stored in the data storage and processing module, and the data storage and processing module periodically sends the current actual pressure value, target pressure value and current real-time flow value to the handheld wireless terminal through the first wireless communication module.

[0087] Step S213, if the evaluation result is to determine that the current PID setting parameters need to be adjusted, or / and one of the indicators among the boost speed, overpressure value and the degree of pressure fluctuation after reaching the target pressure value does not meet the standard, the machine learning module of the handheld wireless terminal obtains the optimized PID setting parameters based on the target pressure value Pset, the current actual pressure value P after the drive motor speed is adjusted, and the corresponding pressure deviation Pd.

[0088] Here, if the various indicator parameters of the boost speed, overpressure value and pressure fluctuation degree in this cycle have reached the standards, and the evaluation result is to determine that the current PID setting parameters do not need to be adjusted, the machine learning module of the handheld wireless terminal will not adjust the current PID setting parameters, and the machine learning module can send a status signal of no adjustment to the host computer data processing module of the handheld wireless terminal.

[0089] On the contrary, if the evaluation result determines that the current PID setting parameters need to be adjusted, and / or any of the indicator parameters of the boost speed, overpressure value and pressure fluctuation degree of this effect does not meet the standard, then the required machine learning module adjusts the PID setting parameters.

[0090] This embodiment can also introduce user selection. If the user chooses that no further adjustment is required, the call can be terminated and the current PID setting parameters will not be adjusted. If the user chooses that further adjustment is required, even if the score has reached the preset score, the feedforward neural network is still called to perform calculations to adjust the current PID setting parameters.

[0091] like Figure 3As shown, in an embodiment of the method for controlling the extraction pressure of a coffee machine based on machine learning of the present invention, in step S213, if the evaluation result is to determine that the current PID setting parameters need to be adjusted, or / and one of the indicators among the pressure increase speed, the overpressure value, and the pressure fluctuation degree after reaching the target pressure value does not meet the standard, then the machine learning module of the handheld wireless terminal obtains the optimized PID setting parameters based on the target pressure value Pset, the current actual pressure value P after the driving motor speed is adjusted, and the corresponding pressure deviation Pd, including:

[0092] Step S2131, calculating the weight Q of the learning rate adjustment based on the corresponding score of the boost speed, the corresponding score of the overpressure value, the corresponding score of the pressure fluctuation degree after reaching the target pressure value, and the corresponding score of the current PID setting parameter that needs to be adjusted;

[0093] Step S2132, multiplying the original learning rate α of the feedforward neural network model by the weight Q to obtain a new learning rate α. Preferably, when the new learning rate α is greater than 0.1, the new learning rate α is equal to 0.1;

[0094] Step S2133, the machine learning module uses the target pressure value of this cycle, the current actual pressure value and the corresponding pressure deviation as the input of the feedforward neural network model, and based on the new learning rate α, calls the feedforward neural network model to calculate and obtain the optimized PID setting parameters, including: Kp, Ki, Kd.

[0095] Here, the inputs calculated by the feedforward neural network model are: target pressure value, actual pressure value and pressure deviation.

[0096] Since the feedforward neural network minimizes the loss function by continuously adjusting the weight matrix W and bias b during calculation, that is, the actual pressure value P is constantly approaching the target pressure value Pset, the more times the user uses the system, the higher the accuracy of the system pressure control will be, thereby overcoming a series of defects such as large inertia, nonlinear system characteristics, changes in the use environment, and performance degradation caused by aging of components, so that the system always maintains high-precision performance.

[0097] The boost speed, overpressure value, and pressure fluctuation after reaching the target pressure value are used to evaluate the effect of the last PID setting parameters, and are ultimately reflected in the learning rate parameter.

[0098] Among them, the learning rate is an important parameter in the BP neural network, which determines the magnitude of the model parameter update in each iteration. A learning rate that is too large may cause oscillation and non-convergence, while a learning rate that is too small will make the model converge slowly.

[0099] In one embodiment of the method for controlling the extraction pressure of a coffee machine based on machine learning of the present invention, step S2231, based on the corresponding score of the pressure increase speed, the corresponding score of the overpressure value, the corresponding score of the pressure fluctuation degree after reaching the target pressure value, and the corresponding score of determining that the current PID setting parameter needs to be adjusted, before calculating the weight Q of the learning rate adjustment, includes:

[0100] Step S2211, as Figure 2 As shown, the human-computer interaction module of the handheld wireless terminal presents the coffee extraction data including: the current actual pressure value P, flow rate value and total flow value at each time point after the speed adjustment of the driving motor on the user interface, prompting the user whether the data of this coffee extraction is valid. If it is valid, the user will be reminded to rate the displayed data, which is recorded as the user score S0, that is, the corresponding score that determines the current PID setting parameters that need to be adjusted, indicating whether the user still hopes that the pressure control effect is better. The user score S0 can be 11 points: 10 points means that no adjustment is required; 0 points means that the current pressure control is very unsatisfactory; from 9 points to 0 points, the intensity of pressure optimization adjustment is from small to large, among which, for example, 9 points means that it is available but a small degree of optimization is desired; the user score S0 will be sent to the machine learning module by the upper computer data processing module of the wireless handheld terminal;

[0101] Step S2212, the corresponding score S1 of the boost speed is: the time taken by the current actual pressure value P to reach the target pressure value Pset after a certain target pressure value is set. If the time is less than the preset boost setting value (such as 2s), it is up to standard, that is, the score S1 of the boost speed is 10 points; if it is greater than the boost setting value or the target pressure value has not been reached, the score S1 of the boost speed is 0 points;

[0102] Step S2213, the corresponding score S2 of the overpressure value is: after reaching the target pressure value Pset, and within the preset first time period t (such as 5s), the current actual pressure value P minus the target pressure value Pset is obtained, and the maximum value is taken out. The smaller the absolute value of the maximum value, the better. If the absolute value of the maximum value is less than the preset overpressure setting value (such as 0.3bar), it is up to standard, that is, 10 points. If the absolute value of the maximum value is greater than the setting value, it is 0 points.

[0103] Step S2214, the corresponding score S3 of the pressure fluctuation degree after reaching the target pressure value is: after reaching the target pressure value Pset, within the preset second time period (such as 10s), take the variance of 20 current actual pressure values ​​​​P1 to P20, that is, ((M-P1)2+(M-P2)2…(M-P20)2) / 20, where the average of P1 to P20 is M, and the smaller the variance value, the better. If the variance is less than the preset variance setting value (such as 0.05), it is up to standard, that is, 10 points; if it is greater than the setting value, the score is 0 points.

[0104] Here, after the human-computer interaction module presents the data (time array (T1, T2, T3...Ti), the current actual pressure array corresponding to each time point (P1, P2, P3...Pi), the target pressure value corresponding to each time point (Pset1, Pset2...Pseti), the flow rate value corresponding to each time point (F1, F2, F3...Fi), the total flow value Vtotal and the PID setting parameters used for this coffee extraction to the user interface, it reminds the user to rate the actual coffee extraction effect and returns the user rating result to the host computer data processing module.

[0105] In this embodiment, the current extraction result is scored, and the scoring criteria include the following ranges: pressure increase speed, overpressure value, pressure fluctuation degree after reaching the target value, etc. At the same time, user scoring is introduced and weighted to a certain extent to obtain the final score.

[0106] In one embodiment of the method for controlling the extraction pressure of a coffee machine based on machine learning of the present invention, the weight Q for adjusting the learning rate is calculated, including:

[0107] First, calculate the weight Q of the learning rate adjustment based on the current total score S (S = S0 + S1 + S2 + S3):

[0108] As shown in Table 1, if the total score S is equal to 0, the weight Q = 1.1;

[0109] The total score S is equal to 1 to 30, then the weight Q = 1 + S / 1000;

[0110] The total score S is equal to 31 to 39, then the weight Q = 1 + (S-30) / 1000;

[0111] The total score S is equal to 40, so the weight Q = 1;

[0112] The original learning rate α is modified to 0.01. When the total score S = 40, the new learning rate = 0.01 (original learning rate) * 1 (Q).

[0113] Table 1

[0114] Overall rating: S meaning Q 0 Maximum Weight 1.1 1-30 Maximum value 1.03 1+S / 1000 31-39 Maximum value 1.009 1+(S-30) / 1000 40 No adjustment 1

[0115] Here, during the calculation, the learning rate α of the feedforward neural network is limited by the weight Q, thereby limiting the numerical value of each PID setting parameter fine-tuning to ensure that the system does not change too much and become unstable.

[0116] In one embodiment of the method for controlling the extraction pressure of a coffee machine based on machine learning of the present invention, in step S2, before the machine learning module obtains the optimized PID setting parameters based on the target pressure value Pset, the current actual pressure value P after the drive motor speed is adjusted, and the corresponding pressure deviation Pd, the method includes:

[0117] Step S231, pre-training and optimizing a feedforward neural network model on a high-performance computer, including:

[0118] Step S2311, the training method is: using existing historical experience data, including: historical PID setting parameters and historical actual pressure values, using historical PID setting parameters as input, and historical actual pressure values ​​as output, to fit a mathematical function as a mathematical model of the coffee machine in a high-performance computer, wherein the more historical experience data there is, the more accurate the mathematical model is. The historical experience data includes multiple sets of real coffee making data, each set of data includes historical PID setting parameters and historical actual pressure values ​​P;

[0119] Here, the high-performance computer refers to the computing performance relative to the handheld wireless terminal. The high-performance computer generally used to train the neural network in this article has a basic configuration of a mainstream CPU in the current market such as Intel i7, a memory of 32G or more, a graphics card memory of 6G or more, and a solid-state hard disk SSD capacity of 512G or more.

[0120] Step S2312, randomly generate a set of PID setting parameters as initial values, provide them to the mathematical model of the coffee machine in the high-performance computer, obtain the target pressure value Pset, the actual pressure value P and the pressure deviation Pd, and use the obtained target pressure value Pset, the actual pressure value P and the pressure deviation Pd as the input of the feedforward neural network model on the high-performance computer. After calculation on the feedforward neural network model, a new set of PID setting parameters is output as the next set of inputs provided to the mathematical model of the coffee machine in the high-performance computer; this cycle is repeated until the set target value is reached, that is, the pressure deviation Pd is less than 0.02.

[0121] Step S232, integrating a pre-trained and optimized feedforward neural network model on a high-performance computer into the machine learning module, including:

[0122] After the feedforward neural network model is trained, in order to integrate the feedforward neural network model into the embedded system of the handheld wireless terminal and run it effectively, the feedforward neural network model is quantized and compressed, and the corresponding data type and storage method of the feedforward neural network model are adjusted according to the specific hardware platform of the handheld wireless terminal. In order to ensure the stability of the handheld wireless terminal when in use, the original learning rate α of the feedforward neural network model is changed to 0.01 to obtain an optimized feedforward neural network model; the feedforward neural network model that has been pre-trained and optimized on a high-performance computer is integrated into the machine learning module.

[0123] In one embodiment of the method for controlling the extraction pressure of a coffee machine based on machine learning of the present invention, the machine learning module, before integrating a feedforward neural network model that has been pre-trained and optimized on a high-performance computer, further includes:

[0124] The number of neurons in the input layer of the feedforward neural network model is set to 3, corresponding to the target pressure value Pset, the actual pressure value P and the pressure deviation Pd respectively;

[0125] The number of neurons in the hidden layer is set to 4, and the number of neurons in the output layer is set to 3, which correspond to three PID setting parameters, namely, Kp proportional adjustment coefficient, Ki integral adjustment coefficient, and Kd differential adjustment coefficient;

[0126] The initial weight matrix W and bias b are generated using random numbers;

[0127] The learning rate α of gradient descent is set to 0.1, and the mean square error loss function and sigmoid activation function are used;

[0128] Then, it is set that the training ends when the pressure deviation Pd is less than or equal to 0.02.

[0129] It should be noted here that the above specific numbers and function settings are for better describing the specific implementation methods, and are not intended to be limiting of the content of the present invention. For example, the loss function may also use the cross entropy loss function, which can shorten the system operation time, but its operation requires stronger computing power.

[0130] The machine learning module integrates a preliminarily trained feedforward neural network, that is, the neural network is trained and optimized in advance on a high-performance computer using empirical data to determine the initial values ​​of a series of key parameters, including the number of neurons in the input layer, hidden layer, and output layer, weight matrix, bias, learning rate, loss function, activation function, etc., so as to improve the efficiency of actual learning. After the feedforward neural network model is trained, in order to integrate it into the embedded system and run it effectively, it needs to be quantized and compressed, and the corresponding data type, storage method, calculation method, etc. need to be adjusted for the specific hardware platform.

[0131] like Figure 3 As shown, in an embodiment of the control method of the coffee machine extraction pressure based on machine learning of the present invention, before the initial operation, a set of PID setting parameters preset according to experience values ​​has been pre-set in the system. After the operator sets the target pressure value Pset through the extraction pressure setting device, the signal processing module of the coffee machine controller receives the current actual pressure value P sent by the pressure sensor, and sends it together with the current actual pressure value P to the PID calculation module. After obtaining the pressure difference value Pd=Pset-P, the PID calculation module obtains the PID setting parameters from the data storage and processing module, and calculates the control signal St, that is, the duty cycle, according to the difference between the target pressure value and the current actual pressure value by executing the PID formula, and sends it to the signal output module, and finally converts it into a PWM pulse signal to control the speed of the water pump and the driving motor. In this process, the signal processing module of the coffee machine controller also receives the current real-time flow value V sent by the flow sensor, and divides it by the time interval to obtain the current real-time flow rate value F.

[0132] After the operator completes a coffee extraction, the data storage and processing module in the coffee machine controller will completely record the relevant parameters, including the time array (T1, T2, T3...Ti), the actual pressure array corresponding to each time point (P1, P2, P3...Pi), the target pressure value corresponding to each time point (Pset1, Pset2...Pseti), the flow rate value corresponding to each time point (F1, F2, F3...Fi), the total flow value Vtotal and the PID setting parameters used for this coffee extraction. The division of time intervals can be defined according to the actual data processing capacity. The smaller the division, the more samples are obtained.

[0133] After the data storage and processing module completes the data recording, the data is immediately sent to the handheld wireless terminal through the first wireless communication module. Step S2211, before prompting the user whether the data of this coffee extraction is valid, may also include:

[0134] After the upper computer data processing module receives the coffee extraction data, it is necessary to determine whether the coffee extraction data is valid, that is, to perform preprocessing, that is, data cleaning. Examples of data cleaning strategies are as follows:

[0135] 1. If the coffee extraction time does not exceed the first preset value, such as 5 seconds, it is considered invalid data;

[0136] 2. If the total flow value does not exceed the preset second specified value, such as 90mL, it will be regarded as invalid data;

[0137] 3. If the actual pressure value exceeds the preset third specified value, such as 20 bar, it will be regarded as invalid data;

[0138] 4. If the flow rate value exceeds the preset fourth specified value, such as 6mL / s, for most of the preset time (80%), it will be regarded as invalid data;

[0139] 5. Continue to receive data from five coffee extractions, and regard the data group whose deviation from the average value is greater than a preset fifth specified value as invalid data, such as the deviation from the average value exceeds 50%.

[0140] In addition, in step S2, the machine learning module of the handheld wireless terminal obtains the target pressure value Pset, the current actual pressure value P after the drive motor speed is adjusted, and the corresponding pressure deviation Pd.

[0141] The machine learning module of the handheld wireless terminal can obtain the data of effective coffee extraction determined by the host computer data processing module, the corresponding target pressure value Pset, the current actual pressure value P after the driving motor speed is adjusted, and the corresponding pressure deviation Pd.

[0142] The above data cleaning strategies are summarized by experienced technicians and coffee practitioners, and will not be listed here one by one.

[0143] The host computer data processing module sends the cleaned data to the human-computer interaction module and the machine learning module respectively.

[0144] The host computer data processing module receives the signal through the wireless communication module, and after necessary data cleaning, sends it to the machine learning module and the human-computer interaction module.

[0145] According to another aspect of the present invention, there is further provided a computer-readable storage medium having computer-executable instructions stored thereon, wherein when the computer-executable instructions are executed by a processor, the processor is caused to: execute any of the methods described above.

[0146] The detailed contents of the device embodiments of the present invention can be found in the corresponding parts of the method embodiments, which will not be described in detail here.

[0147] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

[0148] It should be noted that the present invention can be implemented in software and / or a combination of software and hardware, for example, can be implemented using an application specific integrated circuit (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the present invention can be executed by a processor to implement the steps or functions described above. Similarly, the software program of the present invention (including related data structures) can be stored in a computer readable recording medium, for example, a RAM memory, a magnetic or optical drive or a floppy disk and the like. In addition, some steps or functions of the present invention can be implemented using hardware, for example, as a circuit that cooperates with a processor to perform each step or function.

[0149] In addition, a part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. The program instruction for calling the method of the present invention may be stored in a fixed or removable recording medium, and / or transmitted through a data stream in a broadcast or other signal-bearing medium, and / or stored in a working memory of a computer device that runs according to the program instruction. Here, according to an embodiment of the present invention, a device is included, the device including a memory for storing computer program instructions and a processor for executing program instructions, wherein, when the computer program instruction is executed by the processor, the device is triggered to run the method and / or technical solution based on the aforementioned multiple embodiments of the present invention.

[0150] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

Claims

1. A method for controlling the extraction pressure of a coffee machine based on machine learning, characterized in that: include: The PID calculation module of the coffee machine controller calculates a control speed signal for controlling the rotation of a driving motor of the coffee machine based on the current PID setting parameters and the difference between a preset target pressure value and a current actual pressure value in the pipeline of the coffee machine, so as to adjust the amount of water pumped into the pipeline by the water pump by adjusting the speed of the driving motor, thereby changing the current actual pressure value in the pipeline of the coffee machine; The machine learning module of the handheld wireless terminal obtains the target pressure value, the current actual pressure value after the drive motor speed is adjusted, and the corresponding pressure deviation; The machine learning module obtains optimized PID setting parameters based on the target pressure value, the current actual pressure value after the drive motor speed is adjusted, and the corresponding pressure deviation, wherein the machine learning module integrates a feedforward neural network model that has been pre-trained and optimized on a high-performance computer; The PID calculation module of the coffee machine controller calculates a control speed signal for controlling the rotation of a drive motor of the coffee machine based on the optimized current PID setting parameters and according to the difference between a preset target pressure value and a current actual pressure value in the pipeline of the coffee machine, so as to adjust the amount of water pumped into the pipeline by the water pump by adjusting the speed of the drive motor, thereby changing the current actual pressure value in the pipeline of the coffee machine.

2. The method for controlling the extraction pressure of a coffee machine based on machine learning according to claim 1, characterized in that: The machine learning module of the handheld wireless terminal obtains the target pressure value, the current actual pressure value after the drive motor speed is adjusted, and the corresponding pressure deviation, including: The human-computer interaction module of the handheld wireless terminal obtains the evaluation results input by the user based on the current actual pressure value, flow rate value and total flow value at each time point after the speed adjustment of the driving motor, and the evaluation results include: determining that the current PID setting parameters need to be adjusted or determining that the current PID setting parameters do not need to be adjusted; The machine learning module of the handheld wireless terminal calculates the pressure increase speed, overpressure value and pressure fluctuation degree after reaching the target pressure value based on the target pressure value, the current actual pressure value at each time point after the drive motor speed is adjusted and the corresponding pressure deviation; If the evaluation result is that the current PID setting parameters need to be adjusted, and / or one of the indicators including the boost speed, overpressure value and the degree of pressure fluctuation after reaching the target pressure value does not meet the standards, the machine learning module of the handheld wireless terminal obtains the optimized PID setting parameters based on the target pressure value, the current actual pressure value after the drive motor speed is adjusted and the corresponding pressure deviation.

3. The method for controlling the extraction pressure of a coffee machine based on machine learning as claimed in claim 2, characterized in that: If the evaluation result is that the current PID setting parameters need to be adjusted, or / and one of the pressure boost speed, overpressure value, and pressure fluctuation degree after reaching the target pressure value does not meet the standard, the machine learning module of the handheld wireless terminal obtains the optimized PID setting parameters based on the target pressure value, the current actual pressure value after the drive motor speed is adjusted, and the corresponding pressure deviation, including: Based on the corresponding score of the boost speed, the corresponding score of the overpressure value, the corresponding score of the pressure fluctuation degree after reaching the target pressure value, and the corresponding score of determining that the current PID setting parameters need to be adjusted, the weight Q of the learning rate adjustment is calculated; The original learning rate α of the feedforward neural network model is multiplied by the weight Q to obtain a new learning rate α, wherein when the new learning rate α is greater than 0.1, the new learning rate α is equal to 0.1; The machine learning module uses the target pressure value of this cycle, the current actual pressure value and the corresponding pressure deviation as the input of the feedforward neural network model, and based on the new learning rate α, calls the feedforward neural network model to perform calculations to obtain the optimized PID setting parameters.

4. The method for controlling the extraction pressure of a coffee machine based on machine learning as claimed in claim 3, characterized in that: Based on the corresponding score of the boost speed, the corresponding score of the overpressure value, the corresponding score of the pressure fluctuation degree after reaching the target pressure value, and the corresponding score of determining that the current PID setting parameters need to be adjusted, before calculating the weight Q of the learning rate adjustment, it includes: The human-computer interaction module of the handheld wireless terminal presents the coffee extraction data including: the current PID setting parameters, the target pressure value Pset, the current actual pressure value P at each time point after the speed adjustment of the driving motor and the corresponding pressure deviation, flow rate value and total flow value on the user interface, prompting the user whether the data of this coffee extraction is valid. If it is valid, the user is reminded to score the displayed data, which is recorded as the user score S0, that is, the corresponding score that determines the current PID setting parameters that need to be adjusted, indicating whether the user still hopes that the pressure control effect is better. The user score S0 is divided into 11 score values: 10 points means that no adjustment is required; 0 points means that the current pressure control is very unsatisfactory; from 9 points to 0 points, the intensity of pressure optimization adjustment is from small to large, among which 9 points means that it is available but a small degree of optimization is desired; the user score S0 is sent to the machine learning module by the upper computer data processing module of the wireless handheld terminal; The corresponding score S1 of the boost speed is: the time taken by the current actual pressure value P to reach the target pressure value Pset after a certain target pressure value is set. If the time is less than the preset boost setting value, the boost speed score S1 is 10 points; if it is greater than the boost setting value or the target pressure value has not been reached, the boost speed score S1 is 0 points; The corresponding score S2 of the overpressure value is: after reaching the target pressure value Pset and within the preset first time period t, the data group obtained by subtracting the target pressure value Pset from the current actual pressure value P, the maximum value is taken out, if the absolute value of the maximum value is less than the preset overpressure setting value, it is up to standard, that is, 10 points, if the absolute value of the maximum value is greater than the setting value, 0 points; The corresponding score S3 of the pressure fluctuation degree after reaching the target pressure value is: after reaching the target pressure value Pset, within the preset second time period, take the variance of 20 current actual pressure values ​​P1 to P20, that is, ((M-P1)2+(M-P2)2…(M-P20)2) / 20, where the average of P1 to P20 is M. If the variance is less than the preset variance setting value, it meets the standard, that is, 10 points; if it is greater than the setting value, the score is 0 points.

5. The method for controlling the extraction pressure of a coffee machine based on machine learning as claimed in claim 4, characterized in that: Calculate the learning rate adjusted weight Q, including: Calculate the weight Q of learning rate adjustment based on the current total score S = S0 + S1 + S2 + S3: If the total score S is equal to 0, the weight Q = 1.1 The total score S is equal to 1 to 30, then the weight Q = 1 + S / 1000; The total score S is equal to 31 to 39, then the weight Q = 1 + (S-30) / 1000; The total score S is equal to 40, so the weight Q=1.

6. The method for controlling the extraction pressure of a coffee machine based on machine learning according to claim 1, characterized in that: Before the machine learning module obtains the optimized PID setting parameters based on the target pressure value, the current actual pressure value after the drive motor speed is adjusted, and the corresponding pressure deviation, it includes: Utilize the existing historical experience data, including: historical PID setting parameters and historical actual pressure values, use the historical PID setting parameters as input, and the historical actual pressure values ​​as output, to fit a mathematical function as the mathematical model of the coffee machine in the high-performance computer; A set of PID setting parameters is randomly generated as initial values, and provided to the mathematical model corresponding to the coffee machine in the high-performance computer, and a target pressure value, an actual pressure value and a pressure deviation are obtained. The target pressure value, the actual pressure value and the pressure deviation are used as inputs of the feedforward neural network model on the high-performance computer, and a new set of PID setting parameters is output after calculation on the feedforward neural network model as the next set of inputs provided to the mathematical model corresponding to the coffee machine in the high-performance computer; this cycle is repeated until the set target value is reached, that is, the pressure deviation is less than 0.02; After the feedforward neural network model is trained, the feedforward neural network model is quantized and compressed, and the corresponding data type and storage method of the feedforward neural network model are adjusted according to the hardware platform of the handheld wireless terminal, wherein the original learning rate α of the feedforward neural network model is changed to 0.01 to obtain an optimized feedforward neural network model; the feedforward neural network model that has been pre-trained and optimized on a high-performance computer is integrated into the machine learning module.

7. The method for controlling the extraction pressure of a coffee machine based on machine learning according to claim 6, characterized in that: The machine learning module integrates a feedforward neural network model that has been pre-trained and optimized on a high-performance computer, and also includes: The number of neurons in the input layer of the feedforward neural network model is set to correspond to the target pressure value, the actual pressure value and the pressure deviation respectively; Set the hidden layer neurons and output layer neurons, corresponding to the PID setting parameters respectively; Use random numbers to generate the initial weight matrix W and bias b; Set the learning rate α for gradient descent, use the loss function and activation function; Set the training to end when the pressure deviation is less than or equal to the preset pressure deviation.

8. The method for controlling the extraction pressure of a coffee machine based on machine learning as claimed in claim 4, characterized in that: Before prompting the user whether the data of this coffee extraction is valid, it can also include: After the upper computer data processing module receives the coffee extraction data, it determines whether the coffee extraction data is valid. If the coffee extraction time does not exceed the preset first specified value, it will be regarded as invalid data; If the total flow value does not exceed the preset second specified value, it will be regarded as invalid data; If the actual pressure value exceeds the preset third specified value, it will be regarded as invalid data; If the flow rate value exceeds the preset fourth specified value within the preset time, it will be regarded as invalid data; The data sets of coffee extraction of a preset number of times are continuously received, and the data sets whose deviation from the average value is greater than a preset fifth specified value are regarded as invalid data.

9. The method for controlling the extraction pressure of a coffee machine based on machine learning according to claim 8, characterized in that: The machine learning module of the handheld wireless terminal obtains the target pressure value, the current actual pressure value after the drive motor speed is adjusted, and the corresponding pressure deviation. The machine learning module of the handheld wireless terminal obtains the data of effective coffee extraction determined by the upper computer data processing module, the corresponding target pressure value, the current actual pressure value after the driving motor speed is adjusted, and the corresponding pressure deviation.

10. A computer-readable storage medium having computer-executable instructions stored thereon, wherein: When the computer executable instructions are executed by a processor, the processor is caused to: perform the method according to any one of claims 1 to 9.

Citation Information

Cited By

  • Coffee making parameter decision method and system based on user interaction habits

    CN122691022A

  • Coffee making parameter decision method and system based on user interaction habits

    CN122691022B