Tobacco leaf sunburn warning method, electronic device and storage medium
By constructing a mapping relationship function between the sun burning area of tobacco leaves and the meteorological characteristics, the collected meteorological characteristic data are used to predict the sun burning area of tobacco leaves, the problem of lack of effective sun burning warning in the existing technology is solved, and accurate prediction and early warning of sun burning tobacco leaves is achieved.
Patent Information
- Application Number
- CN202411659630.X
- 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
At this stage, there is a lack of effective understanding of tobacco leaf sunburn and an effective sunburn warning plan, which has affected the production and quality of tobacco leaf.
By obtaining the historical tobacco leaf sunburn data set, a mapping relationship function between the tobacco leaf sunburn area and meteorological characteristics was constructed, and the collected meteorological characteristic data was used to predict the tobacco leaf sunburn area, and a tobacco leaf sunburn warning was issued based on the prediction results.
Accurate prediction of the daily burning area of tobacco leaves is achieved, the reliability of early warning is improved, and the daily burning loss of tobacco leaves is reduced.
Smart Images

Figure CN119150000B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a tobacco sunburn warning method, electronic equipment and storage medium. Background Art
[0002] Sunburn is an agricultural phenomenon in which plants are damaged by high temperatures. During tobacco planting and growth, sunburn is a meteorological disaster that affects tobacco yield and quality. Therefore, necessary early warning during tobacco production can improve meteorological disaster prevention and control capabilities, reduce the sunburn area, and reduce tobacco sunburn losses. However, at this stage, there is a lack of effective understanding of tobacco sunburn and a lack of effective sunburn early warning solutions.
[0003] Therefore, how to achieve effective early warning of tobacco leaf sunburn and improve the reliability of early warning has become an urgent problem to be solved. Summary of the invention
[0004] In response to the above technical problems, the present invention provides a tobacco sunburn warning method, electronic equipment and storage medium, which can accurately and reasonably predict the sunburn area based on a number of collected meteorological characteristic values to issue a reliable tobacco sunburn warning.
[0005] According to a first aspect of the present invention, a tobacco leaf sunburn warning method is provided, comprising the following steps:
[0006] A historical tobacco leaf sunburn data set is obtained; the historical tobacco leaf sunburn data set includes historical data of a number of historical tobacco leaf sunburn areas and a number of meteorological characteristics corresponding to each historical tobacco leaf sunburn area.
[0007] For any meteorological characteristic, based on the pre-constructed mapping relationship function to be processed between the tobacco leaf sunburn area and the meteorological characteristic, according to several historical data of the meteorological characteristic and several historical tobacco leaf sunburn areas corresponding to the meteorological characteristic, the target mapping relationship function between the tobacco leaf sunburn area and the meteorological characteristic is obtained; the mapping relationship function to be processed is a linear function that characterizes the positive correlation between the tobacco leaf sunburn area and the meteorological characteristic.
[0008] When the collected data of several meteorological characteristics in the target tobacco planting area are received, the collected data of each meteorological characteristic is input as an independent variable into the corresponding target mapping relationship function to obtain the tobacco sunburn prediction area corresponding to each meteorological characteristic.
[0009] When the difference between the predicted tobacco leaf sunburn areas corresponding to each meteorological feature meets the preset judgment condition, the average predicted tobacco leaf sunburn areas corresponding to several predicted tobacco leaf sunburn areas are determined as the predicted tobacco leaf disaster area.
[0010] The target disaster level is determined based on the ratio of the predicted tobacco damage area to the target tobacco planting area, and when the target disaster level is greater than the preset level threshold, a tobacco sunburn warning is issued.
[0011] According to a second aspect of the present invention, a non-transitory computer-readable storage medium is provided, in which at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the above-mentioned tobacco sunburn warning method.
[0012] According to a third aspect of the present invention, there is provided an electronic device comprising a processor and the above-mentioned non-transitory computer-readable storage medium.
[0013] The present invention has at least the following beneficial effects:
[0014] The present invention provides a tobacco leaf sunburn warning method. First, historical data of several historical tobacco leaf sunburn areas and several meteorological characteristics corresponding to each historical tobacco leaf sunburn area are obtained. According to several historical data of any meteorological characteristic and several historical tobacco leaf sunburn areas, a target mapping relationship function between the tobacco leaf sunburn area and the corresponding meteorological characteristic is obtained. The collected data of the meteorological characteristic is input as an independent variable into the corresponding target mapping relationship function to obtain the tobacco leaf sunburn prediction area corresponding to the meteorological characteristic. When the difference between the tobacco leaf sunburn prediction areas corresponding to the meteorological characteristics meets the preset judgment condition, that is, when the difference between the obtained tobacco leaf sunburn prediction areas is small, it indicates that each individual meteorological characteristic can more accurately reflect the influence on the tobacco leaf sunburn area. Therefore, the average sunburn prediction area is determined as the tobacco leaf disaster prediction area, which simplifies the calculation process and ensures the prediction accuracy of the tobacco leaf sunburn area. Finally, according to the proportion of the tobacco leaf disaster prediction area, it is judged whether to issue a tobacco leaf sunburn warning. The present invention analyzes the influence of several meteorological characteristics on the sunburn area, and can realize accurate and reasonable prediction of the sunburn area according to several collected meteorological characteristic values, so as to issue a reliable tobacco leaf sunburn warning. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] 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.
[0016] Figure 1 A flow chart of a tobacco leaf sunburn warning method provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0017] 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.
[0018] This embodiment provides a tobacco leaf sunburn warning method, such as Figure 1 As shown, the method comprises the following steps:
[0019] S100, obtaining a historical tobacco leaf sunburn data set; the historical tobacco leaf sunburn data set includes a number of historical tobacco leaf sunburn areas and historical data of a number of meteorological characteristics corresponding to each historical tobacco leaf sunburn area; it can be understood that: the historical tobacco leaf sunburn area refers to the sunburn area of tobacco leaves collected within a preset historical time period.
[0020] Specifically, the several meteorological characteristics include the mean air temperature, mean solar radiation, mean soil temperature and the highest soil temperature of the day corresponding to the day when sunscald occurs; in the specific implementation, the air temperature, solar radiation and soil temperature are collected once every hour.
[0021] Preferably, the collection time period corresponding to each meteorological feature is 10:00-15:00 on the day when sunburn occurs; since the sunburn phenomenon generally occurs at noon, the meteorological statistics of the noon mean represent the meteorological conditions when sunburn may occur.
[0022] In addition, in the specific implementation, the data in the historical tobacco sunburn dataset are recorded at the township scale, that is, the sunburn disaster situation and the corresponding meteorological conditions in each township are recorded. Considering that the maximum spatial resolution of meteorology in open source meteorology is 0.125°, the corresponding spatial range is about 10km. Due to the limitation of meteorological resolution, there may be multiple villages within the range of 10×10km cell. Therefore, using township as the scale can reflect the meteorological differences.
[0023] As mentioned above, considering the various causes of sunburn, starting from meteorological conditions, the characteristics of air temperature, solar radiation, and soil temperature that are highly correlated with the sunburn phenomenon are introduced, which is conducive to the subsequent separate and comprehensive analysis of each meteorological characteristic to obtain the cause of sunburn and achieve a better prediction of the degree of sunburn.
[0024] S200, for any meteorological characteristic, based on a pre-constructed mapping relationship function to be processed between the tobacco leaf sunburn area and the meteorological characteristic, a target mapping relationship function between the tobacco leaf sunburn area and the meteorological characteristic is obtained according to a number of historical data of the meteorological characteristic and a number of historical tobacco leaf sunburn areas corresponding to the meteorological characteristic; the mapping relationship function to be processed is a linear function characterizing that the tobacco leaf sunburn area and the meteorological characteristic are positively correlated; it can be understood that: the meteorological characteristic is the independent variable, and the tobacco leaf sunburn area is the dependent variable.
[0025] In a specific embodiment, the target mapping relationship function between the tobacco leaf sunburn area and the meteorological characteristics is obtained through the following steps:
[0026] S201, for any meteorological feature, any historical data of the meteorological feature and the historical tobacco leaf sunburn area corresponding to the historical data itself are substituted as independent variables and dependent variables into the to-be-processed mapping relationship function corresponding to the meteorological feature, to obtain the first mapping relationship function corresponding to the meteorological feature.
[0027] For a better understanding, the following explanation is made: For each historical tobacco leaf sunburn area, there are four meteorological characteristics corresponding to the value, that is, each meteorological characteristic corresponds to a number of historical tobacco leaf sunburn areas. For any meteorological characteristic, the historical data corresponding to the meteorological characteristic and the historical tobacco leaf sunburn areas are respectively taken as h i 、f i Substitute into the mapping function f to be processed i =kh i +g, we can obtain several groups of first mapping relationship functions corresponding to any meteorological feature, where h i represents the i-th historical data corresponding to the meteorological characteristics, f i Indicates h i The corresponding historical tobacco leaf sunburn area, k is the sunburn influence factor, g is the sunburn compensation factor, which can also be understood as k is an unknown coefficient of any historical data of meteorological characteristics, g is an unknown constant, i ranges from 1 to m, and m is the number of historical tobacco leaf sunburn areas.
[0028] S202, based on a number of first mapping relationship functions corresponding to meteorological characteristics, the initial value of the sunburn influence factor and the initial value of the sunburn compensation factor can be calculated through each two adjacent first mapping relationship functions to obtain the upper limit value and lower limit value of the sunburn influence factor and the upper limit value and lower limit value of the sunburn compensation factor.
[0029] To better understand the above content, an example is given below: solve the equation group for f1=kh1+g and f2=kh2+g to obtain a set of k and g values, solve the equation group for f2=kh2+g and f3=kh3+g to obtain a set of k and g values, and so on, ultimately obtaining m-1 k values and m-1 g values, and then obtaining the upper and lower limits of the sunburn influence factor and the upper and lower limits of the sunburn compensation factor.
[0030] S203, according to the upper limit value and lower limit value of the sunburn influence factor and the upper limit value and lower limit value of the sunburn compensation factor, a grid optimization algorithm is used to obtain the final value of the sunburn influence factor and the final value of the sunburn compensation factor; those skilled in the art are aware of the specific implementation process of the grid optimization algorithm to obtain the optimal solution, which will not be repeated here.
[0031] S204, substituting the final value of the sunburn impact factor and the final value of the sunburn compensation factor into the to-be-processed mapping relationship function corresponding to the meteorological feature to obtain a target mapping relationship function between the tobacco leaf sunburn area and the meteorological feature.
[0032] In the above, considering the influence of single meteorological characteristics on the sunburn area of tobacco leaves, starting from a single dimension, a linear mapping relationship function to be processed between the single meteorological characteristics and the sunburn area of tobacco leaves is constructed, and the unknown parameters in the function are calculated, so that when any meteorological characteristics are collected, the corresponding sunburn area of tobacco leaves can be predicted by the function.
[0033] S300, when the collected data of several meteorological characteristics in the target tobacco planting area are received, the collected data of each meteorological characteristic is input as an independent variable into the corresponding target mapping relationship function to obtain the tobacco sunburn prediction area corresponding to each meteorological characteristic.
[0034] Specifically, the target tobacco planting area is any tobacco planting area whose sunburn area is to be predicted.
[0035] S400: When the difference between the predicted tobacco leaf sunburn areas corresponding to each meteorological feature meets a preset judgment condition, an average predicted tobacco leaf sunburn area corresponding to a plurality of predicted tobacco leaf sunburn areas is determined as the predicted tobacco leaf disaster area.
[0036] In a specific embodiment, the following steps are used to determine whether the difference between the predicted tobacco leaf sunburn areas corresponding to each meteorological feature meets the preset judgment condition:
[0037] S401, calculating the degree of dispersion of the tobacco leaf sunburn prediction area according to the tobacco leaf sunburn prediction area corresponding to each meteorological feature.
[0038] Specifically, the degree of dispersion S of the predicted area of tobacco leaf sunburn meets the following conditions:
[0039] S=(∑ n j=1 (λ j -λ0) 2 ) / n, where λ j is the predicted sunburn area of tobacco leaves corresponding to the jth meteorological feature, λ0 is the average predicted sunburn area corresponding to a number of predicted sunburn areas of tobacco leaves, and n is the number of categories of meteorological features; in this embodiment, n=4.
[0040] S402, when the degree of dispersion of the predicted tobacco leaf sunburn area is less than a preset dispersion degree threshold, it is determined that the difference between the predicted tobacco leaf sunburn areas corresponding to each meteorological feature meets the preset judgment condition; technical personnel in this field set the dispersion degree threshold according to actual needs.
[0041] As mentioned above, when a single-dimensional mapping relationship function to be processed is used to predict the tobacco leaf sunburn area, when the difference between the tobacco leaf sunburn areas predicted by the collected data of each meteorological feature is small, it shows that each individual meteorological feature can more accurately reflect the impact on the tobacco leaf sunburn area. Therefore, the average sunburn area can be directly calculated in the subsequent process to realize the prediction of the tobacco leaf sunburn area, which simplifies the calculation process and ensures the prediction accuracy of the tobacco leaf sunburn area.
[0042] In another specific embodiment, the method further comprises the steps of:
[0043] S410, when the difference between the predicted tobacco sunburn areas corresponding to each meteorological feature does not meet the preset judgment condition, any historical tobacco sunburn area is used as the dependent variable, and the historical data of several meteorological features corresponding to the historical tobacco sunburn area itself are respectively input as independent variables into the preset sunburn area prediction model y=ax1+bx2+cx3+dx4+ε, and the sunburn area prediction model to be processed is obtained, wherein y represents the dependent variable, x1, x2, x3, and x4 are the historical data of the mean temperature corresponding to the historical tobacco sunburn area itself The data are as follows: the historical data of the corresponding average solar radiation, the historical data of the corresponding average soil temperature and the historical data of the corresponding maximum soil temperature of the day; a, b, c, d are the sunburn area influence coefficients corresponding to x1, x2, x3 and x4 respectively; ε is the sunburn area compensation constant; the initial values of a, b, c, d and ε are unknown; it can be understood as: based on the sunburn occurrence day corresponding to the historical tobacco leaf sunburn area itself, x1, x2, x3 and x4 respectively correspond to the historical data of the four meteorological characteristics on the sunburn occurrence day; y represents the predicted sunburn area.
[0044] S420, according to the prediction model of the sunburn area to be processed corresponding to each historical tobacco leaf sunburn area, the optimal solution is obtained through the genetic algorithm, and the values of a, b, c, d and ε are obtained to obtain the target sunburn area prediction model; technical personnel in this field are aware of the specific implementation process of the genetic algorithm to find the optimal solution according to several prediction models, which will not be repeated here.
[0045] S430, inputting the collected data of each meteorological feature received as an independent variable into the target sunburn area prediction model, and determining the output value of the target sunburn area prediction model as the predicted tobacco leaf damage area.
[0046] As mentioned above, when the difference between the predicted tobacco sunburn area corresponding to each meteorological feature is large, it shows that the accuracy of predicting the tobacco sunburn area through a single dimension is low, that is, each meteorological feature has mutual influence. Therefore, a multi-dimensional approach is used to comprehensively analyze the influencing factors of the tobacco sunburn area. Since each feature has a positive impact on the tobacco sunburn area, a sunburn area prediction model combining multiple meteorological features is constructed. Through this model, a comprehensive analysis of several meteorological characteristics can be carried out, thereby increasing the prediction accuracy and reliability of the tobacco sunburn prediction area.
[0047] S500, determining a target disaster level according to the ratio of the predicted tobacco leaf disaster level to the target tobacco leaf planting area, and issuing a tobacco leaf sunburn warning when the target disaster level is greater than a preset level threshold.
[0048] Specifically, the method of determining the target disaster level according to the ratio of the predicted tobacco leaf disaster area to the target tobacco leaf planting area includes the following steps:
[0049] S501, obtain the preset disaster-affected area ratio interval corresponding to each preset disaster level; it can be understood that: each preset disaster level corresponds to a disaster-affected area ratio range. For example, the disaster levels from high to low are complete crop failure, severe, moderate, and mild. The disaster-affected area ratio interval corresponding to complete crop failure is (0.9-1], the disaster-affected area ratio interval corresponding to severe is (0.6-0.9], the disaster-affected area ratio interval corresponding to moderate is (0.3-0.6], and the disaster-affected area ratio interval corresponding to mild is (0.05-0.3].
[0050] S502, according to the ratio of the predicted tobacco leaf disaster-affected area to the target tobacco leaf planting area, determine a target disaster-affected area ratio interval from a plurality of preset disaster-affected area ratio intervals.
[0051] S503, determining the preset disaster level corresponding to the target disaster area ratio interval as the target disaster level. For example, when the ratio of the predicted tobacco leaf disaster area to the target tobacco leaf planting area is 0.7, the target disaster area ratio interval is determined to be (0.6-0.9], and the target disaster level at this time is a severe level.
[0052] As mentioned above, while considering the predicted area of tobacco leaf damage, the target tobacco leaf planting area was introduced, and a reasonable target disaster level was obtained through the proportion of the predicted area of tobacco leaf damage. The predicted results of the disaster level are conducive to timely issuing tobacco leaf sunburn warnings, so as to improve the ability to prevent and control meteorological disasters and reduce tobacco field losses.
[0053] Furthermore, when considering the difference in tobacco leaf types, the method further obtains the tobacco leaf sunburn level in the target tobacco leaf planting area through the following steps:
[0054] K100, receives the number of tobacco leaf types and the current meteorological characteristic information set in the target tobacco leaf planting area. When the number of tobacco leaf types is 1, obtains several first historical sunburn occurrence dates corresponding to the tobacco leaf types, the historical meteorological characteristic information set corresponding to each first historical sunburn occurrence date, and the historical sunburn level corresponding to each first historical sunburn occurrence date.
[0055] The first historical sunburn occurrence dates corresponding to the tobacco leaf type refer to the sunburn occurrence dates of the tobacco leaves belonging to the tobacco leaf type itself within a historical period of time.
[0056] Specifically, the current meteorological characteristic information set includes a first current maximum temperature difference, a second current maximum temperature difference, a first current solar radiation change rate, a second current solar radiation change rate, total precipitation for the day, and total precipitation within three days before the day.
[0057] Furthermore, the first current maximum temperature difference is the difference between the maximum temperature of the day and the maximum temperature of the day before the day; it can be understood that the maximum temperature of the day refers to the maximum temperature on the corresponding first historical sunburn occurrence day.
[0058] Similarly, the second current maximum temperature difference is the difference between the maximum temperature of the day and the maximum temperature of the three days before the day.
[0059] Specifically, the first current solar radiation change rate is the change rate of the maximum solar radiation of the day compared with the maximum solar radiation of the day before the day; it can be understood that the maximum solar radiation of the day refers to the maximum value of the solar radiation on the corresponding first historical sunburn day.
[0060] Furthermore, the second current solar radiation change rate is the change rate of the maximum solar radiation of the day compared with the target solar radiation of the previous three days; the target solar radiation of the previous three days is the solar radiation corresponding to the minimum value of the daily maximum solar radiation in the previous three days; it can be understood as: selecting the minimum value from the three maximum solar radiations.
[0061] Specifically, the meteorological characteristics in the historical meteorological characteristic information set corresponding to the first historical sunscald occurrence day are consistent with the meteorological characteristics in the current meteorological characteristic information set, and the calculation method of the meteorological characteristic values is consistent; it can be understood that: the historical meteorological characteristic information set corresponding to the first historical sunscald occurrence day includes the first historical maximum temperature difference, the second historical maximum temperature difference, the first historical solar radiation change rate, the second historical solar radiation change rate, the total precipitation on the first historical sunscald occurrence day, and the total precipitation within the three days before the first historical sunscald occurrence day.
[0062] K200, using the historical meteorological feature information set corresponding to each first historical sunburn occurrence date and the historical sunburn level corresponding to each first historical sunburn occurrence date as samples to train a preset logistic regression model to obtain a target logistic regression model; the output layer of the preset logistic regression model is configured with a number of preset sunburn levels.
[0063] Among them, the preset logistic regression model is a softmax logistic regression model.
[0064] Furthermore, the method trains a preset logistic regression model through the following steps:
[0065] K201, for any first historical sunburn occurrence day, convert the historical meteorological feature information set corresponding to the first historical sunburn occurrence day into a historical meteorological feature vector and input it into the preset logistic regression model, and output the predicted probability of the first historical sunburn occurrence day corresponding to each preset sunburn level according to the preset level weight of each preset sunburn level; it can be understood that: the historical meteorological feature vector is a feature vector obtained by combining several historical meteorological feature values in the historical meteorological feature information set. In specific implementation, the total precipitation on the first historical sunburn occurrence day and the total precipitation in the three days before the first historical sunburn occurrence day can also be normalized to be between 0 and 1.
[0066] Specifically, the predicted probability of the first historical sunburn occurrence day corresponding to any preset sunburn level meets the following conditions:
[0067] , where P q|s represents the prediction probability of the qth preset sunburn level when the input historical meteorological feature vector is s, Q is the number of preset sunburn levels, and w q is the weight vector of the qth preset sunburn level, w ris the weight vector of the rth preset sunburn level; in this embodiment, the weight vector of each preset sunburn level is a value preset according to the actual needs of those skilled in the art.
[0068] K202, according to the predicted probability of each preset sunburn level corresponding to the first historical sunburn occurrence date, and the historical sunburn level corresponding to the first historical sunburn occurrence date, the probability loss value is calculated by using the cross entropy loss function; wherein, the formula and calculation process of the cross entropy loss function are existing technologies and will not be repeated here.
[0069] K203, iteratively adjust the parameters in the preset logistic regression model through the probability loss value corresponding to each first historical sunburn occurrence date until the probability loss value meets the preset requirements to obtain the target logistic regression model; it can be understood as: every time the probability loss value is obtained, the parameters in the prediction probability formula in the preset logistic regression model are adjusted.
[0070] As mentioned above, by obtaining several historical sunburn occurrence dates and corresponding historical meteorological data of the same tobacco type as that in the target tobacco planting area, and using the obtained data as samples, a logistic regression model corresponding to the tobacco type can be trained, so that a reliable sunburn level prediction result for the tobacco can be obtained based on the currently collected meteorological data.
[0071] K300, converts the current meteorological feature information set into the first meteorological feature vector and inputs it into the target logistic regression model, outputs the probability value of each preset sunburn level, and uses the preset sunburn level corresponding to the maximum probability value as the tobacco leaf sunburn level.
[0072] As mentioned above, when there is only one type of tobacco leaf, since the logistic regression model is suitable for multi-classification problems and the training and calculation processes are simple, the use of the logistic regression model can reduce the processing complexity, and the logistic regression model can be trained in a targeted manner based on a number of historical data corresponding to the tobacco leaf type, which can improve the prediction accuracy and reliability of the model.
[0073] K400, when the number of tobacco leaf types is greater than 1, obtain the second historical sunburn occurrence date corresponding to each tobacco leaf type, the historical meteorological characteristic information set corresponding to each second historical sunburn occurrence date, and the historical sunburn level corresponding to each second historical sunburn occurrence date; it can be understood that: for each tobacco leaf type, several historical sunburn occurrence dates corresponding to the tobacco leaf type itself are obtained.
[0074] Specifically, the historical meteorological characteristic information set corresponding to the second historical sunscald occurrence date is obtained in the same manner as the historical meteorological characteristic information set corresponding to the first historical sunscald occurrence date.
[0075] K500, uses the tobacco leaf label corresponding to each tobacco leaf type, the historical meteorological feature information set corresponding to each second historical sunburn occurrence date, and the historical sunburn level corresponding to each second historical sunburn occurrence date as samples to train the preset random forest model and obtain the target random forest model.
[0076] Specifically, the tobacco label of a tobacco type is the name of the tobacco variety.
[0077] Specifically, the method obtains the target random forest model through the following steps:
[0078] K501, for any tobacco leaf type, the tobacco leaf label corresponding to the tobacco leaf type and the historical meteorological characteristic information set corresponding to any second historical sunburn occurrence date under the tobacco leaf type are combined into a target sample to obtain a plurality of target samples.
[0079] K502, obtain several historical sunburn sub-sample data sets from several target samples by sampling with replacement; technical personnel in this field set the number of sampling times according to actual needs.
[0080] K503, for any historical sunburn sub-sample data set, at the root node of the constructed initial decision tree, randomly select several feature combinations from several historical meteorological feature information in the historical meteorological feature information set corresponding to each second historical sunburn occurrence date and the tobacco leaf label corresponding to each tobacco leaf type as feature subsets for splitting until the preset stopping condition is met to obtain the target decision tree; it can be understood that: the tobacco leaf label and any historical meteorological feature information are each a feature.
[0081] Specifically, the preset stopping condition is that during the process of constructing the initial decision tree into the target decision tree, the number of leaf node samples is less than a preset number threshold or the depth of the initial decision tree reaches a preset value.
[0082] K504, obtain the target random forest model based on the target decision tree corresponding to each historical sunburn sub-sample dataset.
[0083] As mentioned above, for each type of tobacco leaves, several historical sunburn occurrence dates and several corresponding historical meteorological data corresponding to each type of tobacco leaves are obtained respectively, and the obtained data are used as samples to train a model for sunburn level prediction that is simultaneously applicable to several types of tobacco leaves. While having high prediction accuracy, when there are several types of tobacco leaves in the target tobacco leaf planting area, the sunburn level prediction results corresponding to each type of tobacco leaf can be obtained, thereby reducing the complexity of prediction.
[0084] K600, combines any tobacco leaf label with the current meteorological feature information set and converts it into a second meteorological feature vector, which is input into the target random forest model, and outputs the tobacco leaf sunburn level corresponding to the tobacco leaf label itself.
[0085] As mentioned above, for the case where there are several types of tobacco leaves, if a logistic regression model is used, a corresponding logistic regression model must be trained separately for each type of tobacco leaf, and the processing process is complicated. Therefore, a random forest model is used to uniformly train the relevant historical data of several types of tobacco leaves, so that the trained model can be simultaneously applicable to the sunburn level prediction of multiple types of tobacco leaves, thereby reducing the complexity of the prediction process.
[0086] An embodiment of the present invention also provides a non-transitory computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to implementing a method in a method embodiment. 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 embodiment.
[0087] An embodiment of the present invention further provides an electronic device, comprising a processor and the aforementioned non-transitory computer-readable storage medium.
[0088] An embodiment of the present invention further provides a computer program product, which includes program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the method according to various exemplary embodiments of the present invention described above in this specification.
[0089] 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 tobacco leaf sunburn early warning method, characterized in that: The method comprises the following steps: Acquire a historical tobacco leaf sunburn data set; the historical tobacco leaf sunburn data set includes historical data of several historical tobacco leaf sunburn areas and several meteorological characteristics corresponding to each historical tobacco leaf sunburn area; the several meteorological characteristics include the mean temperature, mean solar radiation, mean soil temperature and the highest soil temperature on the day corresponding to the sunburn occurrence day; For any meteorological feature, based on a pre-constructed mapping relationship function to be processed between tobacco leaf sunburn area and meteorological feature, a target mapping relationship function between tobacco leaf sunburn area and meteorological feature is obtained according to a number of historical data of the meteorological feature and a number of historical tobacco leaf sunburn areas corresponding to the meteorological feature; the mapping relationship function to be processed is a linear function characterizing that tobacco leaf sunburn area and meteorological feature are positively correlated; When the collected data of several meteorological characteristics in the target tobacco leaf planting area are received, the collected data of each meteorological characteristic is input as an independent variable into the corresponding target mapping relationship function to obtain the tobacco leaf sunburn prediction area corresponding to each meteorological characteristic; When the difference between the predicted tobacco leaf sunburn areas corresponding to each meteorological feature meets the preset judgment condition, the average predicted tobacco leaf sunburn areas corresponding to the predicted tobacco leaf sunburn areas are determined as the predicted tobacco leaf disaster area; The target disaster level is determined based on the ratio of the predicted tobacco leaf damage area to the target tobacco leaf planting area, and when the target disaster level is greater than the preset level threshold, a tobacco leaf sunburn warning is issued; The method further comprises the following steps: When the difference between the predicted tobacco sunburn areas corresponding to each meteorological feature does not meet the preset judgment conditions, any historical tobacco sunburn area is taken as the dependent variable, and the historical data of several meteorological features corresponding to the historical tobacco sunburn area itself are respectively input as independent variables into the preset sunburn area prediction model y=ax1+bx2+cx3+dx4+ε, and the sunburn area prediction model to be processed is obtained, wherein y represents the dependent variable, x1, x2, x3, and x4 are the historical data of the mean temperature corresponding to the historical tobacco sunburn area itself, the historical data of the corresponding mean solar radiation, the historical data of the corresponding mean soil temperature, and the historical data of the highest soil temperature of the day, respectively, a, b, c, and d are the sunburn area influence coefficients corresponding to x1, x2, x3, and x4, respectively, and ε is the sunburn area compensation constant; According to the prediction model of the sunburn area to be processed corresponding to each historical tobacco leaf sunburn area, the optimal solution is obtained through the genetic algorithm, and the values of a, b, c, d and ε are obtained to obtain the target sunburn area prediction model; The collected data of each meteorological feature received are respectively input into the target sunburn area prediction model as independent variables, and the output value of the target sunburn area prediction model is determined as the predicted area of tobacco leaf damage.
2. The tobacco leaf sunburn warning method according to claim 1, characterized in that: The target mapping relationship function between tobacco leaf sunburn area and meteorological characteristics is obtained through the following steps: For any meteorological feature, any historical data of the meteorological feature and the historical tobacco leaf sunburn area corresponding to the historical data are substituted as independent variables and dependent variables into the to-be-processed mapping relationship function corresponding to the meteorological feature, to obtain a first mapping relationship function corresponding to the meteorological feature; Based on a number of first mapping relationship functions corresponding to meteorological characteristics, the initial value of the sunburn influence factor and the initial value of the sunburn compensation factor can be calculated through each two adjacent first mapping relationship functions to obtain the upper limit value and lower limit value of the sunburn influence factor and the upper limit value and lower limit value of the sunburn compensation factor; According to the upper limit value and lower limit value of the sunburn influence factor and the upper limit value and lower limit value of the sunburn compensation factor, the final value of the sunburn influence factor and the final value of the sunburn compensation factor are obtained by using a grid optimization algorithm; The final value of the sunburn influence factor and the final value of the sunburn compensation factor are substituted into the mapping relationship function to be processed corresponding to the meteorological characteristics to obtain the target mapping relationship function between the tobacco leaf sunburn area and the meteorological characteristics.
3. The tobacco leaf sunburn early warning method according to claim 1, characterized in that: The following steps are used to determine whether the difference between the predicted tobacco leaf sunburn areas corresponding to each meteorological feature meets the preset judgment conditions: According to the predicted tobacco leaf sunburn area corresponding to each meteorological feature, the dispersion degree of the predicted tobacco leaf sunburn area is calculated; When the degree of dispersion of the tobacco leaf sunburn prediction area is less than a preset dispersion degree threshold, it is determined that the difference between the tobacco leaf sunburn prediction areas corresponding to each meteorological feature meets the preset judgment condition.
4. The tobacco leaf sunburn early warning method according to claim 1, characterized in that: Determining the target disaster level according to the ratio of the predicted tobacco leaf disaster area to the target tobacco leaf planting area includes the following steps: Obtain the preset disaster-affected area ratio interval corresponding to each preset disaster level; According to the ratio of the predicted tobacco leaf disaster area to the target tobacco leaf planting area, a target disaster area ratio interval is determined from a number of preset disaster area ratio intervals; The preset disaster level corresponding to the target disaster-affected area ratio interval is determined as the target disaster level.
5. The tobacco leaf sunburn early warning method according to claim 1, characterized in that: The collection time period corresponding to each meteorological feature is 10:00-15:00 on the day when the sunburn occurs.
6. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium, characterized in that: The at least one instruction or the at least one program is loaded and executed by the processor to implement the tobacco leaf sunburn warning method as described in any one of claims 1-5.
7. An electronic device, characterized in that: The invention comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 6.
Citation Information
Patent Citations
Intelligent tea garden meteorological disaster early warning optimization method and system
CN117830827A
Intelligent citrus fruit sunburn monitoring and early warning method and system
CN117972481A