Intelligent management method and system for pesticide residue detection based on multi-mode cooperation
By constructing a multimodal digital twin and a pesticide degradation prediction model, an agricultural scheduling sequence is generated and simulated for evaluation. This solves the problems of lack of foresight and information barriers in pesticide residue detection and management, and achieves dynamic optimization and efficient management of the entire chain.
Patent Information
- Application Number
- CN202510929323.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-07
- Publication Date
- 2025-11-25
AI Technical Summary
Existing pesticide residue detection and management methods focus on final product testing, lacking forward-looking risk avoidance capabilities. Production planning relies on static schedules rather than data-driven approaches, and information barriers between the production end and the downstream supply chain lead to low management efficiency.
Digital twins are constructed based on multimodal data to generate agricultural scheduling sequences and conduct simulation evaluations. By utilizing pesticide degradation prediction models and multi-objective programming models, hierarchical supply chain collaborative management is automatically triggered to achieve dynamic optimization and risk avoidance.
It has improved the foresight and initiative in agricultural product quality and safety management, enhanced the accuracy of agricultural production decisions and the efficiency of the entire supply chain, and solved the problem of management disconnect caused by information barriers.
Smart Images

Figure CN121010116A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent control technology, specifically to an intelligent management method and system for pesticide residue detection based on multimodal collaboration. Background Technology
[0002] Pesticide residue testing is a crucial step in ensuring the quality and safety of agricultural products. Modern pesticide residue testing is not simply chemical analysis, but a complex and high-risk business process that spans multiple stages, including production planning, process control, and logistics and warehousing.
[0003] Current technologies for managing this complex process present several challenges. They focus on final product testing, making proactive risk mitigation at the production source difficult. Furthermore, production planning relies on static schedules rather than data-driven dynamic optimization, hindering adjustments to agricultural operations based on real-time data. Additionally, information barriers exist between production and the downstream supply chain, making differentiated and refined management difficult in downstream segments.
[0004] In summary, existing technologies, lacking forward-looking forecasting and planning capabilities, result in fragmented management processes, delayed decision-making responses, and poor workflow integration, leading to low management efficiency. Therefore, this paper proposes an intelligent management method for pesticide residue detection based on multimodal collaboration. Summary of the Invention
[0005] The purpose of this invention is to provide a multimodal collaborative intelligent management method and system for pesticide residue detection, used for intelligent collaborative management. To address the problems existing in the prior art, this invention first constructs a digital twin based on multimodal data, including a pesticide degradation prediction model. This multimodal data includes sample detection data, agricultural management data, meteorological data, and supply chain data. Then, the digital twin is used to generate a final agricultural scheduling sequence. The agricultural product batches obtained from the final agricultural scheduling sequence are simulated to generate dynamic profiles, and a multi-objective programming model is constructed to perform path deduction and generate disposal paths. Finally, based on the disposal paths, hierarchical supply chain collaborative management actions are automatically triggered. This invention achieves the effect of proactive avoidance and dynamic optimization in intelligent collaborative management by predicting the future state evolution of agricultural products.
[0006] To achieve the above objectives, the present invention provides the following technical solution: A smart management method for pesticide residue detection based on multimodal collaboration includes: A digital twin containing a pesticide degradation prediction model is constructed based on multimodal data; the multimodal data includes sample detection data, agricultural management data, meteorological data, and supply chain data; The digital twin generates an agricultural risk knowledge graph based on sample detection data and agricultural management data. Based on the agricultural management data and the agricultural risk knowledge graph, it generates candidate agricultural scheduling sequences. Meteorological data is used to simulate and evaluate the candidate agricultural scheduling sequences to determine the final agricultural scheduling sequence. The prediction model in the digital twin is invoked to simulate the state evolution of each batch of agricultural products obtained from the final agricultural scheduling sequence. A dynamic profile is generated based on the time-series trend data generated by the simulation. A multi-objective programming model is constructed, and the dynamic profile and supply chain data are used as constraints for the multi-objective programming model to generate disposal paths through path deduction. Based on the disposal path, hierarchical supply chain collaborative management actions are automatically triggered, including logistics scheduling and automated hierarchical warehousing.
[0007] Preferably, the pesticide degradation prediction model is constructed based on a long short-term memory network, including a data processing layer, a sample construction layer, and a model training layer. The data processing layer performs spatiotemporal alignment, normalization, and numerical encoding on the agricultural management data and meteorological data. The sample construction layer constructs a training feature vector containing pesticide application characteristics and environmental evolution characteristics based on the processed agricultural management data and meteorological data. The pesticide application characteristics include pesticide type, application dosage, and application date, while the environmental evolution characteristics include the average daily temperature, humidity, rainfall, and sunshine duration of the plot. The training feature vector is used as the input vector of the prediction model, and the sample detection data is used as the ground truth label of the prediction model output, forming an "input vector-ground truth label" sample pair. The model training layer inputs the sample pair into the prediction model and uses the gradient descent optimization algorithm to iteratively train and optimize the prediction model based on minimizing the mean square error between the model's predicted value and the ground truth label.
[0008] Preferably, the digital twin includes: a data warehouse connected to an external data source interface and a trained pesticide degradation prediction model engine, wherein the data warehouse stores the sample detection data, agricultural management data, meteorological data and supply chain data.
[0009] Preferably, the step of generating the agricultural risk knowledge graph includes: identifying and extracting core entities from the sample detection data and agricultural management data, wherein the core entities include agricultural product batches, plots, pesticide types, pesticide application records, and detection records; identifying the relationships between entities and storing them in a structured manner of "subject-relationship description-object", wherein the relationships include the correspondence between agricultural product batches and plots, pesticide application records, and detection records; comparing the actual residue values in the detection records with preset safety thresholds, and automatically marking the agricultural product batch entity corresponding to the detection record with a high-risk level attribute when the actual residue value is greater than the preset safety threshold.
[0010] Preferably, generating a candidate agricultural scheduling sequence includes: obtaining a list of available agricultural resources for the planned agricultural product batches from the agricultural management data, the list of available agricultural resources including plots and pesticide types; querying the agricultural risk knowledge graph to determine whether the resources in the list of available agricultural resources have the high-risk level attribute; constructing resource combinations based on the determination result and selecting resources that do not have the high-risk level attribute; and structuring the resource combinations according to preset agricultural operation rules to form a candidate agricultural scheduling sequence containing specific agricultural events and execution times.
[0011] Preferably, the simulation evaluation of candidate agricultural scheduling sequences using meteorological data includes: extracting agricultural operation events from the candidate agricultural scheduling sequences, filling the agricultural operation events into the corresponding time points of future meteorological data in the meteorological data, generating a simulation feature vector, inputting the simulation feature vector into the pesticide degradation prediction model for simulation analysis to obtain pesticide residue prediction results; calculating a quantitative evaluation score based on the pesticide residue prediction results, wherein calculating the quantitative evaluation score includes: extracting the predicted safe time point in the pesticide residue prediction results where the pesticide residue value first falls below a preset safe threshold, calculating a first component inversely proportional to the predicted safe time point; extracting the predicted residue value corresponding to the preset harvest date in the pesticide residue prediction results, calculating a second component inversely proportional to the predicted residue value; weighted summing of the first and second components to obtain the quantitative evaluation score; and selecting the candidate agricultural scheduling sequence with the highest evaluation score as the final agricultural scheduling sequence.
[0012] Preferably, the step of generating a disposal path includes: comparing the predicted pesticide residue values from the time-series trend data with a preset safety threshold point by point, and identifying the predicted time point when the predicted residue value first falls below the preset safety threshold; integrating the time-series trend data and the predicted time point to generate a dynamic profile associated with the agricultural product batch; based on the dynamic profile, setting the execution of the disposal action after the predicted time point as a hard constraint condition, and constructing a quantitative objective function using market price and transportation cost information in the supply chain data; the quantitative objective function includes a profit objective function and a time optimization function, wherein the profit objective function takes the predicted market price of the agricultural product batch as a positive revenue item and storage costs and transportation costs as negative cost items, and the time optimization function is inversely proportional to the waiting days, wherein the waiting days are the difference in days between the harvest date and the predicted safety time point; within the space defined by the hard constraint condition, the profit objective function and the time optimization function are weighted and summed to obtain the quantitative objective function, the quantitative objective function is solved, and the decision combination obtained from the solution is used as the disposal path.
[0013] A multimodal collaborative intelligent management system for pesticide residue detection includes: Twin building block: Constructs a digital twin based on multimodal data, including a pesticide degradation prediction model; multimodal data includes sample detection data, agricultural management data, meteorological data, and supply chain data; Generative planning module: The digital twin generates an agricultural risk knowledge graph based on sample detection data and agricultural management data, generates candidate agricultural scheduling sequences based on agricultural management data and agricultural risk knowledge graph, and uses meteorological data to simulate and evaluate the candidate agricultural scheduling sequences to determine the final agricultural scheduling sequence; Disposal Decision Module: Calls the prediction model in the digital twin to simulate the state evolution of each batch of agricultural products obtained from the final agricultural scheduling sequence, and generates a dynamic profile based on the time-series trend data generated by the simulation; constructs a multi-objective programming model, and uses the dynamic profile and supply chain data as constraints of the multi-objective programming model to perform path deduction and generate disposal paths; Collaborative Management Module: Based on the disposal path, it automatically triggers hierarchical supply chain collaborative management actions, including logistics scheduling and automated hierarchical warehousing.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention establishes a connection between discrete detection records of exceeding standards and specific production entities through an agricultural risk knowledge graph, and marks them with high-risk level attributes; when generating agricultural scheduling sequences, the system actively filters out marked high-risk resource combinations by querying the knowledge graph; it transforms the originally delayed and implicit risk information into machine-executable hard constraints, blocking the transmission and reproduction of risks at the source of production, realizing the transformation from passive final product detection to proactive process prediction and risk avoidance, and improving the predictability and proactivity of agricultural product quality and safety management.
[0015] 2. This invention utilizes a pesticide degradation prediction model combined with future meteorological data to simulate and extrapolate multiple candidate agricultural scheduling sequences. By comprehensively predicting safe time points and residual values, a quantitative evaluation score is calculated for each candidate sequence, and the optimal sequence is selected. This transforms a planning approach that relies on static schedules and personal experience into a dynamic optimization process based on multi-dimensional data input and quantifiable evaluation. This ensures that the final adopted agricultural scheduling scheme is the optimal solution under foreseeable conditions, thereby improving the accuracy and scientific rigor of agricultural production decisions.
[0016] 3. This invention generates a dynamic profile for each batch of agricultural products, including a pesticide residue prediction curve and a predicted safe time point, and sets the predicted safe time point as a hard constraint for downstream disposal path planning. Within this constraint, a multi-objective programming model is used to solve the functions of profit and time, and the resulting disposal path can drive the downstream supply chain to perform differentiated logistics scheduling and graded warehousing. This design seamlessly transforms upstream production status prediction results into precise inputs for downstream collaborative management actions, solving the management disconnect problem caused by poor information flow and improving the operational efficiency of the entire chain. Attached Figure Description
[0017] Figure 1 The flowchart illustrates an intelligent management method for pesticide residue detection based on multimodal collaboration, as proposed in an embodiment of this invention. Figure 2 This is a schematic diagram of the structure of an intelligent management system for pesticide residue detection based on multimodal collaboration, as proposed in an embodiment of this invention. Figure 3 This is a schematic diagram of the dynamic response process proposed in an embodiment of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Please see Figures 1 to 3 This invention provides an intelligent management method and system for pesticide residue detection based on multimodal collaboration, the technical solution of which is as follows: A smart management method for pesticide residue detection based on multimodal collaboration includes the following steps: A digital twin containing a pesticide degradation prediction model is constructed based on multimodal data; the multimodal data includes sample detection data, agricultural management data, meteorological data, and supply chain data; The digital twin generates an agricultural risk knowledge graph based on sample detection data and agricultural management data. Based on the agricultural management data and the agricultural risk knowledge graph, it generates candidate agricultural scheduling sequences. Meteorological data is used to simulate and evaluate the candidate agricultural scheduling sequences to determine the final agricultural scheduling sequence. The prediction model in the digital twin is invoked to simulate the state evolution of each batch of agricultural products obtained from the final agricultural scheduling sequence. A dynamic profile is generated based on the time-series trend data generated by the simulation. A multi-objective programming model is constructed, and the dynamic profile and supply chain data are used as constraints for the multi-objective programming model to generate disposal paths through path deduction. Based on the disposal path, hierarchical supply chain collaborative management actions are automatically triggered, including logistics scheduling and automated hierarchical warehousing. Example
[0020] This embodiment provides a specific application of a pesticide residue detection intelligent management method based on multimodal collaboration. Its typical application scenario is that Company A introduces a pesticide residue detection intelligent management method to meet the agricultural product quality and safety requirements of downstream high-end customers and reduce production and supply chain costs.
[0021] refer to Figure 1 The method includes: S1. Construct a digital twin containing a pesticide degradation prediction model based on multimodal data; the multimodal data includes sample detection data, agricultural management data, meteorological data, and supply chain data; S2. The digital twin generates an agricultural risk knowledge graph based on sample detection data and agricultural management data. Based on the agricultural management data and agricultural risk knowledge graph, it generates candidate agricultural scheduling sequences. Meteorological data is used to simulate and evaluate the candidate agricultural scheduling sequences to determine the final agricultural scheduling sequence. S3. Call the prediction model in the digital twin to simulate the state evolution of each batch of agricultural products obtained from the final agricultural scheduling sequence, and generate a dynamic profile based on the time-series trend data generated by the simulation. S4. Construct a multi-objective programming model, using dynamic profiles and supply chain data as constraints for the multi-objective programming model, and perform path deduction to generate disposal paths; S5. Based on the disposal path, automatically trigger hierarchical supply chain collaborative management actions, including logistics scheduling and automated hierarchical warehousing.
[0022] Furthermore, a digital twin incorporating a pesticide degradation prediction model is constructed based on multimodal data; the multimodal data includes sample detection data, agricultural management data, meteorological data, and supply chain data, corresponding to step S1 above, and the specific process includes: Through standardized application programming interfaces (APIs), IoT data gateways, and database connectors, the system connects to laboratory information management systems, agricultural management information systems, public meteorological service platforms, and supply chain management systems to acquire sample testing data, agricultural management data, meteorological data, and supply chain data. Sample testing data includes sample ID, associated batch, testing items, and test results; agricultural management data includes plot data, time data, pesticide types, and application dosage data; meteorological data includes historical and daily weather data for the next 15 days; and supply chain data includes market prices, warehousing costs, and transportation costs.
[0023] This embodiment uses a Long Short-Term Memory (LSTM) network to construct a pesticide degradation prediction model. The model includes an input layer, two LSM hidden layers, a fully connected layer, and an output layer. The input layer receives training feature vectors, the fully connected layer transforms the output of the LSM hidden layers into predicted values, and the output layer uses a modified linear unit (MRU) as the activation function. For example, the input layer receives a vector containing 7 features; the first hidden layer contains 128 neurons, the second hidden layer contains 64 neurons, and the tanh inner activation function is used; a Dropout layer with a ratio of 0.2 is followed by the hidden layers to prevent overfitting; the fully connected layer contains 32 neurons and uses the ReLU activation function; the output layer is a single neuron using the ReLU activation function to ensure that the output pesticide residue value is non-negative. The system performs spatiotemporal alignment, normalization, and numerical encoding on the acquired agricultural management and meteorological data. Specifically, it uses the plot ID and date as primary keys for spatiotemporal alignment, normalizes temperature and dosage, and numerically encodes pesticide types. It constructs a training feature vector containing pesticide type, application dosage, number of days after application, average daily temperature, average daily humidity, rainfall, and sunshine duration. For example, if pesticide type A is the first of three candidate pesticides, and pesticide type A is encoded using a one-hot encoding, its one-hot encoding is [1, 0, 0]. Then, a complete training feature vector, after concatenation, can be represented as [[1, 0, 0], 750, 1, 23.1, 72, 2, 7]. [5] The training feature vector is used as the input vector of the prediction model, and the actual pesticide residue value in the sample detection data is used as the ground truth label of the model output, forming an "input vector-ground truth label" sample pair, for example, "[[1, 0, 0], 750, 1, 23.1, 72, 2, 7.5]-0.85", where 0.85 corresponds to the output ground truth label; the sample pair is input into the prediction model, and the Adam optimization algorithm is used to minimize the mean square error between the model prediction value and the ground truth label. The learning rate, batch size and number of iterations are set to train and optimize the prediction model. The learning rate, batch size and number of iterations can be tuned by cross-validation and grid search methods. The parameters are set as follows: learning rate 0.1, batch size of 30 samples, and number of iterations of 100 rounds. By training the prediction model with "input vector-ground truth label" sample pairs, the model learns the complex laws of pesticide degradation, ensuring the reliability and accuracy of the prediction results, and realizing the transformation from post-detection to pre-prediction.
[0024] The multimodal data obtained from various interfaces is cleaned, aligned, and structured, and then stored in a data warehouse. The data warehouse contains all historical information and attributes of agricultural product batches from planting to the supply chain. The trained long short-term memory network model is encapsulated into a pesticide degradation prediction model engine. Based on the data warehouse and with the prediction model engine as the core, a digital twin of agricultural products is constructed.
[0025] Furthermore, an adaptive enhancement mechanism based on residual analysis is introduced into the digital twin. The system continuously analyzes the predicted values and subsequent actual detection values of specific plots. When the residuals deviate from the normal distribution for a long period, an "unmodeled factor" warning is automatically triggered, indicating to managers that there may be key influencing factors not included in the initial model, such as soil microbial activity or specific trace elements. The adaptive enhancement mechanism links the warning with a standardized model iteration process. The system guides users to supplement new dimensions of data through the data interface and automatically integrates the new data into feature vectors to trigger model retraining, forming a closed loop of "monitoring-warning-data supplementation-automatic retraining". Through this adaptive enhancement mechanism, the digital twin acquires the technical capability of self-improvement and dynamic correction, effectively slowing down the process of model accuracy decay due to environmental changes, ensuring the long-term accuracy and reliability of model predictions, reducing the risk of management plans deviating from preset goals due to decreased model accuracy, and ensuring the reliable operation of the system.
[0026] By defining interfaces between the data warehouse and various external systems and encapsulating predictive models into independent engines, the digital twin is able to acquire multimodal data throughout its entire lifecycle, achieving modularization of core intelligence and enhancing the system's scalability.
[0027] Furthermore, the digital twin generates an agricultural risk knowledge graph based on sample detection data and agricultural management data. Based on the agricultural management data and the agricultural risk knowledge graph, candidate agricultural scheduling sequences are generated. Meteorological data is used to simulate and evaluate the candidate agricultural scheduling sequences to determine the final agricultural scheduling sequence. Corresponding to step S2 above, the specific process includes: First, the system accesses sample testing data and agricultural management data from the data warehouse to identify core entities and relationships. These core entities include agricultural product batches, plots of land, pesticide types, pesticide application records, and testing records. Based on national safety standards, a preset safety threshold for pesticide residues is set. For example, for pesticide X in agricultural product A, the preset safety threshold is set to 0.05 mg / kg. The actual residue value in the testing records is compared with the preset safety threshold. If the actual residue value exceeds the preset safety threshold, the agricultural product batch associated with the testing record is automatically marked with a high-risk attribute. This high-risk attribute is then transmitted to the plot of land associated with the batch through the knowledge graph's relationships. For example, if batch B is marked with a high-risk attribute due to excessive pesticide levels, this high-risk attribute is transmitted to the associated planting plot A. The construction of the knowledge graph attributes risk to specific production factors, transforming implicit risk information into explicit knowledge that is understandable and searchable by machines, thus achieving accurate identification of source risks.
[0028] Furthermore, in constructing the agricultural risk knowledge graph, the concepts of "risk transmission" and "quantified risk" are introduced. The system marks plots associated with batches exceeding standards with high-risk attributes, and assigns secondary risk weights to adjacent plots based on geographical proximity and hydrological factors. By transforming risk levels from simple binary attributes into dynamic quantitative scores, risk assessment expands from marking individual plots to the proactive identification of potential risk areas, improving the precision of identifying potential risk areas and the accuracy of risk avoidance.
[0029] Secondly, when a new agricultural product batch needs to be planned, the system obtains a list of available agricultural resources from the agricultural management data, which includes land parcels and pesticide types. The system queries the agricultural risk knowledge graph to determine whether the land parcel entity has a high-risk level attribute and selects resources that do not have a high-risk level attribute. Then, according to preset agricultural operation rules, the resources are combined in a structured arrangement to form a candidate agricultural scheduling sequence containing specific agricultural events and execution times. Specifically, the structured arrangement is implemented through a backtracking algorithm based on constraint satisfaction, with the following steps: obtaining the growth period of the batch to be planned, the list of available land parcels, the list of available pesticides, and the constraint set stored in the rule base, and defining an empty... The system generates a scheduling sequence; it defines a recursive function that takes the current processing date and the current scheduling sequence as input parameters. If the current processing date exceeds the total growth period, the current scheduling sequence is considered a valid candidate sequence, which is then added to the candidate set and returned. The system examines all possible agricultural operations for the current processing date, checking their compliance against a set of constraints, such as whether the application interval is met or whether pesticides are prohibited during the growth period. If the operation is compliant, it is added to the current scheduling sequence. The function is then called with the next day as the new date. After this call returns, the compliant operation is removed from the current scheduling sequence, and other possible compliant operations are tried. The system generates multiple candidate sequences by changing resource combinations, with a limit of up to 10 candidate sequences to control the computational scale. The preset agricultural operation rules are stored in a rule base in the form of structured data, and each rule has clearly defined triggering conditions and execution actions. For example, the pre-defined agricultural operation rules include rules on safe intervals between pesticide applications, environmental constraints based on real-time weather, and resource conflict rules between agricultural equipment and manpower. Specifically: "Rule ID: R001; Applicable crop: strawberry; Condition: Crop growth stage is flowering; Action: Pesticide A is prohibited, pesticide B is permitted; Application interval: 10 days"; "Rule ID: R002; Applicable crop: general; Condition: Pesticide A has been applied in the past 15 days; Action: Pesticide B is prohibited in this plot." By transforming the complex planning process that relies on human experience into an automated and standardized sequence generation process, efficiency is improved, compliance of agricultural operations is ensured, and a foundation is provided for subsequent optimization.
[0030] Finally, the system extracts agricultural events for each candidate sequence, fills the corresponding time points of future meteorological data in the meteorological data, generates simulation feature vectors, and inputs these simulation feature vectors into the trained pesticide degradation prediction model to simulate and obtain the prediction results of pesticide residue changes over time. Based on the pesticide residue prediction results, an evaluation score is calculated. The specific calculation process for the evaluation score is as follows: The candidate sequence is simulated to obtain the predicted safe time point and the predicted harvest residue value. The predicted safe time point is the date on which the predicted pesticide residue value first falls below a preset safe threshold, and the predicted harvest residue value is the predicted pesticide residue value on the preset harvest date. The first component is the reciprocal of "predicted safe time point - first agricultural event date + 1", and the second component is the preset safe threshold divided by (predicted safe threshold + predicted harvest residue value). The two components are weighted and summed to obtain the final evaluation score, calculated as: (weight 1 × first component) + (weight 2 × second component), where weight 1 and weight 2 are custom weight coefficients for the components. The system determines the candidate agricultural scheduling sequence with the highest evaluation score as the final agricultural scheduling sequence. For example, when mitigating extreme risks, a weight of 0.7 is assigned to the first component and a weight of 0.3 to the second component; when ensuring harvest quality, a weight of 0.3 is assigned to the first component and a weight of 0.7 to the second component. By conducting data-driven simulation evaluation and optimization of multiple candidate sequences, the final agricultural scheduling is ensured to be safe, compliant, and the optimal solution under foreseeable conditions, thus improving the scientific nature and accuracy of production decisions.
[0031] Furthermore, the prediction model in the digital twin is invoked to simulate the state evolution of each agricultural product batch obtained from the final agricultural scheduling sequence. A dynamic profile is generated based on the time-series trend data generated by the simulation. Corresponding to step S3 above, the specific process includes: The system calls the prediction model in the digital twin to perform a complete state evolution simulation of the final agricultural scheduling sequence, generating time-series trend data of pesticide residue values for the batch from application to a period after harvest. The system compares the time-series trend data with preset safety thresholds point by point, identifying the prediction time point when the predicted residue value first falls below the threshold. The system integrates the time-series trend data and key prediction time points to construct a dynamic profile associated with the batch. The dynamic profile includes the batch ID, pesticide residue prediction curve, predicted safety time point, estimated quality, and optimal sales period. The pesticide residue prediction curve is the time-series trend data generated by the simulation. The specific calculation method for the estimated quality score is as follows: First, determine the highest quality score immediately after harvest and the lowest quality score at which the quality no longer declines. Subtract the lowest quality score from the highest quality score to obtain the initial variable quality range. The system sets a fixed daily decay multiplier based on the agricultural product type information; for example, for fruits with short shelf lives, the multiplier is set between 0.95 and 0.98. When calculating the quality for any N days after harvest, the system multiplies the initial variable quality range by the daily decay multiplier N times to obtain the remaining quality range after decay for that day. Finally, the remaining quality range for that day is added to the lowest quality score to obtain the final estimated quality score for that day, achieving an accurate simulation of the non-linear decline in quality as the number of days after harvest increases. The optimal sales period is determined by comprehensively considering the predicted safe time point, the estimated quality curve, and market price forecasts, using a benefit model to calculate the date range with the highest expected overall benefit.
[0032] Furthermore, a multi-objective programming model is constructed, using dynamic profiles and supply chain data as constraints. Path deduction is then performed to generate disposal paths, corresponding to step S4 above. The specific process includes: Specifically, step S4 includes the following sub-steps: S41, determining the decision variables and decision space; S42, constructing sub-functions within the quantified objective function; S43, weighted summation and solving for the optimal solution.
[0033] S41, Determine the decision variables and decision space; the decision variables are the harvest date and the disposal plan, and the decision space is the application of hard constraints. For example, if the pesticide residue of a batch of agricultural products is predicted to be below the safe threshold on the 25th, all alternative harvest dates are the 25th or later. This defines a safe and effective decision space in terms of time, eliminating the possibility of non-compliant disposal from the source.
[0034] S42, construct sub-functions within the quantification objective function; within the decision space of S41, the system quantifies and scores possible decision combinations, with scores obtained by weighting the profit objective function and the time optimization function; the profit objective function calculates the economic benefit score, where economic benefit score = market forecast price - warehousing cost - transportation cost, and the market forecast price is obtained from the supply chain data; the current quality score is obtained based on the dynamic profile of the agricultural product batch, and the corresponding quality premium coefficient is determined based on the current quality score. For example, according to expert experience, when the current quality score is higher than 90, the quality premium coefficient is 1.5; when the current quality score is not higher than 90 but higher than 80, the quality premium coefficient is 1.1; when the current quality score is not higher than 80, the quality premium coefficient is 0.8. The time optimization function calculates the timeliness score, where waiting days = harvest date - predicted safe time point, and the reciprocal of the value after adding 1 to the waiting days is used to obtain the timeliness score.
[0035] S43, Weighted summation and optimal solution finding: Importance weights are set for the profit objective function and the time optimization function, with the weights adjusted according to the current strategy, and the sum of the weights is 1; the quantification function calculates the final quantification target score, which is: Final quantification target score = (Economic benefit score × Weight_Profit) + (Timeliness score × Weight_Timeliness); the system scores all possible decision combinations within the decision space; when there are 5 or fewer alternative solutions, the solver uses an exhaustive search algorithm to select the decision combination with the highest final quantification target score as the optimal solution under the current conditions, outputting it as a disposal path; when there are more than 5 alternative solutions, the solver uses a genetic algorithm for rapid optimization, specifically: each individual consists of "harvest date, disposal solution ID", the fitness function is the final quantification target score, and iteration is performed using roulette wheel selection, single-point crossover, and a 5% probability mutation operator. The termination condition is 200 iterations or the optimal solution remains unchanged for 50 consecutive generations. The decision combination with the highest final quantification target score is selected as the optimal solution under the current conditions, outputting it as a disposal path. This method transforms complex business problems into a well-defined, well-constrained, and quantifiable mathematical optimization problem. By solving this problem, it provides automated, data-driven scientific decision-making support for the subsequent disposal of agricultural products. For example, in a scenario where rapid cash flow is prioritized, if the manager sets the weight of timeliness to 0.8, the model will prioritize the fastest disposal option. The model finds that "harvesting on August 25th and shipping to a warehouse on August 26th" has the highest score and is chosen as the final disposal path.
[0036] Furthermore, when constructing the multi-objective programming model, a dynamic parameter adjustment method is introduced into the profit objective function. The system obtains external market demand saturation data through an interface and quantifies it as an adjustment factor, adjusting the quality premium coefficient and weight within the profit function in real time. By transforming the optimization model that relies on static parameters into an enhanced model that can respond to external data flows and dynamically correct its own parameters, the technical problem of model parameter failure caused by sudden changes in the market environment, leading to deviations from the optimal solution in the planning results, is solved. Parameter calibration, which previously required manual experience-based judgment, is transformed into an efficient automated data process, improving the reliability and accuracy of the final generated disposal path, ensuring optimal allocation of subsequent logistics and warehousing, and achieving lean management across the entire chain.
[0037] Furthermore, based on the disposal path, tiered supply chain collaborative management actions are automatically triggered, including logistics scheduling and automated tiered warehousing, corresponding to the S5 step mentioned above. The specific process includes: The system receives the disposal route, automatically parses the transportation information within the route, and converts it into standardized electronic instructions. These electronic instructions are then sent to the logistics module of the supply chain management system, which automatically schedules transportation resources, such as booking vehicles and planning routes. The system also sends dynamic profiles of agricultural product batches to the warehouse management system of the target warehouse along the disposal route via an interface, enabling automated and differentiated tiered warehousing management. For example, tiering rules could include: when the dynamic profile shows "predicted residual value below the safety threshold" and "at the optimal sales period," triggering a high-level action, such as directing a forklift or conveyor belt to store the agricultural product batch in storage location A1 and marking it as "high quality - immediately available"; when the dynamic profile shows "predicted residual value below the safety threshold" but "current date is not yet the optimal sales period," triggering a standard-level action, such as allocating it to a Class B standard storage location.
[0038] This invention constructs a digital twin incorporating predictive models and combines it with knowledge graphs for forward-looking planning, shifting from post-event detection to pre-event avoidance and improving risk predictability. Simultaneously, through simulation evaluation of multiple scenarios and multi-objective planning of response paths, it breaks down information barriers between the production end and the supply chain, achieving dynamic optimization and intelligent collaboration across the entire chain, thereby improving management efficiency and the scientific nature of decision-making. Example
[0039] In this application embodiment, a pesticide residue detection intelligent management system based on multimodal collaboration is applied to strawberry base B; see reference Figure 2 The intelligent management system includes: a twin construction module, a generative planning module, a disposal decision module, and a collaborative management module.
[0040] Furthermore, the twin building block includes a data warehouse and a pesticide degradation prediction model engine. The data warehouse adopts a hybrid database architecture, connecting in real-time with external laboratory information management systems, agricultural management information systems, public meteorological service platforms, and supply chain management systems through application programming interfaces (APIs), IoT data gateways, and database connectors. It aggregates multimodal data from four categories: sample testing, agricultural management, meteorology, and supply chain. A time-series database stores meteorological and environmental data; a relational database stores structured agricultural management and supply chain data; and a graph database stores the subsequently generated agricultural risk knowledge graph. The pesticide degradation prediction model engine is a microservice encapsulating a trained long short-term memory (LSTM) network model. The engine provides a standard application programming interface (API), receives feature vector input, and returns predicted pesticide residue values.
[0041] Furthermore, the generative planning module includes a knowledge graph generator, a candidate sequence generator, and a simulation evaluator. The knowledge graph generator is triggered periodically, calling sample detection data and agricultural management data to perform entity recognition, relation extraction, and risk labeling, storing the results in a graph database to form an agricultural risk knowledge graph. When the candidate sequence generator receives a new production task, it retrieves a list of available resources from the agricultural management information system, queries the agricultural risk knowledge graph to filter resources with high-risk attributes, and finally arranges and combines them according to preset agricultural rules to generate multiple candidate agricultural scheduling sequences represented in JSON format. The simulation evaluator receives all candidate sequences, calls a prediction model engine, and combines future meteorological data to simulate each sequence, calculating the quantitative evaluation score of the sequence; the sequence with the highest evaluation score is determined as the final agricultural scheduling sequence.
[0042] Furthermore, the disposal decision module includes a dynamic profile generator and a multi-objective programming solver. The dynamic profile generator receives the final agricultural scheduling sequence, calls the prediction model to simulate the state evolution from pesticide application to harvest, and generates a dynamic profile containing time-series trend data and predicted safe time points. The multi-objective programming solver takes the dynamic profile and supply chain data as input, and has a built-in quantitative objective function consisting of a profit objective function and a time optimization function. The execution of the disposal action after the predicted time point is set as a hard constraint, and a weighted summation method is used to solve the problem, ultimately outputting a structured disposal path decision.
[0043] Furthermore, the collaborative management module includes a workflow engine and an interface adapter. The workflow engine receives and parses instructions obtained from the processing path; the interface adapter converts the instructions into a format recognizable by downstream systems. For example, it calls the logistics system's interface to create a transportation order, calls the warehouse management system's API to create an inbound task, and pushes the current batch's dynamic profile data to the warehouse management system. The warehouse management system then performs differentiated storage location allocation and quality level labeling. Through the collaborative work of these modules, this system tightly integrates data, models, planning, and execution, achieving intelligent, forward-looking, closed-loop management of the entire process from the source of production to the end of the supply chain, improving efficiency and the scientific nature of decision-making. Example
[0044] This embodiment provides a specific scenario for dynamic response and replanning applications to address sudden weather changes. (See attached document.) Figure 3 This further illustrates the dynamic optimization capability of the method of the present invention.
[0045] The application subject of this embodiment is the strawberry base B mentioned in Embodiment 2. The base has generated a final agricultural scheduling sequence for strawberries with batch number B-01 according to the method of this invention, and generated an initial disposal path based on preliminary weather forecasts: harvesting on the 15th, and transportation to a fresh food supermarket in City A via cold chain logistics on the 16th. On the 12th, the system obtained the latest meteorological data through the public meteorological service platform. The data showed that the originally predicted sunny weather from the 13th to the 15th suddenly changed into continuous heavy rain.
[0046] In response to this emergency, the intelligent management system of the present invention automatically executes the following dynamic response: The system detected a significant deviation between the input meteorological data and the predicted data used to generate the initial disposal path. It automatically triggered the pesticide degradation prediction model engine, using the latest rainfall prediction data to re-simulate the pesticide degradation process of batch B-01 strawberries under emergency conditions. Analysis of the time-series trend data generated by the re-simulation showed that continuous rainfall led to reduced sunlight and increased humidity, significantly slowing the pesticide degradation rate. The predicted pesticide residue value for the 15th was now higher than the preset safety threshold. The system calculated a new predicted safety time point, postponing it to the 20th. The dynamic profile generator updated the dynamic profile of the current batch, correcting the predicted safety time point to the 20th. Through real-time correction of the dynamic profile, the system proactively identified product quality and safety risks caused by sudden weather changes, providing timely and reliable decision-making basis for subsequent disposal path replanning.
[0047] The updated dynamic profile automatically triggers the multi-objective programming solver. Since the hard constraints of the original disposal path can no longer be met, the solver re-deduces the path based on the new dynamic profile and supply chain data. For example, supply chain data shows that orders from supermarkets in City A have strict time constraints; delayed delivery will lead to default and voided demand. After solving the multi-objective programming model, a new optimal disposal path is generated: harvest the batch of strawberries on the 20th; having missed the optimal fresh produce season, change the batch's supply from "supermarkets in City A" to "jam processing plants in City C," and execute transportation on the 21st. When the original plan fails due to unexpected interruptions, the system automatically finds and plans the optimal commercial disposal path, avoiding the risks of product voiding and supply chain defaults, and minimizing losses.
[0048] The collaborative management module receives the new disposal path and automatically sends instructions to the supply chain management system through the interface adapter: cancel the logistics order originally scheduled to be sent to the supermarket in City A on June 16; book a general freight vehicle to the processing plant in City C on June 21, and push the updated batch dynamic profile to the processing plant's warehouse management system. Example
[0049] In this embodiment, the intelligent pesticide residue detection management system based on multimodal collaboration proposed in this invention is applied to Vineyard C. This vineyard uses the system of this invention to manage a batch of grapes with batch number C-01, intended for the production of high-end dry red wine. The system has generated a dynamic profile for this batch of grapes, showing that the predicted safe time point for pesticide residues is 10 days, and the optimal harvest time for achieving the best winemaking flavor is between the 18th and 22nd day.
[0050] At this point, the estate manager has three options: harvest as soon as possible to accelerate capital recovery, wait for better quality products to obtain a higher premium, or seek a better market price within a reasonable waiting period. Managers can use the system's decision-making module to input different business objective weights to generate differentiated disposal paths.
[0051] To expedite harvesting and accelerate capital recovery, the management adjusted the weights in the multi-objective programming model as follows: the weight of the time optimization function was set to 0.8, and the weight of the profit objective function was set to 0.2. Under these weights, the system's quantitative objective function prioritizes minimizing storage waiting time. The resulting disposal path is: organize harvesting on the 10th and send the wine to the basic wine production line for fermentation; minimize the cycle from field to production to ensure the fastest possible capital turnover.
[0052] If the goal is to achieve higher product premiums by waiting for better quality, the manager adjusts the weights in the multi-objective programming model as follows: the weight of the time optimization function is set to 0.1, and the weight of the profit objective function is set to 0.9. Under this weight, the system's quantitative objective function prioritizes maximizing expected profit. The resulting solution path is: continue fruiting in the field, organize harvesting on the 20th, and send the fruit to the flagship premium wine production line; ensure the highest quality raw materials, and maximize overall profit.
[0053] If a better market price is sought within a reasonable waiting period, the manager adjusts the weights in the multi-objective programming model as follows: the weight of the time optimization function is set to 0.5, and the weight of the profit objective function is set to 0.5. Under this weight, the system's quantitative objective function will balance time and profit. The resulting disposal path is: continue fruiting and growing in the field, organize harvesting on the 18th, and send it to the flagship premium wine production line; find a balance point that takes into account quality, cost, and efficiency, and achieve a balance between commercial value and time efficiency. The disposal decision module of this invention quantifies high-level business strategies into model parameters through a multi-objective programming model, generating an executable optimal disposal path, providing flexible, data-driven decision support capabilities for agricultural production and supply chain management.
[0054] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A smart management method for pesticide residue detection based on multimodal collaboration, characterized in that, Includes the following steps: A digital twin containing a pesticide degradation prediction model is constructed based on multimodal data; the multimodal data includes sample detection data, agricultural management data, meteorological data, and supply chain data; The digital twin generates an agricultural risk knowledge graph based on sample detection data and agricultural management data. Based on the agricultural management data and the agricultural risk knowledge graph, it generates candidate agricultural scheduling sequences. Meteorological data is used to simulate and evaluate the candidate agricultural scheduling sequences to determine the final agricultural scheduling sequence. The prediction model in the digital twin is invoked to simulate the state evolution of each batch of agricultural products obtained from the final agricultural scheduling sequence, and a dynamic profile is generated based on the time-series trend data generated by the simulation. A multi-objective programming model is constructed, and dynamic profiles and supply chain data are used as constraints for the multi-objective programming model to generate disposal paths through path deduction. Based on the disposal path, hierarchical supply chain collaborative management actions are automatically triggered, including logistics scheduling and automated hierarchical warehousing.
2. The intelligent management method for pesticide residue detection based on multimodal collaboration according to claim 1, characterized in that, The pesticide degradation prediction model is built on a long short-term memory network and includes a data processing layer, a sample construction layer, and a model training layer. The data processing layer performs spatiotemporal alignment, normalization, and numerical encoding on the agricultural management data and meteorological data. The sample construction layer constructs a training feature vector containing pesticide application characteristics and environmental evolution characteristics based on the processed agricultural management data and meteorological data. The pesticide application characteristics include pesticide type, application dosage, and application date, while the environmental evolution characteristics include the plot's average daily temperature, humidity, rainfall, and sunshine duration. The training feature vector is used as the input vector of the prediction model, and the sample detection data is used as the ground truth label of the prediction model output, forming an "input vector-ground truth label" sample pair. The model training layer inputs the sample pairs into the prediction model and uses the gradient descent optimization algorithm to iteratively train and optimize the prediction model based on minimizing the mean square error between the model's predicted value and the ground truth label.
3. The intelligent management method for pesticide residue detection based on multimodal collaboration according to claim 1, characterized in that, The digital twin includes a data warehouse that interfaces with external data sources and a trained pesticide degradation prediction model engine. The data warehouse stores the sample detection data, agricultural management data, meteorological data, and supply chain data.
4. The intelligent management method for pesticide residue detection based on multimodal collaboration according to claim 1, characterized in that, The steps for generating the agricultural risk knowledge graph include: identifying and extracting core entities from the sample testing data and agricultural management data. These core entities include agricultural product batches, land plots, pesticide types, pesticide application records, and testing records. The relationships between these entities are stored in a structured manner as "subject-relationship description-object," and these relationships include the correspondence between agricultural product batches and land plots, pesticide application records, and testing records. The actual residue values in the testing records are compared with a preset safety threshold. When the actual residue value is greater than the preset safety threshold, the agricultural product batch entity corresponding to the testing record is automatically labeled with a high-risk level attribute.
5. The intelligent management method for pesticide residue detection based on multimodal collaboration according to claim 1, characterized in that, The process of generating candidate agricultural scheduling sequences includes: obtaining a list of available agricultural resources for the planned agricultural product batches from the agricultural management data, wherein the list of available agricultural resources includes land parcels and pesticide types; querying the agricultural risk knowledge graph to determine whether the resources in the list of available agricultural resources have a high-risk level attribute; constructing resource combinations based on the determination results and selecting resources that do not have a high-risk level attribute; and structuring the resource combinations according to preset agricultural operation rules to form a candidate agricultural scheduling sequence that includes specific agricultural events and execution times.
6. The intelligent management method for pesticide residue detection based on multimodal collaboration according to claim 1, characterized in that, The simulation evaluation of candidate agricultural scheduling sequences using meteorological data includes: extracting agricultural operation events from the candidate agricultural scheduling sequences, filling the agricultural operation events into the corresponding time points of future meteorological data in the meteorological data, generating simulation feature vectors, inputting the simulation feature vectors into the pesticide degradation prediction model for simulation analysis to obtain pesticide residue prediction results; calculating a quantitative evaluation score based on the pesticide residue prediction results, the calculation of the quantitative evaluation score includes: extracting the predicted safe time point in the pesticide residue prediction results where the pesticide residue value first falls below a preset safe threshold, calculating a first component that is inversely proportional to the predicted safe time point; extracting the predicted residue value corresponding to the preset harvest date in the pesticide residue prediction results, calculating a second component that decreases as the predicted residue value increases; weighted summing of the first and second components to obtain the quantitative evaluation score; and selecting the candidate agricultural scheduling sequence with the highest evaluation score as the final agricultural scheduling sequence.
7. The intelligent management method for pesticide residue detection based on multimodal collaboration according to claim 1, characterized in that, The steps for generating a disposal path include: comparing the predicted pesticide residue values from the time-series trend data with a preset safety threshold point by point, and identifying the predicted time point when the predicted residue value first falls below the preset safety threshold; integrating the time-series trend data and the predicted time point to generate a dynamic profile associated with the agricultural product batch; based on the dynamic profile, setting the execution of the disposal action after the predicted time point as a hard constraint, and constructing a quantitative objective function using market price and transportation cost information from the supply chain data; the quantitative objective function includes a profit objective function and a time optimization function, wherein the profit objective function takes the predicted market price of the agricultural product batch as a positive revenue item and storage costs and transportation costs as negative cost items, and the time optimization function is inversely proportional to the waiting days, wherein the waiting days are the difference in days between the harvest date and the predicted safety time point; within the space defined by the hard constraint condition, the profit objective function and the time optimization function are weighted and summed to obtain the quantitative objective function, the quantitative objective function is solved, and the resulting decision combination is used as the disposal path.
8. A pesticide residue detection intelligent management system based on multimodal collaboration, characterized in that, include: The digital twin construction module constructs a digital twin containing a pesticide degradation prediction model based on multimodal data; the multimodal data includes sample detection data, agricultural management data, meteorological data, and supply chain data; the generative planning module generates an agricultural risk knowledge graph based on the sample detection data and agricultural management data, generates candidate agricultural scheduling sequences based on the agricultural management data and agricultural risk knowledge graph, and uses meteorological data to simulate and evaluate the candidate agricultural scheduling sequences to determine the final agricultural scheduling sequence; Disposal Decision Module: Calls the prediction model in the digital twin to simulate the state evolution of each batch of agricultural products obtained from the final agricultural scheduling sequence, and generates a dynamic profile based on the time-series trend data generated by the simulation; A multi-objective programming model is constructed, and dynamic profiles and supply chain data are used as constraints for the multi-objective programming model to generate disposal paths through path deduction. Collaborative Management Module: Based on the disposal path, it automatically triggers hierarchical supply chain collaborative management actions, including logistics scheduling and automated hierarchical warehousing.