A postharvest disease early warning method and system for fruits and vegetables based on time-series association rules
Patent Information
- Application Number
- CN202610756531.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-29
- Publication Date
- 2026-08-21
AI Technical Summary
[0005]有鉴于此,本申请实施例提供一种基于时序关联规则的果蔬采后病害预警方法及系统,至少解决高原地区果蔬采后贮藏场景下,因昼夜温差、周期性通风导致的高误报和高漏报的技术问题
本申请通过利用数据获取模块,获取多维环境传感数据。多维环境传感数据能够表征高原夏菜所处贮藏环境的状态,为后续实现对高原夏菜的病害预警奠定数据基础。利用瞬时事件生成模块,在多维环境传感数据满足预定义的三阶判定条件时,生成瞬时事件。通过生成瞬时事件,能够筛选出具有统计异常特征的环境参数和对应时间,识别出突发的瞬时环境参数变化干扰,为区分高原夏菜的贮藏环境的真实风险与瞬时干扰提供关键信息,降低了因瞬时波动产生的误报率。利用状态事件生成模块,在多维环境传感数据处于预设病理阈值区间内的持续时长超过预警持续周期阈值时,生成状态区间事件。通过生成状态区间事件,能够记录容易诱发高原夏菜病害的长时间不良环境状态,克服了仅关注瞬时值而忽略持续性危害的缺陷,降低了漏报真实长期病害风险的概率。利用规则匹配模块,将状态区间事件与预先构建的风险关联规则库进行匹配,得到预警触发信号;基于瞬时事件对预警触发信号进行验证,得到预警信息;该步骤能够实现风险的智能识别与交叉验证。通过发现状态区间事件中存在的潜在风险,利用瞬时事件对状态区间事件中存在的潜在风险进行验证,从而降低误将正常作业引发的环境波动判定为病害风险的概率,提升了预警结论的可靠性。利用预警模块,基于预警信息进行预警。通过预警,能够确保相关人员第一时间获知病害风险,为调整环境设备或采取早期防治措施争取时间,实现从风险自动检测到现场干预的闭环,达到降低病害发生和降低高原夏菜的损失的目的。综上所述,本申请能够在高原夏菜的病害潜伏期就实现早期发现,并且准确率高、稳定性好,将病害的防控窗口前移,降低病害治疗产生的损耗,解决了高原地区果蔬采后贮藏场景下,因昼夜温差、周期性通风导致的高误报和高漏报的问题。
Smart Images

