Cigar fermentation curve fitting method, electronic equipment and storage medium
By classifying and fitting the temperature-time and humidity-time curves of high-quality tobacco piles during cigar fermentation, confidence interval curves are generated, which solves the problem of lack of standards in cigar fermentation process and improves the controllability and quality consistency of cigar fermentation.
Patent Information
- Application Number
- CN202410249076.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-05
- Publication Date
- 2026-01-06
AI Technical Summary
The lack of standards in cigar fermentation processes leads to inconsistencies in the fermentation process, which affects the quality of cigars.
By obtaining a list of tobacco pile grades, the temperature-time and humidity-time curve information of high-quality tobacco piles are classified. The least squares method and the confidence interval of the normal distribution are used to generate a fitted temperature-time and humidity-time curve interval to guide the fermentation process.
This improves the controllability and consistency of cigar fermentation, ensuring the final quality of the cigars.
Smart Images

Figure CN121278431A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing, and in particular to a method for fitting a cigar fermentation curve, an electronic device, and a storage medium. Background Technology
[0002] Fermentation is a crucial step in cigar making. Through this stage, the tobacco leaves are fully fermented and aged, developing a complex and unique flavor that has a profound impact on the final quality and taste of the cigar.
[0003] Currently, there are no clear standards for cigar fermentation processes, and producers in various provinces and cities are still exploring the process, resulting in insufficient data and basic research. The lack of standardized procedures for fermentation relies heavily on the personal experience of fermentation workers, often leading to inconsistencies and negatively impacting cigar quality. Summary of the Invention
[0004] To address the aforementioned technical problems, the technical solution adopted by this invention is as follows:
[0005] A method for fitting a cigar fermentation curve, comprising the following steps:
[0006] S1: Obtain the list of smoke pile levels A = {A1, A2, ..., A...} i , ..., A m}, A i Let i be the grade of the i-th smoke pile, i = 1, 2, ..., m, where m is the total number of smoke piles.
[0007] S2: Based on A, obtain the temperature-time curve information set B = {B1, B2, ..., B} of the high-quality tobacco pile. g , ..., B z} and the humidity-time curve information set C = {C1, C2, ..., C} g , ..., C z}, B g This provides the temperature-time curve information for the g-th high-quality tobacco pile, where g = 1, 2, ..., z, and z is the total number of high-quality tobacco piles. g ={B g 1 B g 2 , ..., B g j , ..., B g n}, B g j C represents the temperature value at the j-th hour of fermentation in the temperature-time curve corresponding to the g-th high-quality tobacco pile, where j = 1, 2, ..., n, and n is the total number of fermentation hours.g is the humidity-time curve information corresponding to the g-th high-quality tobacco stack, C g ={C g 1 , C g 2 , ……, C g j , ……, C g n}, C g j is the humidity value corresponding to the j-th hour of tobacco stack fermentation in the humidity-time curve corresponding to the g-th high-quality tobacco stack, z < m, and the high-quality tobacco stacks are a preset number of tobacco stacks obtained from A according to the tobacco leaf grades
[0008] S3: Classify the high-quality tobacco stacks according to a preset first classification rule, and classify B into B<00�0032>={B 0 1, B 0 2, ……, B 0 r , …… B 0 s}, B 0 r is the temperature-time curve information set of the r-th class of high-quality tobacco stacks, r = 1, 2, ……, s, s is the number of categories of high-quality tobacco stacks, B 0 r ={B 0 r 1 , B 0 r 2 , ……, B 0 r x , ……, B 0 r p(r)}, B 0 r x is the temperature-time curve information corresponding to the x-th high-quality tobacco stack in the r-th class of temperature-time curve information set, x = 1, 2, ……, p(r), p(r) is the number of high-quality tobacco stacks in the r-th class of temperature-time curve information set; B 0 r x ∈B, classify C into C 0 ={C 0 1, C 0 2, ……, C 0 r , ……, C 0 s}, C 0 r is C0 The humidity-time curve information set of the r-th type of high-quality tobacco pile, C 0 r ={C 0 r 1 C 0 r 2 , ..., C 0 r x , ..., C 0 r p (r)}, C 0 r x For the humidity-time curve information corresponding to the x-th high-quality tobacco pile in the r-th humidity-time curve information set, C 0 r x ∈C.
[0009] S4: Based on B for each type of smoke pile 0 r Generate the fitted temperature-time curve E for each type of smoke pile. r ={E r 1 E r 2 , ..., E r y , ..., E r q(r)}, E r y Let y = 1, 2, ..., q(r) be the fitted temperature-time curve of the r-th type of tobacco pile after the y-th turning, where q(r) is the maximum number of turnings in the r-th type of tobacco pile, and E is the maximum value of the number of turnings in the r-th type of tobacco pile. ry ={E r y 1, E r y 2, ..., E r y k , ..., E r y t(y)}, E r y k Let t(y) be the temperature value at hour k in the humidity-time curve fitted to the r-th type of tobacco pile after the y-th turning, where k = 1, 2, ..., t(y), and t(y) is the average fermentation time of the r-th type of tobacco pile after the y-th turning; according to C 0 r Generate the fitted humidity-time curve F for each type of smoke pile.r ={F r 1 F r 2 , ..., F r y , ..., F r q(r)}, F r y Let F be the humidity-time curve fitted to the r-th type of tobacco pile after the y-th turning. r y ={F r y 1, F r y 2, ..., F r y k , ..., F r y t(y)}, F r y k S4 represents the humidity value at hour k in the humidity-time curve fitted to the r-th type of tobacco pile after the y-th turning; where S4 includes:
[0010] S41: For each B 0 r x and C 0 r x Perform data cleaning.
[0011] S42: Each B 0 r x and C 0 r x The data in the table is categorized according to the number of times the pile is turned over, let B 0 r x ={G r x 1, G r x 2, ..., G r x y , ..., G r x q(r)}, G r x y Let C be the set of temperature-time data points after the y-th heap flip. 0 r x ={G 0r x 1, G 0 r x 2, ..., G 0 r x y , ..., G 0 r x q(r)}, G 0 r x y Let y be the set of humidity-time data points after the y-th turning of the pile.
[0012] S43: Based on each B 0 r x Every G r x y The data in the dataset is used to generate E using the least squares method. r y .
[0013] S44: Based on each C 0 r x Every G 0 r x y The data in the dataset is used to generate F using the least squares method. r y .
[0014] S5: Obtain all G values located within each y. r x y The mean G of the data r x y 0 The temperature-time curve range with a 95% confidence interval was obtained based on the confidence interval of the normal distribution.
[0015] S6: Obtain all G values located within each y. 0 r x y The mean G of the data 0 r x y 0 The humidity-time curve range with a 95% confidence interval was obtained based on the confidence interval of the normal distribution.
[0016] According to another aspect of the present invention, a non-transitory computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or the at least one program being loaded and executed by a processor to implement the aforementioned method.
[0017] According to another aspect of the present invention, an electronic device is provided, including a processor and the aforementioned non-transitory computer-readable storage medium.
[0018] The present invention has at least the following beneficial effects:
[0019] First, obtain the list of tobacco pile grades A, and based on A, obtain the temperature-time curve information set B and humidity-time curve information set C for high-quality tobacco piles. Then, classify B as B according to the preset first classification rule. 0 C is classified as C 0 Then according to B 0 and C 0 Generate the fitted temperature-time curve E for each type of smoke pile r and the fitted humidity-time curve F r Then, based on the confidence interval of the normal distribution, the temperature-time curve interval and humidity-time curve interval with 95% confidence interval are obtained, which can facilitate the subsequent fermentation of the tobacco pile and thus improve the quality of the cigars. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 A flowchart illustrating a method for fitting a cigar fermentation curve, provided in an embodiment of the present invention. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] Reference Figure 1 This invention provides a method for fitting a cigar fermentation curve, the method comprising the following steps:
[0024] S1: Obtain the list of smoke pile levels A = {A1, A2, ..., A...} i , ..., A m}, A i Let i be the grade of the i-th smoke pile, i = 1, 2, ..., m, where m is the total number of smoke piles.
[0025] Specifically, the grading of tobacco piles is based on factors such as leaf maturity, leaf integrity, uniformity, oil content, and toughness. When grading the wrapper, Grade 1 tobacco leaves are characterized by mature maturity, intact leaves, uniformity, some oil content, and strong toughness; Grade 2 tobacco leaves are characterized by mature maturity, relatively intact leaves, relatively uniformity, some oil content, and medium toughness; and Grade 3 tobacco leaves are characterized by moderate maturity, incomplete leaves, uneven uniformity, low oil content, and weak toughness. The grading of the filler is based on both maturity and leaf integrity, which will not be elaborated upon here.
[0026] S2: Based on A, obtain the temperature-time curve information set B = {B1, B2, ..., B} of the high-quality tobacco pile. g , ..., B z} and the humidity-time curve information set C = {C1, C2, ..., C} g , ..., C z}, B g This provides the temperature-time curve information for the g-th high-quality tobacco pile, where g = 1, 2, ..., z, and z is the total number of high-quality tobacco piles. g ={B g 1 B g 2 , ..., B g j , ..., B g n}, B g j C represents the temperature value at the j-th hour of fermentation in the temperature-time curve corresponding to the g-th high-quality tobacco pile, where j = 1, 2, ..., n, and n is the total number of fermentation hours. g For the humidity-time curve information corresponding to the g-th high-quality tobacco pile, C g ={C g 1 C g 2 , ..., C g j , ..., C g n}, C g jLet z be the humidity value at hour j of fermentation in the humidity-time curve corresponding to the g-th high-quality tobacco pile. <m。
[0027] Specifically, determining z involves the following steps:
[0028] S21: Sort the smoke piles in A according to their grade number from low to high, and generate A. 0 ={A 0 1, A 0 2, ..., A 0 i , ..., A 0 m}
[0029] S22: Let z = rounddown(m * 10%), then A 0 The first z A's 0 i The corresponding tobacco piles are considered high-quality tobacco piles.
[0030] As mentioned above, when it is necessary to fit the fermentation curve of tobacco leaves, tobacco leaves with higher grade numbers should be selected in the early data selection, that is, tobacco leaves with better quality should be selected for data collection to improve the fitting degree of the fitted curve.
[0031] S23: Smooth the data in B.
[0032] S24: Smooth the data in C.
[0033] For each point in the input data set, let d0 = round(d / 0.1) * 0.1, where d is the data of each point in the input data set, and d0 is the updated data.
[0034] Specifically, temperature and humidity data are typically acquired via IoT devices with an accuracy of 0.01. However, in the context of fitting a reference curve, which is relatively smooth, excessively high data accuracy would increase the computational burden of fitting the curve. Furthermore, when those skilled in the art adjust the humidity and temperature within the fermentation chamber based on the fitted curve, high-precision data has limited practicality. Therefore, smoothing the aforementioned data improves the applicability of the solution.
[0035] S3: Classify the high-quality tobacco piles according to the preset first classification rule, and classify B as B. 0 ={B 0 1, B 0 2, ..., B 0 r , ... B 0 s}, B 0 rLet B be the temperature-time curve information set for the r-th type of high-quality tobacco pile, where r = 1, 2, ..., s, and s is the number of high-quality tobacco pile categories. 0 r ={B 0 r 1 B 0 r 2 , ..., B 0 r x , ..., B 0 r p(r)}, B 0 r x This refers to the temperature-time curve information corresponding to the x-th high-quality tobacco pile in the r-th temperature-time curve information set, where x = 1, 2, ..., p(r), and p(r) is the number of high-quality tobacco piles in the r-th temperature-time curve information set; B 0 r x ∈B, classify C as C 0 ={C 0 1, C 0 2, ..., C 0 r , ..., C 0 s}, C 0 r C 0 The humidity-time curve information set of the r-th type of high-quality tobacco pile, C 0 r ={C 0 r 1 C 0 r 2 , ..., C 0 r x , ..., C 0 r p (r)}, C 0 r x For the humidity-time curve information corresponding to the x-th high-quality tobacco pile in the r-th humidity-time curve information set, C 0 r x ∈C.
[0036] Obtain all features corresponding to the smoke piles and classify them to generate a feature list D = {D1, D2, D3}, where D1, D2, and D3 are the quantities in the first, second, and third feature categories corresponding to the smoke piles, respectively. Then s satisfies the following condition:
[0037] s = D1 * D2 * D3.
[0038] The first characteristic is the region to which the tobacco pile belongs, the second characteristic is the variety of cigar, and the third characteristic is the grade of tobacco leaves.
[0039] As described above, classifying the smoke piles can reduce the influence of the first, second, and third features on the final fitted curve, thereby achieving dimensionality reduction of the data and improving the fitting degree of the final fitted curve for each type of smoke pile.
[0040] S4: Based on B for each type of smoke pile 0 r Generate the fitted temperature-time curve E for each type of smoke pile. r ={E r 1 E r 2 , ..., E r y , ..., E r q(r)}, E r y Let y = 1, 2, ..., q(r) be the fitted temperature-time curve of the r-th type of tobacco pile after the y-th turning, where q(r) is the maximum number of turnings in the r-th type of tobacco pile, and E is the maximum value of the number of turnings in the r-th type of tobacco pile. ry ={E r y 1, E r y 2, ..., E r y k , ..., E r y t(y)}, E r y k Let t(y) be the temperature value at hour k in the humidity-time curve fitted to the r-th type of tobacco pile after the y-th turning, where k = 1, 2, ..., t(y), and t(y) is the average fermentation time of the r-th type of tobacco pile after the y-th turning; according to C 0 r Generate the fitted humidity-time curve F for each type of smoke pile. r ={F r 1 F r 2 , ..., F ry , ..., F r q(r)}, F r y Let F be the humidity-time curve fitted to the r-th type of tobacco pile after the y-th turning. r y ={F r y 1, F r y 2, ..., F r y k , ..., F r y t(y)}, F r y k Let be the humidity value at hour k in the humidity-time curve fitted to the r-th type of tobacco pile after the y-th turning.
[0041] Specifically, S4 includes the following steps:
[0042] S41: For each B 0 r x and C 0 r x Perform data cleaning.
[0043] Specifically, this embodiment uses the k-means clustering algorithm to clean the data. After cleaning, outliers are discarded and replaced, and missing values are filled in. Linear interpolation is used when replacing outliers and filling in missing values. Using the k-means clustering algorithm to clean the data and using linear interpolation to fill in missing data are existing technologies well known to those skilled in the art. Other related technologies well known to those skilled in the art are within the protection scope of this invention and will not be elaborated here.
[0044] As mentioned above, before performing curve fitting, the data is cleaned and supplemented to reduce the negative impact of outliers and missing values on curve fitting and improve the fitting accuracy of subsequent curve fitting.
[0045] S42: Each B 0 r x and C 0 r x The data in the table is categorized according to the number of times the pile is turned over, let B 0 r x ={G r x 1, Gr x 2, ..., G r x y , ..., G r x q(r)}, G r x y Let C be the set of temperature-time data points after the y-th heap flip. 0 r x ={G 0 r x 1, G 0 r x 2, ..., G 0 r x y , ..., G 0 r x q(r)}, G 0 r x y Let y be the set of humidity-time data points after the y-th turning of the pile.
[0046] S43: Based on each B 0 r x Every G r x y The data in the dataset is used to generate E using the least squares method. r y .
[0047] S44: Based on each C 0 r x Every G 0 r x y The data in the dataset is used to generate F using the least squares method. r y .
[0048] Specifically, generating a fitted curve using the least squares method based on data points is a common technique used by those skilled in the art, and will not be elaborated upon here.
[0049] S5: Obtain all G values located within each y. r x y The mean G of the data rx y 0 The temperature-time curve range with a 95% confidence interval was obtained based on the confidence interval of the normal distribution.
[0050] S6: Obtain all G values located within each y. 0 r x y The mean G of the data 0 r x y 0 The humidity-time curve range with a 95% confidence interval was obtained based on the confidence interval of the normal distribution.
[0051] The above describes the calculation of the fluctuation range of the fermentation curve using confidence intervals. Since artificial temperature and humidity control is rarely performed during cigar fermentation, this invention employs a normally distributed confidence interval to transform the curve into a range with a certain fluctuation, generating a fitted curve without affecting the final product of the fermented tobacco. Using a normally distributed confidence interval is prior art known to those skilled in the art and will not be elaborated upon here.
[0052] S7: After obtaining new data, repeat S1-S6 to iterate over the temperature-time curve interval and the humidity-time curve interval.
[0053] As described above, after obtaining a new batch of data, repeating the S1-S6 operations to iterate over the temperature-time curve interval and the humidity-time curve interval can continuously improve the fitting degree of the fitted curve and improve the performance of the fitted curve.
[0054] The process begins by obtaining a list of tobacco pile grades, A, and then using A to obtain a set of temperature-time curve information B and a set of humidity-time curve information C for high-quality tobacco piles. Finally, B is classified as B according to a preset first classification rule. 0 C is classified as C 0 Then according to B 0 and C 0 Generate the fitted temperature-time curve E for each type of smoke pile r and the fitted humidity-time curve F r Then, based on the confidence interval of the normal distribution, the temperature-time curve interval and humidity-time curve interval with 95% confidence interval are obtained, which can facilitate the subsequent fermentation of the tobacco pile and thus improve the quality of the cigars.
[0055] Embodiments of the present invention also provide a non-transitory computer-readable storage medium that can be disposed in an electronic device to store at least one instruction or at least one program related to implementing a method in the method embodiments, wherein the at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided in the above embodiments.
[0056] Embodiments of the present invention also provide an electronic device, including a processor and the aforementioned non-transitory computer-readable storage medium.
[0057] While specific embodiments of the invention have been described in detail by way of example, those skilled in the art should understand that the above examples are for illustrative purposes only and are not intended to limit the scope of the invention. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.
Claims
1. A method of fitting a cigar fermentation profile, characterized in that, The method comprises the following steps: S1: Obtain the list of smoke pile levels A = {A1, A2, ..., A...} i , ..., A m }, A i Let i be the grade of the i-th smoke pile, i = 1, 2, ..., m, where m is the total number of smoke piles; S2: Obtain the temperature-time curve information set B = {B1, B2, …, B g , …, B z} and the humidity-time curve information set C = {C1, C2, …, C g , …, C z} of the high-quality tobacco pile according to A, B g is the temperature-time curve information of the gth high-quality tobacco pile, g = 1, 2, …, z, z is the total number of high-quality tobacco piles, B g = {B g 1 , B g 2 , …, B g j , …, B g n}, B g j is the temperature value corresponding to the jth hour of fermentation of the high-quality tobacco pile corresponding to the gth high-quality tobacco pile in the temperature-time curve, j = 1, 2, …, n, n is the total number of fermentation hours, C g is the humidity-time curve information corresponding to the gth high-quality tobacco pile, C g = {C g 1 , C g 2 , …, C g j , …, C g n}, C g j is the humidity value corresponding to the jth hour of fermentation of the high-quality tobacco pile corresponding to the gth high-quality tobacco pile in the humidity-time curve, z < m, and the high-quality tobacco pile is a preset number of tobacco piles obtained according to tobacco leaf grades in A; S3: classifying the high-quality tobacco piles according to the preset first classification rule, and classifying B as B 0 = {B 0 1, B 0 2, …, B 0 r , …, B 0 s}, B 0 r is a temperature-time curve information set of the rth high-quality tobacco pile, r = 1, 2, …, s, s is the number of categories of the high-quality tobacco pile, is temperature-time curve information corresponding to the xth high-quality tobacco pile in the rth temperature-time curve information set, x = 1, 2, …, p(r), p(r) is the number of high-quality tobacco piles in the rth temperature-time curve information set; classifying C as C 0 = {C 0 1, C 0 2, …, C 0 r , …, C 0 s}, C 0 r is a humidity-time curve information set of the rth high-quality tobacco pile, 0 is humidity-time curve information corresponding to the xth high-quality tobacco pile in the rth humidity-time curve information set, S4: generating a fitted temperature-time curve E corresponding to each type of tobacco pile according to B 0 r r r 1 r 2 r y r q(r) r y is a fitted temperature-time curve of the rth type of tobacco pile after the yth turning, y = 1, 2, …, q(r), q(r) is the maximum value of the number of turning of the rth type of tobacco pile, is a temperature value of the kth hour in the fitted humidity-time curve of the rth type of tobacco pile after the yth turning, k = 1, 2, …, t(y), t(y) is the average fermentation time after the rth type of tobacco pile is turned y times; according to C 0 r r r 1 r 2 r y r q(r) r y is a fitted humidity-time curve of the rth type of tobacco pile after the yth turning, is a humidity value of the kth hour in the fitted humidity-time curve of the rth type of tobacco pile after the yth turning; wherein, S4 comprises: S41: For each and data cleaning; S42: classify the data in each of and according to the number of times of turning over, let be the temperature-time data point set after the yth time of turning over, let be the humidity-time data point set after the yth time of turning over; S43: According to each Every The data in the dataset is used to generate E using the least squares method. r y ; S44: According to the data in each of the first and second sets of data, a least squares method is used to generate a first and second F r y ; S5: Obtain all data mean values within each y Obtain the 95% confidence interval of the temperature-time curve interval according to the confidence interval of the normal distribution. S6: Obtain all data mean values within each y Obtain 95% confidence interval humidity-time curve interval from confidence interval according to normal distribution. 2. The method of claim 1, wherein, The step S2 further comprises the following steps: S21: Sort the piles in A by rank number from low to high, generate A 0 = {A 0 1, A 0 2, …, A 0 i , …, A 0 m}; S22: Let z = round down (m * 10%), and set A 0 The first z A 0 i The corresponding tobacco pile is as a high-quality tobacco pile.
3. The method of claim 1, wherein, The step S2 further comprises the following steps: S23: smoothing the data in B; S24: smoothing the data in C.
4. The method of claim 1, wherein, The preset first classification rule comprises the following contents: Obtain the characteristics corresponding to all the tobacco piles and classify them to generate a characteristic list D of the tobacco piles, wherein D1, D2 and D3 are respectively the number of the first characteristic, the second characteristic and the third characteristic of the tobacco piles, and s satisfies the following condition: s=D1*D2*D3.
5. The method of claim 4, wherein, The first characteristic is the region to which the tobacco pile belongs, the second characteristic is the cigar variety, and the third characteristic is the tobacco leaf grade.
6. The method of claim 3, wherein, The smoothing process performs the following steps: For the data of each point in the data input set, let d0=round(d / 0.1)*0.1, wherein round() is the rounding function, d is the data of each point in the data input set, and d0 is the updated data.
7. The method of claim 1, wherein, The method further comprises the following steps: S7: after obtaining the new data, repeatedly performing S1-S6 to iterate the temperature-time curve interval and the humidity-time curve interval. 8.A non-transitory computer readable storage medium having stored therein at least one instruction or at least one piece of program, characterized in that, The at least one instruction or the at least one program is loaded and executed by the processor to realize the method as claimed in any one of claims 1-7.
9. An electronic device, comprising: The non-transitory computer readable storage medium as claimed in claim 8 and the processor.