Beverage pipeline discharging amount determination method and system, electronic equipment and storage medium
By acquiring historical output data and establishing a multiple linear regression model, the output deviation and difference of the beverage machine are dynamically determined, solving the problem of error accumulation when multiple materials are discharged together in the beverage machine, and realizing precise control of beverage output and consistency of formula.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-18
- Publication Date
- 2026-03-31
AI Technical Summary
Existing beverage machines cannot accurately control the dispensing volume when dispensing multiple materials simultaneously, leading to inconsistent beverage recipes and waste of raw materials. Traditional methods have failed to effectively solve the problem of error accumulation when dispensing multiple materials simultaneously.
By acquiring historical output data, a multiple linear regression model is established to dynamically determine the output deviation of each material and calculate the output difference. This is then combined with the target beverage formula to compensate for the output and ensure output accuracy.
It enables precise control of beverage output, ensuring consistency of beverage formula and taste, and reducing raw material waste.
Smart Images

Figure CN121761986A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of beverage machines, and more specifically, to a method, system, electronic device, and storage medium for determining the amount of beverage dispensed through a pipeline. Background Technology
[0002] A beverage machine is an automated device used to provide various beverages on demand, such as water, juice, soft drinks, coffee, and tea. Different liquid beverages are stored in separate hoppers within the machine, flowing through pipes connected to each hopper into a container placed on a common dispensing base. During dispensing, the machine needs to precisely control the dispensing volume of each ingredient, often requiring calibration of the corresponding pipes. However, because the properties and temperatures of the ingredients dispensed from different pipes vary, and multiple pipes may dispense the same beverage simultaneously, independent calibration for each ingredient often fails to guarantee the accuracy of the actual total dispensing volume of the beverage formula. For example, a 500ml beverage might actually dispense 480ml or 520ml, leading to poor taste consistency, ingredient waste, or customer dissatisfaction. Traditional methods calibrate only a single ingredient using a fixed compensation value, failing to consider the cumulative error problem when dispensing multiple ingredients simultaneously, and neglecting the impact of real-time fluctuations in the equipment's accuracy. Summary of the Invention
[0003] The present invention addresses the aforementioned problems. Embodiments of the present invention provide a method, system, electronic device, and storage medium for determining the discharge volume of beverages via pipeline. This solution can dynamically determine the discharge variation of each material in each beverage, providing a highly accurate and adaptable discharge variation reference for subsequent discharge compensation of the beverage.
[0004] According to one aspect of the present invention, a method for determining the dispensing quantity of a beverage via a pipeline is provided, applied to a beverage machine. The beverage machine includes multiple dispensing pipelines, each pipeline corresponding to a different material. The method includes: acquiring multiple sets of historical dispensing quantity data corresponding to multiple historical beverages, each set of historical dispensing quantity data including: the theoretical dispensing quantity of each material required for the corresponding historical beverage, and the actual dispensing quantity of the corresponding historical beverage; and determining, based on the multiple sets of historical dispensing quantity data and the target beverage formula of the target beverage, at least a portion of the target materials of each target material in the target beverage formula. The target output deviation of the material is used to indicate the expected deviation of the actual output of the corresponding material from the theoretical output when dispensing according to the target beverage formula. The total output difference of the target beverage is determined based on the actual total output and the theoretical total output of the target beverage. For each target material, which includes at least some of the target materials, the calculated output difference of the target material is determined based on the ratio between the target output deviation of that target material and the total output deviation, as well as the total output difference. The total output deviation is the sum of the target output deviations of all target materials in the target beverage formula.
[0005] Optionally, determining the target discharge deviation of each target material in at least a portion of the target materials of the target beverage formula based on multiple sets of historical discharge volume data and the target beverage formula of the target beverage includes: determining at least one discharge deviation of each material in multiple materials based on multiple sets of historical discharge volume data, wherein the at least one discharge deviation corresponds one-to-one with at least one preset beverage formula; for each target material in at least a portion of the target materials of the target beverage formula, determining the discharge deviation corresponding to the target beverage formula from the at least one discharge deviation of the target material to obtain the target discharge deviation of the target material, wherein the at least one preset beverage formula includes the target beverage formula.
[0006] Optionally, the method further includes: acquiring multiple sets of historical output data corresponding one-to-one with multiple historical beverages, and determining at least one output deviation of each of the multiple materials based on the multiple sets of historical output data, which is performed after each preset period. The multiple sets of historical output data acquired in the current preset period include the historical output data of all historical beverages output in the previous preset period.
[0007] Optionally, the target discharge deviation of each target material in at least a portion of the target materials of the target beverage formula is determined based on multiple sets of historical discharge volume data and the target beverage formula. This includes: calculating the discharge accuracy of each material in multiple materials based on multiple sets of historical discharge volume data; for each target material in at least a portion of the target materials, determining the target discharge deviation of that target material based on the discharge accuracy of that target material and the theoretical discharge volume of that target material when discharging according to the target beverage formula; wherein the target discharge deviation is positively correlated with the theoretical discharge volume and positively correlated with the accuracy error, the accuracy error being equal to the absolute value of the difference between the discharge accuracy and the preset accuracy benchmark value; the target discharge deviation being equal to the product of the accuracy error and the theoretical discharge volume; and / or, the accuracy benchmark value being equal to 1.
[0008] Optionally, the discharge accuracy of each material in a variety of materials is calculated based on multiple sets of historical discharge volume data, including: determining an actual discharge volume matrix and a theoretical discharge volume matrix based on multiple sets of historical discharge volume data, wherein the elements in the actual discharge volume matrix include the actual discharge volume of each of the multiple historical beverages, and the elements in the theoretical discharge volume matrix include the theoretical discharge volume of each of the multiple historical beverages' participating materials; and determining a multiple linear regression model between the actual discharge volume matrix and the theoretical discharge volume matrix using the least squares method; wherein the linear parameters in the multiple linear regression model represent the discharge accuracy of each material in the variety of materials.
[0009] Optionally, after determining the calculated discharge difference of the target material, the method further includes: for each target material of at least some of the target materials, calculating the actual discharge amount of the target material based on the calculated discharge difference and the theoretical discharge amount of the target material.
[0010] Optionally, the method further includes: for a specific target material in the target beverage formula, determining the actual output of the specific target material based on the output accuracy and the corresponding theoretical output, wherein the specific target material is the target material whose corresponding accuracy error is less than a preset error threshold and has the smallest accuracy error among all target materials, and the accuracy error is equal to the absolute value of the difference between the output accuracy and the preset accuracy benchmark value; at least some target materials are one or more non-specific target materials in the beverage formula, and non-specific target materials are target materials other than specific target materials; the preset accuracy benchmark value is equal to 1, the preset error threshold is 0.01, and / or, the actual output of the specific target material is equal to the product of the corresponding output accuracy and the corresponding theoretical output.
[0011] According to another aspect of the present invention, a system for determining the discharge volume of a beverage pipeline is also provided. The system includes multiple discharge pipelines, each corresponding to a different material. The system further includes: an acquisition module for acquiring multiple sets of historical discharge volume data corresponding to multiple historical beverages, each set of historical discharge volume data including: the theoretical discharge volume of each material required for the corresponding historical beverage, and the actual total discharge volume of the corresponding historical beverage; and a first determination module for determining the target amount of each target material in at least a portion of the target materials of the target beverage formula based on the multiple sets of historical discharge volume data and the target beverage formula of the target beverage. The discharge deviation is defined as follows: the target discharge deviation indicates the expected deviation of the actual discharge amount of the corresponding material from the theoretical discharge amount when discharging according to the target beverage formula; the second determination module is used to determine the total discharge difference of the target beverage based on the actual total discharge amount and the theoretical total discharge amount of the target beverage; the third determination module is used to determine the calculated discharge difference amount of each target material for at least some target materials based on the proportional relationship between the target discharge deviation of that target material and the total discharge deviation, as well as the total discharge difference amount. The total discharge deviation is the sum of the target discharge deviations of all target materials in the target beverage formula.
[0012] According to another aspect of the present invention, an electronic device is also provided, comprising: a processor and a memory, wherein the memory stores computer program instructions, which, when executed by the processor, are used to perform the above-described method for determining the pipeline discharge amount of a beverage.
[0013] According to another aspect of the present invention, a storage medium is also provided, on which program instructions are stored, which, when executed, are used to perform the above-described method for determining the pipeline discharge volume of a beverage.
[0014] The aforementioned technical solution determines the target output deviation of a single target material based on historical beverage output data and the target beverage formula. This helps overcome the problem that the output deviation determined by individually discharging a certain material may not be applicable to the current target beverage formula due to differences in output deviation between individual materials and different beverage formulas. Furthermore, by determining the calculated output difference of a target material based on the ratio of the target output deviation of a single target material to the total output deviation and the total output difference of the target beverage, this method of determining the calculated output difference can dynamically allocate the calculated output difference of each target material for each target beverage by combining the proportion of the output deviation of that target material to the total output deviation. This makes the determined calculated output difference of the target material closer to the actual output difference, thereby helping to ensure the consistency of the product and taste for the same formula.
[0015] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0016] The above and other objects, features, and advantages of the present invention will become more apparent from the more detailed description of the embodiments of the invention in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same parts or steps.
[0017] Figure 1 A schematic flowchart of a method for determining the pipeline discharge volume of a beverage according to an embodiment of the present invention is shown;
[0018] Figure 2 A schematic block diagram of a beverage pipeline discharge quantity determination system according to an embodiment of the present invention is shown;
[0019] Figure 3 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the present invention more apparent, exemplary embodiments according to the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely a part of the embodiments of the present invention, and not all of the embodiments of the present invention. It should be understood that the present invention is not limited to the exemplary embodiments described herein. Based on the embodiments of the present invention described herein, all other embodiments obtained by those skilled in the art without inventive effort should fall within the protection scope of the present invention.
[0021] To at least partially solve the aforementioned technical problems, embodiments of the present invention provide a method, system, electronic device, and storage medium for determining the pipeline discharge volume of beverages. This solution can dynamically determine the discharge variation of each material in each beverage, and the discharge variation used for reference during subsequent discharge compensation of the beverage is highly accurate and adaptable to the beverage.
[0022] Please see Figure 1 The diagram shown is a schematic flowchart of a method for determining the discharge volume of a beverage via a pipeline according to an embodiment of the present invention. According to one aspect of the present invention, a method for determining the discharge volume of a beverage via a pipeline is provided, applied to a beverage machine. The beverage machine includes multiple discharge pipelines, each used to discharge multiple materials. The method includes steps S110 to S140.
[0023] For example, a beverage machine can be used to dispense beverages, which can be mixtures of various materials, such as drinking water, syrup, juice, milk, and other liquids. The beverage machine can include multiple dispensing pipes, which can be connected one-to-one with multiple hoppers, and each hopper can store a corresponding material. The material can be dispensed through the dispensing pipe connected to its respective hopper under the drive of a pump.
[0024] In step S110, multiple sets of historical output data corresponding to multiple historical beverages are obtained. Each set of historical output data includes: the theoretical output of each material required for the corresponding historical beverage, and the actual total output of the corresponding historical beverage.
[0025] For example, a historical beverage refers to at least a portion of the beverages produced before the current moment. Each beverage may have a corresponding beverage recipe, which may indicate the types of materials required for the corresponding beverage, as well as the theoretical yield of each material. For example, a beverage recipe may include: 300g of material A, 80g of material B, and 20g of material C. For each historical beverage, the historical beverage may correspond to a beverage recipe, and after the historical beverage is produced, the actual total yield of the historical beverage can be weighed. It can be understood that for each historical beverage, the theoretical yield of each material required for the historical beverage can be obtained through the beverage recipe corresponding to the historical beverage, and the actual total yield of the historical beverage can be obtained by weighing the historical beverage. Therefore, each historical beverage may correspond to a set of historical yield data. Please refer to Table 1 below, which shows multiple sets of historical yield data in one embodiment.
[0026] Table 1:
[0027]
[0028]
[0029] In Table 1, each row except the first row represents a set of historical output data for a historical beverage. For example, for the historical beverage corresponding to the second row, the theoretical output of material A is 300g, material B is 10g, material C is 20g, material D is 90g, and the theoretical output of other materials is 0g (i.e., no other materials are needed). The actual total output of this historical beverage is 400g. For the historical beverage corresponding to the third row, the theoretical output of material B is 10g, material C is 20g, material E is 300g, and material M is 50g. The actual total output of this historical beverage is 500g. The same logic applies to the historical beverages corresponding to the other two rows, which will not be elaborated here. It can be understood that the theoretical total output is equal to the sum of the theoretical output of all materials required for the corresponding historical beverage. It should be noted that the four historical beverage recipes shown in Table 1 are all different. In actual production scenarios, multiple historical beverages may correspond to the same recipe. In this case, the theoretical yield of each material required for each historical beverage corresponding to the same recipe is the same, but the actual total yield may be the same or different. If two or more historical beverages have the same recipe, regardless of whether the actual total yield of the two or more historical beverages is the same, the historical yield corresponding to the two or more historical beverages is still two or more independent sets of historical yield data.
[0030] In step S120, the target discharge deviation of each target material in at least a portion of the target materials of the target beverage formula is determined based on multiple sets of historical discharge volume data and the target beverage formula of the target beverage. The target discharge deviation is used to indicate the expected deviation of the actual discharge volume of the corresponding material from the theoretical discharge volume when discharging according to the target beverage formula.
[0031] For example, a multiple linear regression model can be established using multiple sets of historical output data. In this embodiment of the invention, the theoretical output of each material can be regarded as an independent variable, and the actual total output of the beverage can be regarded as a dependent variable. By establishing a multiple linear regression model, the output accuracy of each material can be obtained.
[0032] For each material, the closer its dispensing accuracy is to the preset accuracy benchmark value, the more accurate the dispensing of the corresponding material. For example, the target beverage is the currently dispensed beverage; similarly, the target beverage has a corresponding beverage formula, denoted as the target beverage formula. The target beverage formula includes at least two materials from a variety of materials, and the materials in the target beverage formula can be denoted as the target materials. The target dispensing deviation can be determined based on the dispensing accuracy of the corresponding target materials. It can be understood that the greater the dispensing accuracy deviates from the preset accuracy benchmark value, the greater the target dispensing deviation. In some embodiments, the target dispensing deviation can be a dimensionless coefficient, indicating the relative degree of expected deviation. In other embodiments, the target dispensing deviation can be the product of a dimensionless coefficient and the theoretical dispensing amount of the target material when dispensing the target beverage formula, indicating the absolute degree of expected deviation. In this case, the unit of measurement for the target dispensing deviation is a weight unit, such as grams. It can be understood that the greater the dispensing accuracy of the target material deviates from the preset accuracy benchmark value, the greater the aforementioned dimensionless coefficient. In one specific embodiment, the dimensionless coefficient is equal to the absolute value of the difference between the discharge accuracy of the target material and the preset accuracy benchmark value. In the following text, the dimensionless coefficient can be referred to as the accuracy error.
[0033] In practice, multiple linear regression models are a preferred method for determining the dispensing accuracy of each material. Historical beverage production involves different formulas and various materials. Since the deviation between the actual and expected total dispensing volume is recorded each time historical beverages are produced, along with the materials included in each historical beverage and the theoretical dispensing volume of each material, the function of the multiple regression model is to use these records to uncover the impact of different materials on the dispensing deviation, and thus deduce the dispensing accuracy of each material. In other embodiments, other data models can be used for fitting; this invention is not limited to these.
[0034] In step S130, the total output difference of the target beverage is determined based on the actual total output of the target beverage and the theoretical total output of the target beverage.
[0035] For example, the total output difference of the target beverage can be obtained by subtracting the actual output total from the theoretical output total. It can be understood that if the actual output total is greater than the theoretical output total, the total output difference is positive; if the actual output total is less than the theoretical output total, the total output difference is negative.
[0036] In step S140, for each target material of at least some target materials, the calculated discharge difference of the target material is determined according to the proportional relationship between the target discharge deviation and the total discharge deviation of the target material and the total discharge difference. The total discharge deviation is the sum of the target discharge deviations of all target materials in the target beverage formula.
[0037] For example, for target material i (i = 1, 2, ..., n), n is equal to the total number of all target materials in the target beverage formula, and its output variance can be calculated using the following formula (1):
[0038]
[0039] In formula (1), Δm i w represents the calculated discharge variance of target material i. i This represents the target discharge deviation of target material i. Δm0 represents the sum of the target discharge deviations of all target materials in the target beverage formula, i.e., the total discharge deviation, and represents the total discharge difference of the target beverage. As can be seen from formula (1), the larger the ratio of the target discharge deviation to the total discharge deviation, the larger the calculated discharge difference allocated to the corresponding target material. The calculated discharge difference represents the discharge difference allocated to the corresponding target material after allocating the total discharge difference according to the weight of the target discharge deviation in the total discharge deviation.
[0040] The aforementioned technical solution determines the target output deviation of a single target material based on historical beverage output data and the target beverage formula. This helps overcome the problem that the output deviation determined by individually discharging a certain material may not be applicable to the current target beverage formula due to differences in output deviation between individual materials and different beverage formulas. Furthermore, by determining the calculated output difference of a target material based on the ratio of the target output deviation of a single target material to the total output deviation and the total output difference of the target beverage, this method of determining the calculated output difference can dynamically allocate the calculated output difference of each target material for each target beverage by combining the proportion of the output deviation of that target material to the total output deviation. This makes the determined calculated output difference of the target material closer to the actual output difference, thereby helping to ensure the consistency of the product and taste for the same formula.
[0041] Optionally, determining the target discharge deviation of each target material in at least a portion of the target materials of the target beverage formula based on multiple sets of historical discharge volume data and the target beverage formula of the target beverage includes: determining at least one discharge deviation of each material in multiple materials based on multiple sets of historical discharge volume data, wherein the at least one discharge deviation corresponds one-to-one with at least one preset beverage formula; for each target material in at least a portion of the target materials of the target beverage formula, determining the discharge deviation corresponding to the target beverage formula from the at least one discharge deviation of the target material to obtain the target discharge deviation of the target material, wherein the at least one preset beverage formula includes the target beverage formula.
[0042] For example, when the theoretical output of a material is used in the calculation of the output deviation, since the theoretical output of the same material may differ in different preset beverage formulas, the output deviation of the same material in each preset beverage formula may also differ. In other words, each output deviation of the same material corresponds one-to-one with each preset beverage formula. It can be understood that for each material, each output deviation of that material is positively correlated with its theoretical output in the corresponding preset beverage formula. For example, after determining at least one output deviation for each of the multiple materials, since each target material belongs to one of the multiple materials, at least one output deviation for the target material can be determined accordingly. Since the target beverage formula belongs to one of the preset beverage formulas, the output deviation of the target material in the target beverage formula, i.e., the target output deviation, can be determined from at least one output deviation of the target material. The theoretical yield of the same material may differ in different beverage formulas, which may lead to different actual yield deviations when the material is dispensed according to different beverage formulas. The above technical solution strongly correlates the target yield deviation of the target material with the target beverage formula, which helps to make each determined target yield deviation closer to the actual yield deviation when dispensed according to the corresponding target beverage formula.
[0043] Optionally, in one embodiment, the method according to the present invention may further include: acquiring multiple sets of historical discharge volume data corresponding one-to-one with multiple historical beverages, and determining at least one discharge deviation of each of multiple materials based on the multiple sets of historical discharge volume data, which is performed after each preset period interval, wherein the multiple sets of historical discharge volume data acquired in the current preset period include the historical discharge volume data of all historical beverages discharged in the previous preset period.
[0044] For example, step S110 and the operation of determining the discharge deviation of each material can be performed according to a preset cycle. For instance, step S110 and the operation of determining the discharge deviation of each material can be performed every other day, or every week. In a specific embodiment, the preset cycle is one day. At a preset time each day (e.g., 6:00 AM), historical discharge volume data of all beverages discharged during the period from the preset time of the previous day to the preset time of the current day can be obtained, and the discharge deviation of each material can be determined based on the obtained historical discharge volume data. This scheme can dynamically update the historical discharge volume data and the discharge deviation of each material. When changes in the condition of the beverage machine pipeline (such as damage or repair) cause changes in the actual discharge deviation, re-determining the discharge deviation every preset cycle can ensure that the calculated discharge deviation matches the actual discharge deviation. In addition, by setting a preset cycle, the fluctuation characteristics of the pipeline discharge accuracy over time can be adapted, thereby helping to detect faulty pipelines early.
[0045] Optionally, in one embodiment, the method according to the present invention may further include: outputting a prompt message when the calculated output difference of any one of the target materials is greater than or equal to a preset difference threshold corresponding to that target material.
[0046] For example, the preset difference threshold for materials in different beverage formulas can be the same or different. The preset difference threshold for different materials in the same beverage formula can be the same or different. This embodiment of the invention does not limit the specific value of the preset difference threshold. The beverage machine can have an interactive device (e.g., a display screen / indicator light / speaker, etc.) or be connected to an interactive device. The interactive device is used to output a prompt message when the calculated dispensing difference of any target material is greater than or equal to the corresponding preset difference threshold. This can promptly prompt the user that the dispensing difference of the target material does not meet the beverage dispensing requirements, thereby prompting the user that the target beverage may be wasted, and / or that material compensation for the target beverage is needed, and / or that the beverage machine needs repair, and / or that the relevant materials in the beverage machine's hopper need to be replenished, etc.
[0047] Optionally, the target discharge deviation of each target material in at least a portion of the target materials of the target beverage formula is determined based on multiple sets of historical discharge volume data and the target beverage formula. This includes: calculating the discharge accuracy of each material in multiple materials based on multiple sets of historical discharge volume data; for each target material in at least a portion of the target materials, determining the target discharge deviation of that target material based on the discharge accuracy of that target material and the theoretical discharge volume of that target material when discharging according to the target beverage formula; wherein the target discharge deviation is positively correlated with the theoretical discharge volume and positively correlated with the accuracy error, the accuracy error being equal to the absolute value of the difference between the discharge accuracy and the preset accuracy benchmark value; the target discharge deviation being equal to the product of the accuracy error and the theoretical discharge volume; and / or, the accuracy benchmark value being equal to 1.
[0048] For example, a multiple linear regression model can be constructed using historical output data. When solving for the linear parameters in the multiple linear regression model, any mathematical method capable of solving the linear parameters can be used, such as the least squares method, the least absolute deviation method (LAD), the Huber regression algorithm, or the maximum likelihood estimation method (MLE). The obtained linear parameters can represent the output accuracy of the material. In this embodiment of the invention, the preset accuracy benchmark value is preferably 1; the closer the output accuracy is to 1, the more accurate the output of the corresponding material. In a specific embodiment, for target material i (i = 1, 2, ..., n), n equals the total number of target materials in the target beverage formula, and its target output deviation w... i It can be calculated using the following formula (2):
[0049] w i =|1-a i |×m i (2)
[0050] In formula (2), a i Indicates the discharge accuracy of target material i, |1-a i | represents the accuracy error of target material i, m i This represents the theoretical output quantity of target material i when discharging according to the target beverage formula. From formula (2), it can be seen that the target output deviation w i With theoretical output m i It shows a positive correlation with the accuracy error |1-a i| There is a positive correlation. This method combines the precision error of the target material with the theoretical output of the target material when it is dispensed according to the target beverage formula, so that the target output deviation can be close to the actual deviation of the actual output of the corresponding target material from the theoretical output.
[0051] Optionally, the discharge accuracy of each material in a variety of materials is calculated based on multiple sets of historical discharge volume data, including: determining an actual discharge volume matrix and a theoretical discharge volume matrix based on multiple sets of historical discharge volume data, wherein the elements in the actual discharge volume matrix include the actual discharge volume of each of the multiple historical beverages, and the elements in the theoretical discharge volume matrix include the theoretical discharge volume of each of the multiple historical beverages' participating materials; and determining a multiple linear regression model between the actual discharge volume matrix and the theoretical discharge volume matrix using the least squares method; wherein the linear parameters in the multiple linear regression model represent the discharge accuracy of each material in the variety of materials.
[0052] For example, a multiple linear regression model can be represented by the following equation (3):
[0053] Y = X·A (3)
[0054] In equation (3), Y represents the actual total output matrix, which can be represented as [Y1, Y2, ..., Y...]. u ] T , u represents the number of sets of historical output data, Y is a matrix of u rows and 1 column, and each element in Y represents the actual output of a historical beverage. X represents the theoretical output matrix, which can be expressed by the following formula (4):
[0055]
[0056] In formula (4), v represents the total number of all material types. It can be understood that X is a matrix of u rows and v columns. Each element in each row of X represents the theoretical output of each material in a historical beverage, and each element in each column represents the theoretical output of a material in various historical beverages. Combining the historical output data shown in Table 1, for each row of X, if a material did not participate in the output of the corresponding historical beverage, then the element corresponding to that material is 0. If the p-th row of matrix Y corresponds to the p-th historical beverage, then the p-th row of matrix X represents the p-th historical beverage. A represents a linear parameter, which can be expressed as [A1, A2, ..., A...]. v A is a matrix with rows of v and columns of 1. In the above equation (3), Y and X can both be determined by historical output data. A is the parameter to be solved, which can be solved by the least squares method. Specifically, A can be expressed by the following formula (5):
[0057] A = (X T X) -1X T Y (5)
[0058] For example, in matrix A, each element represents the discharge accuracy of the corresponding material. It can be understood that if the k-th column of matrix X corresponds to the k-th material, then the k-th row of matrix A corresponds to the k-th material, and the elements in the k-th row of matrix A represent the discharge accuracy of the k-th material. Solving for the linear parameters of the multiple linear regression model using the least squares method requires no numerical optimization iteration, resulting in high computational efficiency.
[0059] Please refer to Table 2 below. Table 2 shows the discharge accuracy of each material and the historical discharge statistics of each material, calculated based on the least squares method in one embodiment.
[0060] Table 2:
[0061]
[0062]
[0063] The material accuracy deviation is equal to the difference between the discharge accuracy and 1. It should be noted that the accuracy deviation can be positive or negative; the accuracy error in the aforementioned embodiment is positive. The average output of the material is equal to the ratio between the sum of the theoretical output of the material in each historical beverage and the number of historical beverages. The number of uses refers to the number of times the material participates in the discharge process in each historical beverage. The discharge accuracy and average output recorded in Table 2 above are approximate values rounded to six decimal places, and the accuracy deviation is a percentage obtained by converting approximate values rounded to eight decimal places.
[0064] Optionally, after determining the calculated discharge difference of the target material, the method further includes: for each target material of at least some of the target materials, calculating the actual discharge amount of the target material based on the calculated discharge difference and the theoretical discharge amount of the target material.
[0065] For example, for any target material, the actual discharge rate of that target material is equal to the sum of the theoretical discharge rate and the calculated discharge difference. Calculating the actual discharge rate of the target material helps to subsequently correct the operating parameters of the pump connected to the discharge pipeline of the beverage machine.
[0066] It should be noted that the following situation may exist: if the discharge accuracy of a certain target material is greater than the accuracy benchmark value, meaning the actual discharge volume should theoretically be greater than the theoretical discharge volume, but the actual discharge volume of the target beverage is less than the theoretical discharge volume. This situation usually occurs because the discharge accuracy of other target materials deviates from the preset accuracy benchmark value more significantly than that of this target material. In other words, the degree to which the discharge accuracy of other target materials is less than the preset accuracy benchmark value is greater than the degree to which the discharge accuracy of this target material is greater than the preset accuracy benchmark value, leading to the actual discharge volume of the target beverage being less than the theoretical discharge volume. Therefore, the weight of this target material is usually smaller. Even if the calculated discharge difference for this target material is still negative, due to its smaller weight, the calculated discharge difference will not differ too much from the actual discharge difference, thus meeting the calculation expectations. Similarly, it is also possible that the actual discharge volume of a certain target material should theoretically be less than the theoretical discharge volume, but the actual discharge volume of the target beverage is greater than the theoretical discharge volume. In this scenario, the degree to which the discharge accuracy of the target material is less than the preset accuracy benchmark value is less than the degree to which the discharge accuracy of other target materials is greater than the preset accuracy benchmark value, which would cause the actual discharge volume of the target beverage to exceed the theoretical discharge volume. Similar to the previous scenario, the calculated discharge difference obtained in this case also meets the expected calculation.
[0067] For example, there may also be a special case where the total discharge difference is positive, the discharge accuracy of a certain target material is less than the accuracy reference value, and the discharge accuracy of this target material deviates from the accuracy reference value more than that of other target materials; or, the total discharge difference is negative, but the discharge accuracy of a certain target material is greater than the accuracy reference value, and the discharge accuracy of this target material deviates from the accuracy reference value more than that of other target materials. This is usually because the theoretical discharge amount of the target material is extremely small. In this case, it is preferable that the target discharge deviation of the target material is the product of the corresponding accuracy error and the theoretical discharge amount, which can reduce the weight of target materials whose calculated actual discharge amount has the opposite sign to the theoretical actual discharge amount. Please refer to Table 3 below, which shows the calculated discharge difference for two target materials in one embodiment.
[0068] Table 3:
[0069]
[0070] In the embodiments shown in Table 3 above, the target discharge deviation of the target material is equal to the product of the accuracy error and the corresponding theoretical discharge amount. In this embodiment, the target discharge deviation of material B has a smaller weight in the total discharge deviation, and the ratio between the target discharge deviation and the total discharge deviation of material A is smaller. Therefore, the calculated discharge difference allocated to material B (0.39g) is smaller than the calculated discharge difference allocated to material A (6.01g). In this embodiment, the difference between the actual discharge amount and the theoretical discharge amount of the target beverage is positive (6.4g). Although the actual discharge amount of material B is more likely to be less than its theoretical discharge amount (20g) during actual discharge, due to its smaller weight, the calculated discharge difference allocated to it is smaller, and the final calculated actual discharge amount can be close to the actual value.
[0071] Optionally, in one embodiment, the method according to the present invention may further include: for a specific target material in a target beverage formulation, determining the actual output amount of the specific target material based on the output accuracy of the specific target material and the corresponding theoretical output amount, wherein the specific target material is the target material whose corresponding accuracy error is less than a preset error threshold and has the smallest accuracy error among all target materials, and the accuracy error is equal to the absolute value of the difference between the output accuracy and the preset accuracy benchmark value; at least some of the target materials are one or more non-specific target materials in the beverage formulation, and the non-specific target materials are target materials other than the specific target materials; the preset accuracy benchmark value is equal to 1, the preset error threshold is 0.01, and / or, the actual output amount of the specific target material is equal to the product of the corresponding output accuracy and the corresponding theoretical output amount.
[0072] For example, target materials may include specific target materials and non-specific target materials. For any target material, if the accuracy error of the target material is less than a preset error threshold (0.01) and is the smallest among all target materials, then the target material is a specific target material. Target materials other than specific target materials are non-specific target materials. For each non-specific target material, the calculated output difference can be determined based on the ratio between the target output deviation and the total output deviation of that non-specific target material, as well as the total output difference. Then, the calculated output difference and the theoretical output amount of that non-specific target material are summed to obtain the corresponding actual output amount. For each specific target material, the output accuracy of that specific target material can be multiplied by the corresponding theoretical output amount, and the product can be used as the actual output amount of that specific target material. Specifically, there is a situation where, in the target beverage formula, the output accuracy of a certain target material is very close to the accuracy benchmark value, and the theoretical output amount of that target material is very small, but the calculated output difference amount for that target material is still large. For example, if the total output variance of a target beverage is 100g, the theoretical output of syrup is 5g, and the target output deviation of syrup accounts for only 1% of the total output variance, then the calculated output variance of syrup is 1g. However, the actual accuracy error of syrup is less than 0.01. In this case, the calculated output variance of syrup obviously differs significantly from the actual output variance, and the final calculated actual output also differs significantly from the actual value. Considering this situation, this embodiment of the invention, for specific target materials with accuracy errors less than a preset error threshold and the smallest accuracy error among all target materials, directly calculates the product of its output accuracy and theoretical output to obtain its actual output. This scheme can effectively avoid assigning a large calculated output variance to target materials with accurate output and small theoretical output. By multiplying the output accuracy of a specific target material by its theoretical output, its accurate actual output can be obtained.
[0073] Please see Figure 2 The diagram shown is a schematic block diagram of a beverage pipeline discharge quantity determination system 200 according to an embodiment of the present invention. According to another aspect of the present invention, a beverage pipeline discharge quantity determination system is also provided. The system 200 includes multiple discharge pipelines, each used to discharge multiple materials. The system 200 further includes:
[0074] The acquisition module 210 is used to acquire multiple sets of historical output data corresponding to multiple historical beverages. Each set of historical output data includes: the theoretical output of each material required for the corresponding historical beverage, and the actual total output of the corresponding historical beverage.
[0075] The first determining module 220 is used to determine the target discharge deviation of each target material of at least a portion of the target materials in the target beverage formula based on multiple sets of historical discharge volume data and the target beverage formula of the target beverage. The target discharge deviation is used to indicate the expected deviation of the actual discharge volume of the corresponding material from the theoretical discharge volume when discharging according to the target beverage formula.
[0076] The second determining module 230 is used to determine the total output difference of the target beverage based on the actual output total and the theoretical output total of the target beverage.
[0077] The third determining module 240 is used to determine the calculated discharge difference of each target material for at least some of the target materials, based on the proportional relationship between the target discharge deviation and the total discharge deviation of the target material and the total discharge difference. The total discharge deviation is the sum of the target discharge deviations of all the target materials in the target beverage formula.
[0078] Please see Figure 3 As shown, it is a schematic block diagram of an electronic device 300 according to an embodiment of the present invention. According to another aspect of the present invention, an electronic device is also provided, including: a processor 310 and a memory 320, wherein the memory 320 stores computer program instructions, which are executed by the processor 310 to perform the above-mentioned method for determining the pipeline output of beverages.
[0079] According to another aspect of the present invention, a storage medium is also provided, on which program instructions are stored. When the program instructions are executed by a computer or processor, the computer or processor performs the corresponding steps of the beverage pipeline discharge quantity determination method described in the embodiments of the present invention, and is used to implement a corresponding module in the beverage pipeline discharge quantity determination system according to the embodiments of the present invention, or a corresponding module in the beverage pipeline discharge quantity determination system described above. The storage medium may, for example, include a memory card of a smartphone, a storage component of a tablet computer, a hard disk of a personal computer, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disc read-only memory (CD-ROM), a USB memory, or any combination of the above storage media. A computer-readable storage medium may be any combination of one or more computer-readable storage media.
[0080] According to another aspect of the present invention, a computer program product is also provided, including computer program instructions, which, when executed, are used to perform the method for determining the pipeline discharge volume of a beverage as described above.
[0081] Those skilled in the art will understand the specific implementation and beneficial effects of the above-described method for determining the pipeline output of beverages by reading the detailed description of the method above. For the sake of brevity, they will not be described in detail here.
[0082] Although exemplary embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above exemplary embodiments are merely illustrative and are not intended to limit the scope of the invention. Various changes and modifications can be made therein by those skilled in the art without departing from the scope and spirit of the invention. All such changes and modifications are intended to be included within the scope of the invention as claimed in the appended claims.
[0083] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0084] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed.
[0085] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0086] Similarly, it should be understood that, in order to streamline the invention and aid in understanding one or more of the various aspects of the invention, features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the description of exemplary embodiments of the invention. However, this approach should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the corresponding claims, its inventive point lies in solving the corresponding technical problem with fewer features than all of those in a single disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the invention.
[0087] Those skilled in the art will understand that, apart from the mutual exclusion of features, all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or apparatus so disclosed can be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0088] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments can be used in any combination.
[0089] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some modules in the beverage pipeline dispensing quantity determination system according to embodiments of the present invention. The present invention can also be implemented as an apparatus program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such programs implementing the present invention can be stored on a computer-readable medium or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
[0090] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.
[0091] The above are merely specific embodiments or descriptions of the present invention, and the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. The scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method of determining the amount of beverage to be dispensed from a line, characterized in that, The method is applied to a beverage machine, the beverage machine comprising a plurality of discharge pipelines for discharging a plurality of materials one by one, and the method comprises: obtaining a plurality of sets of historical discharge amount data corresponding to a plurality of historical beverages one by one, each set of historical discharge amount data comprising a theoretical discharge amount of each material required by a corresponding historical beverage and an actual total discharge amount of the corresponding historical beverage; determining a target discharge deviation of each target material of at least part of target materials of a target beverage formula of the target beverage formula according to the plurality of sets of historical discharge amount data and the target beverage formula, the target discharge deviation being used to indicate an expected deviation degree of an actual discharge amount of a corresponding material relative to a theoretical discharge amount when discharging according to the target beverage formula; determining a total discharge difference amount of the target beverage according to an actual total discharge amount of the target beverage and a theoretical total discharge amount of the target beverage; for each target material of the at least part of target materials, determining a calculated discharge difference amount of the target material according to a proportional relationship between the target discharge deviation of the target material and a total discharge deviation and the total discharge difference amount, the total discharge deviation being a sum value of target discharge deviations of all target materials in the target beverage formula.
2. The method of claim 1, wherein, The determining of the target discharge deviation of each target material of the at least part of target materials of the target beverage formula according to the plurality of sets of historical discharge amount data and the target beverage formula comprises: determining at least one discharge deviation of each material of the plurality of materials according to the plurality of sets of historical discharge amount data, the at least one discharge deviation corresponding to at least one preset beverage formula one by one; for each target material of the at least part of target materials of the target beverage formula, determining a discharge deviation corresponding to the target beverage formula in at least one discharge deviation of the target material to obtain the target discharge deviation of the target material, the at least one preset beverage formula comprising the target beverage formula.
3. The method of claim 2, wherein, The method further comprises: The operations of the obtaining of the plurality of sets of historical discharge amount data corresponding to the plurality of historical beverages one by one and the determining of the at least one discharge deviation of each material of the plurality of materials according to the plurality of sets of historical discharge amount data are performed after each interval preset period, and the plurality of sets of historical discharge amount data obtained in a current preset period comprise historical discharge amount data of all historical beverages discharged in a last preset period.
4. The method of claim 1, wherein, The determining of the target discharge deviation of each target material of the at least part of target materials of the target beverage formula according to the plurality of sets of historical discharge amount data and the target beverage formula comprises: calculating a discharge accuracy of each material of the plurality of materials according to the plurality of sets of historical discharge amount data; for each target material of the at least part of target materials, determining a target discharge deviation of the target material according to the discharge accuracy of the target material and a theoretical discharge amount of the target material when discharging according to the target beverage formula; The target discharge deviation is positively correlated with the theoretical discharge amount and positively correlated with a precision error, the precision error being an absolute value of a difference between the discharge precision and a preset precision reference value; The target discharge deviation is equal to a product of the precision error and the theoretical discharge amount; and / or, the precision reference value is equal to 1.
5. The method of claim 4, wherein, The calculation of the discharge precision of each of the plurality of materials according to the plurality of sets of historical discharge amount data comprises: determining, based on the plurality of sets of historical discharge amount data, an actual total discharge amount matrix and a theoretical discharge amount matrix, elements in the actual total discharge amount matrix including respective actual total discharge amounts of the plurality of historical drinks, and elements in the theoretical discharge amount matrix including respective theoretical discharge amounts of materials involved in discharging of the plurality of historical drinks; determining, by using a least square method, a multivariate linear regression model between the actual total discharge amount matrix and the theoretical discharge amount matrix; wherein a linear parameter in the multivariate linear regression model represents the discharge precision of each of the plurality of materials.
6. The method according to any one of claims 1 to 5, characterized in that, After the calculation of the calculated discharge difference amount of the target material, the method further comprises: for each of the at least part of the target materials, calculating an actual discharge amount of the target material according to the calculated discharge difference amount and the theoretical discharge amount of the target material.
7. The method according to claim 6 when dependent on claim 4, characterized in that, The method further comprises: for a specific target material in the target drink formula, determining an actual discharge amount of the specific target material according to the discharge precision and the corresponding theoretical discharge amount of the specific target material, the specific target material being a target material whose corresponding precision error is less than a preset error threshold and is the smallest among the precision errors of the all target materials, the precision error being an absolute value of a difference between the discharge precision and a preset precision reference value; the at least part of the target materials being one or more non-specific target materials in the drink formula, the non-specific target material being a target material other than the specific target material; the preset precision reference value being equal to 1, the preset error threshold being 0.01, and / or the actual discharge amount of the specific target material being equal to a product of the corresponding discharge precision and the corresponding theoretical discharge amount.
8. A system for determining the amount of beverage to be dispensed from a line, characterized in that The system comprises a plurality of discharge pipelines for one-to-one discharging of a plurality of materials, and further comprises: an acquisition module configured to acquire a plurality of sets of historical discharge amount data corresponding to a plurality of historical drinks one-to-one, each set of historical discharge amount data comprising: a theoretical discharge amount of each material required by a corresponding historical drink, and an actual total discharge amount of the corresponding historical drink; a first determination module configured to determine, according to the plurality of sets of historical discharge amount data and a target drink formula of a target drink, a target discharge deviation of each of at least part of target materials of the target drink formula, the target discharge deviation being used to indicate an expected deviation degree of an actual discharge amount of a corresponding material relative to a theoretical discharge amount when discharging according to the target drink formula; a second determining module, configured to determine a total difference in dispensing of the target beverage according to an actual total dispensing amount of the target beverage and a theoretical total dispensing amount of the target beverage; a third determining module, configured to, for each target material of the at least part of target materials, determine a calculated dispensing difference amount of the target material according to a proportional relationship between a target dispensing deviation of the target material and a total dispensing deviation and the total difference in dispensing, the total dispensing deviation being a sum of target dispensing deviations of all target materials in the target beverage formula.
9. An electronic device, comprising: A device, comprising a processor and a memory, wherein the memory stores computer program instructions, and the computer program instructions, when executed by the processor, cause the device to perform the method of determining a dispensing amount of a beverage pipeline according to any one of claims 1-7.
10. A storage medium storing a computer program / instructions, characterized by The computer program / instructions, when executed, perform the method of determining a dispensing amount of a beverage pipeline according to any one of claims 1-7.