Machine learning-based agricultural ecological intelligent monitoring and regulation method and system
By training an attribution model and compensating based on farmland images and actual parameters, the problems of data simplification and responsiveness in existing farmland ecological monitoring technologies have been solved, achieving precise regulation and resource conservation.
Patent Information
- Application Number
- CN202511553315.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2045-10-29
AI Technical Summary
Existing technologies do not use image recognition to screen and regulate farmland ecology, which is not conducive to the conciseness and rapid response of subsequent data analysis, and fails to compensate and adjust the training model according to the actual soil conditions, affecting the accuracy of ecological monitoring.
By training an attribution model, ecological quality calculations are performed using farmland images, farmland areas are delineated, and the model is compensated according to the causes of problems to achieve precise regulation.
It significantly improves the reliability of long-term regulation, reduces resource waste, achieves simultaneous cost reduction and efficiency improvement with green production, and reduces pollution risks.
Smart Images

Figure CN121032144B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of intelligent monitoring, and in particular to an intelligent monitoring and control method and system for agricultural ecology based on machine learning. Background Technology
[0002] In recent years, agricultural ecological monitoring has shifted from traditional manual sampling to an integrated air-space-ground sensing system. This system integrates technologies such as remote sensing, ground sensor networks, RFID, and passive sensors to achieve real-time collection of multi-dimensional information on farmland environment, crop growth, and pests and diseases. Based on model predictive control and reinforcement learning, the system can automatically adjust agricultural production parameters such as irrigation, fertilization, ventilation, and temperature control, realizing closed-loop management of perception, analysis, decision-making, and regulation. By using image recognition models to identify pest types and densities and combining meteorological data to predict the risk of pest and disease outbreaks, the system can guide drones to apply pesticides precisely, reducing pesticide use and environmental pollution. This constructs an intelligent control system that integrates multi-source data such as meteorology, hydrology, and crop growth, achieving dynamic optimization of water resource allocation and maximization of ecological benefits in irrigation areas.
[0003] Currently, Chinese invention patent CN118537797A discloses an IoT-based intelligent monitoring and control system for agricultural ecology. This method analyzes and processes acquired information on harmful substance content and image data to determine if the ecological condition within an agricultural ecological engineering park is abnormal. The control and management module generates corresponding control levels to manage the agricultural ecological engineering park when the ecological condition is abnormal. This invention comprehensively analyzes acquired image information and harmful substance content information to derive the potential risk value of the monitoring area. Based on the potential risk value, it identifies potential ecological problems in the monitoring area, thereby promptly controlling and managing impending ecological anomalies to ensure the economic benefits of the agricultural ecological engineering park. However, related technologies do not utilize image recognition for screening and control of farmland ecology, which is detrimental to the conciseness of subsequent analysis data and the rapid response of the analysis. Furthermore, it does not compensate and adjust the trained model according to actual soil conditions, which is detrimental to the accuracy of ecological monitoring. Summary of the Invention
[0004] The technical problem solved by this invention is that related technologies do not use image recognition to screen and regulate farmland ecology, which is not conducive to the simplification of subsequent analysis data and the rapid response of analysis. Furthermore, they do not compensate and adjust the trained model according to the actual soil conditions, which is not conducive to the accuracy of ecological monitoring.
[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: Firstly, a machine learning-based intelligent monitoring and control method for agricultural ecology, comprising the following steps:
[0006] Step S100: Train an attribution model based on historical ecological problem data, perform a first calculation on ecological quality based on farmland images, and perform a first operation based on the first calculation result. The first operation includes first regulation and division of farmland areas.
[0007] Step S200: In response to the first operation, divide the farmland area and input the relevant parameters of the finished product of the divided farmland area into the trained attribution model to obtain the cause of the problem;
[0008] Step S300: Compensate the attribution model according to the actual parameters corresponding to the cause of the problem, obtain the cause of the problem in different regions based on the compensated attribution model, and perform a second adjustment.
[0009] As a preferred embodiment of the machine learning-based intelligent monitoring and control method for agricultural ecology described in this invention, the historical ecological problem data includes historical finished product data and corresponding historical ecological problem data. The historical finished product data includes historical finished product pollutant residue, historical finished product organic ratio, historical finished product dry grain weight, and historical finished product nitrate content. The historical ecological problem data includes no ecological problems, soil pollutant exceeding standards, soil fertility exceeding standards, insufficient soil irrigation, and irrigation water source pollutant exceeding standards.
[0010] As a preferred embodiment of the machine learning-based intelligent monitoring and regulation method for agricultural ecology described in this invention, the method for training an attribution model based on historical ecological problem data includes:
[0011] The historical ecological problem data is processed by filling in missing values, unifying units, and standardizing the data. The historical finished data is set as the input feature, and the historical ecological problem data is set as the output label.
[0012] Select a machine learning model, set each output label to one of the five classification results of the machine learning model, divide the input features and output labels into a sample set and a test set, train the machine learning model based on the sample set, and test the machine learning model based on the test set. When the output accuracy of the machine learning model for the output label reaches a first value, stop the test and set the machine learning model at this time as an attribution model.
[0013] As a preferred embodiment of the intelligent monitoring and control method for agricultural ecology based on machine learning described in this invention, wherein: farmland images are acquired, and the farmland images are represented as a top-view plan view of the farmland projected vertically;
[0014] The first calculation result is the first ratio. The method for performing the first calculation of ecological quality based on farmland images includes:
[0015] The number of pixels in the farmland image is counted and recorded as the first number. A standard color value database is retrieved, and green is input into the standard color value database to obtain the color values corresponding to green, which are recorded as the first color value.
[0016] The number of pixels in the farmland image that belong to the first color value is counted and denoted as the second number.
[0017] Calculate the first ratio of the second quantity to the first quantity, and set the first ratio as the first calculation result.
[0018] As a preferred embodiment of the machine learning-based intelligent monitoring and control method for agricultural ecology described in this invention, the method for performing a first operation based on a first calculation result includes:
[0019] Set the second value as the first ratio threshold, compare the first ratio with the second value, and when the first ratio is greater than or equal to the second value, set the first operation to divide farmland areas; when the first ratio is less than the second value, set the first operation to first regulation.
[0020] When the first operation is to divide farmland areas, proceed to step S200;
[0021] When the first operation is the first adjustment, the system jumps to the farmland image, obtains the coordinates of the missing pixels of each plant according to the preset green plant distribution path, and sends the coordinates of the missing pixels of each plant to the control center. The control center then replants the plants according to the coordinates of the missing pixels of each plant.
[0022] As a preferred embodiment of the intelligent monitoring and control method for agricultural ecology based on machine learning described in this invention, the preset green plant distribution path represents the distribution location of green plants planned by the control center for the farmland, wherein the color value of the image corresponding to the green plant is distributed between a first color value and a second color value.
[0023] The system retrieves pixels from the farmland image corresponding to the preset green plant distribution path, obtains the color value of the pixel, compares the color value of the pixel with the distribution range of the color values of the corresponding green plant image, and deletes the corresponding pixel when the color value of the pixel is greater than or equal to the first color value and less than or equal to the second color value, and jumps to the color value of the next pixel. When the color value of the pixel is less than the first color value or the color value of the pixel is greater than the second color value, the coordinates of the corresponding pixel are set as the coordinates of the missing green plant pixels, and the coordinates of the missing green plant pixels are sent to the control center.
[0024] As a preferred embodiment of the intelligent monitoring and control method for agricultural ecology based on machine learning described in this invention, wherein: when the first operation is to divide farmland areas, the farmland areas are divided in response to the first operation;
[0025] The method for dividing farmland areas includes:
[0026] Fill the farmland into a rectangle, set the third value as the width of the dividing box, and set the fourth value as the length of the dividing box to construct the dividing box. The third value is less than the fourth value, and the third value is a common factor of the width of the rectangle corresponding to the farmland, and the fourth value is a common factor of the length of the rectangle corresponding to the farmland.
[0027] Place the dividing frame at any corner of the farmland, slide it parallel along the length, and then slide it parallel along the width until the entire farmland area is covered. The positions of the non-overlapping dividing frames are the respective farmland areas.
[0028] The relevant parameters of the finished products from the divided farmland areas are input into the trained attribution model to obtain the causes of the problems. The relevant parameters of the finished products include the residual amount of pollutants in the finished products, the organic ratio of the finished products, the dry grain weight of the finished products, and the nitrate content of the finished products. The causes of the problems include no ecological problems, excessive soil pollutants, excessive soil fertility, insufficient soil irrigation, and excessive pollutants in irrigation water sources. There may be one or more causes of the problems.
[0029] As a preferred embodiment of the machine learning-based intelligent monitoring and control method for agricultural ecology described in this invention, the method for compensating the attribution model based on the actual parameters corresponding to the causes of the problem includes:
[0030] If the cause of the problem is not an ecological issue, the attribution model is not compensated, and the process moves to the next farmland area.
[0031] If the cause of the problem is not an ecological issue, obtain the actual parameters corresponding to the cause of the problem, and verify the cause of the problem based on the actual parameters. When the cause of the problem is excessive soil pollutants, the corresponding actual parameter is the soil heavy metal content. When the cause of the problem is excessive soil fertility, the corresponding actual parameter is the soil trace element content. When the cause of the problem is insufficient soil irrigation, the corresponding actual parameter is the soil water content. When the cause of the problem is excessive pollutants in irrigation water, the corresponding actual parameter is the heavy metal content in irrigation water.
[0032] When the causes of a problem are combined, the corresponding actual parameters are also combined.
[0033] Obtain the standard distribution interval corresponding to the actual parameter. The standard distribution interval represents the distribution range of the content of the actual parameter that meets the production requirements. Compare the actual parameter with the standard distribution interval. When all actual parameters are distributed within the standard distribution interval, modify the corresponding cause of the problem to "no ecological problem". When any actual parameter is distributed within the standard distribution interval, delete the corresponding cause of the problem. When none of the corresponding causes of the problem are distributed within the standard distribution interval, do not delete the corresponding cause of the problem.
[0034] A value distributed within a standard distribution interval is defined as being greater than or equal to the minimum value of the standard distribution interval and less than or equal to the maximum value of the standard distribution interval.
[0035] The attribution model is retrained based on the modified causes of the problem and the finished product data until the accuracy of the attribution model reaches the first accuracy, at which point training stops, and the compensated attribution model is obtained.
[0036] As a preferred embodiment of the intelligent monitoring and control method for agricultural ecology based on machine learning described in this invention, the causes of problems in different regions are obtained according to the compensated attribution model, and a second control is performed. The second controls corresponding to soil pollutant exceedance, soil fertility exceedance, insufficient soil irrigation, and excessive irrigation water pollutant exceedance are respectively increasing pH, reducing fertilization, reducing irrigation quota, and increasing passivating agent dosage. Through the second control, the actual parameters corresponding to the causes of problems in the corresponding farmland areas are distributed within the standard distribution range.
[0037] Secondly, an intelligent monitoring and control system for agricultural ecology based on machine learning, including a calculation module, a partitioning module, and a compensation module;
[0038] The calculation module trains an attribution model based on historical ecological problem data, performs a first calculation on ecological quality based on farmland images, and executes a first operation based on the first calculation result. The first operation includes first regulation and division of farmland areas.
[0039] The segmentation module responds to the first operation by segmenting farmland areas and inputting the relevant parameters of the finished products of the segmented farmland areas into the trained attribution model to obtain the cause of the problem.
[0040] The compensation module compensates the attribution model based on the actual parameters corresponding to the cause of the problem, obtains the cause of the problem in different regions based on the compensated attribution model, and performs a second adjustment.
[0041] The beneficial effects of this invention are as follows: By using a result and cause feedback mechanism, it solves the problem that traditional models cannot self-correct, significantly improves the reliability of long-term regulation, binds the attribution results to the farmland grid, supports precision operations such as variable fertilization and fixed-point irrigation, avoids resource waste, and reduces the input of fertilizers, pesticides, passivating agents, etc. while reducing pollution risks, thus achieving cost reduction and efficiency improvement and green production simultaneously. Attached Figure Description
[0042] Figure 1 This is a schematic diagram of the basic process of a machine learning-based intelligent monitoring and control method for agricultural ecology, provided as an embodiment of the present invention. Detailed Implementation
[0043] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0044] Example, refer to Figure 1 As an embodiment of the present invention, an intelligent monitoring and control method for agricultural ecology based on machine learning is provided, comprising the following steps:
[0045] Step S100: Train an attribution model based on historical ecological problem data, perform a first calculation on ecological quality based on farmland images, and perform a first operation based on the first calculation result. The first operation includes first regulation and division of farmland areas.
[0046] Step S200: In response to the first operation, divide the farmland area and input the relevant parameters of the finished product of the divided farmland area into the trained attribution model to obtain the cause of the problem;
[0047] Step S300: Compensate the attribution model according to the actual parameters corresponding to the cause of the problem, obtain the cause of the problem in different regions based on the compensated attribution model, and perform a second adjustment.
[0048] This invention addresses the problem of traditional models' inability to self-correct through a result and cause feedback mechanism, significantly improving the reliability of long-term regulation. It binds attribution results to farmland grids, supporting precision operations such as variable fertilization and targeted irrigation, avoiding resource waste, reducing pollution risks, and decreasing the input of fertilizers, pesticides, passivating agents, etc., thus achieving cost reduction, efficiency improvement, and green production simultaneously.
[0049] Historical ecological problem data includes historical finished product data and corresponding historical ecological problem data. Historical finished product data includes historical finished product pollutant residue, historical finished product organic ratio, historical finished product dry particle weight, and historical finished product nitrate content. Historical ecological problem data includes no ecological problems, soil pollutant exceeding standards, soil fertility exceeding standards, insufficient soil irrigation, and irrigation water source pollutant exceeding standards.
[0050] Methods for training attribution models based on historical ecological problem data include:
[0051] The historical ecological problem data is processed by filling in missing values, unifying units, and standardizing the data. The historical finished data is set as the input feature, and the historical ecological problem data is set as the output label.
[0052] Select a machine learning model, set each output label to one of the five classification results of the machine learning model, divide the input features and output labels into a sample set and a test set, train the machine learning model based on the sample set, and test the machine learning model's mechanical performance based on the test set. Stop testing when the machine learning model's output accuracy for the output label reaches the first value, and set the machine learning model at this point as an attribution model.
[0053] In practice, the system takes "finished product quality" as the entry point. Using readily available post-harvest indicators such as pollutant residues, thousand-grain weight, and nitrates, it infers potential anomalies in the "soil-water-fertilizer" system. This solves the problem of the traditional method's single attribution chain of "from environment to environment," forming a two-way closed loop of "crop-environment." Complex field anomalies are summarized into five mutually exclusive labels (no problem, pollutant exceedance, fertility exceedance, insufficient irrigation, and water pollution). This ensures classification accuracy and allows direct connection to five major regulatory strategy libraries, enabling one-click mapping of "diagnosis-prescription." All input features come from routine testing: heavy metal residues, organic ratio, thousand-grain weight, and nitrates are already mandatory measurements in the acquisition, quality inspection, and research stages, eliminating the need for separate point placement or additional equipment for the model. The system is suitable for rapid replication across regions and varieties. Its three-stage preprocessing—missing value imputation, unit unification, and Z-score standardization—reduces dimensional drift caused by differences in instruments, varieties, and years, enabling the same model to be quickly implemented in different ecological zones and on different crops, reducing the cost of repeated training. With "accuracy ≥ first value" as the stopping condition, and in conjunction with actual feedback on subsequent regulatory effects, it can seamlessly introduce online incremental learning. Model parameters are automatically optimized as data accumulates, forming a self-growing mechanism that becomes more accurate with use. The weight relationship between finished product characteristics and ecological labels (such as the high SHAP value of pollutant residues for the "excessive soil pollutants" category) can be directly converted into agricultural technical advice language, lowering the threshold for technology implementation.
[0054] Acquire farmland images, which are represented as a top-down plan view of the farmland projected vertically.
[0055] The first calculation result is the first ratio. The method for performing the first calculation of ecological quality based on farmland images includes:
[0056] The number of pixels in the farmland image is counted and recorded as the first count. The standard color value database is retrieved, and green is input into the standard color value database to obtain the color values corresponding to green, which are recorded as the first color value.
[0057] The number of pixels in the farmland image that belong to the first color value is counted and denoted as the second number.
[0058] Calculate the first ratio of the second quantity to the first quantity, and set the first ratio as the first calculation result.
[0059] The method for performing the first operation based on the first calculation result includes:
[0060] Set the second value as the first ratio threshold, compare the first ratio with the second value, and when the first ratio is greater than or equal to the second value, set the first operation to divide farmland areas; when the first ratio is less than the second value, set the first operation to first regulation.
[0061] When the first operation is to divide farmland areas, proceed to step S200;
[0062] When the first operation is the first adjustment, the system jumps to the farmland image, obtains the coordinates of the missing pixels of each plant according to the preset green plant distribution path, and sends the coordinates of the missing pixels of each plant to the control center. The control center then replants the plants according to the coordinates of the missing pixels of each plant.
[0063] In practical implementation, the ecological quality of the field can be quantified using only the one-dimensional indicator of "green pixel ratio," without the need for multispectral bands or radiometric correction. Ordinary RGB cameras can complete the data collection and calculation, significantly reducing the cost and energy consumption of edge devices. The standard green color value database is independent of hardware and can be established and solidified in advance in a laboratory environment. Different models and batches of cameras only need to call the same database to ensure consistent "greenness recognition" results, solving the drift problem caused by equipment differences. The system uses "first ratio ≥ second value" as the sole judgment condition, with only two logical exits: "dividing areas" or "replanting greenery." Agricultural technicians do not need to understand machine learning models to understand, reproduce, and adjust parameters, facilitating grassroots promotion. When the ratio is lower than a threshold, the system... The system automatically outputs the "pixel coordinates of missing green plants," which can directly drive a GPS-RTK seeder or unmanned plant protection drone to replant, transforming "ecological quality restoration" into "precision replanting operations." This reduces resource waste caused by full-field replanting or large-scale secondary fertilization. If the ratio is qualified, it enters the subdivided grid attribution (S200); if it is unqualified, it replants on the spot and re-photographs for verification, forming a short closed loop of "photographing → calculation → replanting → re-photographing." This avoids subsequent control failures due to a single misjudgment, improving the overall robustness of the solution. For complex scenarios such as inter-row fallow and strip rotation, the "allowable bare ratio" can be flexibly controlled by adjusting the size of the "second value," preventing both over-replanting and underestimation of ecological quality due to insufficient green cover, and adapting to various cropping systems.
[0064] The preset green plant distribution path represents the distribution location of green plants planned by the control center for farmland, wherein the color value of the image corresponding to the green plant is distributed between the first color value and the second color value.
[0065] The system retrieves pixels from the farmland image corresponding to the preset green plant distribution path, obtains the color value of the pixel, compares the color value of the pixel with the distribution range of the color values of the corresponding green plant image, and deletes the corresponding pixel when the color value of the pixel is greater than or equal to the first color value and less than or equal to the second color value, and jumps to the color value of the next pixel. When the color value of the pixel is less than the first color value or the color value of the pixel is greater than the second color value, the coordinates of the corresponding pixel are set as the coordinates of the missing green plant pixels, and the coordinates of the missing green plant pixels are sent to the control center.
[0066] When the first operation is to divide farmland areas, the farmland areas are divided in response to the first operation.
[0067] Methods for dividing farmland areas include:
[0068] Fill the farmland into a rectangle, set the third value as the width of the dividing box, and set the fourth value as the length of the dividing box to construct the dividing box. The third value is less than the fourth value, and the third value is a common factor of the width of the rectangle corresponding to the farmland, and the fourth value is a common factor of the length of the rectangle corresponding to the farmland.
[0069] Place the dividing frame at any corner of the farmland, slide it parallel along the length, and then slide it parallel along the width until the entire farmland area is covered. The positions of the non-overlapping dividing frames are the respective farmland areas.
[0070] The relevant parameters of the finished products from the divided farmland areas are input into the trained attribution model to obtain the causes of the problems. The relevant parameters of the finished products include the residual amount of pollutants in the finished products, the organic ratio of the finished products, the dry weight of the finished products, and the nitrate content of the finished products. The causes of the problems include no ecological problems, excessive soil pollutants, excessive soil fertility, insufficient soil irrigation, and excessive pollutants in irrigation water. There may be one or more causes of the problems.
[0071] In practice, only the criteria of "first color value ≤ pixel value ≤ second color value" are used to batch delete normal green plant pixels. Remaining pixels are automatically considered as missing plants. The logic is simple, requiring no clustering or deep learning, making it suitable for embedded gateways to complete in milliseconds. The coordinates of pixels judged as "missing" are output in row and column order, which can be seamlessly converted into RTK navigation commands. The control center sends these commands to the unmanned planter with one click, achieving a point-to-point closed loop of "seeing-sending-replacing". This eliminates the need for manual field surveying and delineation. Irregular plots are first filled into rectangles, and then the "common factor of length and width" is taken as the dividing frame size to ensure that all frame boundaries fall on integer coordinates. This avoids half-grids and fragmented grids at the field edges and ensures that the grid row and column numbers correspond one-to-one with the subsequent sampling points and machine paths, facilitating data overlay. The dividing frame is translated in the order of "length priority → width return". Adjacent frames share boundaries but do not overlap, eliminating the need for subsequent deduplication. The system performs calculations while ensuring zero omissions in the entire field area, providing continuous and uninterrupted spatial sample units for the attribution model. By adjusting the third and fourth values (common factors), the grid size can be quickly switched: a 1m×1m fine zone can be set for research-level applications, while 3m×6m, 4m×8m, and other sizes matching the width of seeders and fertilizer applicators can be set for routine operations, achieving "one-time division, universal for multiple machines." Each grid independently outputs pollutant residues, organic ratio, thousand-grain weight, and nitrate content, which can be directly fed into the trained attribution model. It can simultaneously return one or more causes of problems, achieving precise positioning of "multiple problems in one field." It provides the smallest operational unit for variable fertilization, fixed-point passivation, and localized supplementary irrigation. The grid row and column numbers, pixel coordinates, and machine RTK coordinates share the same Cartesian plane system, and the attribution results can be directly mapped to the machine path without the need for reprojection or interpolation, reducing the accumulation of spatial errors and improving the accuracy and efficiency of subsequent regulation.
[0072] Methods for compensating the attribution model based on the actual parameters corresponding to the causes of the problem include:
[0073] If the cause of the problem is not an ecological issue, the attribution model is not compensated, and the process moves to the next farmland area.
[0074] If the cause of the problem is not an ecological issue, obtain the actual parameters corresponding to the cause of the problem, and verify the cause of the problem based on the actual parameters. When the cause of the problem is excessive soil pollutants, the corresponding actual parameter is the soil heavy metal content. When the cause of the problem is excessive soil fertility, the corresponding actual parameter is the soil trace element content. When the cause of the problem is insufficient soil irrigation, the corresponding actual parameter is the soil water content. When the cause of the problem is excessive pollutants in irrigation water, the corresponding actual parameter is the heavy metal content in irrigation water.
[0075] When the causes of a problem are combined, the corresponding actual parameters are also combined.
[0076] Obtain the standard distribution interval corresponding to the actual parameter. The standard distribution interval represents the distribution range of the content of the actual parameter that meets the production requirements. Compare the actual parameter with the standard distribution interval. When the actual parameter is distributed within the standard distribution interval, change the corresponding cause of the problem to no ecological problem. When any actual parameter is distributed within the standard distribution interval, delete the corresponding cause of the problem. When none of the corresponding causes of the problem are distributed within the standard distribution interval, do not delete the corresponding cause of the problem.
[0077] A value distributed within the standard distribution interval is defined as being greater than or equal to the minimum value of the standard distribution interval and less than or equal to the maximum value of the standard distribution interval.
[0078] The attribution model is retrained based on the modified causes of the problem and the finished product data until the accuracy of the attribution model reaches the first accuracy, at which point training stops and the compensated attribution model is obtained.
[0079] The causes of problems in different regions are obtained based on the compensated attribution model, and a second regulation is implemented. The second regulation corresponding to soil pollutant exceedance, soil fertility exceedance, insufficient soil irrigation, and excessive irrigation water pollutant exceedance are to increase pH, reduce fertilizer application, reduce irrigation quota, and increase passivating agent dosage, respectively. Through the second regulation, the actual parameters corresponding to the causes of problems in the corresponding farmland areas are distributed within the standard distribution range.
[0080] In practice, the initial inference of the cause of the problem by the model is not directly used as the final state. Instead, it is validated a second time using the corresponding measured parameters (soil heavy metals, trace elements, moisture content, and irrigation water heavy metals) according to national standard ranges. Cases that are "misjudged as exceeding the standard" or "partially qualified in the superimposed causes" are automatically corrected to "no ecological problem" or the causes are removed, significantly reducing the labeling error rate and improving the purity of subsequent training samples. When the same sample is judged to have multiple problems, the corresponding measured indicators are called and compared in parallel: as long as one measured value falls within the qualified range, that cause is deleted, and only the true problem label of "all measured values are unqualified" is retained, ensuring that the granularity of the attribution result is completely consistent with the actual pollution / nutrient deficiency situation. The new label after validation and correction is recombined with the original product characteristics to form a "cleaned sample", which is used to incrementally improve the original model. Alternatively, full retraining can be performed. As field measurement data accumulates year by year, the model accuracy continues to converge from the "first accuracy" to a higher threshold, forming a long-term self-growing closed loop of "diagnosis → verification → correction → retraining". No manual relabeling is required. The standard distribution interval (minimum value - maximum value) is implanted as an external parameter and can be replaced with local standards, organic certification standards, or enterprise internal control standards at any time. The same process can be used in different scenarios such as mining areas, plains, and facility agriculture, improving the transferability and policy adaptability of the method. The measured indicators used for verification (soil heavy metals, trace elements, moisture content, and irrigation water heavy metals) are routine and mandatory items for local agricultural environmental monitoring, farmland quality evaluation, and water and fertilizer management. This invention can complete label cleaning by calling existing data, without additional sampling and testing, saving a lot of manpower and money.
[0081] This invention addresses the problem of traditional models' inability to self-correct through a result and cause feedback mechanism, significantly improving the reliability of long-term regulation. It binds attribution results to farmland grids, supporting precision operations such as variable fertilization and targeted irrigation, avoiding resource waste, reducing pollution risks, and decreasing the input of fertilizers, pesticides, passivating agents, etc., thus achieving cost reduction, efficiency improvement, and green production simultaneously.
[0082] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0083] 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, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A machine learning-based intelligent monitoring and control method for agricultural ecology, characterized in that, Includes the following steps: Step S100: Train an attribution model based on historical ecological problem data, perform a first calculation on ecological quality based on farmland images, and perform a first operation based on the first calculation result. The first operation includes first regulation and division of farmland areas. Methods for initial calculations of ecological quality based on farmland images include: The number of pixels in the farmland image is counted and recorded as the first number. A standard color value database is retrieved, and green is input into the standard color value database to obtain the color values corresponding to green, which are recorded as the first color value. The number of pixels in the farmland image that belong to the first color value is counted and denoted as the second number. Calculate the first ratio of the second quantity to the first quantity, and set the first ratio as the first calculation result; Step S200: In response to the first operation, divide the farmland area and input the relevant parameters of the finished product of the divided farmland area into the trained attribution model to obtain the cause of the problem; The method for performing the first operation based on the first calculation result includes: Set the second value as the first ratio threshold, compare the first ratio with the second value, and when the first ratio is greater than or equal to the second value, set the first operation to divide farmland areas; when the first ratio is less than the second value, set the first operation to first regulation. When the first operation is to divide farmland areas, proceed to step S200; When the first operation is the first adjustment, the system jumps to the farmland image, obtains the coordinates of the missing pixels of each plant according to the preset green plant distribution path, and sends the coordinates of the missing pixels of each plant to the control center. The control center then replants the plants according to the coordinates of the missing pixels of each plant. The relevant parameters of the finished product include the residual amount of contaminants, the organic content, the dry weight, and the nitrate content. Step S300: Compensate the attribution model according to the actual parameters corresponding to the cause of the problem, obtain the cause of the problem in different regions based on the compensated attribution model, and perform a second adjustment.
2. The agricultural ecological intelligent monitoring and control method based on machine learning as described in claim 1, characterized in that: The historical ecological problem data includes historical finished product data and corresponding historical ecological problem data. The historical finished product data includes historical finished product pollutant residue, historical finished product organic ratio, historical finished product dry grain weight, and historical finished product nitrate content. The historical ecological problem data includes no ecological problems, soil pollutant exceeding standards, soil fertility exceeding standards, insufficient soil irrigation, and irrigation water source pollutant exceeding standards.
3. The agricultural ecological intelligent monitoring and control method based on machine learning as described in claim 2, characterized in that: Methods for training attribution models based on historical ecological problem data include: The historical ecological problem data is processed by filling in missing values, unifying units, and standardizing the data. The historical finished data is set as the input feature, and the historical ecological problem data is set as the output label. Select a machine learning model, set each output label to one of the five classification results of the machine learning model, divide the input features and output labels into a sample set and a test set, train the machine learning model based on the sample set, and test the machine learning model based on the test set. When the output accuracy of the machine learning model for the output label reaches a first value, stop the test and set the machine learning model at this time as an attribution model.
4. The agricultural ecological intelligent monitoring and control method based on machine learning as described in claim 1, characterized in that: Acquire farmland images, which are represented as a top-view plan view of the farmland projected vertically; The first calculation result is the first ratio.
5. The agricultural ecological intelligent monitoring and control method based on machine learning as described in claim 1, characterized in that: The preset green plant distribution path represents the distribution location of green plants planned by the control center for the farmland, wherein the color value of the image corresponding to the green plant is distributed between the first color value and the second color value. The system retrieves pixels from the farmland image corresponding to the preset green plant distribution path, obtains the color value of the pixel, compares the color value of the pixel with the distribution range of the color values of the corresponding green plant image, and deletes the corresponding pixel when the color value of the pixel is greater than or equal to the first color value and less than or equal to the second color value, and jumps to the color value of the next pixel. When the color value of the pixel is less than the first color value or the color value of the pixel is greater than the second color value, the coordinates of the corresponding pixel are set as the coordinates of the missing green plant pixels, and the coordinates of the missing green plant pixels are sent to the control center.
6. The agricultural ecological intelligent monitoring and control method based on machine learning as described in claim 1, characterized in that: When the first operation is to divide farmland areas, the farmland areas are divided in response to the first operation. The method for dividing farmland areas includes: Fill the farmland into a rectangle, set the third value as the width of the dividing box, and set the fourth value as the length of the dividing box to construct the dividing box. The third value is less than the fourth value, and the third value is a common factor of the width of the rectangle corresponding to the farmland, and the fourth value is a common factor of the length of the rectangle corresponding to the farmland. Place the dividing frame at any corner of the farmland, slide it parallel along the length, and then slide it parallel along the width until the entire farmland area is covered. The positions of the non-overlapping dividing frames are the respective farmland areas. The relevant parameters of the finished products of the divided farmland areas are input into the trained attribution model to obtain the causes of the problem. The causes of the problem include no ecological problems, excessive soil pollutants, excessive soil fertility, insufficient soil irrigation, and excessive pollutants in irrigation water. There may be one or more causes of the problem.
7. The agricultural ecological intelligent monitoring and control method based on machine learning as described in claim 6, characterized in that: Methods for compensating the attribution model based on the actual parameters corresponding to the causes of the problem include: If the cause of the problem is not an ecological issue, the attribution model is not compensated, and the process moves to the next farmland area. If the cause of the problem is not an ecological issue, obtain the actual parameters corresponding to the cause of the problem, and verify the cause of the problem based on the actual parameters. When the cause of the problem is excessive soil pollutants, the corresponding actual parameter is the soil heavy metal content. When the cause of the problem is excessive soil fertility, the corresponding actual parameter is the soil trace element content. When the cause of the problem is insufficient soil irrigation, the corresponding actual parameter is the soil water content. When the cause of the problem is excessive pollutants in irrigation water, the corresponding actual parameter is the heavy metal content in irrigation water. When the causes of a problem are combined, the corresponding actual parameters are also combined. Obtain the standard distribution interval corresponding to the actual parameter. The standard distribution interval represents the distribution range of the content of the actual parameter that meets the production requirements. Compare the actual parameter with the standard distribution interval. When all actual parameters are distributed within the standard distribution interval, modify the corresponding cause of the problem to "no ecological problem". When any actual parameter is distributed within the standard distribution interval, delete the corresponding cause of the problem. When none of the corresponding causes of the problem are distributed within the standard distribution interval, do not delete the corresponding cause of the problem. A value distributed within a standard distribution interval is defined as being greater than or equal to the minimum value of the standard distribution interval and less than or equal to the maximum value of the standard distribution interval. The attribution model is retrained based on the modified causes of the problem and the finished product data until the accuracy of the attribution model reaches the first accuracy, at which point training stops, and the compensated attribution model is obtained.
8. The agricultural ecological intelligent monitoring and control method based on machine learning as described in claim 7, characterized in that: The causes of problems in different regions are obtained based on the compensated attribution model, and a second regulation is implemented. The second regulation corresponding to soil pollutant exceedance, soil fertility exceedance, insufficient soil irrigation, and excessive irrigation water pollutant exceedance are to increase pH, reduce fertilizer application, reduce irrigation quota, and increase passivating agent dosage, respectively. Through the second regulation, the actual parameters corresponding to the causes of problems in the corresponding farmland areas are distributed within the standard distribution range.
9. A machine learning-based intelligent monitoring and control system for agricultural ecology, the system being used to execute the machine learning-based intelligent monitoring and control method for agricultural ecology as described in claim 1, characterized in that, It includes a calculation module, a partitioning module, and a compensation module; The calculation module trains an attribution model based on historical ecological problem data, performs a first calculation on ecological quality based on farmland images, and executes a first operation based on the first calculation result. The first operation includes first regulation and division of farmland areas. The segmentation module responds to the first operation by segmenting farmland areas and inputting the relevant parameters of the finished products of the segmented farmland areas into the trained attribution model to obtain the cause of the problem. The compensation module compensates the attribution model based on the actual parameters corresponding to the cause of the problem, obtains the cause of the problem in different regions based on the compensated attribution model, and performs a second adjustment.
Citation Information
Patent Citations
Agricultural ecology intelligent monitoring regulation and control system based on Internet of Things
CN118537797A
Product service maintenance method and system based on problem classification model
CN120634511A
Artificial intelligence rice water and fertilizer real-time monitoring method and system
CN120822071A