Intelligent identification system and method for vegetable planting mode based on stable isotope
The vegetable planting pattern recognition system, which integrates multi-dimensional databases and multiple models, combined with stable isotope and geographical data, achieves efficient and accurate planting pattern recognition. This solves the problems of high cost, long cycle, and easy data tampering in traditional detection methods, and dynamically adapts to new planting technologies.
Patent Information
- Application Number
- CN202511257179.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2025-12-19
AI Technical Summary
Identifying traditional agricultural product planting patterns requires destroying samples and has a long testing cycle. Existing traceability system data is easily tampered with and cannot be directly linked to planting pattern characteristics. Single machine learning models have weak generalization ability in complex data scenarios, and the system is difficult to update to adapt to new planting areas or patterns.
It uses a multidimensional database to store stable isotope and geographic data, integrates four machine learning models: PLS-DA, SVM, RF, and ANN, and realizes planting pattern recognition through feature extraction and hierarchical classification algorithms. It also combines a visualization interaction module and a WeChat mini-program for data display and model prediction.
It achieves non-destructive and efficient vegetable planting pattern recognition, reducing detection costs by 30%, shortening the time to 1 minute, and improving accuracy by 30%. The system dynamically adapts to new planting technologies without the need for manual intervention or updates.
Smart Images

Figure CN121171392A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural product quality and safety traceability technology, specifically to an intelligent identification system and method for vegetable planting patterns based on stable isotope data fusion and multi-model collaboration. Background Technology
[0002] Traditional identification of agricultural planting patterns requires laboratory chemical analysis (such as soil and fertilizer composition testing, pesticide residue analysis), which destroys samples and has a long testing cycle (usually 24-48 hours), failing to meet the needs of large-scale rapid screening. Existing traceability systems mostly rely on blockchain to record planting processes (such as fertilization time and irrigation volume), but this data is easily tampered with and cannot be directly correlated with planting pattern characteristics. Single machine learning models (such as those using only SVM) have weak generalization ability in complex data scenarios. Traditional systems display data in tabular form, failing to intuitively present the relationship between planting patterns and the geographical environment; furthermore, once deployed, models are difficult to update and cannot adapt to the detection needs of new planting areas or patterns. Summary of the Invention
[0003] This invention aims to provide an intelligent identification system for vegetable planting patterns based on stable isotopes, comprising:
[0004] Multidimensional database module: stores the δ of vegetable samples. 13 C、δ 15 N, δ 2 H, δ 18 The database contains stable isotope values, as well as fields for origin longitude, latitude, cultivation mode, and product name. The database table structure includes fields for ID, Name, Model, Address, Longitude, Latitude, and [other fields not specified in the original text]. 13 C 15 N、 2 H, 18 O has a total of 10 fields;
[0005] Multi-model integration module: Integrates four machine learning models: PLS-DA, SVM, RF, and ANN, and achieves automatic identification of organic, green, and ordinary planting patterns through feature extraction and hierarchical classification algorithms;
[0006] Visualization and Interaction Module: The sampling points are marked with an electronic map, and the data is displayed in combination with tables and radar charts. The user inputs the detection data and receives feedback on the model prediction results through a WeChat mini program.
[0007] Furthermore, in the aforementioned system, the PLS-DA model of the multi-model integration module employs the following projection vector calculation method: Let the independent variable matrix be the X isotope data matrix (n×4) dimensional, and the dependent variable matrix be the Y cultivation mode label matrix (n×3) dimensional. The projection vectors w and c are obtained by iteratively solving the following optimization problem: in Given the current predicted value of Y, data dimensionality reduction is achieved by extracting the top k latent variables (LVs).
[0008] Furthermore, the classification steps of the PLS-DA model include:
[0009] The training and validation sets were randomly divided to ensure that the samples included organic, green, and conventional cultivation methods.
[0010] The projection vector is calculated using the formula, and X is projected into a low-dimensional space to obtain a new feature matrix T;
[0011] Linear discriminant analysis (LDA) is performed on T to maximize inter-class variance and minimize intra-class variance, thus obtaining the classification decision boundary. Furthermore, the SVM model employs a radial basis function (RBF) kernel, with the kernel function expression being K(x... i x j )=exp(-γ||x i -x j || 2 ), σ is the standard deviation of the sample features, and γ- and the penalty parameter C are optimized through cross-validation.
[0012] Furthermore, in the system described above, the parameter settings of the RF model include:
[0013] Number of decision trees (nestimators = 100);
[0014] The feature selection metric is the Gini coefficient.
[0015] The minimum number of leaf node samples is min_samples_leaf = 1;
[0016] The maximum number of features, max_features = auto, means that all features are considered.
[0017] Furthermore, the ANN model uses the gradient descent algorithm to update the weights, and the weight update formula is as follows: Where wt is the weight matrix of the t-th iteration, η = 0.1 is the learning rate, L is the cross-entropy loss function, the input layer is 4-dimensional isotope data, the output layer is the probability values of 3 cultivation modes, and the number of hidden layers and neurons can be dynamically adjusted through the system interface.
[0018] Furthermore, the visualization interaction module includes:
[0019] Electronic map component: Developed based on OpenLayers, it uses different colors to mark sampling points, and clicking on a point allows you to view its delta (δ). 13 C、δ 15 N and other indicator values;
[0020] Mini Program Radar Chart Component: Displays the prediction probabilities of four models—PLS-DA, SVM, RF, and ANN—in real time, as well as the final probability value after integration.
[0021] Furthermore, the data upload module supports batch data import via Excel templates, and the data import process automatically triggers the following steps:
[0022] Samples with outlier |x-μ|>3σ were removed using the Z-score algorithm;
[0023] Update the PostgreSQL database and trigger incremental training of the multi-model ensemble module.
[0024] Furthermore, the system development architecture is as follows:
[0025] The backend web service is developed using the Flask framework and the Python language, with PostgreSQL as the database.
[0026] The front-end is developed using the React framework and JavaScript language for WeChat mini programs, and calls the back-end interface via the SOAP protocol.
[0027] Furthermore, the intelligent identification method for vegetable planting patterns in the system includes the following steps:
[0028] δ of vegetable samples 13 C、δ 15 N, δ 2 H, δ 18 O values are entered into a multidimensional database; principal components are extracted using the PLS-DA model to reduce the data dimensionality to 2-3 dimensions; hierarchical classification is performed sequentially using the SVM-RBF model, RF model, and ANN model to output cultivation pattern prediction results and probabilities; the distribution of sampling points and prediction results are visualized through an electronic map and WeChat mini-program.
[0029] Beneficial effects:
[0030] Efficiency improvement: The cost of single sample detection has been reduced from 50 yuan to 5 yuan (only isotope detection + model call is required), and the detection time has been shortened from 24 hours to 1 minute.
[0031] Breakthrough in accuracy: The average accuracy after multi-model integration is 89.7%, which is more than 30% higher than traditional methods.
[0032] Dynamic adaptability: The system automatically updates the model after new data is added, without the need for manual intervention, and adapts to the promotion of new planting technologies. Attached Figure Description
[0033] Figure 1 System overall architecture diagram;
[0034] Figure 2 Multi-model integration flowchart;
[0035] Figure 3 : Electronic map visualization interface;
[0036] Figure 4 The interface for the prediction results in the mini-program. Detailed Implementation
[0037] Example 1
[0038] This paper presents a non-destructive, efficient, and accurate method for identifying vegetable planting patterns, which solves the problems of high cost and low efficiency of traditional detection methods.
[0039] Build a multi-model collaborative intelligent recognition system to improve classification accuracy in complex scenarios.
[0040] It automates and dynamically optimizes the entire process of data collection, analysis, and visualization, lowering the barrier to entry for users.
[0041] 1: Methods for Acquiring and Standardizing Stable Isotope Multidimensional Data
[0042] Technical solution:
[0043] δ of vegetable samples 13 C、δ 15 N, δ 2 H, δ 18 A 10-field multidimensional database was constructed by combining the ratios of four stable isotopes, O, and Cultivation mode (organic / green / common), and Variety (vegetables / lettuce, etc.).
[0044] Example: Among 910 data points from a base in Shanghai, the δ of organic vegetables... 15 The N value was on average 2.3‰ higher than that of ordinary vegetables, forming a significant difference.
[0045] Innovation advantages:
[0046] Stable isotopes, acting as "natural fingerprints," can reflect the type of fertilizer used during the planting process (e.g., organic fertilizers contain higher delta content). 15 N), irrigation water source (δ) 2 H and δ 18 O reflects information such as water quality regional characteristics, and is non-destructive and the data is traceable.
[0047] 2: Multi-model integrated hierarchical recognition architecture for planting patterns
[0048] Technical solution:
[0049] Construct a four-layer model architecture including PLS-DA, SVM, RF, and ANN:
[0050] PLS-DA pre-screening: Principal components are extracted through partial least squares discriminant analysis, reducing the data dimensionality (e.g., reducing 4-dimensional isotope data to 2-dimensionality) and reducing the computational load of the model.
[0051] SVM-RBF core classification: It uses the radial basis function to process nonlinear features, performs preliminary classification on the dimensionality-reduced data, and outputs organic / non-organic probability values.
[0052] RF Ensemble Optimization: The SVM results are voted on using the Random Forest algorithm to correct the classification error of marginal samples (such as misclassifying "green" as "normal" samples).
[0053] ANN Dynamic Calibration: A dynamic calibration model is built based on artificial neural networks. It takes geographical features of the place of origin (such as longitude and latitude) as input and calibrates the classification results of cross-regional samples.
[0054] Experimental data: After integrating the four models, the average accuracy of cross-regional samples reached 89.7%, which is 24.7% higher than that of a single SVM model.
[0055] 3: Dynamic model training mechanism based on incremental learning
[0056] Technical solution:
[0057] The backend management system supports batch uploading of new data via Excel templates, triggering an automated process of "data cleaning - feature extraction - model retraining".
[0058] Data cleaning: Removing delta values using the Z-score algorithm 13 Outliers in indicators such as C (e.g., data points exceeding the mean ± 3σ).
[0059] Feature importance ranking: Utilizing the `feature_importance_` attribute of the RF model, the contribution of each isotope index to the classification (e.g., δ) is automatically calculated. 15 N's contribution reached 42%.
[0060] Model retraining: The entire model is retrained using K-fold cross-validation (K=5), and the updated model is automatically deployed to the front-end mini-program.
[0061] Application scenario: When new data on green vegetables in a suburb is added, the system completes retraining within 2 hours, and the accuracy of sample recognition in that area increases from 75% to 88%.
[0062] 4: Spatiotemporal Correlation Visualization Methods for Geographic Information and Isotope Data
[0063] Technical solution:
[0064] Sampling points are marked on an electronic map, and planting patterns are displayed using color coding (e.g., red - organic, green - conventional). Clicking on a marker will display a heat map of isotope data distribution in that area.
[0065] Horizontal comparison: δ values of the same vegetable variety in different districts and counties 2 H-value differences (e.g., δ in the sample from Qingpu District, Shanghai) 2 The mean H value was -85‰, significantly lower than -72‰ in Pudong New Area, reflecting differences in irrigation water sources.
[0066] Longitudinal analysis: Dynamically displays the isotopic variation trend of the same vegetable plot over time (e.g., after the application of organic fertilizer, δ¹²...). 15 The N value increased by 1.5‰ quarterly.
[0067] Visualization component: An interactive map component developed based on ECharts, supporting zooming, data downloading, and custom indicator filtering.
[0068] 5: Lightweight front-end interaction and cross-platform service calls
[0069] Technical solution:
[0070] The front-end mini-program is developed using React Native, achieving "three-platform integration" (WeChat mini-program + Android + iOS):
[0071] Quick Input: Supports photo recognition and detection reports (OCR technology extracts δ) 13 (e.g., C values) to reduce manual input errors.
[0072] Results visualization: The prediction probabilities of each model are displayed in the form of radar charts (e.g., SVM predicts an organic probability of 65%, RF predicts 72%, and the final ensemble result is 70%), enhancing user trust.
[0073] Offline caching: In field scenarios with weak network signals, detection data can be cached and automatically synchronized to the background after connecting to the network.
[0074] Performance metrics: Single-sample prediction response time < 1.5 seconds, mini-program installation package size < 5MB, compatible with low-end Android devices.
[0075] 6: A data security system based on access control levels for data traceability
[0076] Technical solution:
[0077] Build a three-tier access control system:
[0078]
[0079] Security mechanisms: Data transmission uses the HTTPS protocol, and database fields are stored encrypted (e.g., δ). 13 C-values are salted and hashed to prevent data leakage.
[0080] 7: Dynamic optimization algorithm for model parameters adapted to multiple scenarios
[0081] Technical solution:
[0082] The system automatically recommends optimal model parameters based on the characteristics of the input data:
[0083] Data complexity detection: Calculate the condition number of the sample covariance matrix to determine the linear separability of the data (if the condition number is greater than 1000, it is considered non-linear data).
[0084] Model matching strategy:
[0085] Linear data: Preferably use the PLS-DA+SVM linear kernel, with parameters C=1.0 and gamma=auto.
[0086] Nonlinear data: Automatically switch to SVM-RBF+RF integration, with parameters n_estimators=200 and gamma=scale.
[0087] User-defined entry: Advanced users can adjust the number of hidden layer nodes in the ANN through the backend (e.g., the default is 3 layers, and the number of nodes in each layer = the number of features × 2 + 1).
[0088] Optimization results: For non-linear data scenarios, the accuracy is improved by 12-15% after automatic optimization compared to the default parameters.
[0089] Example 2
[0090] Step 1: Data Collection and Database Construction
[0091] Fifty samples each of bok choy and lettuce grown under three different methods in the cooperative were collected, and their delta values were tested. 13 C、δ 15 Indicators such as N are entered into the database.
[0092] Example data: Organic lettuce δ 15 The mean N value was 5.8‰, which was significantly higher than that of ordinary lettuce (3.2‰) (P < 0.01).
[0093] Step 2: Model Training and Optimization
[0094] The training and validation sets are divided in an 8:2 ratio, and the automatic training process is initiated:
[0095] PLS-DA extracted the first two principal components, and the cumulative variance contribution rate reached 89%.
[0096] The SVM-RBF model achieved an accuracy of 82% on the validation set, which improved to 88% after RF integration, and finally reached 91% after ANN calibration.
[0097] Step 3: Front-end application and result verification
[0098] The cooperative's quality inspectors uploaded photos of new samples for testing via a mini-program, and the system returned the results within one second: "89% probability of organic farming".
[0099] Laboratory chemical analysis confirmed that the batch of samples was indeed organically grown, and the identification results were consistent.
[0100] Invention Effects
[0101] Efficiency improvement: The cost of single sample detection has been reduced from 50 yuan to 5 yuan (only isotope detection + model call is required), and the detection time has been shortened from 24 hours to 1 minute.
[0102] Breakthrough in accuracy: The average accuracy after multi-model integration is 89.7%, which is more than 30% higher than traditional methods.
[0103] Dynamic adaptability: The system automatically updates the model after new data is added, without the need for manual intervention, and adapts to the promotion of new planting technologies.
[0104] Example 3
[0105] A smart identification system for vegetable planting patterns based on stable isotopes, comprising:
[0106] Multidimensional database module: stores the δ of vegetable samples. 13 C、δ 15 N, δ 2 H, δ 18 The database contains stable isotope values, as well as fields for origin longitude, latitude, cultivation mode, and product name. The database table structure includes fields for ID, Name, Model, Address, Longitude, Latitude, and [other fields not specified in the original text]. 13 C 15 N、 2 H, 18 O has a total of 10 fields;
[0107] Multi-model integration module: Integrates four machine learning models: PLS-DA, SVM, RF, and ANN, and achieves automatic identification of organic, green, and ordinary planting patterns through feature extraction and hierarchical classification algorithms;
[0108] The visualization and interaction module marks the geographical locations of sampling points on an electronic map, displays data using tables and radar charts, and provides user input of detection data and feedback of model prediction results via a WeChat mini-program. In the system described above, the PLS-DA model of the multi-model integration module uses the following projection vector calculation method: Let the independent variable matrix be the X isotope data matrix (n×4) dimensional, and the dependent variable matrix be the Y cultivation mode label matrix (n×3) dimensional. The projection vectors w and c are obtained by iteratively solving the following optimization problem: in Given the current predicted value of Y, data dimensionality reduction is achieved by extracting the top k latent variables (LVs).
[0109] The classification steps of the PLS-DA model include:
[0110] The training and validation sets were randomly divided to ensure that the samples included organic, green, and conventional cultivation methods.
[0111] The projection vector is calculated using the formula, and X is projected into a low-dimensional space to obtain a new feature matrix T;
[0112] Linear discriminant analysis (LDA) is performed on T to maximize inter-class variance and minimize intra-class variance, thus obtaining the classification decision boundary. The SVM model employs a radial basis function (RBF) kernel, with the kernel function expression being K(x... i x j )=exp(-γ||x i -x j || 2 ), σ represents the standard deviation of the sample features, and γ and the penalty parameter C are optimized through cross-validation. The parameter settings of the RF model in the system described above include:
[0113] Number of decision trees (nestimators = 100);
[0114] The feature selection metric is the Gini coefficient.
[0115] The minimum number of leaf node samples is min_samples_leaf = 1;
[0116] The maximum number of features, `max_features`, is set to `auto`, meaning all features are considered. The ANN model uses gradient descent to update the weights, and the weight update formula is as follows: Where wt is the weight matrix of the t-th iteration, η = 0.1 is the learning rate, L is the cross-entropy loss function, the input layer is 4-dimensional isotope data, the output layer is the probability values of 3 cultivation modes, and the number of hidden layers and neurons can be dynamically adjusted through the system interface.
[0117] The visual interaction module includes:
[0118] Electronic map component: Developed based on OpenLayers, it uses different colors to mark sampling points, and clicking on a point allows you to view its delta (δ). 13 C、δ 15 N and other indicator values;
[0119] Mini Program Radar Chart Component: Displays the prediction probabilities of four models—PLS-DA, SVM, RF, and ANN—in real time, as well as the final probability value after integration.
[0120] The data upload module supports batch data import via Excel templates. Importing data automatically triggers the following process:
[0121] Samples with outlier |x-μ|>3σ were removed using the Z-score algorithm;
[0122] Update the PostgreSQL database and trigger incremental training of the multi-model ensemble module.
[0123] The system development architecture is as follows:
[0124] The backend web service is developed using the Flask framework and the Python language, with PostgreSQL as the database.
[0125] The front-end is developed using the React framework and JavaScript language for WeChat mini programs, and calls the back-end interface via the SOAP protocol.
[0126] The intelligent identification method for vegetable planting patterns in the system includes the following steps:
[0127] δ of vegetable samples 13 C、δ 15 N, δ 2 H, δ 18 O value, entered into the multidimensional database;
[0128] Principal components were extracted using the PLS-DA model, reducing the data dimensionality to 2-3 dimensions.
[0129] Hierarchical classification was performed sequentially using the SVM-RBF model, RF model, and ANN model, and the cultivation pattern prediction results and probabilities were output.
[0130] The distribution of sampling points and prediction results are visualized through electronic maps and WeChat mini-programs.
[0131] Example 4
[0132] Traditional solutions rely on cloud servers and mini-programs for interaction, resulting in strong network dependence and slow response in field scenarios. This embodiment addresses offline detection needs by designing an embedded hardware system that integrates stable isotope detection equipment and machine learning models into a portable terminal, achieving integrated on-site sampling, analysis, and identification, thus overcoming the dependence of existing technologies on networks and fixed servers.
[0133] Hardware system architecture design
[0134] 1. Hardware Components of the Portable Detection Terminal
[0135] Core components
[0136] Hardware innovation
[0137] Miniaturized integration: The sensor, computing unit, and display screen are integrated into a 20cm×15cm×5cm body, weighing less than 1.2kg, making it easy to operate by hand.
[0138] Multi-source data synchronous acquisition: The sensor and positioning module are synchronously triggered through the SPI bus to ensure that the timestamp error between isotope data and geographic information is less than 10ms.
[0139] Low power consumption design: Utilizing Dynamic Voltage Regulation (DVFS) technology, standby power consumption is <1.5W, and detection mode power consumption is <5W.
[0140] 2 Edge computing architecture optimization
[0141] Traditional solutions rely on cloud-based model invocation. This embodiment deploys a lightweight model on edge devices to achieve offline inference:
[0142] Model compression techniques:
[0143] The original ANN model was pruned, reducing the number of hidden layers from 3 to 2, and the number of neurons was reduced by 40%.
[0144] Using 8-bit fixed-point quantization, the model file size was compressed from 128MB to 22MB, reducing memory usage by 83%. Hardware acceleration optimization:
[0145] By leveraging the CUDA cores of Jetson Nano to accelerate SVM-RBF matrix operations, inference speed is increased by 5 times (single-sample prediction time is reduced from 1.2 seconds to 0.23 seconds).
[0146] Offline training mechanism:
[0147] The device supports importing pre-trained model files (.pt format) from the cloud via USB, allowing for model updates without an internet connection. 3. Sensor calibration and data preprocessing module.
[0148] Temperature drift compensation:
[0149] Built-in PT1000 temperature sensor monitors ambient temperature in real time and corrects isotope detection values (such as δ) using a polynomial fitting algorithm. 13 The C value is compensated by -0.02‰ per 1°C increase.
[0150] Outlier filtering algorithm:
[0151] The density-based DBSCAN clustering algorithm is used to automatically identify and remove outliers (such as data points whose detection values deviate from the mean by ±4σ).
[0152] Feature normalization processing:
[0153] For δ 13 C(-30‰~-20‰), δ 15 Indices such as N (-5‰ to 10‰) are standardized and scaled to a uniform range of [-1, 1] to improve the model convergence speed.
[0154] Software system design
[0155] 3.1 Embedded Operating System and Development Framework: Operating System: Ubuntu 18.04LTS for ARM, equipped with ROS robot operating system, to realize real-time scheduling of sensor-driven and computing tasks.
[0156] Development languages: Primarily C++ (hardware driver and algorithm implementation), supplemented by Python (model training and data analysis). Key software components:
[0157] Sensor driver package: Develops the LGR sensor communication interface based on libusb, enabling real-time data reading and parsing. Visual interaction package: Develops the UI using the Qt framework, supporting functions such as gesture-based switching of detection modes and historical data querying.
[0158] 3 Improved Machine Learning Model
[0159] To address the computational resource limitations of embedded devices, a lightweight gradient boosting tree model (LightGBM-ES) is designed:
[0160] Feature selection optimization:
[0161] Key features were screened using the variance inflation factor (VIF), and redundant indicators were eliminated (such as the contribution rate of variety name to classification being <5%, which was ignored).
[0162] Finally retain δ 13 C、δ 15 The four core features of N, longitude, latitude, and longitude reduce the amount of computation.
[0163] Model parameter tuning:
[0164] The optimal parameters were searched using the Bayesian optimization algorithm and finally determined as follows:
[0165] Tree depth = 5, number of leaf nodes = 31, learning rate = 0.1, number of iterations = 100.
[0166] The model achieved an accuracy of 87.2% on the test set, a 2.3% improvement over the original ANN model, while reducing memory usage by 60%. Incremental learning mechanism:
[0167] The device supports local data annotation (marking planting patterns via the UI interface) and automatically triggers incremental training when more than 50 new data points are accumulated.
[0168] Using the warm start technique, only new data is trained, and the time taken is less than 3 minutes.
[0169] 3.3 Offline Visualization and Data Management
[0170] Spatiotemporal data visualization:
[0171] With the built-in open-source map library Leaflet, offline map tiles can be loaded in offline environments, sampling points can be marked, and isotope values can be displayed in a bubble chart (bubble size represents δ). 15 (N value, high or low).
[0172] Supports viewing historical data distribution by sliding along the timeline, such as a plot of land where δ was detected three times consecutively. 2 A decrease of 5‰ in the H value suggests a possible change in the irrigation water source.
[0173] Data export and synchronization:
[0174] The test results can be exported as a CSV file and transferred to a PC via USB or Bluetooth.
[0175] Once connected to the network, it automatically synchronizes to the cloud database, realizing a hybrid mode of "offline detection + online management".
[0176] IV. Implementation of Field Operation Procedures
[0177] 4.1 On-site testing process
[0178] Sample collection:
[0179] Collect 5-10g of vegetable leaves using a portable sampler, place them in the sensor detection chamber, and click the "Start Detection" button.
[0180] Data Acquisition:
[0181] The sensor completes isotope value measurement within 30 seconds, and the positioning module simultaneously acquires latitude and longitude (e.g., 31.23°N, 121.48°E).
[0182] The interface displays the raw data in real time: δ 13 C = -24.5‰, δ 15 N = 4.8‰, δ 2 H = -80‰, δ 18 O = -5.2‰.
[0183] Model Inference:
[0184] The preprocessing module normalizes the data, and the LightGBM-ES model outputs the result within 0.2 seconds: "Organic cultivation probability 92%". The results interface displays the classification criteria: δ 15 The N value is higher than the threshold of 3.5‰ (characteristic of organic fertilizer), and the place of origin is located in a known organic planting area (a base in Qingpu District).
[0185] 4.2 Data Management and Model Updates
[0186] Local annotation:
[0187] If the detection results do not match the actual planting pattern (e.g., misjudged as "normal"), the correct category can be manually labeled through the interface, and newly added data will be automatically saved into the "training dataset".
[0188] Incremental training:
[0189] When the number of training data points reaches 50, click the "Model Optimization" button, and the device will automatically perform the following:
[0190] Data cleaning (outlier removal) → Feature selection → LightGBM incremental training → Model evaluation (if accuracy > 85%, save the new model).
[0191] Cloud synchronization:
[0192] Back in the lab, local data is synchronized to the cloud management platform via Wi-Fi. Administrators can view the full-domain detection data and generate a heat map of planting pattern distribution through the web interface.
[0193] V. Performance Comparison and Application Effects
[0194] 5.1 Comparison of Key Indicators
[0195]
[0196] 5.2 Application Case: Cross-regional testing scenario of a farm in Jiangsu: The farm grows the same variety of cucumbers in Suzhou (conventional planting) and Yangzhou (organic planting) and needs to quickly identify samples mixed during transportation.
[0197] Implementation process:
[0198] Using this device, 50 samples were tested on-site, and all identification was completed within 15 minutes.
[0199] Three samples from Suzhou were found to have been mistakenly packaged into organic batches. 15 With N values of 3.1‰ and 2.8‰ (below the organic threshold of 3.5‰), erroneous packaging was successfully intercepted.
[0200] Effect: Avoids the risk of organic certification violations caused by mixed packaging, and is expected to reduce economic losses by more than 100,000 yuan per instance.
[0201] VI. Summary of Invention Points (Differences from the Original Solution)
[0202] Hardware integration innovation: Build an integrated portable terminal that combines "sensor-computing-display" to solve the dependence of traditional solutions on laboratories and networks.
[0203] Edge computing optimization: Achieve high-precision real-time inference (87.2% accuracy, <0.3 seconds) on low-power devices through model compression and hardware acceleration.
[0204] Offline functionality expansion: Supports local data annotation, incremental training, and spatiotemporal visualization to meet the needs of complex field operations. Lightweight model design: Adopts LightGBM instead of ANN, reducing computational load while improving classification accuracy, making it more suitable for embedded scenarios.
Claims
1. A stable isotope-based intelligent identification system for vegetable planting patterns, characterized in that, The application relates to a system and method for automatic identification of organic, green and ordinary planting modes based on multi-model integration and visualization interaction. Multi-dimensional database module: store δ of vegetable samples 13 C, δ 15 N, δ 2 H, δ 18 O stable isotope values, and origin longitude, latitude, cultivation mode, product name field data, the database table structure contains ID, Name, Model, Adress, Longitude, Latitude, 13 C, 15 N, 2 H, 18 O 10 fields; The multi-model integration module integrates PLS-DA, SVM, RF and ANN machine learning models, realizes automatic identification of organic, green and ordinary planting modes through feature extraction and hierarchical classification algorithms, and comprises the following steps: The visualization interaction module labels the geographic positions of sampling points on an electronic map, displays data in combination with a table and a radar chart, and realizes user detection data input and model prediction result feedback through a WeChat applet.
2. The system of claim 1, wherein, The PLS-DA model of the multi-model integration module adopts the following projection vector calculation method: let an independent variable matrix be X, an isotopic data matrix, (n x 4) dimension, and a dependent variable matrix be Y, a cultivation mode label matrix, (n x 3) dimension, and the projection vector w and c are obtained by iteratively solving the following optimization problem: wherein is the current prediction of Y, data dimensionality reduction is achieved by extracting the top k latent variables LVs.
3. The system of claim 2, wherein, The classification steps of the PLS-DA model comprise the following steps: (1) randomly divide the training set and the validation set to ensure that the samples contain organic, green and ordinary cultivation modes; (2) calculate the projection vector according to the formula, project X into a low-dimensional space to obtain a new feature matrix T; (3) perform linear discriminant analysis LDA on T to maximize the inter-class difference and minimize the intra-class difference, and obtain a classification decision boundary.
4. The system of claim 1, wherein, The SVM model adopts a radial basis kernel function (RBF), and a kernel function expression is K(x i ,x j ) = exp(-γ||x i -x j || 2 ), σ is a sample feature standard deviation, and γ and a penalty parameter C are optimized through cross validation.
5. The system of claim 1, wherein, The parameter settings of the RF model comprise the following steps: The number of decision trees nestimators is 100; The feature selection metric is the Gini coefficient gini; The minimum leaf node sample size min_samples_leaf is 1; The maximum feature number max_features is auto, that is, all features are considered.
6. The system of claim 1, wherein, The ANN model updates the weight by using gradient descent algorithm, and the weight update formula is: wherein wt is the weight matrix of the tth iteration, η = 0.1 is the learning rate, L is the loss function cross-entropy loss, the input layer is 4-dimensional isotope data, the output layer is 3-class cultivation mode probability value, the number of hidden layers and the number of neurons can be dynamically adjusted through the system interface.
7. The system of claim 1, wherein, The visualization interaction module comprises the following steps: Electronic map component: based on OpenLayers development, through different color mark sampling points, click to view the point of the delta 13 C, delta 15 N index value; The applet radar chart component: real-time display of the prediction probabilities of the PLS-DA, SVM, RF and ANN four models, and the final probability value after integration.
8. The system of claim 1, wherein, The data uploading module supports batch data import through an Excel template, and the imported data automatically triggers the following processes: (1) remove samples with an absolute value greater than 3sigma, that is, |x-mu|>3sigma, through the Z-score algorithm; (2) update the PostgreSQL database and trigger the incremental training of the multi-model integration module.
9. The system of claim 1, wherein, The system development architecture comprises the following steps: The background is developed based on the Flask framework and Python language, and the database adopts PostgreSQL; The front end is developed based on the React framework and JavaScript language, and the WeChat applet calls the background interface through the SOAP protocol.
10. A method for intelligent recognition of vegetable planting pattern based on the system according to any one of claims 1-9, characterized in that, The system development architecture comprises the following steps: (1). Collecting the δ 13 C, δ 15 N, δ 2 H, δ 18 O values of the vegetable samples and entering them into the multidimensional database; (2) extract principal components through the PLS-DA model, and reduce the data dimension to 2-3 dimensions; (3) sequentially perform hierarchical classification through the SVM-RBF model, the RF model and the ANN model, and output the cultivation mode prediction result and the probability; (4) visually display the sampling point distribution and the prediction result through an electronic map and a WeChat applet.
Citation Information
Cited By
Intelligent strawberry greenhouse multi-energy complementary energy supply system and energy management method
CN121749421A