A processing method, device and medium for determining the maturity state of tobacco leaves
By constructing multiple historical relationship models and screening matching models based on the feature vectors of the target tobacco plants, the problem of insufficient prediction accuracy of tobacco leaves in the prior art is solved, and higher prediction accuracy is achieved.
Patent Information
- Application Number
- CN202411659562.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2044-11-20
AI Technical Summary
In the prior art, the accuracy of predicting the maturity status of tobacco leaves based on a single relational model is insufficient, especially at different sampling points, different tobacco strains or different growth environments.
Multiple historical relationship models are constructed, each model corresponds to a set of historical data. By obtaining the similarity between the characteristic vectors of the target tobacco plants and the characteristic vectors of each historical data, matching historical relationship models are selected to predict the maturity status of tobacco leaves.
It improves the accuracy of predicting the maturity status of tobacco leaves and can adapt to changes in different tobacco plants and growth environments.
Smart Images

Figure CN119164947B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic digital data processing, and in particular to a processing method, equipment and medium for determining the maturity state of tobacco leaves. Background Art
[0002] When tobacco plants enter the mature stage, the chlorophyll in the leaves gradually decreases during the mature process, and the corresponding multispectral characteristic values will also change. For example, the Normalized Difference Vegetation Index (NDVI) corresponding to the leaves gradually decreases during the mature process. The prior art discloses a relationship model that characterizes the relationship between the maturity state of tobacco leaves and the multispectral characteristic values, that is, y=k 1 +k 2 ×x+c, where x is the maturity state of tobacco leaves, the maturity state of tobacco leaves is the ratio of the number of mature tobacco leaves to the corresponding total number of tobacco leaves, y is the multispectral feature value, c is the random error, and k is the 1 and k 2 are the first coefficient and the second coefficient respectively; based on the relationship model and the multispectral feature value of a tobacco plant at a certain sampling point, the maturity state of the tobacco leaves at the sampling point can be predicted. However, after the tobacco plants enter the maturity stage, the maturity state of the tobacco leaves and the multispectral feature values corresponding to different sampling points do not conform to the same relationship model, and the maturity state of the tobacco leaves and the multispectral feature values corresponding to different types of tobacco plants or tobacco plants in different growth environments do not conform to the same relationship model; if only a relationship model is constructed based on historical data to predict the maturity state of the tobacco leaves corresponding to any sampling point of any tobacco plant, then the predicted maturity state of the tobacco leaves is not accurate. Summary of the invention
[0003] The object of the present invention is to provide a processing method, device and medium for determining the maturity state of tobacco leaves, so as to improve the accuracy of predicting the maturity state of tobacco leaves.
[0004] According to a first aspect of the present invention, a method for determining the maturity state of tobacco leaves is provided, the method comprising the following steps:
[0005] Obtain a historical relationship model set; the historical relationship model set includes several historical relationship models, any historical relationship model is used to characterize the relationship between the maturity state of tobacco leaves and multi-spectral characteristic values, any historical relationship model corresponds to a set of historical data, and any set of historical data includes the maturity state of tobacco leaves and multi-spectral characteristic values corresponding to several consecutive sampling points.
[0006] The characteristic vector of the corresponding group of historical data is obtained according to the multispectral characteristic values corresponding to several consecutive sampling points included in each group of historical data; the characteristic vector of any group of historical data includes the average multispectral characteristic value, the average multispectral characteristic value change rate and the multispectral characteristic value change rate variance corresponding to several consecutive sampling points included in the group of historical data.
[0007] The target feature vector of the target tobacco plant is obtained according to the multispectral feature values of the target tobacco plant at the target time and the target historical time period; the target historical time period is the time period before the target time and including a preset number of sampling points of the target.
[0008] It is determined in turn whether the similarity between the feature vector of each group of historical data and the target feature vector of the target tobacco plant is greater than or equal to a preset similarity threshold. If so, the determination is stopped, and the tobacco leaf maturity state of the target tobacco plant at the target time is determined according to the historical relationship model corresponding to the group of historical data; otherwise, the determination is continued until the similarity between the feature vector of a certain group of historical data and the target feature vector of the target tobacco plant is greater than or equal to the preset similarity threshold or the similarities between the feature vectors of all groups of historical data and the target feature vector of the target tobacco plant are less than the preset similarity threshold.
[0009] Furthermore, the processing method further comprises the following steps:
[0010] If the similarities between the feature vectors of all groups of historical data and the target feature vector of the target tobacco strain are less than a preset similarity threshold, the first feature vector of the target tobacco strain is obtained based on the multi-spectral feature values of the target tobacco strain at the target moment and the first historical time period; the first historical time period is a time period before the target moment and includes a first preset number of sampling points, and the first preset number is half of the target preset number.
[0011] It is determined in turn whether the similarity between the feature vector of each group of historical data and the first feature vector of the target tobacco strain is greater than or equal to a preset similarity threshold. If so, the determination is stopped, and the tobacco leaf maturity state of the target tobacco strain at the target time is determined according to the historical relationship model corresponding to the group of historical data; otherwise, the determination is continued until the similarity between the feature vector of a certain group of historical data and the first feature vector of the target tobacco strain is greater than or equal to the preset similarity threshold or the similarities between the feature vectors of all groups of historical data and the first feature vector of the target tobacco strain are less than the preset similarity threshold.
[0012] If the similarities between the feature vectors of all groups of historical data and the first feature vector of the target tobacco strain are less than a preset similarity threshold, the second feature vector of the target tobacco strain is obtained based on the multi-spectral feature value of the target tobacco strain in a second historical time period; the second historical time period is the remaining time period in the target historical time period except the first historical time period.
[0013] It is determined in turn whether the similarity between the feature vector of each group of historical data and the second feature vector of the target tobacco strain is greater than or equal to a preset similarity threshold. If so, the determination is stopped, and the tobacco leaf maturity state of the target tobacco strain at the target time is determined based on the successor historical relationship model of the historical relationship model corresponding to the group of historical data; otherwise, the determination is continued until the similarity between the feature vector of a certain group of historical data and the second feature vector of the target tobacco strain is greater than or equal to the preset similarity threshold or the similarities between the feature vectors of all groups of historical data and the second feature vector of the target tobacco strain are less than the preset similarity threshold.
[0014] Furthermore, the process of obtaining any historical relationship model includes:
[0015] Acquire historical data corresponding to a specified historical relationship model; the specified historical relationship model is any historical relationship model.
[0016] A value set of each coefficient corresponding to the specified historical relationship model is determined according to the historical data corresponding to the specified historical relationship model.
[0017] The actual accuracy and value range of the corresponding coefficient are determined according to the value set of each coefficient.
[0018] If the actual accuracy of a coefficient is less than the preset accuracy threshold corresponding to the coefficient, the preset accuracy threshold corresponding to the coefficient is determined as the target accuracy corresponding to the coefficient; otherwise, the actual accuracy of the coefficient is determined as the target accuracy corresponding to the coefficient.
[0019] The target accuracy corresponding to each coefficient is used as the granularity of the corresponding coefficient to search for the optimal coefficient combination that meets the value range of each coefficient corresponding to the specified historical relationship model.
[0020] The values of the coefficients corresponding to the optimal coefficient combination are determined as the values of the coefficients corresponding to the specified historical relationship model.
[0021] Furthermore, determining the actual accuracy and value range of the corresponding coefficient according to the value set of each coefficient includes:
[0022] The minimum value and the maximum value in the value set of the specified coefficient are obtained, and the minimum value is determined as the minimum value of the value range of the specified coefficient, and the maximum value is determined as the maximum value of the value range of the specified coefficient; the specified coefficient is any coefficient.
[0023] The maximum value of the values that meet the first preset condition is determined as the precision of the specified coefficient; the first preset condition is that the value of any specified coefficient in the value set of the specified coefficient divided by the value to be determined whether the first preset condition is met is an integer.
[0024] Furthermore, the acquisition process of any historical relationship model also includes:
[0025] The predicted multi-spectral characteristic value corresponding to each sampling point is obtained according to the tobacco leaf maturity state corresponding to each sampling point included in the historical data corresponding to the specified historical relationship model and the value of each coefficient corresponding to the specified historical relationship model.
[0026] The multispectral characteristic value errors corresponding to each sampling point are obtained according to the multispectral characteristic values corresponding to each sampling point and the corresponding predicted multispectral characteristic values included in the historical data corresponding to the designated historical relationship model.
[0027] An average multispectral eigenvalue error is obtained according to the multispectral eigenvalue errors corresponding to each sampling point, and the average multispectral eigenvalue error is determined as a random error in a specified historical relationship model.
[0028] Furthermore, the target preset number is less than the number of historical data corresponding to any historical relationship model and the target preset number is greater than or equal to 5.
[0029] Furthermore, the rate of change of the multispectral characteristic values corresponding to any two consecutive sampling points is the ratio of the difference between the multispectral characteristic values corresponding to the two consecutive sampling points to the multispectral characteristic value corresponding to the previous sampling point, and the difference between the multispectral characteristic values corresponding to the two consecutive sampling points is the difference between the multispectral characteristic value corresponding to the latter sampling point and the multispectral characteristic value corresponding to the previous sampling point.
[0030] Furthermore, the multispectral characteristic value is a normalized difference vegetation index.
[0031] According to a second aspect of the present invention, there is provided an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned processing method for determining the maturity state of tobacco leaves when executing the computer program.
[0032] According to a third aspect of the present invention, there is provided a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned processing method for determining the maturity state of tobacco leaves.
[0033] Compared with the prior art, the present invention has at least the following beneficial effects:
[0034] In the present invention, multiple historical relationship models are constructed, each of which corresponds to a group of historical data, and any group of historical data includes the maturity status of tobacco leaves and multi-spectral characteristic values corresponding to several continuous sampling points; different historical relationship models correspond to different historical data, and each group of historical data conforms to its corresponding historical relationship model; based on each group of historical data, the present invention constructs a characteristic vector of the corresponding group of historical data, and the characteristic vector can characterize the average multi-spectral characteristic values of the sampling points included in the group of historical data and the changes in the multi-spectral characteristic values between the sampling points; for the target tobacco plant to be judged on the maturity status of tobacco leaves, the present invention obtains the multi-spectral characteristic values of the target historical time period before the target moment, and further obtains the target characteristic vector, and the target characteristic vector can characterize the target tobacco plant at the target moment. The average multispectral feature values and changes in multispectral feature values in a previous period of time. If the target feature vector has a high similarity with the feature vector corresponding to a group of historical data, it means that the corresponding average multispectral feature values and changes in multispectral feature values are relatively similar, and the relationship between the corresponding tobacco leaf maturity state and the multispectral feature values is also relatively similar. The present invention determines the historical relationship model corresponding to the group of historical data as a historical relationship model that matches the target tobacco plant at the target time. Therefore, the present invention selects a historical relationship model that matches the multispectral feature values of the target tobacco plant at the target time and the tobacco leaf maturity state from multiple historical relationship models, and predicts the tobacco leaf maturity state of the target tobacco plant at the target time based on the historical relationship model, which can improve the accuracy of the prediction of the tobacco leaf maturity state. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0036] Figure 1 A first flow chart of a method for determining the maturity state of tobacco leaves provided in Embodiment 1 of the present invention;
[0037] Figure 2 A first flow chart of a process for obtaining any historical relationship model provided in the first embodiment of the present invention;
[0038] Figure 3 A flowchart of the steps of determining the actual accuracy and value range of the corresponding coefficients provided in the first embodiment of the present invention;
[0039] Figure 4 A second flow chart of a process for obtaining any historical relationship model provided in the first embodiment of the present invention;
[0040] Figure 5This is a second flow chart of the processing method for determining the maturity state of tobacco leaves provided in Example 1 of the present invention. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0042] Embodiment 1:
[0043] According to this embodiment, Figure 1 As shown, a method for determining the maturity state of tobacco leaves is provided, and the method comprises the following steps:
[0044] S100, obtaining a historical relationship model set; the historical relationship model set includes several historical relationship models, any historical relationship model is used to characterize the relationship between the maturity state of tobacco leaves and the multi-spectral characteristic values, any historical relationship model corresponds to a set of historical data, and any set of historical data includes the maturity state of tobacco leaves and multi-spectral characteristic values corresponding to several consecutive sampling points.
[0045] In this embodiment, the number of historical relationship models included in the historical relationship model set is greater than or equal to 2, and the number of sampling points corresponding to any set of historical data is greater than or equal to 3. As an optional specific implementation, the sampling time interval corresponding to any two sampling points is 1 day, and the multispectral feature value is the normalized difference vegetation index. Those skilled in the art know that any method of obtaining multispectral features of tobacco leaves in the prior art falls within the protection scope of the present invention; optionally, a multispectral image of a tobacco plant corresponding to a certain sampling point is obtained, and the mean value of the normalized difference vegetation index of the tobacco plant pixel points in the multispectral image is determined as the multispectral feature value corresponding to the sampling point.
[0046] In this embodiment, the tobacco strains corresponding to several consecutive sampling points included in any group of historical data are the same, the tobacco strains corresponding to the sampling points included in different groups of historical data are different or the same, and the types and / or growth environments of different tobacco strains are different.
[0047] In this embodiment, the relationship between the maturity state of tobacco leaves and the multi-spectral feature values corresponding to any sampling point in the historical data corresponding to any historical relationship model conforms to the relationship between the maturity state of tobacco leaves and the multi-spectral feature values in the historical relationship model. Each historical relationship model is obtained according to the historical data corresponding to the historical relationship model, and the historical data corresponding to each historical relationship model is known; the historical data corresponding to different historical relationship models differ at least in the sampling time, tobacco plant type or growth environment of the corresponding sampling point. As a preferred specific implementation method, Figure 2 As shown, the acquisition process of any historical relationship model includes:
[0048] S110, obtaining historical data corresponding to a specified historical relationship model; the specified historical relationship model is any historical relationship model.
[0049] S120, determining a value set of each coefficient corresponding to the specified historical relationship model according to the historical data corresponding to the specified historical relationship model.
[0050] In this embodiment, based on experience, we can know the mathematical model that each set of historical data conforms to, and we can also know the number of unknown coefficients included in the mathematical model, but we cannot know the value of each coefficient in the mathematical model (if there is a random error in the mathematical model, then the value of the random error is also unknown). As a specific implementation method, based on experience, we can know that the mathematical model that a certain set of historical data conforms to is a univariate linear equation (y=k 1 +k 2 ×x+c, where x is the independent variable, indicating the maturity state of tobacco leaves; y is the dependent variable, indicating the multi-spectral feature value, c is the random error, and k 1 and k 2 The first and second coefficients respectively), then the number of unknown coefficients is 2.
[0051] In this embodiment, if the number of unknown coefficients corresponding to the specified historical relationship model is n, then a group of values of all unknown coefficients can be obtained based on the tobacco leaf maturity state and multi-spectral characteristic values corresponding to any n sampling points in the historical data corresponding to the specified historical relationship model; if the historical data corresponding to the specified historical relationship model includes tobacco leaf maturity state and multi-spectral characteristic values corresponding to m consecutive sampling points, then the values of all unknown coefficients in the C(m,n) group can be obtained based on the historical data corresponding to the specified historical relationship model, each unknown coefficient corresponds to C(m,n) values, and the set consisting of C(m,n) values corresponding to any unknown coefficient is the value set of the coefficient; C(m,n) is the factorial of m divided by the factorial of n and then divided by the factorial of (mn).
[0052] S130, determining the actual accuracy and value range of the corresponding coefficient according to the value set of each coefficient.
[0053] As a preferred specific embodiment, Figure 3 As shown, S130 includes:
[0054] S131, obtaining the minimum value and the maximum value in the value set of the specified coefficient, and determining the minimum value as the minimum value of the value range of the specified coefficient, and determining the maximum value as the maximum value of the value range of the specified coefficient; the specified coefficient is any coefficient.
[0055] S132, determining the maximum value of the values that satisfy the first preset condition as the precision of the specified coefficient; the first preset condition is that the value of any specified coefficient in the value set of the specified coefficient divided by the value to be determined whether the first preset condition is satisfied is an integer.
[0056] As a specific implementation, the value set of the specified coefficient is {0.9, 1, 1.5, 1.3, 0.8, 1.1, 1.2, 0.8}, and there are many values that meet the first preset condition, such as 0.1, 0.05, 0.02 and 0.01, etc. However, the maximum value of the value that meets the first preset condition is 0.1, so the precision of the specified coefficient is 0.1. As a specific implementation, the value set of the specified coefficient is {0.9, 1, 1.5, 1.35, 0.8, 1.15, 1.2, 0.85}, and there are many values that meet the first preset condition, such as 0.05, 0.01 and 0.001, etc. However, the maximum value of the value that meets the first preset condition is 0.05, so the precision of the specified coefficient is 0.05.
[0057] Based on S131-S132, the actual accuracy and value range of each coefficient can be obtained.
[0058] S140, if the actual accuracy of a certain coefficient is less than the preset accuracy threshold corresponding to the coefficient, the preset accuracy threshold corresponding to the coefficient is determined as the target accuracy corresponding to the coefficient; otherwise, the actual accuracy of the coefficient is determined as the target accuracy corresponding to the coefficient.
[0059] In this embodiment, the preset accuracy threshold corresponding to each coefficient is an empirical value, and the preset accuracy thresholds corresponding to different coefficients may be the same or different; as a preferred specific implementation method, the larger the span of the value range corresponding to a certain coefficient, the larger the corresponding preset accuracy threshold, thereby reducing the workload of subsequent searches.
[0060] Based on S140, when the actual accuracy of a coefficient is less than the preset accuracy threshold corresponding to the coefficient, the preset accuracy threshold corresponding to the coefficient is used as the granularity corresponding to the coefficient in subsequent searches; when the actual accuracy of a coefficient is greater than the preset accuracy threshold corresponding to the coefficient, the actual accuracy corresponding to the coefficient is used as the granularity corresponding to the coefficient in subsequent searches; thereby, it is helpful to reduce the workload of subsequent searches.
[0061] S150, searching for an optimal coefficient combination that meets the value range of each coefficient corresponding to the specified historical relationship model, using the target accuracy corresponding to each coefficient as the granularity of the corresponding coefficient.
[0062] In this embodiment, if the target accuracy corresponding to a coefficient is 0.1, and the value range corresponding to the coefficient is [1,2], then the granular search for the coefficient with the target accuracy corresponding to the coefficient refers to taking 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9 and 2 as all possible values of the coefficient; if the target accuracy corresponding to a coefficient is 0.5, and the value range corresponding to the coefficient is [1,3], then the granular search for the coefficient with the target accuracy corresponding to the coefficient refers to taking 1, 1.5, 2, 2.5 and 3 as all possible values of the coefficient.
[0063] In this embodiment, when the possible values of each coefficient are known, the combination with the smallest corresponding deviation among all coefficient combinations is determined as the optimal coefficient combination; in this embodiment, the deviation corresponding to each coefficient combination is obtained according to the historical data corresponding to the specified historical relationship model. It should be understood that if the number of coefficients corresponding to the specified historical relationship model is 2, the number of possible values corresponding to the two coefficients is q 1 and q 2 , then the number of combinations is q 1 ×q 2 .
[0064] S160: Determine the values of the coefficients corresponding to the optimal coefficient combination as the values of the coefficients corresponding to the specified historical relationship model.
[0065] Based on S110 - S160 , this embodiment can quickly and accurately obtain the value of the unknown coefficient in each historical relationship model.
[0066] In this embodiment, if there is still random error in the mathematical model corresponding to the specified historical relationship model, then as a preferred specific implementation method, Figure 4 As shown, the acquisition process of any historical relationship model also includes:
[0067] S170, obtaining a predicted multi-spectral feature value corresponding to each sampling point according to the tobacco leaf maturity state corresponding to each sampling point included in the historical data corresponding to the designated historical relationship model and the value of each coefficient corresponding to the designated historical relationship model.
[0068] In this embodiment, the tobacco leaf maturity state and the values of each coefficient corresponding to a certain sampling point included in the historical data corresponding to the specified historical relationship model are substituted into the specified historical relationship model, and the random error is determined to be 0. Then the obtained multispectral feature value is the predicted multispectral feature value corresponding to the sampling point.
[0069] S180, obtaining a multispectral feature value error corresponding to each sampling point according to the multispectral feature value corresponding to each sampling point and the corresponding predicted multispectral feature value included in the historical data corresponding to the designated historical relationship model.
[0070] In this embodiment, the multispectral feature value corresponding to a certain sampling point included in the historical data corresponding to the designated historical relationship model is subtracted from the predicted multispectral feature value corresponding to the sampling point to obtain the multispectral feature value error corresponding to the sampling point.
[0071] S190, obtaining an average multispectral eigenvalue error according to the multispectral eigenvalue errors corresponding to each sampling point, and determining the average multispectral eigenvalue error as a random error in a specified historical relationship model.
[0072] Based on S170-S190, this embodiment can relatively accurately estimate the random error in the specified historical relationship model, and substitute the random error into the subsequent prediction, which is beneficial to improve the accuracy of the specified historical relationship model and the accuracy of the prediction data obtained based on the specified historical relationship model.
[0073] S200, obtaining a feature vector of a corresponding group of historical data according to the multispectral feature values corresponding to several consecutive sampling points included in each group of historical data; the feature vector of any group of historical data includes the average multispectral feature value, the average multispectral feature value change rate and the multispectral feature value change rate variance corresponding to several consecutive sampling points included in the group of historical data.
[0074] In this embodiment, the rate of change of the multi-spectral characteristic values corresponding to any two consecutive sampling points is the ratio of the difference between the multi-spectral characteristic values corresponding to the two consecutive sampling points to the multi-spectral characteristic value corresponding to the previous sampling point, and the difference between the multi-spectral characteristic values corresponding to the two consecutive sampling points is the difference between the multi-spectral characteristic value corresponding to the latter sampling point and the multi-spectral characteristic value corresponding to the previous sampling point.
[0075] In this embodiment, the multi-spectral eigenvalue change rate corresponding to any two consecutive sampling points included in any group of historical data is first obtained. Based on this, the average multi-spectral eigenvalue change rate and the multi-spectral eigenvalue change rate variance corresponding to several consecutive sampling points included in the group of historical data can be further obtained.
[0076] S300, obtaining a target feature vector of a target tobacco plant according to multispectral feature values of the target tobacco plant at a target time and a target historical time period; the target historical time period is a time period before the target time and including a target preset number of sampling points.
[0077] In this embodiment, the target preset number is an empirical value. Preferably, the target preset number is less than the number of historical data corresponding to any historical relationship model and the target preset number is greater than or equal to 5; the number of historical data is the number of sampling points corresponding to the historical data.
[0078] In this embodiment, the time interval between any two adjacent sampling points in the target historical time period is equal to the time interval between any two adjacent sampling points in any set of historical data.
[0079] In this embodiment, the target feature vector of the target tobacco plant includes the average multispectral feature value, the average multispectral feature value change rate and the multispectral feature value change rate variance corresponding to each sampling point in the target time and target historical time period.
[0080] S400, determine in turn whether the similarity between the feature vector of each group of historical data and the target feature vector of the target tobacco strain is greater than or equal to a preset similarity threshold; if so, stop judging, and determine the tobacco leaf maturity state of the target tobacco strain at the target time based on the historical relationship model corresponding to the group of historical data; otherwise, continue judging until the similarity between the feature vector of a certain group of historical data and the target feature vector of the target tobacco strain is greater than or equal to the preset similarity threshold or the similarity between the feature vectors of all groups of historical data and the target feature vector of the target tobacco strain is less than the preset similarity threshold.
[0081] In this embodiment, the maturity state of the tobacco leaves of the target tobacco plant at the target time can be obtained by substituting the multi-spectral feature value of the target tobacco plant at the target time into the historical relationship model.
[0082] In this embodiment, the preset similarity threshold is an empirical value; if the similarity between the feature vector of a group of historical data and the target feature vector of the target tobacco plant is greater than or equal to the preset similarity threshold, it means that the average multispectral feature value and the change of the multispectral feature value of the target tobacco plant in a period of time before the target moment are similar, and the relationship between the multispectral feature value of the target tobacco plant at the target moment and the maturity state of the tobacco leaves conforms to the historical relationship model corresponding to the group of historical data.
[0083] Those skilled in the art know that any method for obtaining the similarity between two vectors in the prior art falls within the protection scope of the present invention.
[0084] In the present embodiment, multiple historical relationship models are constructed, each of which corresponds to a group of historical data, and any group of historical data includes the maturity status of tobacco leaves and multi-spectral characteristic values corresponding to several consecutive sampling points; different historical relationship models correspond to different historical data, and each group of historical data conforms to its corresponding historical relationship model; based on each group of historical data, the present embodiment constructs a feature vector of the corresponding group of historical data, and the feature vector can characterize the average multi-spectral characteristic values of the sampling points included in the group of historical data and the changes in the multi-spectral characteristic values between the sampling points; for the target tobacco plant to be judged on the maturity status of tobacco leaves, the present embodiment obtains the multi-spectral characteristic values of the target historical time period before the target moment, and further obtains the target feature vector, which can characterize the target tobacco plant at the target time. If the target feature vector has a high similarity with the feature vector corresponding to a group of historical data, it means that the corresponding average multispectral feature values and multispectral feature value changes are relatively similar, and the relationship between the corresponding tobacco leaf maturity state and the multispectral feature values is also relatively similar. This embodiment determines the historical relationship model corresponding to this group of historical data as a historical relationship model that matches the target tobacco plant at the target moment. Therefore, this embodiment selects a historical relationship model that matches the multispectral feature value and tobacco leaf maturity state of the target tobacco plant at the target moment from multiple historical relationship models, and predicts the tobacco leaf maturity state of the target tobacco plant at the target moment based on the historical relationship model, which can improve the accuracy of the prediction of the tobacco leaf maturity state.
[0085] As an optional specific implementation, if the similarities between the feature vectors of all groups of historical data and the target feature vectors of the target tobacco strain are less than a preset similarity threshold, a preset prompt message is output.
[0086] As a preferred embodiment, Figure 5 As shown, the processing method also includes the following steps:
[0087] S500, if the similarities between the feature vectors of all groups of historical data and the target feature vector of the target tobacco strain are less than a preset similarity threshold, the first feature vector of the target tobacco strain is obtained based on the multi-spectral feature values of the target tobacco strain at the target moment and the first historical time period; the first historical time period is a time period before the target moment and includes a first preset number of sampling points, and the first preset number is half of the target preset number.
[0088] In this embodiment, if the target preset number is an odd number, a value obtained by dividing the sum of the target preset number and 1 by 2 is determined as the first preset number.
[0089] In this embodiment, half of the target preset number is determined as the first preset number, which is conducive to quickly identifying the inflection point appearing at the target moment (if several sampling points before and several sampling points after a certain sampling point meet different historical relationship models, then the sampling point is judged to be an inflection point), which is conducive to quickly obtaining the historical relationship model that the target tobacco plant meets at the target moment.
[0090] S600, determine in turn whether the similarity between the feature vector of each group of historical data and the first feature vector of the target tobacco strain is greater than or equal to a preset similarity threshold; if so, stop judging, and determine the tobacco leaf maturity state of the target tobacco strain at the target time based on the historical relationship model corresponding to the group of historical data; otherwise, continue judging until the similarity between the feature vector of a certain group of historical data and the first feature vector of the target tobacco strain is greater than or equal to the preset similarity threshold or the similarity between the feature vectors of all groups of historical data and the first feature vector of the target tobacco strain is less than the preset similarity threshold.
[0091] In this embodiment, the first characteristic vector of the target tobacco strain includes the average multispectral characteristic value, the average multispectral characteristic value change rate and the multispectral characteristic value change rate variance corresponding to each sampling point in the target time and the first historical time period.
[0092] S700, if the similarities between the feature vectors of all groups of historical data and the first feature vector of the target tobacco strain are less than a preset similarity threshold, the second feature vector of the target tobacco strain is obtained according to the multi-spectral feature value of the target tobacco strain in a second historical time period; the second historical time period is the remaining time period in the target historical time period except the first historical time period.
[0093] In this embodiment, the second characteristic vector of the target tobacco plant includes the average multispectral characteristic value, the average multispectral characteristic value change rate and the multispectral characteristic value change rate variance corresponding to each sampling point in the target time and the second historical time period.
[0094] S800, determine in turn whether the similarity between the feature vector of each group of historical data and the second feature vector of the target tobacco strain is greater than or equal to a preset similarity threshold; if so, stop judging, and determine the tobacco leaf maturity state of the target tobacco strain at the target time based on the successor historical relationship model of the historical relationship model corresponding to the group of historical data; otherwise, continue judging until the similarity between the feature vector of a certain group of historical data and the second feature vector of the target tobacco strain is greater than or equal to the preset similarity threshold or the similarity between the feature vectors of all groups of historical data and the second feature vector of the target tobacco strain is less than the preset similarity threshold.
[0095] In this embodiment, the subsequent historical relationship model of the specified historical relationship model satisfies the following relationship: the first sampling point included in the historical data corresponding to the subsequent historical relationship model is the next sampling point of the last sampling included in the historical data corresponding to the specified historical relationship model.
[0096] Optionally, if the similarities between the feature vectors of all groups of historical data and the second feature vector of the target tobacco strain are less than a preset similarity threshold, a preset prompt message is output.
[0097] Based on S500-S800, this embodiment realizes accurate judgment of the tobacco leaf maturity state of the target tobacco plant at the target time when the similarity between the feature vectors of all groups of historical data and the target feature vectors of the target tobacco plant is less than a preset similarity threshold.
[0098] Embodiment 2:
[0099] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:
[0100] Obtain a historical relationship model set; the historical relationship model set includes several historical relationship models, any historical relationship model is used to characterize the relationship between the maturity state of tobacco leaves and multi-spectral characteristic values, any historical relationship model corresponds to a set of historical data, and any set of historical data includes the maturity state of tobacco leaves and multi-spectral characteristic values corresponding to several consecutive sampling points.
[0101] The characteristic vector of the corresponding group of historical data is obtained according to the multispectral characteristic values corresponding to several consecutive sampling points included in each group of historical data; the characteristic vector of any group of historical data includes the average multispectral characteristic value, the average multispectral characteristic value change rate and the multispectral characteristic value change rate variance corresponding to several consecutive sampling points included in the group of historical data.
[0102] The target feature vector of the target tobacco plant is obtained according to the multispectral feature values of the target tobacco plant at the target time and the target historical time period; the target historical time period is the time period before the target time and including a preset number of sampling points of the target.
[0103] It is determined in turn whether the similarity between the feature vector of each group of historical data and the target feature vector of the target tobacco plant is greater than or equal to a preset similarity threshold. If so, the determination is stopped, and the tobacco leaf maturity state of the target tobacco plant at the target time is determined according to the historical relationship model corresponding to the group of historical data; otherwise, the determination is continued until the similarity between the feature vector of a certain group of historical data and the target feature vector of the target tobacco plant is greater than or equal to the preset similarity threshold or the similarities between the feature vectors of all groups of historical data and the target feature vector of the target tobacco plant are less than the preset similarity threshold.
[0104] Embodiment three:
[0105] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0106] Obtain a historical relationship model set; the historical relationship model set includes several historical relationship models, any historical relationship model is used to characterize the relationship between the maturity state of tobacco leaves and multi-spectral characteristic values, any historical relationship model corresponds to a set of historical data, and any set of historical data includes the maturity state of tobacco leaves and multi-spectral characteristic values corresponding to several consecutive sampling points.
[0107] The characteristic vector of the corresponding group of historical data is obtained according to the multispectral characteristic values corresponding to several consecutive sampling points included in each group of historical data; the characteristic vector of any group of historical data includes the average multispectral characteristic value, the average multispectral characteristic value change rate and the multispectral characteristic value change rate variance corresponding to several consecutive sampling points included in the group of historical data.
[0108] The target feature vector of the target tobacco plant is obtained according to the multispectral feature values of the target tobacco plant at the target time and the target historical time period; the target historical time period is the time period before the target time and including a preset number of sampling points of the target.
[0109] It is determined in turn whether the similarity between the feature vector of each group of historical data and the target feature vector of the target tobacco plant is greater than or equal to a preset similarity threshold. If so, the determination is stopped, and the tobacco leaf maturity state of the target tobacco plant at the target time is determined according to the historical relationship model corresponding to the group of historical data; otherwise, the determination is continued until the similarity between the feature vector of a certain group of historical data and the target feature vector of the target tobacco plant is greater than or equal to the preset similarity threshold or the similarities between the feature vectors of all groups of historical data and the target feature vector of the target tobacco plant are less than the preset similarity threshold.
[0110] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0111] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It will also be appreciated by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.
Claims
1. A method for determining the maturity state of tobacco leaves, characterized in that: The processing method comprises the following steps: Acquire a historical relationship model set; the historical relationship model set includes several historical relationship models, any historical relationship model is used to characterize the relationship between the maturity state of tobacco leaves and multi-spectral feature values, any historical relationship model corresponds to a group of historical data, and any group of historical data includes the maturity state of tobacco leaves and multi-spectral feature values corresponding to several consecutive sampling points; the number of historical relationship models included in the historical relationship model set is greater than or equal to 2, the number of sampling points corresponding to any group of historical data is greater than or equal to 3, and the sampling time interval corresponding to any two sampling points is a preset time length; the historical data corresponding to different historical relationship models differ at least in the sampling time, tobacco plant type or growth environment of the corresponding sampling points; According to the multispectral characteristic values corresponding to the several continuous sampling points included in each group of historical data, the characteristic vector of the corresponding group of historical data is obtained; the characteristic vector of any group of historical data includes the average multispectral characteristic value corresponding to the several continuous sampling points included in the group of historical data, the average multispectral characteristic value change rate and the multispectral characteristic value change rate variance; Obtaining a target feature vector of the target tobacco plant according to the multispectral feature values of the target tobacco plant at the target time and the target historical time period; the target historical time period is a time period before the target time and including a preset number of sampling points of the target; It is determined in turn whether the similarity between the feature vector of each group of historical data and the target feature vector of the target tobacco plant is greater than or equal to a preset similarity threshold. If so, the determination is stopped, and the tobacco leaf maturity state of the target tobacco plant at the target time is determined according to the historical relationship model corresponding to the group of historical data; otherwise, the determination is continued until the similarity between the feature vector of a certain group of historical data and the target feature vector of the target tobacco plant is greater than or equal to the preset similarity threshold or the similarities between the feature vectors of all groups of historical data and the target feature vector of the target tobacco plant are less than the preset similarity threshold.
2. The method for determining the maturity state of tobacco leaves according to claim 1, characterized in that: The processing method further comprises the following steps: If the similarities between the feature vectors of all groups of historical data and the target feature vector of the target tobacco strain are less than a preset similarity threshold, the first feature vector of the target tobacco strain is obtained according to the multispectral feature values of the target tobacco strain at the target moment and in a first historical time period; the first historical time period is a time period before the target moment and including a first preset number of sampling points, and the first preset number is half of the target preset number; It is judged in turn whether the similarity between the feature vector of each group of historical data and the first feature vector of the target tobacco strain is greater than or equal to a preset similarity threshold value; if so, the judgment is stopped, and the tobacco leaf maturity state of the target tobacco strain at the target time is determined according to the historical relationship model corresponding to the group of historical data; otherwise, the judgment is continued until the similarity between the feature vector of a certain group of historical data and the first feature vector of the target tobacco strain is greater than or equal to the preset similarity threshold value or the similarities between the feature vectors of all groups of historical data and the first feature vector of the target tobacco strain are less than the preset similarity threshold value; If the similarities between the feature vectors of all groups of historical data and the first feature vector of the target tobacco strain are less than a preset similarity threshold, a second feature vector of the target tobacco strain is obtained according to the multispectral feature value of the target tobacco strain in a second historical time period; the second historical time period is the remaining time period in the target historical time period except the first historical time period; It is determined in turn whether the similarity between the feature vector of each group of historical data and the second feature vector of the target tobacco strain is greater than or equal to a preset similarity threshold. If so, the determination is stopped, and the tobacco leaf maturity state of the target tobacco strain at the target time is determined based on the successor historical relationship model of the historical relationship model corresponding to the group of historical data; otherwise, the determination is continued until the similarity between the feature vector of a certain group of historical data and the second feature vector of the target tobacco strain is greater than or equal to the preset similarity threshold or the similarities between the feature vectors of all groups of historical data and the second feature vector of the target tobacco strain are less than the preset similarity threshold.
3. The method for determining the maturity state of tobacco leaves according to claim 1, characterized in that: The process of obtaining any historical relationship model includes: Acquire historical data corresponding to a specified historical relationship model; the specified historical relationship model is any historical relationship model; Determine a value set of each coefficient corresponding to the specified historical relationship model according to the historical data corresponding to the specified historical relationship model; Determine the actual accuracy and value range of the corresponding coefficient according to the value set of each coefficient; If the actual accuracy of a certain coefficient is less than the preset accuracy threshold corresponding to the coefficient, the preset accuracy threshold corresponding to the coefficient is determined as the target accuracy corresponding to the coefficient; otherwise, the actual accuracy of the coefficient is determined as the target accuracy corresponding to the coefficient; The target accuracy corresponding to each coefficient is used as the granularity of the corresponding coefficient to search for the optimal coefficient combination that meets the value range of each coefficient corresponding to the specified historical relationship model; The values of the coefficients corresponding to the optimal coefficient combination are determined as the values of the coefficients corresponding to the specified historical relationship model.
4. The method for determining the maturity state of tobacco leaves according to claim 3, characterized in that: The actual accuracy and value range of the corresponding coefficients are determined according to the value set of each coefficient: Obtaining a minimum value and a maximum value in a value set of a specified coefficient, and determining the minimum value as the minimum value of a value range of the specified coefficient, and determining the maximum value as the maximum value of the value range of the specified coefficient; the specified coefficient is any coefficient; The maximum value of the values that meet the first preset condition is determined as the precision of the specified coefficient; the first preset condition is that the value of any specified coefficient in the value set of the specified coefficient divided by the value to be determined whether the first preset condition is met is an integer.
5. The method for determining the maturity state of tobacco leaves according to claim 3, characterized in that: The acquisition process of any historical relationship model also includes: Obtain the predicted multi-spectral feature value corresponding to each sampling point according to the tobacco leaf maturity state corresponding to each sampling point included in the historical data corresponding to the specified historical relationship model and the value of each coefficient corresponding to the specified historical relationship model; Obtaining the multispectral characteristic value error corresponding to each sampling point according to the multispectral characteristic value corresponding to each sampling point and the corresponding predicted multispectral characteristic value included in the historical data corresponding to the specified historical relationship model; An average multispectral eigenvalue error is obtained according to the multispectral eigenvalue errors corresponding to each sampling point, and the average multispectral eigenvalue error is determined as a random error in a specified historical relationship model.
6. The method for determining the maturity state of tobacco leaves according to claim 2, characterized in that: The target preset number is less than the number of historical data corresponding to any historical relationship model and the target preset number is greater than or equal to 5.
7. The method for determining the maturity state of tobacco leaves according to claim 1, characterized in that: The rate of change of the multispectral characteristic values corresponding to any two consecutive sampling points is the ratio of the difference between the multispectral characteristic values corresponding to the two consecutive sampling points to the multispectral characteristic value corresponding to the previous sampling point, and the difference between the multispectral characteristic values corresponding to the two consecutive sampling points is the difference between the multispectral characteristic value corresponding to the latter sampling point and the multispectral characteristic value corresponding to the previous sampling point.
8. The method for determining the maturity state of tobacco leaves according to claim 1, characterized in that: The multispectral characteristic value is a normalized difference vegetation index.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for determining the maturity state of tobacco leaves as described in any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processing method for determining the maturity state of tobacco leaves as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Method, device and apparatus for predicting wind power and computer readable storage medium
CN112836870A
Hyperspectral detection method for ripeness of camellia oleifera fruits based on deep learning and sorting equipment
CN114112932A