Establishment of Climate Quality Evaluation Model for Ganoderma cochlear and Comprehensive Evaluation Method
Patent Information
- Application Number
- CN202611210656.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-09-15
Smart Images

Figure CN122760109A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of meteorological data processing and agricultural product quality evaluation technology, and more specifically, to the establishment of a climate quality evaluation model and a comprehensive evaluation method for Ganoderma lucidum. Background Technology
[0002] The current climate quality assessment of Ganoderma lucidum mainly relies on meteorological data such as temperature, precipitation, sunshine, continuous rain, drought, and high temperature heat damage. The key periods for quality formation are divided according to the established phenological dates or manual records. The evaluation values of each indicator are calculated using membership functions, the weights of the indicators are determined by combining expert scores, and the climate quality level is obtained by weighted coefficient method. Under the conditions of scattered planting in mountainous areas, the actual start and end times of the same growth stage often shift forward or backward due to differences in altitude, slope aspect, degree of shading and cultivation management in different plots. However, the edge computing devices set up at the planting sites are limited by storage capacity, communication bandwidth and computing power, making it difficult to store and continuously process all high temporal resolution meteorological data for a long time. When continuous rain, drought, or high-temperature heat damage occurs near the boundary of a critical period, a slight shift in the boundary position can cause the same disaster to be classified into different growth stages, thus causing the weighted evaluation results of the same batch of Ganoderma lucidum to vary between adjacent quality grades. Using fixed boundaries, result averaging, or majority judgment methods can only reduce surface differences and cannot determine the range of meteorological data that truly causes grade changes. It may also lead to the critical period division deviation being mistakenly considered as an improper setting of indicator weights. The technical problem this application aims to solve is: given the limited edge computing resources and the locational shift during the critical period of Ganoderma lucidum quality formation, how to accurately determine the meteorological data intervals that cause changes in climate quality level, and accordingly correct the boundaries of the critical period so that the obtained climate quality level does not change due to changes in the candidate boundaries. Summary of the Invention
[0003] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a method for establishing and comprehensively evaluating the climate quality assessment model of Ganoderma lucidum. By generating multi-scale candidate time periods, locating the grade change range based on the climate quality classification results of the candidate time periods, and gradually shrinking the boundary of key time periods under the constraint of edge computing resources, the present invention addresses the problems mentioned in the background art.
[0004] To achieve the above objectives, the present invention provides the following technical solution: A method for establishing a climate quality evaluation model and comprehensively assessing Ganoderma lucidum, comprising: S1. Obtain historical batch meteorological data, levels and expert scores. Establish a membership function based on the zero point of the cumulative frequency difference between adjacent levels. Normalize the product of the mean difference of membership between adjacent levels and the expert score into index weights. Train an ordered Logit model with weighted membership values to obtain level boundary values. S2. Edge computing nodes acquire phenological times and original meteorological sequences of the batch to be evaluated, determine the quadratic sampling interval according to the boundary movement range and halve it layer by layer to generate candidate time period sequences with single boundary movement. S3. Calculate the evaluation value of the candidate time period and determine the candidate level based on the weighted membership contribution prefix sum. Perform multi-scale PELT recursion by multiplying the squared error within the segment by the sum of the model parameter number and the natural logarithm of the candidate number, and output the segmented change position. S4. Within the next scale segmented change interval, calculate the upper and lower bounds of the evaluation based on the meteorological data added and removed by the boundary movement, delete the intervals that do not cross the grade boundary value, and establish a dynamic planning of the branch boundary interval for the remaining intervals based on the number of uncalculated boundaries, and record the number of classifications and branch paths. S5. Divide the number of idle processor cycles by the number of single classification cycles to obtain the classification quota. Allocate the classification quota according to the product of the number of grade boundary values crossed and the number of uncalculated boundaries. Determine the candidate grade layer by layer along the branch path until the reserved interval does not cross the grade boundary value. Read the first candidate time period in ascending order according to the number of samples that the candidate time period deviates from the phenological time period and output the climate quality grade.
[0005] In a preferred embodiment, S1 includes: S11. For each meteorological indicator, the historical batches are arranged in ascending order of meteorological values. The cumulative frequency of adjacent level samples at each meteorological value position is calculated. The adjacent meteorological values where the cumulative frequency difference changes from non-positive to positive or from non-negative to negative are used as the interpolation endpoints. The meteorological values with zero cumulative frequency difference are obtained through linear interpolation, and the level zero point is output. The grade sample refers to the batch record formed by grouping historical batches according to the labeled climate quality grade. One historical batch corresponds to one grade sample. The grade sample must include at least the batch identifier, climate quality grade, start and end times of the critical period, and the index value of the current meteorological indicator within the critical period. Cumulative frequency refers to the number of samples at each meteorological value position in the ascending sequence of meteorological values for a given climate quality level, where the statistical index value is no greater than the current meteorological value. This number is the ratio of the statistical quantity to the total number of samples for the corresponding climate quality level. The difference in cumulative frequency between adjacent levels is obtained by subtracting the cumulative frequency of the previous climate quality level from the cumulative frequency of the next climate quality level. The process of obtaining meteorological values with zero cumulative frequency difference through linear interpolation is as follows: Read the meteorological value before and after the cumulative frequency difference sign conversion, and the corresponding cumulative frequency difference. Add the negative of the previous cumulative frequency difference to the previous meteorological value, divide the ratio obtained by the difference between the cumulative frequency difference of the next interval and the cumulative frequency difference of the previous interval, and multiply it by the difference between the previous and next meteorological values to obtain the candidate zero point. When the cumulative frequency difference is equal to zero in the meteorological value position, directly record the corresponding meteorological value as the candidate zero point. When there are more than two candidate zero points, calculate the absolute difference between each candidate zero point and the median of the adjacent level samples, and read the first candidate zero point in ascending order of absolute difference as the level zero point. S12. Connect adjacent level zeros in order of level. Calculate the level membership value of historical batches between adjacent level zeros according to the distance ratio. Divide the product of the difference in the level membership mean of adjacent level samples and the corresponding expert score by the sum of all products to output the index weight. The process of calculating the grade membership value of historical batches is as follows: assign consecutive integer grade codes to each grade according to the order of climate quality grades. When the meteorological value is between the zero point of the j-th grade and the zero point of the j+1-th grade, divide the distance of the meteorological value from the zero point of the j-th grade to the zero point of the j+1-th grade by the distance between the two grade zero points to obtain the interval ratio. Then add the interval ratio to the j-th grade code to obtain the grade membership value. Write the first grade code when the meteorological value is outside the first grade zero point, and write the last grade code when the meteorological value is outside the last grade zero point. Expert scoring refers to the score given independently by experts in the climate quality assessment of Ganoderma lucidum for the same meteorological indicator during key periods, distinguishing adjacent climate quality levels, and using a unified integer scale. The arithmetic mean of all expert scores for the same meteorological indicator is used to obtain the expert score corresponding to the meteorological indicator, and the same scoring scale and the same set of experts are used for each model training. S13. Calculate the weighted membership value of historical batches based on the membership value and weight of each meteorological indicator. Represent all membership values with the exponential value of the increment of the first membership value and the adjacent membership values. Update the ordered Logit model parameters through Newton iteration until the parameters are the same under the floating-point encoding of the edge computing node in two adjacent iterations. Output the membership values that increase in order of membership. The process of calculating the weighted membership value of historical batches is as follows: For a historical batch, calculate the product of the level membership value of each meteorological indicator and the corresponding indicator weight in turn, and add all the products together. The sum is used as the weighted membership value of the historical batch. The process of updating the ordered Logit model parameters through Newton iteration is as follows: Calculate the conditional probability of each historical batch falling into the corresponding climate quality level using the weighted membership value, the labeled climate quality level, and the current model parameters. Add the negative logarithms of all conditional probabilities to form the negative log-likelihood value. Calculate the first and second partial derivatives with respect to the model parameters to form the gradient vector and Hessian matrix. Subtract the product of the inverse Hessian matrix and the gradient vector from the current model parameters to obtain the next model parameters. Recalculate the negative log-likelihood value, gradient vector, and Hessian matrix using the next model parameters until the floating-point codes of the model parameters in two adjacent iterations are identical bit by bit. An ordered Logit model is a cumulative Logit classification model that uses the weighted membership values of historical batches as explanatory variables and climate quality levels as ordered response variables. The model parameters include weighted membership value coefficients, the first level boundary value parameter, and the incremental parameter of adjacent level boundary values. The first level boundary value is directly obtained from the first level boundary value parameter, and the subsequent level boundary value is obtained by adding the exponential value of the corresponding incremental parameter to the previous level boundary value, so that all level boundary values increase in order of level. When the model is running, the cumulative probability that the weighted membership values do not exceed each level boundary value after coefficient transformation is calculated. The conditional probability of the intermediate climate quality level is obtained by the difference between adjacent cumulative probabilities, the conditional probability of the first climate quality level is obtained by the first cumulative probability, and the conditional probability of the last climate quality level is obtained by subtracting the last cumulative probability from one. The first climate quality level is then read in descending order of conditional probability as the classification result. Floating-point encoding refers to the IEEE 754 binary 64-bit floating-point representation that edge computing nodes use consistently during a model training session. Model parameters are rounded to form corresponding bit strings based on the sign bit, exponent bit, and mantissa bit. The floating-point encoding of adjacent model parameters is identical bit by bit, meaning that the 64-bit bit strings of each corresponding parameter in the parameter vector are completely identical.
[0006] In a preferred embodiment, S2 includes: S21. The edge computing node reads the phenological start time, phenological end time, boundary movement range and original sampling interval of the batch to be evaluated. It continuously multiplies the original sampling interval by two until the interval obtained by multiplying by two again exceeds the boundary movement range. The sampling interval that exceeds the previous one is determined as the first-layer sampling interval. Then, it continuously halves the first-layer sampling interval until the original sampling interval is reached, and outputs the sampling interval sequence. The batch to be evaluated refers to a batch of Ganoderma lucidum with a unique batch identifier, corresponding to the same Ganoderma lucidum planting plot and the same growth cycle, with the start and end times of phenology recorded, but whose climate quality grade has not yet been determined. Phenology refers to the timing and duration of each growth stage of Ganoderma lucidum within a growth cycle, from mycelial growth, primordium formation, fruiting body development to mature harvesting. The boundary movement range refers to the time range determined by the offset of the start and end times of the key periods of the historical batches relative to the corresponding phenological times. The offsets of the start and end times of the historical batches are arranged in chronological order, and the movement range of the start and end times of the phenology is limited by their first and last offsets. S22. For each sampling interval in the sampling interval sequence, take the phenological start time and phenological end time as the center, move successively within the boundary movement range according to the current sampling interval to form a start time sequence and an end time sequence. Pair each start time in the start time sequence with each end time in the end time sequence, delete the pairing results where the start time is not earlier than the end time, and output the candidate time period set. S23. Read the candidate time period set according to the time order of the start time, arrange the end times corresponding to the odd-numbered start times in time order, and arrange the end times corresponding to the even-numbered start times in time reverse order, so that the adjacent candidate time periods only move the start time or the end time, and write the original meteorological sequence crossed by the moving boundary into the corresponding candidate time period, and output the candidate time period sequence. The original meteorological sequence refers to the meteorological record sequence continuously collected by the edge computing nodes according to the original sampling interval and arranged according to the sampling time. Each meteorological record consists of the sampling time and the measured value of the corresponding meteorological index in S1. The candidate time period reads the meteorological records within the corresponding sampling time range through the start time and end time.
[0007] In a preferred embodiment, S3 includes: S31. For the candidate time period sequence at the current sampling scale, the weighted membership contribution prefix sum of the previous sampling point is subtracted from the weighted membership contribution prefix sum of the candidate time period termination position, and then divided by the number of candidate time period sampling points to obtain the evaluation value. The candidate level is determined according to the level boundary range of the evaluation value, and the first value of the ascending order of the distance between the evaluation value and the level boundary value of the limited candidate level is read as the boundary distance. The evaluation value sequence, candidate level sequence and boundary distance sequence are output. The sampling scale refers to the sampling interval used for the start and end times of the current moving candidate time period in the sampling interval sequence. One sampling scale corresponds to a set of candidate time period sequences generated according to the current sampling interval. The sampling interval of the next sampling scale is half of the sampling interval of the previous sampling scale. The weighted membership contribution prefix sum refers to first calculating the sum of the products of the membership value of each meteorological index level and the corresponding index weight for each sampling point in the original meteorological sequence to obtain the weighted membership contribution of the sampling point, and then accumulating the cumulative value from the first sampling point in the original meteorological sequence to the current sampling point in chronological order; the cumulative value corresponding to the end position of the candidate time period minus the cumulative value corresponding to the sampling point before the start position is the sum of the weighted membership contributions of all sampling points in the candidate time period; The grade boundary range refers to the range of climate quality grades formed by the grade boundary values output by S1 in numerical order; when the evaluation value is not greater than the first grade boundary value, it corresponds to the first climate quality grade; when the evaluation value is greater than the previous grade boundary value but not greater than the next grade boundary value, it corresponds to the climate quality grade between the two grade boundary values; when the evaluation value is greater than the last grade boundary value, it corresponds to the last climate quality grade. The limited candidate level refers to the candidate level whose level boundary range includes the current evaluation value; for the first candidate level, the level boundary value of the limited candidate level is the first level boundary value; for the middle candidate level, the level boundary value of the limited candidate level is the previous level boundary value and the next level boundary value on both sides of the evaluation value; for the last candidate level, the level boundary value of the limited candidate level is the last level boundary value. S32. The reciprocal of the sum of the boundary distance and the floating-point precision of the evaluation value is used as the boundary weight of the corresponding evaluation value. The sum of the weighted square differences of the weighted mean of the evaluation value relative to the boundary weight in each candidate segment is used as the segment cost. The product of the number of Logit model parameters and the natural logarithm of the number of candidate time periods is used as the segment penalty. For each current position, the sum of the predecessor cumulative cost, segment cost and segment penalty of each retained predecessor is calculated. The first predecessor is recorded in ascending order of the sum. The predecessor cumulative cost and the predecessor segment cost from the predecessor to the current position are deleted. The predecessors whose sum of the predecessor cumulative cost and the segment cost from the predecessor to the current position is not less than the cumulative cost of the current position are deleted. The change position of the current sampling scale is output. Floating-point precision refers to the absolute difference between the current evaluation value and the adjacent floating-point numbers in the numerical direction when the edge computing node uses the IEEE 754 binary 64-bit format to represent the current evaluation value; the boundary distance is added to the floating-point precision and the reciprocal is taken so that the evaluation value can still obtain a finite boundary weight when it is located at the level boundary value; A candidate segment refers to a continuous subsequence of evaluation values in the evaluation value sequence, located between the position following a predecessor position and the current position. The predecessor position and the current position together define the start and end positions of the candidate segment. The retained predecessor refers to the position of the evaluation value sequence that has not been deleted by the PELT pruning rule before the current position is executed, and can be used as the previous changed position of the current position to participate in the cumulative cost calculation. The starting point of the evaluation value sequence is denoted as the initial retained predecessor. The cumulative cost of the predecessor refers to the cumulative value obtained by adding the segmentation cost and segmentation penalty of each candidate segment in the corresponding segmentation path when segmenting from the starting point of the evaluation value sequence to the predecessor position, and taking the first ascending value among the cumulative values of each segmentation path to the predecessor position.
[0008] In a preferred embodiment, S3 further includes: S33. Expand the change position of the current sampling scale to the next sampling scale into a verification interval that extends one current sampling interval before and after. Recalculate the evaluation value sequence in the verification interval and perform PELT recursion. Form a level transition pair between adjacent candidate levels on both sides of the change position. If the level transition pairs are consistent, retain the change position of the next sampling scale. If the level transition pairs are inconsistent, calculate the piecewise cost and the negative logarithm of the conditional probability of the candidate level on both sides of the change position of the current sampling scale and the next sampling scale respectively. Retain the first change position in ascending order of the calculation results. The PELT recursive process is as follows: the starting point of the evaluation value sequence is used as the initial retained predecessor and the cumulative cost of the starting point is recorded as zero. The current position is read sequentially according to the position of the evaluation value sequence. For each retained predecessor, the cumulative cost of the predecessor, the segmented cost from the next position after the retained predecessor to the current position, and the sum of the segmented penalties are calculated. The first sum is recorded in ascending order as the cumulative cost of the current position and the corresponding retained predecessor is recorded. Then, the sum of the cumulative cost of the predecessor and the corresponding segmented cost of each retained predecessor is calculated. Retained predecessors whose calculated results are not lower than the cumulative cost of the current position are deleted. The current position is added to the set of retained predecessors used for the next position until the end of the verification interval. The changed position is read in reverse along the recorded retained predecessors.
[0009] In a preferred embodiment, S3 further includes: S34. Repeat the verification of interval expansion and change position retention layer by layer according to the sampling interval sequence. Stop when the change position retained by two consecutive sampling scales is mapped to the same original meteorological sequence position or the current sampling interval is equal to the original sampling interval. Retain the first and second change positions in descending order of the difference between the segment cost before segmentation and the sum of the segment cost after segmentation and the segment penalty, and output the segmented change positions. The original meteorological sequence position refers to the order of sampling points in the original meteorological sequence, which are numbered consecutively from the first to the last according to the sampling time. The change position formed by different sampling scales is mapped to the original meteorological sequence position by subtracting the first sampling time of the original meteorological sequence from the corresponding boundary time and dividing by the original sampling interval. The same mapping result indicates that the change position falls in the same sampling point order. The original sampling interval refers to the difference in sampling time between adjacent sampling points in the original meteorological sequence. The same original sampling interval is used for the batch to be evaluated. The original sampling interval is also used as the last layer sampling interval of the sampling interval sequence.
[0010] In a preferred embodiment, S4 includes: S41. For each segmental variation interval of the next sampling scale, the weighted membership contribution and the number of sampling points corresponding to the first candidate boundary are used as the base value. The weighted membership contribution of the meteorological data added is accumulated according to the candidate boundary order, and the weighted membership contribution of the meteorological data removed is deducted. The number of sampling points is increased or decreased simultaneously. The first and last values of each accumulated contribution are read in ascending order to form the lower and upper bounds of contribution. The first and last values of each number of sampling points are read in ascending order to form the lower and upper bounds of quantity. The lower bound of contribution is divided by the upper bound of quantity to obtain the lower bound of evaluation. The upper bound of contribution is divided by the lower bound of quantity to obtain the upper bound of evaluation. The segmented change interval refers to the range of candidate time period sequences corresponding to adjacent segmented change positions output by S3 in the next sampling scale. The starting point of the range is the candidate time period order after the previous segmented change position is mapped to the next sampling scale, and the ending point of the range is the candidate time period order after the next segmented change position is mapped to the next sampling scale. The candidate time periods within the range are arranged continuously in the order determined by S2. Candidate boundaries refer to the locations of candidate time periods within a segmented variation interval, defined by a start time and an end time. Each candidate boundary corresponds to a candidate time period, a set of weighted membership contributions, and a number of sampling points. Adjacent candidate boundaries only change the start time or the end time, and the change in location determines whether meteorological data is added or removed. S42. Read the grade boundary value between the lower and upper bounds of the evaluation. If no grade boundary value is read, delete the corresponding segmented change interval. If a grade boundary value is read, write the start and end positions of the segmented change interval, the order of the grade boundary value, and the number of unclassified candidate boundaries into the interval status. Use the segmented change position output by S3 as the branch position. Determine the candidate level corresponding to the branch position through the climate quality classification model. Then, calculate the lower and upper bounds of the evaluation for the two sub-intervals based on the meteorological data before and after the branch position, and output the sub-interval status. The process of determining the candidate level corresponding to the branch position through the climate quality classification model is as follows: The climate quality classification model adopts an ordered Logit structure. The model parameters consist of evaluation value coefficients, first level boundary value parameters, and subsequent level boundary value increment parameters. The first level boundary value is determined by the first level boundary value parameter, and the subsequent level boundary value is determined by the previous level boundary value plus the exponential value of the corresponding increment parameter, so that the level boundary values increase sequentially according to the level. During operation, the evaluation value of the candidate time period corresponding to the branch position is read, and the evaluation value is multiplied by the evaluation value coefficient to obtain the evaluation item. The evaluation item is subtracted from each level boundary value and then input into the Logistic function to obtain the cumulative probability that the evaluation value falls within each level boundary value. The first cumulative probability is used as the level probability of the first candidate level, the difference between adjacent cumulative probabilities is used as the level probability of the middle candidate level, and the difference between one and the last cumulative probability is used as the level probability of the last candidate level. Then, the first candidate level is read in descending order of level probability. If the level probabilities are the same, the first candidate level is read in ascending order of level. The candidate level corresponding to the branch position is output.
[0011] In a preferred embodiment, S4 further includes: S43. For each interval state, the number of unclassified candidate boundaries is recorded as the classification cost, and the sum of the costs of one branch classification and the two sub-interval classifications is recorded as the branch cost. The first cost and the corresponding branch position are recorded in ascending order of branch cost, and the recorded cost is used as the limit value. When the sum of the number of classifications used in the current branch and the number of unresolved sub-intervals is not less than the limit value, the current branch is stopped. The interval states with the same interval start and end positions and level boundary values are reused with the recorded cost to form a branch-bound interval dynamic programming path. One branch classification refers to the process of reading the weighted membership contribution and the number of sampling points of the candidate time period corresponding to a branch position, calculating the evaluation value, obtaining the candidate level through the climate quality classification model, and dividing the current interval into the front sub-interval and the back sub-interval based on the branch position; this process is recorded as one classification cycle. An undecided subinterval refers to a subinterval that, after being divided by branch positions, still contains one or more grade boundary values between the lower and upper bounds of the evaluation, and for which all candidate grades have not yet been determined through branch classification, interval deletion, or classification of remaining candidate boundaries. S44. Calculate the evaluation value and candidate level of the branch position according to the dynamic programming path of the branch boundary interval. Replace the lower or upper bound of the evaluation of the corresponding sub-interval endpoint with the calculation result and reread the level boundary value crossed. Delete the sub-interval that does not cross the level boundary value. Continue to perform interval state solution for the sub-interval that still crosses the level boundary value until all sub-intervals are deleted or the current sampling scale is equal to the original sampling interval. When the current sampling scale is equal to the original sampling interval and there is still a level boundary value, classify the remaining candidate boundaries in turn and output the number of classifications and the branch path. The process of solving the interval state is as follows: Read the start and end positions, lower bound, upper bound, grade boundary value order, and number of unclassified candidate boundaries of the current sub-interval. When there is no grade boundary value between the lower bound and the upper bound, the sub-interval is marked as deleted and the classification cost is marked as zero. When there is a grade boundary value between the lower bound and the upper bound, the number of unclassified candidate boundaries is recorded as the classification cost, and the segment change positions within the sub-interval are read sequentially as candidate branch positions. For each candidate branch position, the number of branch classifications is calculated once, along with the sum of the classification costs of the previous and subsequent sub-intervals. The first result and the corresponding candidate branch position are recorded in ascending order of the calculation results. When the sum of the number of classifications used by the current candidate branch and the number of unsolved sub-intervals is not less than the recorded results, the expansion of the current candidate branch is stopped. When the start and end positions of the interval and the grade boundary value order are the same as the solved interval state, the recorded classification cost and branch position are read directly until the current sub-interval is deleted or all remaining candidate boundaries are classified. The classification cost and branch path of the current sub-interval are then output.
[0012] In a preferred embodiment, S5 includes: S51. The edge computing node reads the number of idle processor cycles in this round and the number of processor cycles occupied by the previous climate quality classification under the same sampling scale. It divides the number of idle processor cycles in this round by the number of processor cycles occupied by the previous climate quality classification and rounds down to output the classification quota for this round. The number of processor cycles refers to the cumulative number of clock cycles that the edge computing node processors have accumulated from the start of the climate quality classification task to the completion of the classification result writing. The number of idle processor cycles in this round is obtained by subtracting the number of processor clock cycles occupied by the allocated tasks from the total number of processor clock cycles included in this round of scheduling. Climate quality classification refers to the process of reading the evaluation value corresponding to a candidate time period, inputting the evaluation value into an ordered Logit structure climate quality classification model, calculating the probability of the evaluation value being assigned to each candidate level, reading the first candidate level in descending order of level probability and writing it into the corresponding candidate boundary. S52. For each reserved interval, read the number of grade boundary values between the lower and upper bounds of the evaluation, the number of unclassified candidate boundaries, and the remaining number of classifications for the dynamic programming path of the branch limit interval. Divide the product of the number of grade boundary values and the number of unclassified candidate boundaries by the remaining number of classifications to obtain the interval allocation value. Sort the reserved intervals in descending order of the interval allocation value, and allocate a classification quota to each reserved interval in turn until the classification quota allocation for this round is completed. Output the interval classification sequence. The reserved interval refers to the segmented change interval between the lower and upper bounds of the evaluation after S4 calculation, which still contains the level boundary value, and where it is not yet possible to determine that all candidate boundaries within the interval correspond to the same candidate level, and the start and end positions of the interval, the number of unclassified candidate boundaries, and the branch paths have been recorded.
[0013] In a preferred embodiment, S5 further includes: S53. Read the candidate boundaries in the branch path according to the interval classification sequence, calculate the candidate level through the climate quality classification model, update the lower or upper bound of the corresponding sub-interval with the evaluation value of the candidate boundary, delete the sub-interval where there is no level boundary value between the lower and upper bounds of the evaluation, return the unused classification quota of the deleted sub-interval to the current round of classification quota and re-execute the interval allocation, and output the updated retained interval and branch path. S54. When the classification quota for this round is used up, save the updated retention interval and branch path and continue to execute S51 to S53 in the next round until there is no grade boundary value between the lower and upper bounds of the evaluation of all retention intervals. Read the first candidate time period in ascending order of the sum of the number of samples that deviate from the start and end times of the candidate time period from the phenological start and end times, and output the climate quality level.
[0014] The technical effects and advantages of this invention are as follows: 1. This scheme uses multi-scale PELT to locate meteorological intervals that cause grade changes and corrects the boundaries of key time periods layer by layer, which can relatively reduce grade fluctuations caused by boundary offsets. 2. Calculating the candidate time period evaluation value using the weighted membership contribution prefix sum and boundary addition / removal results can reduce redundant statistics and decrease the computational load on edge nodes. 3. Perform branch and bound deletion on intervals that do not cross the grade boundary value, and retain only the unresolved intervals for further classification, which can reduce the number of repeated judgments for candidate time periods; 4. Establishing a membership function based on the zero cumulative frequency difference between adjacent levels, and correcting expert scores by combining level discrimination, can alleviate the classification bias caused by fixed weights. 5. Allocating classification quotas based on the number of level boundary values and the number of unclassified boundaries can concentrate processor cycles within the level divergence range, improving the utilization efficiency of limited computing power. Attached Figure Description
[0015] Figure 1 This is a flowchart of the climate quality evaluation process for Ganoderma lucidum in this invention. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] Refer to the instruction manual appendix Figure 1 The present invention provides a climate quality evaluation model for Ganoderma lucidum and a comprehensive evaluation method, comprising: S1. Obtain historical batch meteorological data, levels and expert scores. Establish a membership function based on the zero point of the cumulative frequency difference between adjacent levels. Normalize the product of the mean difference of membership between adjacent levels and the expert score into index weights. Train an ordered Logit model with weighted membership values to obtain level boundary values. This implementation method uses historical batches of Ganoderma lucidum with climate quality grades to determine the grade separation position of meteorological indicators, combines expert scores to generate indicator weights, and trains an ordered Logit model. Historical batches and batches to be evaluated use the same sampling caliber. Temperature, precipitation, and sunshine are recorded according to the sampling time. Continuous rain, drought, and high temperature heat damage are generated as incremental values for each sampling point as a continuous process. The quality direction of each meteorological indicator is unified in advance so that the direction of indicator value change is consistent with the direction of climate quality grade code change. When determining the zero point between adjacent climate quality levels, execute S11. First, merge the historical batches of the two levels in ascending order of meteorological values. Only one position is retained for the same meteorological value. Then, the cumulative frequency is obtained by dividing the number of samples with index values not greater than the current position by the total number of samples in this level. The cumulative frequency difference is obtained by subtracting the cumulative frequency of the previous level from the cumulative frequency of the next level. The two meteorological values whose cumulative frequency difference has undergone sign conversion are read, and the meteorological value with zero cumulative frequency difference is obtained by linear interpolation. When the cumulative frequency difference is directly zero, the corresponding meteorological value is read. When multiple consecutive positions are zero, the arithmetic mean of the two ends of the zero value range is read. When no sign conversion occurs, the meteorological value corresponding to the first position of the absolute value of the cumulative frequency difference in ascending order is read. When there are multiple candidate zeros, read the first one in ascending order of the absolute difference between the candidate zero and the mean of the medians of the two level samples; When the zero points of adjacent levels coincide or are reversed, the separation position is re-determined by using different meteorological values located on both sides of the zero point in the corresponding level sample. If different meteorological values cannot be obtained, the record that the meteorological index cannot distinguish between adjacent levels is written. After the level zero point is written, a segmented linear membership relationship is established according to the level order through S12; when the meteorological value is between two adjacent level zero points; The interval ratio is obtained by dividing the distance of the meteorological value from the zero point of the previous level by the difference between the two level zero points, and then adding it to the code of the previous level to obtain the level membership value of the sampling point; when it is located outside the zero point of the first or last level, the first or last level code is written respectively. The historical batch level membership value is formed by averaging the sampling point level membership values of each historical batch during the key period. Experts evaluated the role of meteorological indicators in classifying grades using the same integer scoring table. The average of the valid scores for the same meteorological indicator was used to obtain the expert score. Missing scores were recorded in the supplementary record. For each meteorological indicator, the absolute value of the difference between the membership mean values of adjacent level samples is calculated and summed. The resulting level discrimination is multiplied by the expert score to form the weight numerator, and then divided by the sum of the weight numerators of all meteorological indicators to obtain the indicator weight. When a single weight numerator is zero, it is written as zero weight. When the sum of all weight numerators is zero, the model training is terminated. After completing the calculation of the indicator weights, in S13, the grade membership value of each historical batch is multiplied by the corresponding indicator weight and summed to obtain the weighted membership value. Then, the weighted membership value is used as the explanatory variable and the climate quality grade code is used as the ordered response variable to establish a cumulative Logit model. The model uses weighted membership coefficients, the first cumulative cutoff point, and the incremental parameters of adjacent cumulative cutoff points. The subsequent cumulative cutoff point is obtained by adding the exponent of the incremental parameter to the previous cumulative cutoff point. During training, the negative log-likelihood value is generated based on the conditional probability of the historical batches, and the parameter update direction is obtained through the gradient vector and Hessian matrix. When the Hessian matrix cannot be decomposed, the value of the main diagonal is increased, and the step size is halved successively when the negative log-likelihood value increases after the update. The update round is canceled when the parameter has a non-numerical or infinite value. The iteration ends when the floating-point encoding of the parameters in two adjacent rounds is consistent, the historical parameter encoding is repeated, or the training round limit is reached. After training, the position where the conditional probability of adjacent climate quality levels is equal is obtained within the range of historical weighted membership values. This position is written as the classification boundary value for subsequent candidate time period level determination. Taking historical batches of three climate quality levels as an example, the edge computing nodes sequentially form the level zero point, level membership value and indicator weight, and then train the ordered Logit model with the weighted membership value of the historical batches. Finally, the meteorological indicator number, level zero point, indicator weight, model parameters and classification boundary value are saved. This process ensures that the historical batch training data and the candidate time periods of the batch to be evaluated use the same calculation method, and provides fixed model parameters and classification boundaries for subsequent climate quality level classification.
[0018] S2. Edge computing nodes acquire phenological times and original meteorological sequences of the batch to be evaluated, determine the quadratic sampling interval according to the boundary movement range and halve it layer by layer to generate candidate time period sequences with single boundary movement. Based on the boundary offset of the key time period of the batch to be evaluated, this implementation method establishes sampling intervals from coarse to fine, and generates a candidate time period sequence that changes only one time period boundary under each sampling interval; Each processing step corresponds to one batch to be evaluated and one key time period number. The phenological start time, phenological end time, and original meteorological sequence are all bound to this key time period number to avoid cross-use of data from different growth stages. The implementation process includes the following steps: The sampling scale is first determined by the historical boundary offset range and the original sampling interval, thereby reducing the number of candidate time periods at the coarse scale. The edge computing node reads the batch identifier, key period number, phenological start time, phenological end time and original sampling interval to be evaluated, and calculates the offset of the key period start time relative to the corresponding phenological start time and the offset of the key period end time relative to the corresponding phenological end time from the historical batches respectively. After the two sets of offsets are filled with zero offset, the first and last values are read in time order to form the starting boundary movement range and the ending boundary movement range; S21 takes the longer duration of the two movement ranges and multiplies it by two continuously from the original sampling interval. If the current interval does not exceed the duration but exceeds the duration after being multiplied by two again, the current interval is written as the first-level sampling interval, and then continuously halved until the original sampling interval is reached, forming a sampling interval sequence. When the duration of both moving ranges is shorter than the original sampling interval, a single-layer sampling interval sequence is formed directly using the original sampling interval; when historical offsets are missing, candidate time period generation is stopped, and records of missing boundary moving ranges for the corresponding key time periods are written. When generating candidate time periods, each sampling scale establishes an independent start time sequence and end time sequence based on phenological time. When executing S22, the time that is an integer multiple of the current sampling interval from the start time of the phenological event is read within the starting boundary movement range, and the time that is an integer multiple of the current sampling interval from the end time of the phenological event is read within the ending boundary movement range, and the time is arranged in chronological order. If the endpoint of the movement range does not fall on an integer multiple position, it is not written separately, and the zero offset position is always retained. Each start time is paired with each end time in sequence. The candidate time period includes the sampling points corresponding to the start time and the end time. Pairing results where the start time is not earlier than the end time are removed. If a candidate time period exceeds the first and last sampling times of the original meteorological sequence, or if the difference between adjacent sampling times within a candidate time period is not equal to the original sampling interval, the corresponding candidate time period will be written into the insufficient data record and removed from the candidate time period set; if there are no remaining candidate time periods at the current sampling scale, the processing of that sampling scale will be stopped. To enable subsequent evaluation values to be recursively derived according to boundary changes, the candidate time period set is formed into a continuous sequence in S23 according to a single boundary movement relationship; First, divide the candidate time periods into ascending order of start time. Then, read the end times corresponding to odd-numbered start times in ascending order of time, and read the end times corresponding to even-numbered start times in descending order of time. When the last ending time of the previous group is different from the first ending time of the next group, first insert an existing candidate time period with the same first ending time of the next group into the previous group as a connection position, and then move the starting time into the next group so that the positions of adjacent sequences only change the starting time or the ending time. When the supplementary candidate time period has already appeared in the previous position, the original candidate time period is bound to the order and the evaluation result is reused; after the adjacent candidate time periods are connected, the movement boundary type, the time before movement and the time after movement are recorded respectively. When the start time is moved forward or the end time is moved backward, the newly added original meteorological records within the crossed range are written into the added record; when the start time is moved backward or the end time is moved forward, the original meteorological records removed from the crossed range are written into the removed record. Each original meteorological record includes the sampling time, measured values of meteorological indicators, and incremental values of disasters at each sampling point according to the S1 caliber, which are used by S3 to calculate the weighted membership contribution prefix sum; In real-world scenarios: when the original sampling interval is one hour, the starting boundary movement range lasts for thirty hours, and the ending boundary movement range lasts for twenty-six hours, the edge computing nodes first generate sampling interval sequences of sixteen hours, eight hours, four hours, two hours, and one hour. At each sampling scale, the phenological start time and phenological end time are moved separately, and paired results with start times no earlier than end times and incomplete meteorological records are deleted. Then, candidate time period sequences are formed by alternating sorting and connecting positions. The final candidate time period record includes the batch identifier to be evaluated, key time period number, sampling scale, candidate time period order, start time, end time, added record, and removed record, which are used for subsequent candidate level calculation and segmented change position identification.
[0019] S3. Calculate the evaluation value of the candidate time period and determine the candidate level based on the weighted membership contribution prefix sum. Perform multi-scale PELT recursion by multiplying the squared error within the segment by the sum of the model parameter number and the natural logarithm of the candidate number, and output the segmented change position. Following the membership function, index weight, grade boundary value and ordered Logit model parameters written in S1, and the candidate time period sequence formed in S2, this implementation first calculates the evaluation value and candidate grade of each candidate time period, then identifies the position where the evaluation value changes segment by segment as the time period boundary moves, and verifies the position of segment change by adjacent sampling scales. The grade cutoff value specifically refers to the evaluation value corresponding to the conditional probability of adjacent climate quality grades being equal. The cumulative cutoff point within the ordered Logit model does not participate in the candidate grade interval division. This implementation process includes the following steps: When candidate time periods are included in the evaluation calculation, the original meteorological sequence is first converted into a weighted membership contribution that can be extracted by time period. Temperature, precipitation, and sunshine are assigned a membership value at each sampling point according to the membership function established by S1. Continuous rain, drought, and high temperature heat damage are recorded according to the process number, including the length of continuity and the cumulative impact. The incremental value is formed by subtracting the cumulative impact of the previous sampling point from the cumulative impact of the current sampling point, and then the incremental value is converted into a membership value. When a candidate time period is truncated from a continuous disaster process, the length of the continuous process retained within the time period is read and the impact at the beginning or end is recalculated. The difference between the recalculated result and the original increment is used to form the boundary correction amount. The non-negative weighted membership contribution of sampling points is obtained by multiplying the membership value of each meteorological indicator level with the corresponding indicator weight and summing the results. A prefix and zero position are set before the first sampling point of the original meteorological sequence, and the weighted membership contribution prefix sum is formed by accumulating the values from the first sampling point. The weighted membership contribution of the candidate time period is obtained by subtracting the prefix sum of the sampling point before the starting position from the prefix sum of the candidate time period termination position, and then adding the boundary correction amount of the continuous disaster process; the weighted membership contribution is divided by the number of sampling points of the candidate time period to obtain the evaluation value. When the evaluation value is not greater than the first level boundary value, the first candidate level is written; when the evaluation value is between the adjacent level boundary values, the corresponding candidate level is written; when the evaluation value is greater than the last level boundary value, the last candidate level is written. Then, the absolute difference between the evaluation value and each level boundary value that limits the current candidate level is calculated, and the first and second results are read in ascending order of absolute difference as the boundary distance. The above processing is performed in S31 according to the candidate time period order, and the evaluation value sequence, candidate level sequence and boundary distance sequence are output. When the number of sampling points in a candidate time period is zero, the corresponding record is removed. When there is only one candidate time period, the evaluation value and candidate level are output directly without generating internal change positions. After completing the evaluation value sequence, S32 adjusts the segmentation cost based on the degree to which the evaluation value is close to the grade boundary value, so that the candidate time period located near the classification boundary can play a corresponding role in the identification of the change location. Edge computing nodes read the boundary distance and adjacent floating-point interval in binary 64-bit representation of each evaluation value, and use the reciprocal of the sum of the two to form the initial boundary weight, and then divide it by the sum of the initial boundary weights in the candidate segments to obtain the normalized boundary weight. When the evaluation value is at the grade boundary value and the initial boundary weight has an infinite value, the evaluation value with a boundary distance of zero is evenly weighted, and the weight of the remaining evaluation values is written as zero. The weighted average of the boundary weights is obtained by multiplying each evaluation value within a candidate segment by its corresponding normalized boundary weight and then summing the results. The segment cost is obtained by multiplying the square of the difference between each evaluation value and the weighted average of the boundary weights by its corresponding normalized boundary weight and then summing the results. The segmented penalty is formed by multiplying the number of parameters in the ordered Logit model by the natural logarithm of the number of candidate time periods. A virtual predecessor is set before the starting point of the evaluation value sequence, and the cumulative cost of the virtual predecessor is written as the negative of the segmented penalty. When reading the current position, calculate the sum of the cumulative cost of each retained predecessor, the segmented cost from the next position of the retained predecessor to the current position, and the segmented penalty. Read the first result in ascending order of sum and ascending order of predecessor position as the cumulative cost of the current position and record the predecessor position. Then, the sum of the cumulative cost of each retained predecessor and the corresponding segment cost is calculated. Predecessors whose calculated cost is higher than the cumulative cost of the current position are deleted. If the calculated cost is equal to the cumulative cost of the current position, the predecessor position is retained as the first in ascending order, and the current position is added to the set of retained predecessors for the next position. After processing to the end of the evaluation value sequence, the internal change position is read backwards from the predecessor position of the record; when the number of candidate time periods is one, only the virtual start point and virtual end point are retained. When refining the scale downwards, it is necessary to confirm whether the changes identified by the coarse sampling scale have been continuously supported by the same level. For a change position at the current sampling scale, first read the starting or ending boundary of the movement between adjacent candidate time periods of the change position, and then, with the corresponding boundary time as the center, read the position ranges that cover one current sampling interval before and after in the candidate time period sequence of the next sampling scale to form a verification interval. Within the verification interval, the evaluation value, candidate level, and boundary distance are recalculated according to the same rules as in S31, and PELT calculation is performed according to the same recursive rules as in S32. This process constitutes S33. At the current sampling scale change position, the candidate levels on the left and right sides are sequentially formed into a level transition pair. At each change position of the next sampling scale, a level transition pair is also formed. When the order of the level transition pairs is exactly the same, the corresponding change position of the next sampling scale is retained. When two or more pairs of the same level of transition appear in the verification interval, calculate the sum of the normalized segmented costs on both sides of the change position and the average of the negative logarithm of the conditional probability of the candidate level, and read the first change position in ascending order of the sum of the two items and the position of the original meteorological sequence. When all level transition pairs are different, the sum value is read in ascending order after the same normalization calculation is applied to the current sampling scale and the next sampling scale; when the conditional probability is lower than the lower limit of positive numbers that can be represented in binary 64-bit format, the lower limit of positive numbers is substituted into the logarithmic operation. If no internal change position is generated in the next sampling scale, the current change position mapping result is retained and written into the record to be verified. The layer-by-layer verification continues until the changed location achieves a stable mapping in the original meteorological sequence. S34 is responsible for unifying the changed locations at different sampling scales and outputting the segmented changed locations. The edge computing node first converts the sampling time into the number of original sampling intervals accumulated from the first sampling time of the original meteorological sequence, so that each change position directly corresponds to the sampling point sequence of the original meteorological sequence; If the change positions retained by two consecutive sampling scales are mapped to the same sampling point order and the level transition pair is the same, or if the current sampling interval is equal to the original sampling interval, the scale refinement of the corresponding change position is stopped. When the change positions of multiple sampling scales are mapped to the same sampling point order, the segmentation gain is obtained by subtracting the segmentation cost of the two segments after segmentation and the segmentation penalty from the segmentation cost before segmentation. The first and second change positions are read in descending order of segmentation gain and ascending order of sampling scale. The changed positions mapped to different sampling points are retained separately, and segmented changed position sequences are formed by ascending order of the original meteorological sequence positions; When the segmentation benefits are the same and the sampling scale is the same, the first candidate time period is read in ascending order. Finally, the batch identifier to be evaluated, the key time period number, the sampling scale, the level transfer pair and the original meteorological sequence position are written into the segment change position record for S4 to delineate the segment change interval of the next sampling scale. In real-world scenarios, when the original sampling interval is one hour and the current sampling scale is eight hours, the edge computing node first calculates the evaluation value based on the weighted membership contribution prefix sum of each sampling point within the candidate time period and the disaster boundary correction amount, and then writes it into the candidate level according to the level boundary value. After the evaluation value sequence is recursively derived using PELT with boundary weights to obtain the eight-hour scale change position, it is recalculated in the corresponding verification interval at the four-hour scale. If the change locations at both scales are mapped to the 96th sampling point of the original meteorological sequence, and the grade transition pairs are both changed from the second climate quality grade to the third climate quality grade, then the location is retained. If multiple locations change on the four-hour scale, the location to be retained is determined based on the average of the normalized segmentation cost and the negative logarithm of the conditional probability, and the verification continues on the two-hour scale until the location stabilizes or the original one-hour sampling interval is reached.
[0020] S4. Within the next scale segmented change interval, calculate the upper and lower bounds of the evaluation based on the meteorological data added and removed by the boundary movement, delete the intervals that do not cross the grade boundary value, and establish a dynamic planning of the branch boundary interval for the remaining intervals based on the number of uncalculated boundaries, and record the number of classifications and branch paths. This implementation method targets candidate time periods that may still cross the climate quality level boundary value in the next sampling scale. First, it determines the coverage of all evaluation values within the segmented change interval, then removes the intervals where the candidate level has been determined, and solves the classification number and branch path for the remaining intervals. The calculation process follows the weighted membership contribution, disaster boundary correction, grade boundary value and segmented change position formed in S3, where the grade boundary value is the evaluation value corresponding to the conditional probability of adjacent climate quality grades being equal. After the adjacent segment change positions and the virtual positions at both ends of the candidate time period sequence are mapped to the next sampling scale, the consecutively arranged segment change intervals are defined in pairs; The interval boundary calculation is recorded in S41: using the weighted membership contribution of the first candidate boundary and the number of sampling points as the base value, the weighted membership contribution of the added meteorological data is added sequentially along the candidate boundary and the weighted membership contribution of the removed meteorological data is deducted; When the boundary is interrupted by continuous rain, drought or high temperature heat damage, the recalculated disaster boundary correction amount is added simultaneously, and the number of sampling points is updated according to the added or removed sampling points; The cumulative contribution of each candidate boundary is read in ascending order of value, with the first and last values forming the lower and upper bounds of contribution, respectively. The number of each sampling point is read in ascending order of value, with the first and last values forming the lower and upper bounds of quantity, respectively. The lower bound of contribution is divided by the upper bound of quantity to obtain the lower bound of evaluation, and the upper bound of contribution is divided by the lower bound of quantity to obtain the upper bound of evaluation. The lower bound of the evaluation is rounded towards the direction of decreasing value, and the upper bound of the evaluation is rounded towards the direction of increasing value, so that the evaluation values of all candidate time periods within the interval fall between the upper and lower bounds of the evaluation; the candidate boundary with zero sampling points is removed from the segmented variation interval; Once the upper and lower bounds of the evaluation are determined, S42 reads all the grade boundary values that satisfy the condition that the lower bound of the evaluation is not greater than the grade boundary value and the upper bound of the evaluation is greater than the grade boundary value. If no grade boundary value is read, the segmented change interval is removed from the set of intervals to be classified, and the start and end positions of the interval, the upper and lower bounds of the evaluation, the candidate grade and the order of the candidate time period are saved; When a grade boundary value is read, the start and end positions of the interval, the order of the first grade boundary value, the order of the last grade boundary value, and the number of unclassified candidate boundaries are recorded to form the interval status; Within the interval, the segmented change position of the S3 output is read first as the branch position; when there is no segmented change position, the middle position of the unclassified candidate boundary is read; when there is only one unclassified candidate boundary left, that candidate boundary is read directly. After multiplying the evaluation value of the candidate time period corresponding to the branch position with the evaluation value coefficient of the ordered Logit model, the product is subtracted from each cumulative cutoff point and then input into the Logistic function to obtain the level probability of each candidate level; the candidate levels are read in descending order of level probability, and when the level probabilities are the same, they are read in ascending order of climate quality level. The branch position is removed from the unclassified range, and the consecutive candidate boundaries before and after it form the front sub-interval and the back sub-interval. The upper and lower bounds of the evaluation of both sub-intervals are recalculated. To determine the number of classifications required to complete the interval level confirmation, the interval solver in S43 records the number of unclassified candidate boundaries as the classification cost, and sequentially reads the segment change positions and backoff branch positions within the interval; Each branch position corresponds to one branch classification number, and the branch cost is formed by adding the classification cost of the previous sub-interval and the classification cost of the next sub-interval. When the branch costs are the same, read the first result in ascending order of distance from the branch position to the middle of the interval and in ascending order of branch position, and write the first branch cost as the limit value. When expanding the remaining branches, add the number of classifications already used to the number of unresolved subintervals that still cross the rank threshold. Stop expanding the current branch when the resulting value is not lower than the threshold. Each sub-interval remains continuous and does not contain any classified candidate boundaries. It is uniquely identified by the sampling scale, the start and end positions of the interval, and the order of the first and last level boundary values. When the same interval state appears again, the saved classification cost and branch position are directly read to form a dynamic programming path for the branch and bound interval. The process of classifying according to the dynamic programming path of the branch-bound interval is classified as S44; for each branch position candidate level calculation completed, the actual classification count is incremented by one, and the branch position forms the front sub-interval and the back sub-interval. Then, the weighted membership contributions of the added and removed meteorological data in each sub-interval are re-accumulated, and the disaster boundary correction, number of sampling points, and evaluation upper and lower bounds are recalculated. When the evaluation no longer contains the grade boundary value between the upper and lower bounds, the sub-interval is removed from the set of intervals to be classified and written into the confirmed interval record; when it still contains the grade boundary value, the interval state and the remaining branch path are re-solved. The current sampling scale processing ends when the set of intervals to be classified is empty; when the current sampling scale is equal to the original sampling interval and the set of intervals to be classified is still not empty, the remaining evaluation values and candidate levels are calculated in order of candidate boundary order. The processing results are written to the planned number of classifications, the actual number of classifications, the branch path, the confirmed interval record, and the interval record to be classified, for S5 to read. For example, a segmented change interval contains twelve candidate boundaries. The lower bound of the evaluation after rounding is 2.18, the upper bound of the evaluation is 2.73, and the interval crosses the level boundary value of 2.50. The edge computing node writes the interval into the set of intervals to be classified and reads the segmented change position within the interval to complete one branch classification. The recalculated evaluation range for the first sub-interval is 2.18 to 2.42, and the evaluation range for the second sub-interval is 2.51 to 2.73. Neither sub-interval crosses 2.50, so they are recorded in the confirmation interval record respectively. This preserves the interval location, confirms candidate levels and branch paths, and reduces the number of subsequent climate quality classifications that need to be performed one by one.
[0021] S5. Divide the number of idle processor cycles by the number of single classification cycles to obtain the classification quota. Allocate the classification quota according to the product of the number of grade boundary values crossed and the number of uncalculated boundaries. Determine the candidate grade layer by layer along the branch path until the retention interval does not cross the grade boundary value. Read the first candidate time period in ascending order according to the number of samples of the candidate time period deviating from the phenological time period and output the climate quality grade. After completing the interval state solution of S4, this implementation method allocates processor cycles to the reserved intervals that still cross the level boundary value according to the number of classifications that the edge computing node can execute in this round, and confirms the candidate level one by one along the branch path. The reserved interval always refers to the segmented range of change between the lower and upper bounds of the evaluation, which includes the grade boundary value and for which grade confirmation has not yet been completed. Intervals whose upper and lower bounds have fallen into the same grade boundary range are transferred to the confirmed interval set and no longer participate in resource allocation. The specific processing is as follows: At the start of each round of scheduling, the edge computing node scheduler writes the scheduling start time and scheduling end time, and uses the processor cores that actually perform climate quality classification as the counting object to count the total number of processor cycles and the number of processor cycles occupied by the allocated tasks during the scheduling period. The difference between the two is the number of idle processor cycles. When there is no classification timing record at the current sampling scale, S51 first reads the first candidate boundary of the branch path and performs a climate quality classification. It starts counting from reading the evaluation value and stops counting after the candidate level is written. The number of processor cycles obtained is used as the number of single classification cycles, and this classification is included in the actual number of classifications. When there is a timing record, it directly reads the number of the previous classification cycles under the same sampling scale and the same model version. When the number of single classification cycles is zero, the timing is restarted without division; the number of idle processor cycles is divided by the number of single classification cycles and then rounded down. The resulting value is then compared with the remaining planned classification times in all reserved intervals. The first value in ascending order is read as the classification quota for this round. When the classification quota is zero, the current state is saved and the current round of scheduling is ended. After the quota is determined, S52 reads the number of grade boundary values between the upper and lower bounds, the number of unclassified candidate boundaries, and the remaining classification times of the branch path for each reserved interval. The interval allocation value is obtained by dividing the product of the number of grade boundary values and the number of unclassified candidate boundaries by the remaining classification times. When the remaining number of classification attempts is zero and the interval still crosses the level boundary value, stop the current assignment and re-execute the interval state solution; Each reserved interval is first arranged in descending order of interval allocation value. If the interval allocation values are the same, they are then arranged in descending order of the number of grade boundary values, descending order of the number of unclassified candidate boundaries, and ascending order of the interval starting position. The edge computing nodes read the reserved intervals in a loop according to the arrangement results, and allocate a category quota each time. Once the category quota obtained by a certain reserved interval reaches the corresponding remaining number of classifications, the reserved interval is skipped until the category quota of this round is allocated, forming an interval classification sequence. When performing classification along the interval classification sequence, S53 reads the candidate boundaries in the branch path in sequence, calculates the weighted membership contribution of the candidate time period and the ratio of the number of sampling points to obtain the evaluation value, and then inputs it into the ordered Logit model to calculate the candidate level; After the candidate boundary is classified, it is removed from the original retained interval and two sub-intervals are formed by the consecutive unclassified positions before and after the candidate boundary. Each sub-interval re-accumulates the weighted membership contribution of the added and removed meteorological data, and recalculates the disaster boundary correction, number of sampling points, lower and upper bounds of evaluation, without directly replacing the sub-interval boundaries with candidate boundary evaluation values. When there is no grade boundary value between the upper and lower bounds of the sub-interval evaluation, the sub-interval is written into the confirmation interval set, and the unused classification quota is returned to the current round of classification quota. If a level boundary value still exists, re-execute the branch limit interval dynamic programming, update the remaining programming classification times and branch paths, and then allocate the returned classification quota according to the updated interval allocation value. After the current classification quota is exhausted, S54 saves the current sampling scale, the set of retained intervals, the set of confirmed intervals, the upper and lower bounds of the evaluation, the boundaries of classified candidates, the candidate level, the number of planned classifications, the number of actual classifications, the branch path, the model version, and the original meteorological sequence version; At the start of the next round, the model version and the original meteorological sequence version must be consistent with the saved records before the original branch path can be read. If any version changes, the original branch path of the incomplete interval is canceled, and S3 and S4 are re-executed based on the updated evaluation value. The classification ends when the reserved interval set is empty. Then, the offset sample number is calculated for the candidate time periods in the confirmed interval set: the absolute value of the difference between the start time of the candidate time period and the start time of the phenology is divided by the original sampling interval, and the absolute value of the difference between the end time of the candidate time period and the end time of the phenology is divided by the original sampling interval. The two are added together to obtain the offset sample number. The first candidate time period is read in ascending order by offset sample count, then by offset sample count at start time, then by offset sample count at end time, and finally by candidate time period order. When the first candidate time period has been classified, the corresponding candidate level is read. When the first candidate time period is only confirmed by the upper and lower bounds of the evaluation, the candidate level represented by the corresponding level boundary range is read, and the stable key time period and climate quality level are output. Taking a scheduling round containing 240,000 idle processor cycles and a single classification cycle occupying 6,000 processor cycles as an example, the classification quota for this round is written as 40; Edge computing nodes form an interval classification sequence based on the number of grade boundary values, the number of unclassified candidate boundaries, and the remaining number of planning classifications for each reserved interval. After performing classification along the branch path, confirmed sub-intervals are moved into the confirmed interval set, and unused quotas are redistributed to reserved intervals that still cross grade boundary values. After continuous scheduling until the reserved interval set is empty, the offset sample number and the first position in ascending order are read from all confirmed candidate time periods to obtain the stable key time periods and their corresponding climate quality levels.
[0022] Working principle: This scheme first utilizes historical batches of Ganoderma lucidum with labeled climate quality levels, establishes membership functions based on the distribution differences of meteorological indicators between adjacent levels, and combines expert scores to form indicator weights. Then, it trains an ordered Logit model with weighted membership values to obtain climate quality level boundary values. Edge computing nodes read the phenological time and meteorological sequences of the batch to be evaluated, and move the key time period boundary according to the sampling interval from coarse to fine to form candidate time period sequences. Subsequently, the evaluation value and candidate level of each candidate time period are calculated. Multi-scale PELT is used to identify the location where the boundary movement causes changes in the evaluation results. Then, branch and bound interval dynamic programming is used to exclude intervals that will not change the climate quality level. Only the intervals that still cross the level boundary value are allocated processor cycles and continue to be classified until the stable key time period and corresponding climate quality level are determined. For example, in a mountainous Ganoderma lucidum cultivation area, a batch of recorded fruiting body development periods experienced continuous rainfall and high temperatures, resulting in a shift between the phenological records and the actual quality formation period. The edge computing node first moves the time period boundary layer by layer according to sampling intervals of 16 hours, 8 hours, 4 hours, and up to 1 hour, calculating the evaluation values corresponding to meteorological indicators and disaster impacts within each candidate time period. When the candidate level changes near a certain boundary, multi-scale PELT is used to locate the meteorological interval causing the change. The branch boundary interval dynamic programming then excludes candidate time periods whose evaluation range always falls into the same level, and concentrates the classification frequency on intervals that still cross the level boundary value. After layer-by-layer refinement, the node reads the candidate time periods with the highest number of samples offset from the phenological time from the candidate time periods whose levels have been determined, and uses them as stable key time periods, outputting the climate quality level of the batch of Ganoderma lucidum.
[0023] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A climate quality evaluation model for Ganoderma lucidum and a comprehensive assessment method, characterized in that, include: S1. Obtain historical batch meteorological data, levels and expert scores. Establish a membership function based on the zero point of the cumulative frequency difference between adjacent levels. Normalize the product of the mean difference of membership between adjacent levels and the expert score into index weights. Train an ordered Logit model with weighted membership values to obtain level boundary values. S2. Edge computing nodes acquire phenological times and original meteorological sequences of the batch to be evaluated, determine the quadratic sampling interval according to the boundary movement range and halve it layer by layer to generate candidate time period sequences with single boundary movement. S3. Calculate the evaluation value of the candidate time period and determine the candidate level based on the weighted membership contribution prefix sum. Perform multi-scale PELT recursion by multiplying the squared error within the segment by the sum of the model parameter number and the natural logarithm of the candidate number, and output the segmented change position. S4. Within the next scale segmented change interval, calculate the upper and lower bounds of the evaluation based on the meteorological data added and removed by the boundary movement, delete the intervals that do not cross the grade boundary value, and establish a dynamic planning of the branch boundary interval for the remaining intervals based on the number of uncalculated boundaries, and record the number of classifications and branch paths. S5. Divide the number of idle processor cycles by the number of single classification cycles to obtain the classification quota. Allocate the classification quota according to the product of the number of grade boundary values crossed and the number of uncalculated boundaries. Determine the candidate grade layer by layer along the branch path until the reserved interval does not cross the grade boundary value. Read the first candidate time period in ascending order according to the number of samples that the candidate time period deviates from the phenological time period and output the climate quality grade.
2. The method for establishing and comprehensively evaluating the climate quality assessment model of Ganoderma lucidum according to claim 1, characterized in that: S1 includes: S11. For each meteorological indicator, the historical batches are arranged in ascending order of meteorological values. The cumulative frequency of adjacent level samples at each meteorological value position is calculated. The adjacent meteorological values where the cumulative frequency difference changes from non-positive to positive or from non-negative to negative are used as the interpolation endpoints. The meteorological values with zero cumulative frequency difference are obtained through linear interpolation, and the level zero point is output. S12. Connect adjacent level zeros in order of level. Calculate the level membership value of historical batches between adjacent level zeros according to the distance ratio. Divide the product of the difference in the level membership mean of adjacent level samples and the corresponding expert score by the sum of all products to output the index weight. S13. Calculate the weighted membership value of historical batches based on the membership value and weight of each meteorological indicator. Represent all membership values with the exponential value of the increment of the first membership value and the adjacent membership values. Update the ordered Logit model parameters through Newton iteration until the parameters are the same in two adjacent floating-point encodings at the edge computing node. Output the membership values that increase in order of membership.
3. The method for establishing and comprehensively evaluating the climate quality assessment model of Ganoderma lucidum according to claim 2, characterized in that: S2 includes: S21. The edge computing node reads the phenological start time, phenological end time, boundary movement range and original sampling interval of the batch to be evaluated. It continuously multiplies the original sampling interval by two until the interval obtained by multiplying by two again exceeds the boundary movement range. The sampling interval that exceeds the previous one is determined as the first-layer sampling interval. Then, it continuously halves the first-layer sampling interval until the original sampling interval is reached, and outputs the sampling interval sequence. S22. For each sampling interval in the sampling interval sequence, take the phenological start time and phenological end time as the center, move successively within the boundary movement range according to the current sampling interval to form a start time sequence and an end time sequence. Pair each start time in the start time sequence with each end time in the end time sequence, delete the pairing results where the start time is not earlier than the end time, and output the candidate time period set. S23. Read the candidate time period set according to the time order of the start time, arrange the end times corresponding to the odd-numbered start times in time order, and arrange the end times corresponding to the even-numbered start times in time reverse order, so that the adjacent candidate time periods only move the start time or the end time, and write the original meteorological sequence crossed by the moving boundary into the corresponding candidate time period, and output the candidate time period sequence.
4. The method for establishing a climate quality evaluation model and conducting comprehensive assessment of Ganoderma lucidum according to claim 3, characterized in that: S3 includes: S31. For the candidate time period sequence at the current sampling scale, the weighted membership contribution prefix sum of the previous sampling point is subtracted from the weighted membership contribution prefix sum of the candidate time period termination position, and then divided by the number of candidate time period sampling points to obtain the evaluation value. The candidate level is determined according to the level boundary range of the evaluation value, and the first value of the ascending order of the distance between the evaluation value and the level boundary value of the limited candidate level is read as the boundary distance. The evaluation value sequence, candidate level sequence and boundary distance sequence are output. S32. Using the reciprocal of the sum of the boundary distance and the floating-point precision of the evaluation value as the boundary weight of the corresponding evaluation value, calculate the sum of the weighted squared differences of the weighted mean of the evaluation value relative to the boundary weight within each candidate segment as the segment cost. Use the product of the number of Logit model parameters and the natural logarithm of the number of candidate time periods as the segment penalty. For each current position, calculate the sum of the predecessor cumulative cost, segment cost, and segment penalty of each retained predecessor. Record the first predecessor in ascending order of the sum and delete predecessors whose cumulative cost and the sum of the segment cost from the predecessor to the current position are not less than the cumulative cost of the current position. Output the change position of the current sampling scale.
5. The method for establishing a climate quality evaluation model and conducting comprehensive assessment of Ganoderma lucidum according to claim 4, characterized in that: S3 also includes: S33. Expand the change position of the current sampling scale to the next sampling scale into a verification interval that extends one current sampling interval before and after. Recalculate the evaluation value sequence in the verification interval and perform PELT recursion. Form a level transition pair between adjacent candidate levels on both sides of the change position. If the level transition pairs are consistent, retain the change position of the next sampling scale. If the level transition pairs are inconsistent, calculate the sum of the segmented cost and the negative logarithm of the conditional probability of the candidate level on both sides of the change position of the current sampling scale and the next sampling scale respectively. Retain the first change position in ascending order of the calculation results.
6. The method for establishing and comprehensively evaluating the climate quality assessment model of Ganoderma lucidum according to claim 5, characterized in that: S3 also includes: S34. Repeat the verification of interval expansion and change position retention layer by layer according to the sampling interval sequence. Stop when the change positions retained by two consecutive sampling scales are mapped to the same original meteorological sequence position or the current sampling interval is equal to the original sampling interval. Retain the first and second change positions of the change positions corresponding to the same original meteorological sequence position in descending order of the difference obtained by subtracting the sum of the segment cost and the segment penalty after the segmentation before segmentation, and output the segmented change positions.
7. The method for establishing and comprehensively evaluating the climate quality assessment model of Ganoderma lucidum according to claim 6, characterized in that: S4 includes: S41. For each segmental variation interval of the next sampling scale, the weighted membership contribution and the number of sampling points corresponding to the first candidate boundary are used as the base value. The weighted membership contribution of the meteorological data added is accumulated according to the candidate boundary order, and the weighted membership contribution of the meteorological data removed is deducted. The number of sampling points is increased or decreased simultaneously. The first and last values of each accumulated contribution are read in ascending order to form the lower and upper bounds of contribution. The first and last values of each number of sampling points are read in ascending order to form the lower and upper bounds of quantity. The lower bound of contribution is divided by the upper bound of quantity to obtain the lower bound of evaluation. The upper bound of contribution is divided by the lower bound of quantity to obtain the upper bound of evaluation. S42. Read the grade boundary value between the lower and upper bounds of the evaluation. If no grade boundary value is read, delete the corresponding segmented change interval. If a grade boundary value is read, write the start and end positions of the segmented change interval, the order of the grade boundary value, and the number of unclassified candidate boundaries into the interval status. Use the segmented change position output by S3 as the branch position. Determine the candidate level corresponding to the branch position through the climate quality classification model. Then, calculate the lower and upper bounds of the evaluation for the two sub-intervals based on the meteorological data before and after the branch position, and output the sub-interval status.
8. The method for establishing and comprehensively evaluating the climate quality assessment model of Ganoderma lucidum according to claim 7, characterized in that: S4 also includes: S43. For each interval state, the number of unclassified candidate boundaries is recorded as the classification cost, and the sum of the costs of one branch classification and the two sub-interval classifications is recorded as the branch cost. The first cost and the corresponding branch position are recorded in ascending order of branch cost, and the recorded cost is used as the limit value. When the sum of the number of classifications used in the current branch and the number of unresolved sub-intervals is not less than the limit value, the current branch is stopped. The interval states with the same interval start and end positions and level boundary values are reused with the recorded cost to form a branch-bound interval dynamic programming path. S44. Calculate the evaluation value and candidate level of the branch position sequentially according to the dynamic programming path of the branch boundary interval. Replace the lower or upper bound of the evaluation of the corresponding sub-interval endpoint with the calculation result and reread the crossed level boundary value. Delete the sub-interval that does not cross the level boundary value. Continue to perform interval state solution for the sub-interval that still crosses the level boundary value until all sub-intervals are deleted or the current sampling scale is equal to the original sampling interval. When the current sampling scale is equal to the original sampling interval and there is still a level boundary value, classify the remaining candidate boundaries sequentially and output the classification number and branch path.
9. The method for establishing a climate quality evaluation model and conducting comprehensive assessment of Ganoderma lucidum according to claim 8, characterized in that: S5 includes: S51. The edge computing node reads the number of idle processor cycles in this round and the number of processor cycles occupied by the previous climate quality classification under the same sampling scale. It divides the number of idle processor cycles in this round by the number of processor cycles occupied by the previous climate quality classification and rounds down to output the classification quota for this round. S52. For each reserved interval, read the number of grade boundary values between the lower and upper bounds of the evaluation, the number of unclassified candidate boundaries, and the remaining number of classifications for the dynamic programming path of the branch and limit interval. Divide the product of the number of grade boundary values and the number of unclassified candidate boundaries by the remaining number of classifications to obtain the interval allocation value. Sort the reserved intervals in descending order of the interval allocation value, and allocate a classification quota to each reserved interval in turn until the classification quota for this round is allocated. Output the interval classification sequence.
10. The method for establishing and comprehensively evaluating the climate quality assessment model of Ganoderma lucidum according to claim 9, characterized in that: S5 also includes: S53. Read the candidate boundaries in the branch path according to the interval classification sequence, calculate the candidate level through the climate quality classification model, update the lower or upper bound of the corresponding sub-interval with the evaluation value of the candidate boundary, delete the sub-interval where there is no level boundary value between the lower and upper bounds of the evaluation, return the unused classification quota of the deleted sub-interval to the current round of classification quota and re-execute the interval allocation, and output the updated retained interval and branch path. S54. When the classification quota for this round is used up, save the updated retention interval and branch path and continue to execute S51 to S53 in the next round until there is no grade boundary value between the lower and upper bounds of the evaluation of all retention intervals. Read the first candidate time period in ascending order of the sum of the number of samples that deviate from the start and end times of the candidate time period from the phenological start and end times, and output the climate quality level.