Figure CN122615775A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of agricultural storage and preservation technology and Internet of Things early warning technology, and includes, but is not limited to, a method and system for early warning of postharvest diseases of fruits and vegetables based on time-series association rules. Background Technology
[0002] For most fruits and vegetables, such as summer vegetables grown in highland areas, post-harvest storage requires precise control of environmental parameters such as temperature, humidity, and gas composition. This typically necessitates long-term storage in a controlled atmosphere environment characterized by low temperature, high humidity, low oxygen, and high carbon dioxide. However, in actual storage processes in highland production areas, the significant diurnal temperature range, necessary periodic ventilation within the storage facility, and sensor signal interference cause frequent, short-term, harmless fluctuations and exceedances of storage environmental parameters. This makes it difficult for traditional monitoring methods to distinguish between normal environmental fluctuations and genuine early signs of disease risk. By the time post-harvest rot diseases in fruits and vegetables exhibit visible symptoms, tissue damage is already irreversible, leading to severe economic losses.
[0003] In related technologies, a fixed threshold alarm method is used to set static thresholds for environmental parameters, triggering an alarm once the sensor reading exceeds the limit. Another method utilizes a cloud-based centralized machine learning model, training a predictive model using environmental parameters and disease labels, and then deploying the trained model at the fruit and vegetable storage site for early warning.
[0004] However, the fixed threshold alarm method cannot distinguish between transient, harmless parameter exceedances caused by environmental factors such as diurnal temperature variations and persistent abnormal states that indicate real pathological risks, thus generating a large number of false alarms and resulting in a high false alarm rate. Furthermore, machine learning prediction models lack the ability to differentiate between different specific fruit and vegetable varieties, different pathogen types, and different storage temperature zones. Summary of the Invention
[0005] In view of this, embodiments of this application provide a method and system for early warning of postharvest diseases of fruits and vegetables based on time-series association rules, which at least solves the technical problems of high false alarms and high missed alarms caused by diurnal temperature differences and periodic ventilation in the postharvest storage of fruits and vegetables in plateau areas.
[0006] The technical solution of this application embodiment is implemented as follows: In a first aspect, embodiments of this application provide a method for early warning of postharvest diseases of fruits and vegetables based on time-series association rules, applied to a postharvest disease early warning system for fruits and vegetables based on time-series association rules; the system includes: a data acquisition module, a transient event generation module, a state event generation module, a rule matching module, and an early warning module; the method includes: The data acquisition module is used to acquire multidimensional environmental sensing data. Using the instantaneous event generation module, an instantaneous event is generated when the multidimensional environmental sensing data meets the predefined third-order judgment conditions; Using the state event generation module, when the duration of the multidimensional environmental sensing data remaining within a preset pathological threshold range exceeds the warning duration period threshold, a state interval event is generated. The rule matching module is used to match the state interval events with a pre-built risk association rule base to obtain an early warning trigger signal; the early warning trigger signal is verified based on the instantaneous event to obtain early warning information. The warning module is used to issue warnings based on the warning information.
[0007] Secondly, embodiments of this application provide a post-harvest disease early warning system for fruits and vegetables based on time-series association rules. The system includes: a data acquisition module, a transient event generation module, a state event generation module, a rule matching module, and an early warning module; wherein: The data acquisition module is used to acquire multidimensional environmental sensing data; The instantaneous event generation module is used to generate an instantaneous event when the multidimensional environmental sensing data meets the predefined third-order judgment conditions; The state event generation module is used to generate a state interval event when the duration of the multidimensional environmental sensing data being within a preset pathological threshold range exceeds the warning duration period threshold. The rule matching module is used to match the state interval event with a pre-built risk association rule base to obtain an early warning trigger signal; and to verify the early warning trigger signal based on the instantaneous event to obtain early warning information. The early warning module is used to issue early warnings based on the early warning information.
[0008] The beneficial effects of the technical solutions provided in this application include at least the following: This application utilizes a data acquisition module to obtain multidimensional environmental sensor data. This multidimensional environmental sensor data can characterize the storage environment of highland summer vegetables, laying a data foundation for subsequent disease early warning of highland summer vegetables. Using a transient event generation module, transient events are generated when the multidimensional environmental sensor data meets predefined third-order judgment conditions. By generating transient events, environmental parameters with statistically abnormal characteristics and their corresponding times can be filtered out, identifying sudden transient environmental parameter changes and providing crucial information to distinguish between the true risks and transient disturbances in the storage environment of highland summer vegetables, reducing the false alarm rate caused by transient fluctuations. Using a state event generation module, state interval events are generated when the duration of the multidimensional environmental sensor data within a preset pathological threshold range exceeds the early warning duration threshold. By generating state interval events, long-term adverse environmental states that easily induce diseases in highland summer vegetables can be recorded, overcoming the deficiency of focusing only on transient values while ignoring persistent hazards, and reducing the probability of underreporting true long-term disease risks. By utilizing a rule matching module, state interval events are matched with a pre-built risk association rule base to obtain early warning trigger signals. These signals are then verified based on instantaneous events to generate early warning information. This step enables intelligent risk identification and cross-validation. By discovering potential risks within state interval events and verifying them using instantaneous events, the probability of mistakenly identifying environmental fluctuations caused by normal operations as disease risks is reduced, thus improving the reliability of early warning conclusions. An early warning module is used to issue warnings based on this information. Early warnings ensure that relevant personnel are aware of disease risks immediately, allowing time to adjust environmental equipment or take early control measures. This achieves a closed loop from automatic risk detection to on-site intervention, reducing disease occurrence and losses in highland summer vegetables. In summary, this application enables early detection of diseases in highland summer vegetables during their incubation period with high accuracy and stability. It moves the disease control window forward, reducing losses from disease treatment and solving the problems of high false alarms and high missed alarms caused by diurnal temperature differences and periodic ventilation in post-harvest storage of fruits and vegetables in highland areas. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein: Figure 1 A flowchart illustrating a method for early warning of postharvest diseases of fruits and vegetables based on time-series association rules, provided in an embodiment of this application; Figure 2This is a schematic diagram of the structure of a postharvest disease early warning system for fruits and vegetables based on time-series association rules, provided in an embodiment of this application. Detailed Implementation
[0010] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0011] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0012] It should be noted that the terms "first, second, and third" used in the embodiments of this application are merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, and third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0013] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of this application pertain. It should also be understood that terms such as those defined in general dictionaries should be understood to have a meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0014] This application provides a method for early warning of postharvest diseases in fruits and vegetables based on time-series association rules. Figure 1 This is a flowchart illustrating a method for early warning of postharvest diseases of fruits and vegetables based on time-series association rules, as provided in this application. The following detailed explanation uses highland summer vegetables as an example. Figure 1 As shown, the method includes at least the following steps: Step S110: Use the data acquisition module to acquire multidimensional environmental sensing data; Multiple sensors were used to continuously collect multidimensional environmental parameters in the storage environment of highland summer vegetables, resulting in multidimensional environmental sensing data arranged in chronological order.
[0015] Multidimensional environmental sensing data can characterize the storage environment of highland summer vegetables, laying a data foundation for subsequent disease early warning of highland summer vegetables.
[0016] Step S120: Using the instantaneous event generation module, when the multidimensional environmental sensing data meets the predefined third-order judgment conditions, an instantaneous event is generated; Transient events are sudden or brief anomalies in environmental parameters captured from continuously changing multidimensional environmental sensor data. A transient event is characterized by a rapid fluctuation in one or more environmental parameters within the multidimensional environmental sensor data over a short period. For example, a rapid fluctuation in temperature during the brief period of switching equipment on / off or opening a window for ventilation.
[0017] The third-order decision condition combines three decision conditions for multidimensional environmental sensing data. At a certain moment, when a certain type of environmental parameter in the multidimensional environmental sensing data simultaneously satisfies all three decision conditions, the corresponding environmental parameter at that moment is marked as an instantaneous event.
[0018] For example, a transient event record is as follows: event type is "transient", parameter name is "temperature", timestamp is "2025-8-30 08:05:01", parameter value is "+1.7℃", and batch ID is "Batch_001". This record indicates that at 08:05:01, the temperature experienced an abnormal surge of 1.7℃, which was captured as a transient event.
[0019] By generating instantaneous events, environmental parameters and corresponding times with statistically abnormal characteristics can be screened out, and sudden instantaneous environmental parameter changes can be identified. This provides key information for distinguishing between the real risks and instantaneous disturbances in the storage environment of highland summer vegetables, and reduces the false alarm rate caused by instantaneous fluctuations.
[0020] Step S130: Using the state event generation module, when the duration of the multidimensional environmental sensing data being within the preset pathological threshold range exceeds the warning duration threshold, a state interval event is generated. State interval events refer to a continuous state in which one or more environmental parameters in multidimensional environmental sensing data remain within a threshold range that is unfavorable to the storage of summer vegetables in highland areas for a certain period of time. For example, the warning duration threshold is 2 hours, and humidity exceeds the pathological threshold range for 2 consecutive hours.
[0021] A state interval event is generated when one or more environmental parameters remain within a preset pathological threshold range that is unfavorable for the storage of summer vegetables in high-altitude areas, and the duration of this state exceeds the warning duration threshold.
[0022] For example, a state interval event record is as follows: event type is "state interval", parameter name is "temperature", start and end time interval is "2024-12-30 08:00:00 to 2024-12-30 09:00:00", threshold interval is "≤4℃", duration is "12", and batch ID is "2024_12_001". This record indicates that the temperature remained in the high-risk range of no more than 4℃ from 08:00:00 to 09:00:00, for a total duration of 12 cycles, thus generating a state interval event characterizing persistent low temperature risk. The duration of "12" represents 12 consecutive sampling cycles, each sampling cycle being 5 minutes.
[0023] By generating state interval events, it is possible to record long-term adverse environmental conditions that easily induce diseases in summer vegetables in highland areas. This overcomes the shortcomings of focusing only on instantaneous values and ignoring persistent hazards, and reduces the probability of underreporting the true long-term disease risk.
[0024] Step S140: Using the rule matching module, the state interval event is matched with a pre-built risk association rule base to obtain a warning trigger signal; the warning trigger signal is verified based on the instantaneous event to obtain warning information; The event representing a prolonged period of adverse environmental conditions is matched with a pre-established risk association rule base to find disease occurrence patterns that match the current state interval event.
[0025] The risk association rule base is a set of patterns mined from a large number of historical cases. This set of patterns records empirical rules that indicate a high probability of specific diseases occurring when a certain environmental state persists. If the current state interval event meets the conditions described by a certain rule, a preliminary warning trigger signal will be generated. To further confirm that the signal is not caused by accidental interference, it is also checked whether any instantaneous events occurred within the same time period of the state interval event.
[0026] For example, if the risk association rule base indicates that persistent high humidity may cause gray mold, but the system also detects short-term drastic temperature fluctuations, which have historically been shown to be associated with harmless operations such as ventilation in the warehouse, the warning may be cancelled.
[0027] By first matching state interval events with a pre-built risk association rule base to obtain early warning trigger signals, and then verifying these signals based on instantaneous events to obtain early warning information, this step enables intelligent risk identification and cross-validation. By discovering potential risks within state interval events and using instantaneous events to perform a secondary check on these potential risks, the probability of mistakenly classifying environmental fluctuations caused by normal operations as disease risks is reduced, thus improving the reliability of early warning conclusions.
[0028] Step S150: Utilize the warning module to issue a warning based on the warning information.
[0029] The system triggers alarm actions based on early warning information, promptly informing warehouse management personnel of verified warnings through methods such as sound and light alerts, display screen messages, or remote notifications. For example, warning information may include the risk type, disease type, location, and severity.
[0030] Early warning systems ensure that relevant personnel are aware of disease risks as soon as possible, allowing time to adjust environmental equipment or take early prevention and control measures. This creates a closed loop from automatic risk detection to on-site intervention, thereby reducing disease occurrence and losses of summer vegetables grown in highland areas.
[0031] This application utilizes a data acquisition module to obtain multidimensional environmental sensor data. This multidimensional environmental sensor data can characterize the storage environment of highland summer vegetables, laying a data foundation for subsequent disease early warning of highland summer vegetables. Using a transient event generation module, transient events are generated when the multidimensional environmental sensor data meets predefined third-order judgment conditions. By generating transient events, environmental parameters with statistically abnormal characteristics and their corresponding times can be filtered out, identifying sudden transient environmental parameter changes and providing crucial information to distinguish between the true risks and transient disturbances in the storage environment of highland summer vegetables, reducing the false alarm rate caused by transient fluctuations. Using a state event generation module, state interval events are generated when the duration of the multidimensional environmental sensor data within a preset pathological threshold range exceeds the early warning duration threshold. By generating state interval events, long-term adverse environmental states that easily induce diseases in highland summer vegetables can be recorded, overcoming the deficiency of focusing only on transient values while ignoring persistent hazards, and reducing the probability of underreporting true long-term disease risks. By utilizing a rule matching module, state interval events are matched with a pre-built risk association rule base to obtain early warning trigger signals. These signals are then verified based on instantaneous events to generate early warning information. This step enables intelligent risk identification and cross-validation. By discovering potential risks within state interval events and verifying them using instantaneous events, the probability of mistakenly identifying environmental fluctuations caused by normal operations as disease risks is reduced, thus improving the reliability of early warning conclusions. An early warning module is used to issue warnings based on the warning information. Early warnings ensure that relevant personnel are aware of disease risks immediately, allowing time to adjust environmental equipment or take early prevention and control measures. This achieves a closed loop from automatic risk detection to on-site intervention, reducing disease occurrence and losses in highland summer vegetables. In summary, this application enables early detection of diseases in highland summer vegetables during their incubation period with high accuracy and stability. It moves the disease control window forward, reducing losses from disease treatment and solving the problems of high false alarms and high missed alarms caused by diurnal temperature differences and periodic ventilation in post-harvest storage of fruits and vegetables in highland areas.
[0032] Optionally, the method further includes: collecting initial multidimensional environmental sensing data of the target storage environment at a preset sampling frequency; the target storage environment contains harvested target fruits and vegetables; the initial multidimensional environmental sensing data is arranged in chronological order; the initial multidimensional environmental sensing data includes temperature, relative humidity, carbon dioxide concentration, oxygen concentration, and surface microhumidity; the surface microhumidity is used to characterize the wetness of the surface of the target fruits and vegetables; and cleaning the initial multidimensional environmental sensing data to obtain the multidimensional environmental sensing data.
[0033] The preset sampling frequency can be set according to actual monitoring needs and resource allocation. In a preferred embodiment of this application, the preset sampling frequency is set to once every 5 minutes, so as to achieve dynamic and continuous sensing of the storage environment without excessively increasing the load.
[0034] Data cleaning includes: removing invalid data segments with a continuous missing rate exceeding 30%, and repairing isolated missing points using a spatiotemporal collaborative interpolation algorithm to solve the data missing problem; and then, based on the reasonable range defined by the physical range of the sensors and the physiological knowledge of fruits and vegetables, and using a statistical filtering method based on a sliding window, detecting and correcting outliers to obtain multidimensional environmental sensing data.
[0035] Optionally, the predefined third-order judgment conditions include a single-step mutation condition, a cumulative change condition, and a baseline deviation condition; generating an instantaneous event when the multidimensional environmental sensing data satisfies the predefined third-order judgment conditions includes: for each multidimensional environmental sensing data, when the multidimensional environmental sensing data simultaneously satisfies the single-step mutation condition, the cumulative change condition, and the baseline deviation condition, generating an instantaneous event corresponding to the multidimensional environmental sensing data; wherein, the single-step mutation condition includes: the absolute value of the first change of the multidimensional environmental sensing data corresponding to the current sampling time relative to the multidimensional environmental sensing data corresponding to the previous sampling time exceeds a first preset threshold; the cumulative change condition includes: within a preset historical period including the current sampling time, the cumulative absolute value of the second change of the multidimensional environmental sensing data between each adjacent sampling time exceeds a second preset threshold; the baseline deviation condition includes: the first change deviates from a preset statistical baseline; the preset statistical baseline is determined based on the historical change corresponding to the first change.
[0036] The single-step mutation condition represents the magnitude of change in multidimensional environmental sensing data between two adjacent sampling points. A first preset threshold is used to determine the magnitude of this change. For example, the first preset threshold can be set to 1.5°C based on domain experience. This means that when the absolute value of the temperature increase or decrease in the previous 5-minute sampling cycle compared to the previous cycle exceeds 1.5°C, the single-step mutation condition is met.
[0037] The cumulative change condition is used to determine the persistence of changes in multidimensional environmental sensor data over a short period. Within a preset historical time period, if the cumulative absolute value of the change in a particular multidimensional environmental sensor data point across all adjacent sampling periods exceeds a second preset threshold, the cumulative change condition is met. For example, the preset historical time period can be set to the past hour, and with each sampling period being 5 minutes, the preset historical time period corresponds to 12 sampling periods; the second preset threshold can be set to 3.0℃. This means that even if the single-step abrupt change condition is met, it is still checked whether the total temperature change over the past hour also exceeds 3.0℃. This cumulative change condition ensures that the anomaly of interest is not a random fluctuation, but rather a significant trend within a short period.
[0038] Baseline deviation conditions can distinguish between anomalous and dramatic changes and dramatic changes that are within the normal range for the same historical period.
[0039] The preset statistical baseline is a normal fluctuation level of environmental parameter changes within the same time period, calculated based on historical data. The method for determining the preset statistical baseline can include determining the statistical period and specific statistical algorithms. For example, the statistical period can be three consecutive days prior to the current moment; for historical data within the same time period of these three days, the average and standard deviation of the change in multidimensional environmental sensor data per minute are calculated. Assuming the calculated average temperature change for the same historical period is an increase of 0.02℃ per minute, with a standard deviation of 0.2℃, then the preset statistical baseline can be set as the average plus 1.5 times the standard deviation, i.e., 0.02 + 1.5 * 0.2 = 0.32℃ / minute, or 1.6℃ / 5 minutes. If the currently detected single-step temperature change reaches 1.7℃ / 5 minutes, exceeding the preset statistical baseline of 1.6℃ / 5 minutes, then the baseline deviation condition is met; if a single temperature increase is only 1.0℃ / 5 minutes, not exceeding the preset statistical baseline, then the baseline deviation condition is not met.
[0040] In some embodiments, after generating a transient event, additional checks are performed. These checks are specific to high-altitude regions with large diurnal temperature variations. After generating a transient event representing a sudden environmental change, it is determined whether the event was caused by normal nighttime cooling. First, the criterion is whether the rate of temperature decrease is very slow. For example, a temperature drop of no more than 0.5°C per hour. Second, it is determined whether the transient event occurred during a specific time period from night to dawn. For example, from 8 PM to 6 AM. If both conditions are met, the transient event is considered a non-hazardous disturbance anomaly and is marked, for example, as an INTERFERENCE type.
[0041] Optionally, the method further includes: acquiring historical multidimensional environmental sensing data and corresponding historical label data, wherein the historical label data includes disease label data and health label data; dividing the historical multidimensional environmental sensing data and the corresponding historical label data into a rule mining set and an evaluation set; generating an initial association rule set that associates environmental conditions with disease results based on the rule mining set; calculating the discriminative support and cross-batch stability score of each rule in the initial association rule set based on the evaluation set; calculating a weighted comprehensive score based on the discriminative support and the cross-batch stability score; and filtering the initial association rule set based on the weighted comprehensive score to generate the pre-constructed risk association rule library.
[0042] Acquire historical multidimensional environmental sensor data and corresponding historical tag data for all historical storage batches. The historical tag data includes disease tag data that identifies the actual time of disease occurrence and health tag data that identifies healthy periods during which no disease occurred.
[0043] To avoid the constructed rule base overfitting to specific batches of data, the aforementioned historical multidimensional environmental sensing data and corresponding historical label data are divided into two non-overlapping subsets in chronological order. The rule mining set consists of the earlier 70% of the stored batches of data, used to generate the initial set of association rules between environmental conditions and disease outcomes. The evaluation set consists of the more recent 30% of the stored batches of data. The evaluation set does not participate in the generation of the initial association rule set; it is only used for subsequent quantitative evaluation and screening of the initial association rule set. The rule mining set is also called the training set, and the evaluation set is also called the test set.
[0044] Disease labeling data consists of labels indicating the time period of rot occurrence provided by manual inspection records or fruit and vegetable image recognition systems. Each positive sample label in the disease labeling data includes: disease start time stamp, end time stamp, and pathogen type. For example, pathogen types include gray mold and soft rot.
[0045] The health label data consists of disease-free period labels extracted from healthy batches that have never experienced rot. Each negative sample label in the health label data includes: a start timestamp, an end timestamp, and a temperature zone label. For example, the temperature zone label includes low temperature zone, normal temperature zone, etc., to distinguish the environmental background.
[0046] The process of generating an initial set of association rules based on the rule mining set is as follows: All actual instantaneous events and state interval events that have occurred are extracted from the rule mining set to form a finite set of event antecedents. Simultaneously, based on the disease types actually recorded in historical tag data, all possible pathogen types are determined to form the set of rule consequents. For antecedents of state interval events, a minimum duration threshold needs to be bound to them. This minimum duration threshold is calculated using statistical methods such as Fisher's optimal segmentation on the rule mining set for each specific combination of fruit / vegetable variety and pathogen type, ensuring that the duration of events below this minimum duration threshold is not statistically significantly associated with disease occurrence. After calculation, this minimum duration threshold is bound as a fixed parameter to the antecedent of this type of event. In all subsequent stages, only events whose duration is greater than or equal to the bound minimum duration threshold are considered valid events. Each event antecedent is combined with each disease consequent to form candidate rules in the form that if an event occurs within 36 hours before the disease occurs, a certain disease may occur. Finally, the generated candidate rules are deduplicated. For example, for two similar rules that differ only in minimum persistence threshold, only the one with the smaller threshold is retained, thus forming the initial set of association rules.
[0047] The process described above for generating an initial set of association rules based on the rule mining set ensures that all candidate rules in the initial set of association rules originate from real observed event patterns and disease types, avoiding the introduction of unverified artificial assumptions, while providing a complete and feasible hypothesis space for subsequent support statistics and rule selection.
[0048] On the evaluation set, the discriminative support and cross-batch stability score of each candidate rule in the initial association rule set are calculated. To comprehensively measure the discriminative ability and stability performance of a rule across different batches, these two scores are combined into a single composite score using a weighted approach. The composite score is calculated as shown in formula (1): Formula (1); in, For the overall score, and All are weights. For discriminative support, The score is for stability across batches.
[0049] In a preferred embodiment of this application, and The weights are 0.8 and 0.2 respectively. This combination of weights has been verified to be effective in multiple batches of trials on highland summer vegetables, and can maximize the overall accuracy of the association rule set on the evaluation set.
[0050] The initial set of association rules is filtered based on the comprehensive score to generate the final risk association rule base. The filtering process must simultaneously meet several stringent conditions, primarily including: First, the comprehensive score must be no less than 0.65; second, the rule base should primarily consist of rules with state interval events as antecedents, accounting for no less than 95%, to ensure that the early warning logic is based on a manageable, persistently high-risk environment; third, the duration of state interval events must be within a reasonable range. For example, the optimal duration threshold must be obtained by traversing the evaluation set within 2 to 36 sampling periods, and the duration maximizing discriminative support should be selected as the early warning duration threshold; fourth, the cross-batch stability score of the rules must be no less than 0.3 to ensure basic generalization ability.
[0051] Candidate rules that pass the above four screening criteria are sorted from highest to lowest based on their comprehensive scores. The top-ranked candidate rules are selected to form a risk association rule base for real-time early warning. Each rule in the risk association rule base is stored in a structured format, containing key information such as rule identifier, antecedent, consequent, optimal persistence threshold, discriminative support, comprehensive score, and stability score.
[0052] Optionally, the rules in the initial association rule set include rules with state interval events as environmental conditions; the method further includes: determining a warning duration threshold based on each rule with state interval events as environmental conditions, specifically including: for the evaluation set, traversing different candidate durations within a preset duration; for each candidate duration, recalculating the discriminative support of the corresponding rule; and selecting the candidate duration that maximizes the discriminative support from each candidate duration as the warning duration threshold.
[0053] The preset duration is a range of preset durations that needs to be traversed and searched. Based on the sampling frequency in practical applications and pathological knowledge, the preset duration can be set between 2 and 36 sampling periods. At a sampling frequency of once every 5 minutes, the preset duration range corresponds to a time range from 10 minutes to 3 hours. Using one sampling period as a step size, all possible candidate durations are generated within the time range of 10 minutes to 3 hours, for example, 2, 3, 4... up to 36 periods.
[0054] The warning duration threshold is the duration that maximizes discriminative support. It is used in real-time monitoring to determine whether a given environmental condition is sufficient to trigger a warning.
[0055] The method for determining the warning duration threshold is as follows: On the evaluation set, for each candidate rule conditioned on a specific state interval event, the duration of each candidate rule is used as a temporary duration threshold, and the discriminative support of that candidate rule on the evaluation set is recalculated. After calculating the discriminative support for all candidate rules, the values of all these discriminative support values are compared, and the candidate duration corresponding to the largest value is determined as the warning duration threshold for that rule. If multiple candidate durations correspond to the same maximum discriminative support, the candidate duration with the smallest value is selected to achieve the earliest possible warning.
[0056] The warning duration threshold determined by the above method can ensure that the selected warning duration threshold has the strongest discriminative ability in the disease warning scenario associated with this rule, that is, it can balance the timeliness of the warning while maximizing the accuracy of the warning.
[0057] Optionally, the discriminative support is calculated based on positive and negative support; the discriminative support is calculated as shown in formula (2): Formula (2); in, For discriminative support, The positive support is... The negative support, The penalty coefficient is related to variety and pathogen characteristics. This is the smoothing constant.
[0058] In the embodiments of this application, the smoothing constant The value is If the positive support is less than 3, the discriminative support is forced to be 0 to exclude spurious associations caused by chance events. Discriminative support measures the ability of a rule to distinguish between positive and negative samples. The larger the value, the stronger the association between the rule and the target disease, and the lower the risk of false alarms. The higher the discriminative support value, the stronger the association between the corresponding rule and the target disease, and the lower the risk of false alarms. The initial value of λ can be set to 1.0. In a preferred embodiment, to improve the discriminative power against highly susceptible varieties or highly pathogenic pathogens, λ can be dynamically adjusted based on the rule's performance on the historical evaluation set. For example, this can be achieved using the formula λ = 1 + (Support...). - / Support + )×0.5. Finally, the λ value that gives the highest overall score on the independent validation set is selected as the fixed parameter of the rule. For example, a highly susceptible variety could be lettuce. A highly pathogenic pathogen could be gray mold.
[0059] This application introduces discriminative support, and by jointly considering positive and negative support, quantifies the comprehensive performance of rules in the relationship between disease correlation and false alarm control. It not only reflects the frequency of rule occurrence in positive samples but also suppresses false matches in negative samples.
[0060] Optionally, the method further includes: segmenting the evaluation set to obtain a historical positive sample set and a historical negative sample set; wherein, for each disease label data, a first data subsequence is extracted from the corresponding historical multidimensional environmental sensing data, tracing back a preset warning duration from the start time of disease occurrence, to obtain the historical positive sample set; for each health label data, a second data subsequence is extracted from the corresponding historical multidimensional environmental sensing data, with a continuous duration equal to the preset warning duration, and if no disease occurs within a preset harmless period following the second data subsequence, the historical negative sample set is determined; the number of successful matches between each rule and the historical positive sample set is counted to obtain the positive support; the number of successful matches between each rule and the historical negative sample set is counted to obtain the negative support.
[0061] The preset warning duration is a fixed time parameter, set at 36 hours. This value is determined by domain experts based on the pathological characteristics of postharvest rot in fruits and vegetables, representing the critical latent and warning window of the disease. When constructing samples, whether positive or negative, the length of the extracted event subsequences is strictly aligned with this preset warning duration, meaning they are all continuous 36-hour periods.
[0062] The process of constructing the historical positive sample set includes: for each disease label in the historical label data, extracting a subsequence of event data from the corresponding historical multidimensional environmental sensor data, with the actual start time of the disease as the endpoint and continuously tracing back to the preset warning duration. All the obtained data subsequences constitute the historical positive sample set.
[0063] The process of constructing the historical negative sample set includes: selecting any continuous data subsequence with a duration equal to the aforementioned preset warning duration from the historical labeled healthy storage batches as candidates. To ensure that this subsequence represents the true health status, rather than being in an unlabeled disease incubation period, a preset harmless period constraint must be imposed on it. Specifically, if the total storage time of the healthy batch is greater than or equal to 72 hours, then at least 36 hours after the selected 36-hour subsequence ends, there must be no record of any disease occurrence; for low-temperature storage conditions or highly susceptible varieties, this preset harmless period should be extended to at least 48 hours. If the total storage time of the batch is less than 72 hours, the condition is adjusted so that as long as there is no disease occurrence within the selected 36-hour subsequence and in all remaining time until the end of the batch, it can be considered a valid healthy sample. All data subsequences selected through this process constitute the historical negative sample set.
[0064] Among them, the historical positive sample set and the historical negative sample set are aligned in terms of time length and are both associated with meta-information such as temperature zone and variety to support grouped analysis. All sub-sequences are uniquely identified by batch ID and label type to facilitate subsequent traceability.
[0065] Optionally, the method further includes: calculating the positive support of each rule on multiple independent storage batches covered by the evaluation set; calculating the corresponding coefficient of variation based on the positive support corresponding to the multiple independent storage batches; and converting the coefficient of variation into the cross-batch stability score based on a preset mapping function.
[0066] On the evaluation set, the discriminative support and cross-batch stability score are calculated for each candidate rule, as follows.
[0067] First, event matching and support statistics are performed. For each candidate rule, matching detection needs to be performed on all positive and negative sample subsequences. The matching logic varies depending on the event type of the rule's antecedent.
[0068] For rules whose antecedent is a transient event, full feature matching is used. That is, a rule is considered to be a successful match in a sample subsequence only if there is a transient event with a timestamp within the 36-hour responsibility window, and this transient event is consistent with the conditions defined in the antecedent of the rule in terms of event type, corresponding environmental parameter name, mutation threshold on which it is triggered, and the entire judgment logic.
[0069] For rules whose antecedent is a state interval event, cross-period coverage determination is adopted. That is, if there is a state interval event in a sample subsequence, and the duration of the event overlaps with the 36-hour responsibility window in any time, and the actual duration of the state interval event is greater than or equal to the minimum duration threshold bound to the antecedent of the rule, then the rule is determined to be a successful match in this sample subsequence.
[0070] After completing the traversal and matching of all sample subsequences, the total number of times the candidate rule is successfully matched in all positive sample subsequences is counted, and this is recorded as positive support. At the same time, the total number of times it is successfully matched in all negative sample subsequences is counted, and this is recorded as negative support.
[0071] Secondly, cross-batch stability verification is performed to assess the consistency of the rule's performance under different storage batch environments. This verification is performed only on the evaluation set. The positive support of the rule is calculated for each independent storage batch included in the evaluation set. If the actual number of independent batches is less than 5, a sliding window with a length of 36 hours and a step size of 12 hours is used to generate multiple non-overlapping virtual sub-batches from the data of each batch, ensuring that the total number of sub-batches used for statistics is not less than 5. During this process, the reuse of data from the same time period between different sub-batches is strictly prevented. If the positive support of the rule is 0 on all batches, its cross-batch stability score is directly recorded as 0. Otherwise, the arithmetic mean and standard deviation of these positive supports are calculated to obtain the coefficient of variation. The calculation of the coefficient of variation is shown in formula (3): CV= Formula (3); Where CV is the coefficient of variation. The arithmetic mean of positive support. The standard deviation of positive support.
[0072] The coefficient of variation (CV) is mapped to a stability score between 0 and 1 using a preset mapping function, as shown in formula (4): Formula (4); When the coefficient of variation (CV) is less than or equal to 0.3, the stability score is... The stability score is 1; when the coefficient of variation (CV) is greater than 0.3 and less than or equal to 0.7, the stability score decreases linearly from 1 to 0; when the coefficient of variation (CV) is greater than 0.7, the stability score is always 0.
[0073] After calculating the stability score, a structured record is output for each candidate rule, forming a data pool. Each record contains six key fields: the rule's antecedent events, the disease type predicted by the rule, the calculated positive support, the calculated negative support, the event type of the rule's antecedent events, and the calculated cross-batch stability score. The obtained cross-batch stability score ensures that the selected rules have basically consistent performance on new storage batches, improving the robustness and deployment sustainability of the proposed method.
[0074] The above content will be explained below with a specific example: First, consider a candidate rule: if the instantaneous event temperature changes abruptly in one step. 1 hour cumulative temperature rise If a significant deviation from the historical baseline occurs within a 36-hour window, soft rot may occur within 36 hours after the end of that window.
[0075] In a positive sample subsequence, a transient event was detected at the 12th hour, with the event type being temperature from... Rising sharply to Triggered, and meets the requirement of cumulative temperature rise over 1 hour. and historical baseline deviation conditions; Since the event type, parameters, threshold conditions are completely consistent with the rule antecedents, and the timestamp is within the responsibility window, it is determined to be a successful match and is counted as positive support.
[0076] Second, consider another candidate rule: if a high relative humidity risk event occurs within a 36-hour window, then gray mold may occur within 36 hours after the end of that window.
[0077] In a positive sample subsequence, a state interval event was detected: the start time is 10 minutes before the window begins, the end time is 40 minutes after the window begins, and the candidate duration is 10.
[0078] The event in this state interval intersects with the 36-hour window, and the minimum duration threshold is greater than or equal to 6, which satisfies the antecedent condition of the rule. Therefore, the match is determined to be successful and is included in the positive support.
[0079] Optionally, matching the instantaneous event and the state interval event with a pre-built risk association rule base to obtain a matching result includes: generating a warning trigger signal when the state interval event successfully matches the pre-built risk association rule base; generating a warning suppression signal when the instantaneous event conforms to a predefined interference pattern; and outputting warning information when no warning suppression signal is received within the duration of the state interval event corresponding to the warning trigger signal.
[0080] The rule matching and verification process operates through two logical channels. The first is the primary matching channel. When a state interval event is generated, the system matches it against a pre-built risk association rule base. If a rule is found in the risk association rule base whose required environmental parameters, predicted disease types, etc., match the characteristics of the state interval event, and the event's duration meets the rule's required warning duration threshold, and the current time is no more than 36 hours from the start time of the state interval event, then a warning trigger signal is generated. The second is the auxiliary verification channel. When a transient event is generated, it is determined whether the transient event belongs to a predefined interference pattern. For example, the transient event conforms to the periodic fluctuation of mild cooling characteristics within a specific time period at night in the local area. If the currently active state interval event is within its duration, and a transient event conforming to this interference pattern is detected simultaneously, a warning suppression signal is generated, and a warning is temporarily withheld to confirm the stability of the environmental state.
[0081] The output of early warning information depends on the combined judgment of the main matching channel and the auxiliary verification channel. Matching is considered successful and an early warning message is generated and output only when the main matching channel generates an early warning trigger signal, and the auxiliary verification channel does not generate an early warning suppression signal within the same risk assessment window. This early warning message includes the triggering rule number, the type of disease, the specific environmental parameters exceeding the standard and their current duration, the early warning confidence level, and targeted handling suggestions.
[0082] Through a dual-channel matching architecture, the main matching channel is triggered by state interval events to provide risk warnings, while the auxiliary verification channel uses instantaneous events to identify typical environmental disturbances in the plateau and dynamically suppress false alarms, thus meeting the requirements of agricultural edge scenarios.
[0083] In some embodiments, the method and system provided in this application are particularly suitable for postharvest disease early warning of highland summer vegetables. It is understood that the method and system are also applicable to other fruits and vegetables with similar sensitivity to storage environments. Specifically, those skilled in the art can modify the key parameters in this application for different application scenarios without inventive effort. For example, the pathological threshold range and the early warning duration threshold can be reset according to the physiological characteristics of other target fruits and vegetables; the penalty coefficient in the discriminative support can be set for different varieties and pathogen combinations; and the interference mode used to suppress false alarms can be redefined according to different storage environments. Therefore, this solution can be applied to a wider range of fruit and vegetable storage facilities, cold chain logistics, and other scenarios to achieve cross-regional and cross-category postharvest disease risk early warning for fruits and vegetables.
[0084] To verify the method of this application, a comparative experiment was conducted in the same highland summer vegetable storage facility, involving 12 varieties and a total of 314 batches over three production seasons. The experiment was divided into two groups: the control group used the traditional threshold method, including fixed threshold and single-window support; the experimental group used the method of this application. Both groups used the same set of sensors and the same disease label, and the occurrence time of rot disease was confirmed by a blind inspection by a third-party plant protection worker. The main evaluation indicators and results are shown in Table 1: Table 1 Performance comparison between the experimental group and the control group In Table 1, under the same hardware environment, the average false alarm rate and average false negative rate of the experimental group of this application were significantly lower than those of the control group. The overall F1 score and evaluation set AUC were improved, the average cross-batch stability of the rule base was higher, the error-free warning time within a single batch could be maintained for a longer period of time, and the earliest warning time was much earlier than visual detection, which ultimately reduced the disease loss rate after intervention.
[0085] Therefore, this application has made significant progress in reducing false alarms, providing early warnings, and generalizing across batches, and has certain application value.
[0086] The temporal association rule described in this application embodiment specifically refers to a rule where the antecedent is an instantaneous event and a state interval event that occur within a specific time window, and the consequent is a disease that occurs within a specific future time period. The association conditions in the temporal association rule include the temporal attributes and temporal relationships of the instantaneous event and the state interval event.
[0087] Figure 2 This application provides an embodiment of a postharvest disease early warning system for fruits and vegetables based on time-series association rules, such as... Figure 2 As shown, this application proposes a postharvest disease early warning system for fruits and vegetables based on time-series association rules. The system 200 includes: a data acquisition module 210, a transient event generation module 220, a status event generation module 230, a rule matching module 240, and an early warning module 250; wherein: The data acquisition module 210 is used to acquire multidimensional environmental sensing data; The instantaneous event generation module 220 is used to generate an instantaneous event when the multidimensional environmental sensing data meets the predefined third-order judgment conditions; The state event generation module 230 is used to generate a state interval event when the duration of the multidimensional environmental sensing data being within a preset pathological threshold range exceeds the warning duration period threshold. The rule matching module 240 is used to match the state interval event with a pre-built risk association rule base to obtain a warning trigger signal; and to verify the warning trigger signal based on the instantaneous event to obtain warning information. The early warning module 250 is used to issue an early warning based on the early warning information.
[0088] It should be noted that the description of the above system embodiments is similar to the description of the above method embodiments, and has similar beneficial effects. For technical details not disclosed in the system embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0089] It should be noted that, in the embodiments of this application, if the above-mentioned method for early warning of post-harvest diseases of fruits and vegetables based on time-series association rules is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.
[0090] Correspondingly, embodiments of this application provide a computer-readable storage medium storing a computer program thereon. When executed by a processor, this computer program implements the steps in any of the above embodiments' methods for early warning of post-harvest diseases of fruits and vegetables based on time-series association rules. Correspondingly, embodiments of this application also provide a computer program product. When executed by a processor of an electronic device, this computer program product is used to implement the steps in any of the above embodiments' methods for early warning of post-harvest diseases of fruits and vegetables based on time-series association rules.
[0091] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0092] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0093] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0094] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units; some or all of the units may be selected to achieve the purpose of the embodiments of this application according to actual needs. In addition, each functional unit in the embodiments of this application may be fully integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the integrated unit may be implemented in hardware or in the form of hardware plus software functional units.
[0095] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause the device automatic test line to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0096] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined to obtain new method embodiments without conflict. The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined to obtain new method embodiments or device embodiments without conflict.
[0097] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for early warning of postharvest diseases in fruits and vegetables based on temporal association rules, characterized in that, It is applied to a postharvest disease early warning system for fruits and vegetables based on time-series association rules; The system includes: a data acquisition module, a real-time event generation module, a status event generation module, a rule matching module, and an early warning module; the method includes: The data acquisition module is used to acquire multidimensional environmental sensing data. Using the instantaneous event generation module, an instantaneous event is generated when the multidimensional environmental sensing data meets the predefined third-order judgment conditions; Using the state event generation module, when the duration of the multidimensional environmental sensing data remaining within a preset pathological threshold range exceeds the warning duration period threshold, a state interval event is generated. The rule matching module is used to match the state interval events with a pre-built risk association rule base to obtain an early warning trigger signal; the early warning trigger signal is verified based on the instantaneous event to obtain early warning information. The warning module is used to issue warnings based on the warning information.
2. The method according to claim 1, characterized in that, The method further includes: For the target storage environment, multidimensional initial environmental sensing data of the target storage environment are collected at a preset sampling frequency; the target storage environment contains harvested target fruits and vegetables; the multidimensional initial environmental sensing data are arranged in chronological order; the multidimensional initial environmental sensing data includes temperature, relative humidity, carbon dioxide concentration, oxygen concentration, and surface microhumidity; the surface microhumidity is used to characterize the moisture state of the surface of the target fruits and vegetables; The initial multidimensional environment sensing data is cleaned to obtain the multidimensional environment sensing data.
3. The method according to claim 2, characterized in that, The predefined third-order decision conditions include single-step mutation conditions, cumulative change conditions, and baseline deviation conditions; the generation of an instantaneous event when the multidimensional environmental sensing data meets the predefined third-order decision conditions includes: For each of the multidimensional environmental sensing data, when the multidimensional environmental sensing data simultaneously satisfies the single-step mutation condition, the cumulative change condition, and the baseline deviation condition, an instantaneous event corresponding to the multidimensional environmental sensing data is generated. The single-step mutation condition includes: the absolute value of the first change of the multidimensional environmental sensing data corresponding to the current sampling time relative to the multidimensional environmental sensing data corresponding to the previous sampling time exceeds a first preset threshold. The cumulative change condition includes: within a preset historical time period including the current sampling time, the cumulative absolute value of the second change of the multidimensional environmental sensing data between each adjacent sampling time exceeds a second preset threshold. The baseline deviation condition includes: the first change amount deviates from the preset statistical baseline; the preset statistical baseline is determined based on the historical change amount corresponding to the first change amount.
4. The method according to claim 1, characterized in that, The method further includes: Acquire historical multidimensional environmental sensor data and corresponding historical tag data, wherein the historical tag data includes disease tag data and health tag data; The historical multidimensional environmental sensing data and the corresponding historical label data are divided into a rule mining set and an evaluation set; Based on the rule mining set, an initial set of association rules between the associated environmental conditions and the disease results is generated; Based on the evaluation set, calculate the discriminative support and cross-batch stability score for each rule in the initial association rule set; A weighted composite score is calculated based on the discriminative support and the cross-batch stability score; The initial set of association rules is filtered based on the weighted comprehensive score to generate the pre-built risk association rule library.
5. The method according to claim 4, characterized in that, The rules in the initial association rule set include rules with state interval events as environmental conditions; the method further includes: The warning duration threshold is determined based on each rule that uses state interval events as environmental conditions, specifically including: For the evaluation set, different candidate durations are traversed within a preset duration. For each candidate duration, the discriminative support of the corresponding rule is recalculated; From each of the candidate durations, the candidate duration that maximizes the discriminative support is selected as the warning duration threshold.
6. The method according to claim 4, characterized in that, The discriminative support is calculated based on positive and negative support; the formula for calculating the discriminative support is as follows: ; in, The positive support is... The negative support, The penalty coefficient is related to variety and pathogen characteristics. This is the smoothing constant.
7. The method according to claim 6, characterized in that, The method further includes: The evaluation set is segmented to obtain a historical positive sample set and a historical negative sample set; Specifically, for each of the disease label data, a first data subsequence is extracted from the corresponding historical multidimensional environmental sensing data, which traces back a preset warning time from the start time of the disease occurrence, to obtain the historical positive sample set; For each of the health tag data, a second data subsequence with a continuous duration equal to the preset warning duration is extracted from the corresponding historical multidimensional environmental sensor data, and when no disease occurs within the preset harmless period following the second data subsequence, the historical negative sample set is determined. The positive support is obtained by counting the number of successful matches between each rule and the historical positive sample set. The negative support is obtained by counting the number of successful matches between each rule and the historical negative sample set.
8. The method according to claim 6, characterized in that, The method further includes: Calculate the positive support for each rule across the multiple independent storage batches covered by the evaluation set; Calculate the corresponding coefficient of variation based on the positive support corresponding to the multiple independent storage batches; Based on a preset mapping function, the coefficient of variation is converted into the cross-batch stability score.
9. The method according to claim 1, characterized in that, The step of matching the instantaneous event and the state interval event with a pre-built risk association rule base to obtain matching results includes: When the event in the state interval successfully matches the pre-built risk association rule base, an early warning trigger signal is generated; When the instantaneous event conforms to a predefined interference pattern, a warning suppression signal is generated; If no warning suppression signal is received within the duration of the state interval event corresponding to the warning trigger signal, a warning message is output.
10. A postharvest disease early warning system for fruits and vegetables based on temporal association rules, characterized in that, The system includes: a data acquisition module, a transient event generation module, a state event generation module, a rule matching module, and an early warning module; wherein: The data acquisition module is used to acquire multidimensional environmental sensing data; The instantaneous event generation module is used to generate an instantaneous event when the multidimensional environmental sensing data meets the predefined third-order judgment conditions; The state event generation module is used to generate a state interval event when the duration of the multidimensional environmental sensing data being within a preset pathological threshold range exceeds the warning duration period threshold. The rule matching module is used to match the state interval event with a pre-built risk association rule base to obtain an early warning trigger signal; and to verify the early warning trigger signal based on the instantaneous event to obtain early warning information. The early warning module is used to issue early warnings based on the early warning information.