Knowledge Graph-Based Recommendation System for Disease Control in Food Crops
By using a knowledge graph-based recommendation system for crop disease control, the accuracy and security issues of disease control systems under network fluctuations and asynchronous data biases have been addressed, enabling high-confidence disease diagnosis and control in complex environments.
Patent Information
- Application Number
- CN202611157899.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-11-17
AI Technical Summary
Existing crop disease control systems struggle to balance disease diagnosis accuracy and offline control security in complex environments such as network fluctuations, asynchronous data deviations, or sensor drift.
A knowledge graph-based crop disease prevention and control recommendation system is adopted. Through edge control nodes, cloud processing nodes, data acquisition modules, time synchronization and quality screening modules, network reporting modules, disease diagnosis modules, prevention and control strategy generation modules, and control output modules, the system achieves data time alignment, quality screening, and adaptive network uploading. It generates prevention and control execution rules in conjunction with an agricultural disease association database and performs local judgment and control at the edge.
Under conditions of network fluctuations and asynchronous data deviations, the system ensures the reliability of disease diagnosis and the security of offline control, avoids erroneous prevention and control actions, and achieves high-confidence disease diagnosis and control.
Smart Images

Figure CN123118290A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural informatization and intelligent agricultural equipment technology, specifically a knowledge graph-based recommendation system for pest control in grain crops. Background Technology
[0002] Existing crop disease control systems include farmland data acquisition equipment, network transmission equipment, cloud analysis platforms, and control execution equipment.
[0003] In related technologies, in order to identify and control diseases of grain crops, image acquisition devices and environmental sensors can be used to collect crop images and meteorological data, and then upload them to the cloud for disease diagnosis and issuance of control instructions; or, edge devices can be used to directly make rule judgments based on locally collected data and control spraying, ventilation or irrigation equipment to perform control actions.
[0004] However, when farmland network fluctuations exceed the preset network jitter threshold, or when there are asynchronous deviations in collected data, image degradation, or sensor drift, the former method is highly dependent on network connectivity, while the latter method has lower accuracy in disease diagnosis and lower adaptability to control strategies. Therefore, the crop disease control systems in related technologies struggle to balance diagnostic reliability and offline control security. Summary of the Invention
[0005] The purpose of this invention is to provide a knowledge graph-based recommendation system for disease prevention and control in food crops, addressing the technical problem that existing technologies struggle to balance disease diagnosis accuracy and offline control security under complex environments such as network fluctuations, asynchronous data deviations, or sensor drift. To solve the above problems, the technical solution of this invention includes:
[0006] The knowledge graph-based recommendation system for disease prevention and control of grain crops includes edge control nodes, cloud processing nodes, data acquisition modules, time synchronization and quality screening modules, network reporting modules, disease diagnosis modules, prevention and control strategy generation modules, edge judgment modules, and control output modules.
[0007] The data acquisition module is used to collect farmland environmental data and network status data;
[0008] The time synchronization and quality screening module is used to perform time alignment and quality screening on the collected data, and output crop phenotypic data, micro-meteorological data, network data and their corresponding validity identifiers.
[0009] The network reporting module is used to upload filtered data to the cloud processing node or to save data at the edge control node.
[0010] The disease diagnosis module and the prevention and control strategy generation module are set on the cloud processing node. They are used to determine the diseases to be diagnosed and the prevention and control plan based on the agricultural disease association database, and generate prevention and control execution rules that include the rule version and the effective time period.
[0011] The edge detection module is used to compare the rule version with the locally stored rule version identifier. If they match and are within the effective time period, the prevention and control action is determined based on the preset sampling period or micro-meteorological data. If they do not match, the execution is stopped and an update is prompted.
[0012] The control output module is used to output control signals to the execution device and record the execution results.
[0013] Preferably, the data acquisition module includes an image acquisition device, a soil moisture sensor, a wind speed sensor, an air temperature and humidity sensor, a leaf condensation sensor, a canopy temperature measurement device, a rainfall probability data interface, and a network status detection interface.
[0014] Preferably, the prevention and control execution rules include candidate actions, action conditions, execution sequence, equipment type, control parameter template, alternative actions, rule version, effective time, effective period, and re-judgment interval; the execution equipment includes spraying equipment, ventilation equipment, irrigation equipment, status feedback unit, and input interface.
[0015] Preferably, the time synchronization and quality screening module is used to: establish a 500ms sampling time period with the current time as the reference time; select the sampling value that is closest to the reference time within the sampling time period for each type of data of each acquisition device; compare the absolute time difference between the sampling time and the reference time with the allowable time deviation threshold stored by data category in the preset configuration table stored locally at the edge end, and determine that it has time validity when it is not greater than the corresponding threshold.
[0016] The effective crop region is determined by a crop region segmentation model or a preset crop region identification rule. The crop region segmentation model adopts a convolutional neural network with an encoder and decoder structure and is obtained by training on a pre-labeled dataset of healthy and diseased crop images. The preset crop region identification rule refers to the rule for image binarization segmentation based on a preset HSV color feature space threshold.
[0017] Feature extraction is performed on the effective area of the crop to determine the lesion area; the ratio of the number of pixels in the lesion area to the number of pixels in the effective area of the crop is determined as the lesion area ratio; in the HSV color space, the color distance between the current color feature vector of the effective area of the crop and the color reference vector of the healthy crop obtained from the pre-labeled healthy crop image is determined as the color offset.
[0018] The effective area ratio of an image is determined by the ratio of the number of effective pixels to the total number of pixels in the image; the proportion of lesion area, color offset, and effective area ratio are used as crop phenotypic data; wind speed, soil volumetric moisture content, leaf dew thickness, canopy temperature, air temperature, relative humidity, and rainfall probability are used as micrometeorological data; and network signal strength, packet loss rate, uplink bandwidth, and round-trip latency are used as network data.
[0019] Preferably, the time synchronization and quality screening module performs quality screening on crop images by: acquiring the original crop image and converting it into a grayscale image; calculating the statistical variance of the pixel neighborhood based on the grayscale image as the image pixel texture feature, and determining the local texture intensity based on the image pixel texture feature;
[0020] Pixels whose brightness values within the effective crop region are between the lower and upper brightness limits and whose local texture intensity is not less than the lower texture limit are identified as effective image pixels; a pre-labeled qualified crop image is obtained, and the lower and upper brightness limits are determined based on the brightness distribution of the qualified crop image, and the lower texture limit is determined based on the texture intensity distribution of the qualified crop image.
[0021] The effective region ratio of an image is determined based on the ratio of the number of effective pixels to the total number of pixels in the image. When the effective region ratio is not less than a preset effective region ratio threshold, the corresponding image is determined as an effective image that can be used for disease diagnosis. The preset effective region ratio threshold is between 0.45 and 0.60.
[0022] Preferably, the time synchronization and quality screening module performs quality screening on micrometeorological data by: for each environmental sampling quantity, obtaining historical sampling values that have been filtered as valid by the time synchronization and quality screening module within a preset time period before the reference time, calculating the median as the median reference value; calculating the deviation between the current sampling value and the median reference value, and comparing it with the drift limit of the corresponding environmental sampling quantity;
[0023] When the deviation is greater than the drift limit, the current collected value is cancelled from participating in the determination of prevention and control actions; when the deviation is not greater than the drift limit of the corresponding environmental collected value, the current collected value is retained to participate in the determination of prevention and control actions; wind speed, soil volumetric moisture content, leaf dew thickness, canopy temperature, air temperature and air relative humidity are respectively configured with corresponding drift limits;
[0024] When the data collected in the same environment is invalid for a preset number of consecutive times, the system prioritizes reading the time-valid and quality-valid data collected by adjacent data collection devices of the same type located in the same area and at a distance not greater than a preset distance from the current data collection device. The same area is determined based on the area identifier, geofence, or device deployment area. If the data collected does not exist, the system reads the most recent historical valid value and sets a replacement identifier for the replacement data.
[0025] Preferably, the network reporting module is used to: determine network availability based on uplink bandwidth, packet loss rate, network signal strength, round-trip time, and their preset weights; and determine the upload validity level based on the validity of crop phenotypic data, the validity of micro-meteorological data, and network availability, wherein the upload validity level includes high priority, medium priority, and low priority.
[0026] The validity of crop phenotypic data and micrometeorological data is determined by whether the key data in the corresponding category meets the preset number of valid data. When both crop phenotypic data and micrometeorological data are valid and the network availability is not less than 0.7, they are determined to be of high priority. When at least one type of data is valid and the network availability is not less than 0.5, they are determined to be of medium priority. The rest are determined to be of low priority.
[0027] When the uplink bandwidth is greater than 128kbps, the packet loss rate is less than 5%, and the network availability is not less than 0.7, data is uploaded in high, medium, and low priority order; otherwise, the data is saved, and local judgment is only made when the rule version at the edge is consistent with the rule version identifier of the current crop type, growth period, and plot and is within the effective time period; if no effective rule exists, a manual inspection prompt is output and the data to be uploaded is saved.
[0028] Preferably, the disease diagnosis module and the control strategy generation module are used to: determine the diseases to be diagnosed in the agricultural disease association database based on crop type, growth period, crop phenotypic data and micro-meteorological data; and retrieve information on pesticides, control actions, environmental constraints, implementation equipment, regulatory restrictions and prohibitions and historical effects associated with each disease to be diagnosed.
[0029] The agricultural disease association database includes disease nodes, pesticide nodes, equipment nodes, environmental constraint nodes, and historical effect nodes and their associated edges; prohibited schemes are removed according to regulatory prohibition and restriction information; the control effect level is determined according to the preset interval of the historical control success rate; the safety level is determined according to the preset safety level corresponding to the pesticide safety level and the equipment safety status; and the on-site feasibility is determined according to the preset implementation level corresponding to the equipment availability status, on-site environmental constraints, and personnel accessibility.
[0030] Resource consumption parameters are determined by at least one of the following technical indicators: pesticide consumption, equipment operation duration, and personnel workload. Based on the prevention and control effect, safety level, on-site feasibility, and comprehensive resource consumption parameters, the prevention and control schemes that have not been eliminated are ranked to obtain candidate prevention and control schemes. From these schemes, prevention and control actions, prohibition conditions, execution equipment, and control parameters are extracted to generate prevention and control execution rules.
[0031] Preferably, the prevention and control strategy generation module converts the candidate prevention and control scheme into prevention and control execution rules by: determining wind speed not exceeding the wind speed limit as wind speed condition, determining leaf surface condensation thickness not exceeding the leaf surface condensation limit as leaf surface condensation condition, and determining rainfall probability not exceeding the rainfall probability limit as rainfall condition;
[0032] Configure wind speed limits, leaf condensation limits, rainfall probability limits, equipment availability conditions, effective time periods, and re-judgment intervals for each prevention and control action; determine that the prevention and control action can be executed when all action conditions are met; determine the delayed spraying, ventilation, or manual inspection actions to be executed when the candidate actions do not meet the action conditions as alternative actions, and configure appropriate waiting time or control parameters for the alternative actions.
[0033] Compared with the prior art, the present invention has the following beneficial effects:
[0034] In the above scheme, the edge control node is combined with the cloud processing node. The data acquisition module collects crop images, soil moisture, wind speed, air temperature and humidity, leaf dew, canopy temperature, rainfall probability and network status data. The time synchronization and quality screening module performs time alignment on multi-source asynchronous data and filters out image degradation and sensor drift. The network reporting module selects to upload or save at the edge based on network availability. The cloud disease diagnosis module and prevention and control strategy generation module generate prevention and control execution rules based on the agricultural disease association database, which include action conditions, alternative actions, rule versions, effective time periods and re-judgment intervals. The edge judgment module makes a judgment based on local real-time micro-meteorological data when the versions are consistent and within the effective time period. The control output module then outputs spraying, ventilation or irrigation control signals.
[0035] This solution is particularly suitable for applications where farmland network fluctuations exceed the preset network jitter threshold, data acquisition is prone to asynchronous deviations, image degradation, or sensor drift. It has the advantages of balancing the reliability of disease diagnosis with the security of offline control and avoiding erroneous prevention and control actions caused by network anomalies or distorted data. Attached Figure Description
[0036] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. The drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0037] Figure 1 This is a flowchart of a knowledge graph-based crop pest control recommendation system provided in an embodiment of the present invention. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0039] Please see the appendix Figure 1 The knowledge graph-based crop disease prevention and control recommendation system includes edge control nodes, cloud processing nodes, a data acquisition module, a time synchronization and quality screening module, a network reporting module, a disease diagnosis module, a prevention and control strategy generation module, an edge judgment module, and a control output module; the data acquisition module is used to collect farmland environmental data and network status data.
[0040] The time synchronization and quality screening module is used to perform time alignment and quality screening on the collected data, and output crop phenotypic data, micro-meteorological data, network data and their corresponding validity indicators.
[0041] The network reporting module is used to upload filtered data to cloud processing nodes or to save data at edge control nodes.
[0042] The disease diagnosis module and the prevention and control strategy generation module are set up on the cloud processing node. They are used to determine the diseases to be diagnosed and the prevention and control plan based on the agricultural disease association database, and generate prevention and control execution rules that include the rule version and the effective period.
[0043] The edge detection module compares the rule version with the locally stored rule version identifier. If they match and are within the valid time period, the prevention and control action is determined based on the preset sampling period or micro-meteorological data. If they do not match, the execution is stopped and an update is prompted.
[0044] The control output module is used to output control signals to the execution device and record the execution results;
[0045] The data acquisition module includes an image acquisition device, a soil moisture sensor, a wind speed sensor, an air temperature and humidity sensor, a leaf condensation sensor, a canopy temperature measurement device, a rainfall probability data interface, and a network status detection interface; the prevention and control execution rules include candidate actions, action conditions, execution sequence, equipment type, control parameter templates, alternative actions, rule version, effective time, effective period, and re-judgment interval; the execution equipment includes spraying equipment, ventilation equipment, irrigation equipment, a status feedback unit, and input interfaces.
[0046] In this embodiment, the system constructs a collaborative architecture that combines cloud-based overall inference with edge-based local control; the edge collects multi-source farmland data and performs strict time alignment and degradation elimination to output high-confidence feature data; the cloud performs comprehensive diagnosis based on an agricultural disease association database, and decomposes and maps text-based prevention and control suggestions into conditional judgment tree logic that includes sensor-specific environmental limits, equipment start-up and shutdown parameters, and execution action flows, thereby reducing the complexity of prevention and control schemes into execution rules with specific physical constraints and sending them to the edge.
[0047] Ultimately, the edge device can autonomously output control commands by matching local real-time micro-meteorological data with rule conditions without needing a continuous network connection. This architecture solves the problem of traditional agricultural IoT devices relying too much on the cloud and causing erroneous prevention actions when the network fluctuates or the data is distorted from a mechanistic perspective.
[0048] The time synchronization and quality screening module is used to: establish a 500ms sampling time period with the current time as the reference time; select the sampling value that is closest to the reference time within the sampling time period for each type of data from each acquisition device; compare the absolute time difference between the sampling time and the reference time with the allowable time deviation threshold stored by data category in the preset configuration table stored locally at the edge end, and determine that it has time validity if it is not greater than the corresponding threshold.
[0049] The effective crop region is determined by a crop region segmentation model or a preset crop region recognition rule. The crop region segmentation model uses a convolutional neural network with an encoder and decoder structure and is trained on a pre-labeled dataset of healthy and diseased crop images. The preset crop region recognition rule refers to the rule for image binarization segmentation based on a preset HSV color feature space threshold.
[0050] Feature extraction is performed on the effective area of the crop to determine the lesion area; the ratio of the number of pixels in the lesion area to the number of pixels in the effective area of the crop is determined as the lesion area percentage; in the HSV color space, the color distance between the current color feature vector of the effective area of the crop and the color reference vector of the healthy crop obtained from the pre-labeled healthy crop image is determined as the color offset.
[0051] The effective area ratio of an image is determined by the ratio of the number of effective pixels to the total number of pixels in the image; the proportion of lesion area, color shift, and effective area ratio are used as crop phenotypic data; wind speed, soil volumetric moisture content, leaf dew thickness, canopy temperature, air temperature, relative humidity, and rainfall probability are used as micrometeorological data; network signal strength, packet loss rate, uplink bandwidth, and round-trip latency are used as network data.
[0052] In this embodiment, for the processing of multi-source asynchronous data, data from the image acquisition device and various environmental sensors are acquired. Based on the current reference time, the acquired data is aligned within a 500ms sampling period to determine the sampling value closest to the reference time.
[0053] Among them, time alignment is used to solve the problem of data phase deviation caused by transmission delay and asynchronous clock of multiple acquisition devices; since the farmland environment system has both global slow variation and local transient, the response time constants of various physical quantities are not on the same order of magnitude; for example, wind speed has high-frequency pulsation characteristics, while soil moisture exhibits slow-changing thermodynamic inertia; due to wireless link jitter, there is a millisecond-level misalignment in data arrival time;
[0054] Unlike traditional techniques that easily combine misaligned and distorted data from different real physical moments, this system establishes a strict 500ms time window and configures heterogeneous allowable time deviation thresholds: for fast variables such as wind speed, the threshold is strictly limited to within 250ms to prevent the real transient from being smoothed; for slow variables such as soil moisture content, the threshold is relaxed to their corresponding update cycle, such as ten minutes, so that low-frequency physical quantities can be naturally extended to the current cross-section; thus avoiding temporal tearing caused by homogeneous alignment.
[0055] Furthermore, when extracting crop phenotypic data, the soil environment background in the image is separated by hard boundaries defined by H channels (35 to 85) and S channels (not less than 43). When calculating color shift, to eliminate the dimensional topological conflict between the H channel (as a ring angle) and the S channel (as a linear proportion), the system divides the short path angle difference of the H component by the maximum theoretical angle difference of 180 degrees and divides the S component difference by its full scale, completing the dimensionless processing before calculating the weighted Euclidean distance. When, for example, the color shift of wheat canopy is measured as a single factor rejection and the lesion area accounts for 15%, an intuitive quantitative feature is formed, providing rigorous physical dimension support for diagnosis.
[0056] The time synchronization and quality screening module performs quality screening on crop images by: acquiring the original crop image and converting it into a grayscale image; calculating the statistical variance of the pixel neighborhood based on the grayscale image as the image pixel texture feature, and determining the local texture intensity based on the image pixel texture feature; and determining the effective pixels of the image as valid pixels in the crop effective area whose brightness value is between the lower limit and the upper limit of brightness and whose local texture intensity is not less than the lower limit of texture.
[0057] Obtain pre-labeled qualified crop images, determine the lower and upper limits of brightness based on the brightness distribution of the qualified crop images, and determine the lower limit of texture based on the texture intensity distribution of the qualified crop images; determine the proportion of the effective area of the image based on the ratio of the number of effective pixels to the total number of pixels in the image; when the proportion of the effective area of the image is not less than the preset effective area proportion threshold, the corresponding image is determined as an effective image that can be used for disease diagnosis, and the preset effective area proportion threshold is 0.45 to 0.60;
[0058] In this embodiment, during the image quality screening stage, the original crop image is acquired and converted into a grayscale image, and the brightness value of each pixel is read. For edge pixels of the image, the system uses a symmetrical mirror filling mechanism to complete the neighborhood boundary, calculates the statistical variance of the brightness value of each pixel in the 5×5 physical perception neighborhood centered on the current pixel, and directly uses this variance value as the local texture intensity, thereby avoiding dependence on the external recognition framework. The effective area ratio of the image is calculated to determine whether the image can be used for disease diagnosis.
[0059] Among them, the effective area ratio of the image refers to the proportion of pixels in the image that do not have the true crop phenotypic appearance destroyed by external interference factors. For example, when the lens is blocked by environmental impurities, the grayscale of pixels in the area tends to be uniform, resulting in a sharp drop in local texture intensity. Or, the brightness value of the area under strong light, backlight and overexposure exceeds the upper limit. These are all invalid pixels that should be removed. The system directly sends all the acquired images into the recognition model. Conventional techniques are easily overwhelmed by noise such as large areas of light spots or mud in the image, causing the cloud model to misjudge.
[0060] This implementation extracts the upper and lower limits of brightness and the lower limit of texture, adaptively adjusts and filters out the effective pixels of the image whose brightness is in a reasonable range and whose texture intensity has not been reduced by dimensionality. The specific acquisition mapping logic of the upper and lower limits of brightness and the lower limit of texture is as follows: the background statistically analyzes the mean and standard deviation of pixel brightness of a large number of qualified crop sample images that are pre-labeled, and sets the mean value minus twice the standard deviation as the lower limit of brightness, and the mean value plus twice the standard deviation as the upper limit of brightness.
[0061] Simultaneously, the local texture intensity distribution of the sample set is statistically analyzed, and the 5th percentile of its distribution is set as the lower limit of texture, thereby configuring a statistical indicator with clear boundary determination. Only when the proportion of the effective region of the image composed of these effective pixels reaches a preset threshold, such as 0.45 to 0.60, is it allowed to enter the subsequent stage, thereby suppressing degraded images. Thus, high-quality sample screening can be achieved based on clear underlying statistical features, avoiding invalid images from occupying uplink bandwidth and causing misdiagnosis.
[0062] The time synchronization and quality screening module performs quality screening on micro-meteorological data, including: for each environmental sampling quantity, obtaining the historical sampling values that have been filtered as valid by the time synchronization and quality screening module within a preset time period before the reference time, calculating the median as the median reference value; calculating the deviation between the current sampling value and the median reference value, and comparing it with the drift limit of the corresponding environmental sampling quantity.
[0063] When the deviation is greater than the drift limit, the current collected value is cancelled from the determination of prevention and control actions; when the deviation is not greater than the drift limit of the corresponding environmental collected value, the current collected value is retained from the determination of prevention and control actions; wind speed, soil volumetric moisture content, leaf dew thickness, canopy temperature, air temperature and air relative humidity are respectively configured with corresponding drift limits;
[0064] When the same environmental data collection is invalid for a preset number of consecutive times, the time-valid and quality-valid collection values of adjacent collection devices of the same type located in the same plot and not more than the preset distance from the current collection device are read first. The same plot is determined based on the plot identifier, geofence, or device deployment area. If no collection value is found, the most recent historical valid value is read and a replacement identifier is set for the replacement data.
[0065] In this embodiment, during the micrometeorological data quality screening stage, the current environmental data collection is obtained, the median reference value is calculated based on the historical valid collection values, and the deviation of the current collection value is compared. The system applies a single long baseline smoothing to all variables indiscriminately. Based on the difference between the response time of farmland fluid dynamics and thermodynamics, this system physically degrades the drift limits and anomaly filtering logic of different environmental parameters.
[0066] For slowly changing physical quantities such as soil moisture content and air temperature, which have high heat capacity and large damping, the preset time is set to 5 minutes before the reference time to establish a median reference value. The drift limit is three times the standard deviation of the historical steady-state data to accurately filter out false high-frequency jumps such as direct sunlight or line crosstalk. However, for rapidly changing physical quantities such as wind speed, which have high-frequency pulsation and gust characteristics, if the median reference value of the first 5 minutes is forcibly used for comparison, the real gust peak value will trigger the drift judgment and be incorrectly rejected.
[0067] Therefore, the system sets a large drift limit for fast variables such as wind speed through a preset configuration table, which can accommodate extreme gust values. This limit is directly anchored to the upper limit of the sensor's physical range and extreme weather values, avoiding the filtering mechanism from smoothing out the real transient danger signals. Only when the deviation exceeds this exclusive drift limit is it determined to be a failure and the current collection value is canceled.
[0068] When the same data collection rate is abnormal for more than a preset number of times, such as 3 times, the system activates the spatial redundancy mechanism and calls the effective value of the adjacent device of the same type to replace it. This strategy not only purifies the slowly changing environmental noise, but also establishes a safe link for the transmission of rapidly changing transient physical quantities to the control logic, avoiding the control link system defects caused by excessive filtering that may lead to the system accidentally triggering spraying operations under severe gusts of wind.
[0069] The network reporting module is used to: determine network availability based on uplink bandwidth, packet loss rate, network signal strength, round-trip time, and their preset weights; and determine the upload validity level based on the validity of crop phenotypic data, the validity of micro-meteorological data, and network availability. The upload validity level includes high priority, medium priority, and low priority.
[0070] The validity of crop phenotypic data and micrometeorological data is determined by whether the key data in the corresponding category meets the preset number of valid data. When both crop phenotypic data and micrometeorological data are valid and the network availability is not less than 0.7, they are determined to be of high priority. When at least one type of data is valid and the network availability is not less than 0.5, they are determined to be of medium priority. The rest are determined to be of low priority.
[0071] When the uplink bandwidth is greater than 128kbps, the packet loss rate is less than 5%, and the network availability is not less than 0.7, data is uploaded in high, medium, and low priority order; otherwise, the data is saved, and local judgment is only made when the rule version at the edge is consistent with the rule version identifier of the current crop type, growth period, and plot and is within the effective time period; if no effective rule exists, a manual inspection prompt is output and the data to be uploaded is saved.
[0072] In this embodiment, for data interaction in a weak network environment in farmland, network data such as uplink bandwidth, packet loss rate, network signal strength and round-trip latency are obtained, as well as the validity of each data category. Based on the preset network availability calculation logic, the current communication status is quantitatively evaluated to determine the data upload validity level and reporting strategy.
[0073] Among them, network availability refers to the physical capacity of the current wireless link to carry valid service data. For example, when base station congestion causes the packet loss rate to suddenly rise to 10%, network availability will drop significantly. The method of handling IoT devices continuing to retransmit when disconnected or in a weak network is implemented by dynamically balancing network quality and data performance. Data is uploaded only when network conditions permit, otherwise the data is saved and transferred to the edge for local judgment.
[0074] Therefore, a smooth switching of edge-cloud collaboration can be achieved based on the network adaptive evaluation mechanism, avoiding invalid retransmissions and reducing communication blockage and service interruption; the quantitative evaluation process of network availability adopts a multi-index weighted scoring mechanism; in application practice, the normalization process adopts a linear proportional mapping, specifically: the measured uplink bandwidth and network signal strength are divided by the preset maximum ideal bandwidth, such as 2Mbps, and the benchmark ideal signal strength, respectively, and the ratio is limited to the [0,1] interval to configure positive weights, such as 0.3 for each;
[0075] Meanwhile, the measured packet loss rate and round-trip latency are divided by the maximum tolerable packet loss rate allowed by the system, such as 20%, and the maximum tolerable latency, such as 1000ms, respectively. The ratio is limited to the range [0,1] to configure negative weights, such as 0.2 for each. The base score is fixed at 0.5. The current network availability is equal to the base score plus the sum of the products of the normalized positive index value and the corresponding positive weight, and then minus the sum of the products of the normalized negative index value and the corresponding negative weight.
[0076] For example, when the measured uplink bandwidth reaches 1.6 Mbps (normalized to 0.8), the network signal strength meets the standard (normalized to 1.0), the measured packet loss rate is only 2% (normalized to 0.1), and the round-trip latency is 200 ms (normalized to 0.2), the calculated availability is:
[0077]
[0078] Meeting a threshold requirement of at least 0.7 triggers high-priority uploads; however, if sudden heavy rainfall causes wireless signal attenuation, the normalization drops to 0.3, uplink bandwidth drops to 0.4Mbps (normalization to 0.2), packet loss rate surges to 18% (normalization to 0.9), round-trip latency reaches 900ms (normalization to 0.9), and computational availability decreases to [missing value].
[0079]
[0080] The system determines that the threshold condition of 0.5 is not met, actively blocks invalid uploads and data saving, and seamlessly transfers the process to the local judgment process at the edge.
[0081] The disease diagnosis module and the control strategy generation module are used to: identify potential diseases in the agricultural disease association database based on crop type, growth stage, crop phenotypic data, and micro-meteorological data; and retrieve information on pesticides, control actions, environmental constraints, implementation equipment, regulatory restrictions, and historical effects associated with each potential disease. The agricultural disease association database includes disease nodes, pesticide nodes, equipment nodes, environmental constraint nodes, and historical effect nodes, as well as their associated edges.
[0082] The prohibited schemes are eliminated according to the information on prohibited and restricted use in accordance with regulatory standards; the level of prevention and control effect is determined according to the preset range of historical prevention and control success rate; the level of safety is determined according to the preset safety level corresponding to the safety level of the agent and the safety status of the equipment; and the degree of on-site implementation is determined according to the preset implementation level corresponding to the equipment availability status, on-site environmental constraints and personnel accessibility. The resource consumption parameters are determined by at least one of the following technical indicators: agent consumption, equipment operation duration and personnel workload.
[0083] Based on the prevention and control effectiveness, safety level, on-site feasibility and comprehensive resource consumption parameters, the prevention and control schemes that have not been eliminated are ranked to obtain the candidate prevention and control schemes. From these schemes, the prevention and control actions, prohibition conditions, execution equipment and control parameters are extracted to generate prevention and control execution rules.
[0084] In this embodiment, in order to generate cloud-based prevention and control strategies, high-confidence phenotypes and meteorological data reported from the edge are obtained; in the disease diagnosis stage, the system maps the phenotypes and meteorological data to disease condition attribute constraints and determines whether they fall within the numerical triggering range.
[0085] Since the mechanisms of biological diseases often involve irreplaceable triggering conditions rather than simple linear probabilities, the system introduces logical constraint features at the bottom layer of the knowledge graph, that is, dividing the triggering conditions into necessary conditions and auxiliary conditions; when determining a susceptible disease, it prioritizes comparing the necessary disease-causing condition nodes connected to it. If any necessary condition, such as the lower limit of temperature and humidity required for a disease, is not met, the comprehensive matching confidence of the disease is directly reduced to zero.
[0086] Only when the necessary conditions are met are the basic weights corresponding to the auxiliary condition nodes that satisfy the trigger interval extracted, weighted and calculated, and divided by the sum of the basic weights of all disease occurrence conditions to obtain a comprehensive confidence level of 0 to 1; this logical correction eliminates the logical conflict of secondary conditions stacking triggering core diseases in traditional weight accumulation; the retained control schemes are subjected to rigorous dimensional quantitative evaluation; the control effect level adopts a segmented threshold method:
[0087] When the historical success rate is below 50%, the score is mapped to the lowest level score; between 50% and 80%, a proportional score is obtained by linear interpolation; and above 80%, a high-level score is configured with logarithmic smoothing. The safety level is extracted by addressing the drug-device safety matrix in the form of a two-dimensional tensor. The horizontal axis is the drug toxicity indicator, i.e., level 1 to 4, and the vertical axis is the device safety isolation level. The cross value in the matrix is the absolute safety score.
[0088] The feasibility assessment assigns Boolean values to each environmental constraint, such as whether the power margin for equipment availability exceeds limits or whether the access road for personnel accessibility is passable due to water accumulation. The calculation is based on the ratio of the number of true Boolean values that pass the constraint to the total number of constraints. To eliminate the anomaly of a zero denominator in division operations, a minimal positive real number is introduced into the resource consumption score calculation. The specific calculation formula is as follows:
[0089]
[0090] And when the result is greater than 100, it is taken as 100; among which, It is a minimal positive real number, and It has the same parameter dimensions as the estimated resource consumption of the current scheme; the historical average minimum cost is the average minimum operating cost of this type of operation in the agricultural disease association database; the estimated cost of the current scheme is the specific execution cost estimated by the current candidate prevention and control scheme; the corresponding weights of prevention and control effect, safety level, field feasibility and operating cost are configured, such as 0.4, 0.3, 0.2 and 0.1, and a weighted sum is performed. For example, heavy equipment has excellent theoretical prevention and control effect, but is limited by the current high soil moisture content and muddy conditions, which sharply reduces the true value ratio of its field feasibility and lowers the overall ranking; the system then selects and extracts the control parameters of the ranked scheme and issues execution rules, realizing safety error prevention control decision based on multi-dimensional technical feature constraints.
[0091] The prevention and control strategy generation module converts the candidate prevention and control schemes into prevention and control execution rules, including: determining wind speed not exceeding the wind speed limit as the wind speed condition, determining leaf surface condensation thickness not exceeding the leaf surface condensation limit as the leaf surface condensation condition, and determining rainfall probability not exceeding the rainfall probability limit as the rainfall condition.
[0092] Configure wind speed limits, leaf condensation limits, rainfall probability limits, equipment availability conditions, effective time periods, and re-judgment intervals for each prevention and control action; determine that the prevention and control action can be executed when all action conditions are met; determine the delayed spraying, ventilation, or manual inspection actions to be executed when the candidate actions do not meet the action conditions as alternative actions, and configure appropriate waiting time or control parameters for the alternative actions.
[0093] In this embodiment, for the triggering of specific control commands at the edge, the prevention and control execution rules issued by the cloud are obtained. Based on the micro-meteorological data collected in real time at the edge, the execution conditions of each prevention and control action are strictly compared to determine the final control action.
[0094] Among them, the action conditions refer to the transformation of cloud-based safety recommendations into physical boundaries that can be directly measured by on-site sensors. For example, the wind speed limit for regular spraying operations is set to 3.0 m / s, and the rainfall probability limit is set to 15%. The system forcibly issues spraying instructions when there is a sudden strong wind on-site without monitoring. This implementation method forcibly binds physical quantities such as wind speed and leaf condensation with action conditions to suppress high-risk operations.
[0095] When any condition is not met, the system will not force the operation, but will trigger the abnormal degradation branch of the local state machine and adaptively adjust to execute the alternative action. For delayed spraying, the waiting time is not a static fixed value, but is dynamically calculated based on the current out-of-bounds physical quantity, such as the difference between the current wind speed and the wind speed limit, and the linear decay slope of the physical quantity over the past 5 sampling periods, until the out-of-bounds physical quantity falls back to the limit at the time of calculation.
[0096] If the estimated waiting time exceeds the valid time period configured by the rules, the state machine will flip to be non-executable and output a manual inspection action as the final alternative action; for alternative actions such as turning on ventilation, control parameters such as pulse width modulation signals will be directly output to the equipment; thus, safe local control can be achieved based on a strict environmental condition protection mechanism and dynamic time axis approximation prediction, avoiding pesticide damage or environmental pollution caused by blind operation.
[0097] To further clarify the actual execution process of this system, we take a prevention and control recommendation system deployed in a remote wheat field as an example; at the start of a new processing cycle, the edge data acquisition module acquires wheat canopy images and temperature, humidity, and wind speed data;
[0098] At this time, the image acquisition device was partially obscured by dew. The time synchronization and quality screening module calculated that the effective area of the image accounted for only 0.3%, which was lower than the threshold of 0.45. The image was then deemed invalid and removed to prevent invalid data from being uploaded.
[0099] Meanwhile, the network status detection interface detected that the network was in a weak state with a packet loss rate of 8%. The network reporting module stopped uploading data and switched to local control judgment. The edge judgment module read the latest wheat rust prevention and control execution rules cached locally. The rule included a candidate action to start drone spraying. The system read the wind speed sensor data in real time and determined that the current wind speed was 5 m / s, which was greater than the wind speed limit of 3 m / s configured in the rule.
[0100] Since the action conditions were not met, the system stopped executing the spraying action and instead executed the alternative action configured in the rules to delay spraying and prompt manual inspection; the control output module recorded the reason for the failure to execute the spraying and the current wind speed data, and fed the execution result back to the cloud after the network was restored; the whole process realized the complete execution flow from data cleaning, condition judgment to safety control under the condition of no network connection.
[0101] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A knowledge graph-based recommendation system for pest control in food crops, characterized in that, It includes edge control nodes, cloud processing nodes, data acquisition modules, time synchronization and quality screening modules, network reporting modules, disease diagnosis modules, prevention and control strategy generation modules, edge judgment modules, and control output modules; The data acquisition module is used to collect farmland environmental data and network status data; The time synchronization and quality screening module is used to perform time alignment and quality screening on the collected data, and output crop phenotypic data, micro-meteorological data, network data and their corresponding validity identifiers. The network reporting module is used to upload filtered data to the cloud processing node or to save data at the edge control node. The disease diagnosis module and the prevention and control strategy generation module are set on the cloud processing node. They are used to determine the diseases to be diagnosed and the prevention and control plan based on the agricultural disease association database, and generate prevention and control execution rules that include the rule version and the effective time period. The edge detection module is used to compare the rule version with the locally stored rule version identifier. If they match and are within the effective time period, the prevention and control action is determined based on the preset sampling period or micro-meteorological data. If they do not match, the execution is stopped and an update is prompted. The control output module is used to output control signals to the execution device and record the execution results.
2. The system according to claim 1, characterized in that, The data acquisition module includes an image acquisition device, a soil moisture sensor, a wind speed sensor, an air temperature and humidity sensor, a leaf condensation sensor, a canopy temperature measurement device, a rainfall probability data interface, and a network status detection interface.
3. The system according to claim 1, characterized in that, The prevention and control execution rules include candidate actions, action conditions, execution sequence, equipment type, control parameter template, alternative actions, rule version, effective time, effective period, and re-judgment interval; the execution equipment includes spraying equipment, ventilation equipment, irrigation equipment, status feedback unit, and input interface.
4. The system according to claim 1, characterized in that, The time synchronization and quality screening module is used to: establish a 500ms sampling time period with the current time as the reference time; select the sampling value that is closest to the reference time within the sampling time period for each type of data of each acquisition device; compare the absolute time difference between the sampling time and the reference time with the allowable time deviation threshold stored by data category in the preset configuration table stored locally at the edge end; and determine that the time is valid if it is not greater than the corresponding threshold. The effective crop region is determined by a crop region segmentation model or a preset crop region identification rule. The crop region segmentation model uses a convolutional neural network with an encoder and decoder structure and is trained on a pre-labeled dataset of healthy and diseased crop images. The preset crop region identification rule refers to the rule for image binarization segmentation based on a preset HSV color feature space threshold. Feature extraction is performed on the effective crop region to determine the lesion region. The ratio of the number of pixels in the lesion area to the number of pixels in the effective crop area is determined as the lesion area percentage; in the HSV color space, the color distance between the current color feature vector of the effective crop area and the color reference vector of the healthy crop obtained from the pre-labeled healthy crop image is determined as the color offset; the effective area percentage of the image is determined according to the ratio of the number of effective pixels to the total number of pixels in the image. The percentage of lesion area, color shift, and effective area of the image were used as crop phenotypic data; wind speed, soil volumetric water content, leaf dew thickness, canopy temperature, air temperature, relative humidity, and rainfall probability were used as micrometeorological data. Network signal strength, packet loss rate, uplink bandwidth, and round-trip latency are used as network data.
5. The system according to claim 2, characterized in that, The time synchronization and quality screening module performs quality screening on crop images by: acquiring the original crop image and converting it into a grayscale image; calculating the statistical variance of the pixel neighborhood based on the grayscale image as the image pixel texture feature, and determining the local texture intensity based on the image pixel texture feature; Pixels whose brightness values within the effective crop region are between the lower and upper brightness limits and whose local texture intensity is not less than the lower texture limit are identified as effective image pixels; a pre-labeled qualified crop image is obtained, and the lower and upper brightness limits are determined based on the brightness distribution of the qualified crop image, and the lower texture limit is determined based on the texture intensity distribution of the qualified crop image. The effective region ratio of an image is determined based on the ratio of the number of effective pixels to the total number of pixels in the image. When the effective region ratio is not less than a preset effective region ratio threshold, the corresponding image is determined as an effective image that can be used for disease diagnosis. The preset effective region ratio threshold is between 0.45 and 0.
60.
6. The system according to claim 2, characterized in that, The time synchronization and quality screening module performs quality screening on micrometeorological data as follows: for each environmental sampling quantity, obtain the historical sampling values that have been filtered as valid by the time synchronization and quality screening module within a preset time period before the reference time, calculate the median as the median reference value; calculate the deviation between the current sampling value and the median reference value, and compare it with the drift limit of the corresponding environmental sampling quantity. When the deviation is greater than the drift limit, the current collected value is cancelled from participating in the determination of prevention and control actions; when the deviation is not greater than the drift limit of the corresponding environmental collected value, the current collected value is retained to participate in the determination of prevention and control actions; wind speed, soil volumetric moisture content, leaf dew thickness, canopy temperature, air temperature and air relative humidity are respectively configured with corresponding drift limits; When the data collected in the same environment is invalid for a preset number of consecutive times, the system prioritizes reading the time-valid and quality-valid data collected by adjacent data collection devices of the same type located in the same area and at a distance not greater than a preset distance from the current data collection device. The same area is determined based on the area identifier, geofence, or device deployment area. If the data collected does not exist, the system reads the most recent historical valid value and sets a replacement identifier for the replacement data.
7. The system according to claim 1, characterized in that, The network reporting module is used to: determine network availability based on uplink bandwidth, packet loss rate, network signal strength, round-trip time, and their preset weights; and determine the upload validity level based on the validity of crop phenotypic data, the validity of micro-meteorological data, and network availability, with upload validity levels including high priority, medium priority, and low priority. The validity of crop phenotypic data and micrometeorological data is determined by whether the key data in the corresponding category meets the preset number of valid data. When both crop phenotypic data and micrometeorological data are valid and the network availability is not less than 0.7, they are determined to be of high priority. When at least one type of data is valid and the network availability is not less than 0.5, they are determined to be of medium priority. The rest are determined to be of low priority. When the uplink bandwidth is greater than 128kbps, the packet loss rate is less than 5%, and the network availability is not less than 0.7, data is uploaded in the order of high, medium, and low priority. Otherwise, save the data and only make a local judgment when the rule version is saved at the edge and is consistent with the rule version identifier of the current crop type, growth period and plot and is within the effective period; if no effective rule exists, output a manual inspection prompt and save the data to be uploaded.
8. The system according to claim 1, characterized in that, The disease diagnosis module and the prevention and control strategy generation module are used to: identify diseases to be diagnosed in the agricultural disease association database based on crop type, growth period, crop phenotypic data and micro-meteorological data; and retrieve information on pesticides, control actions, environmental constraints, implementation equipment, regulatory restrictions and prohibitions, and historical effects associated with each disease to be diagnosed. The agricultural disease association database includes disease nodes, pesticide nodes, equipment nodes, environmental constraint nodes, and historical effect nodes and their associated edges; prohibited schemes are removed according to regulatory prohibition and restriction information; the control effect level is determined according to the preset interval of the historical control success rate; the safety level is determined according to the preset safety level corresponding to the pesticide safety level and the equipment safety status; and the on-site feasibility is determined according to the preset implementation level corresponding to the equipment availability status, on-site environmental constraints, and personnel accessibility. Resource consumption parameters are determined by at least one of the following technical indicators: pesticide consumption, equipment operation duration, and personnel workload. Based on the prevention and control effect, safety level, on-site feasibility, and comprehensive resource consumption parameters, the prevention and control schemes that have not been eliminated are ranked to obtain candidate prevention and control schemes. From these schemes, prevention and control actions, prohibition conditions, execution equipment, and control parameters are extracted to generate prevention and control execution rules.
9. The system according to claim 6, characterized in that, The prevention and control strategy generation module converts the candidate prevention and control schemes into prevention and control execution rules, including: determining wind speed not exceeding the wind speed limit as the wind speed condition, determining leaf surface condensation thickness not exceeding the leaf surface condensation limit as the leaf surface condensation condition, and determining rainfall probability not exceeding the rainfall probability limit as the rainfall condition. Configure wind speed limits, leaf condensation limits, rainfall probability limits, equipment availability conditions, effective time periods, and re-judgment intervals for each prevention and control action; determine that the prevention and control action can be executed when all action conditions are met; determine the delayed spraying, ventilation, or manual inspection actions to be executed when the candidate actions do not meet the action conditions as alternative actions, and configure appropriate waiting time or control parameters for the alternative actions.
