Fertilizer quality monitoring method based on machine learning

Real-time monitoring of fertilizer quality through multi-source sensors and machine learning models solves the problems of poor reliability and long cycles in traditional detection methods, and achieves efficient and accurate fertilizer quality detection and timely alarms.

CN120298373BActive Publication Date: 2025-09-12BEIJING XINGLU ECOLOGICAL FERTILIZER CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510434739.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-09-12
Estimated Expiration
2045-04-08

AI Technical Summary

Technical Problem

Traditional fertilizer quality testing relies on chemical analysis in a laboratory environment, resulting in poor testing reliability and long testing cycles.

Method used

Multi-source sensors are used to collect the physical and chemical parameters of fertilizers in real time. Data preprocessing and feature extraction are performed through machine learning models. A hybrid supervised learning model is constructed for quality monitoring, and a multi-level alarm mechanism is set up.

Benefits of technology

It improves the reliability and accuracy of detection, reduces labor costs, and can timely classify and alarm quality issues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120298373B_ABST
    Figure CN120298373B_ABST
Patent Text Reader

Abstract

This application discloses a fertilizer quality monitoring method based on machine learning, which includes the following steps: Step 1: Fertilizer data collection, using multi-source sensors to collect the physical and chemical parameters of fertilizer samples in real time. The physical and chemical parameters include fertilizer spectral data, fertilizer conductivity data, fertilizer moisture content data, and fertilizer particle image data. When this system is implemented, by replacing the traditional manual sampling and detection method with a sampling method using sensors, the reliability of detection can be improved and labor costs can be effectively reduced in the process. The setting of a hybrid supervised learning model can improve the accuracy of fertilizer quality monitoring and effectively reduce the false alarm rate. The multi-level alarm mechanism can also issue graded alarms when quality problems occur, thereby helping users to deal with them in a timely manner.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of quality monitoring methods, and specifically to a fertilizer quality monitoring method based on machine learning. Background Art

[0002] The traditional fertilizer quality testing system relies heavily on chemical analysis processes in a laboratory environment, and its technical approach is significantly incompatible with the needs of industrial production. Specifically, the current testing model requires manual sampling to initiate the entire analysis process: technicians need to collect representative samples at different points in the production line. This process not only requires consideration of the cleanliness of the sampler and the sealing of the sample container, but also requires strict adherence to statistical sampling principles to ensure data reliability. During the measurement process, although accuracy can be improved with the help of precision equipment such as spectrophotometers and atomic absorption spectrometers, repeated measurements are required to correct errors, resulting in a long single testing cycle.

[0003] In response to the problems of poor reliability and long detection cycle in the above-mentioned prior art, this application proposes a fertilizer quality monitoring method based on machine learning. Summary of the Invention

[0004] To this end, this application provides a fertilizer quality monitoring method based on machine learning to solve the problems of poor reliability and long detection cycle in the existing technology.

[0005] In order to achieve the above objectives, this application provides the following technical solutions:

[0006] In a first aspect, a fertilizer quality monitoring method based on machine learning comprises the following steps:

[0007] Step 1: Fertilizer data collection: Multi-source sensors are used to collect the physical and chemical parameters of fertilizer samples in real time. The physical and chemical parameters include fertilizer spectral data, fertilizer conductivity data, fertilizer moisture content data, and fertilizer particle image data.

[0008] Step 2: Preprocess the collected data, including the following operations: filling missing values, using linear interpolation to complete the data sequence for local data loss caused by environmental interference; spectral noise reduction, filtering the spectral data to remove high-frequency noise interference; image analysis, performing edge detection and morphological processing on the particle image to extract particle size, shape and distribution uniformity indicators;

[0009] Step 3: Extract high-dimensional features from the preprocessed data. This includes spectral feature extraction, which involves performing dimensionality reduction on the noise-reduced spectral data and extracting the first 10 principal components as key spectral features. Dynamic conductivity features are extracted based on the time-varying conductivity curve, with the slope, peak value, and fluctuation frequency extracted as time series features. Composite feature generation involves fusing the particle distribution uniformity index with humidity data and using a weighted algorithm to generate a composite feature vector that characterizes the fertilizer's caking risk.

[0010] Step 4: Build and train a hybrid supervised learning model. Specifically, the architecture of the hybrid supervised learning model uses a deep neural network as a classifier, with the input layer receiving a composite feature vector, the hidden layer containing three fully connected layers, the activation function ReLU, and the output layer generating quality grade labels; semi-supervised learning generates pseudo labels for unlabeled data, and the hybrid supervised learning model is optimized through iterative training to predict the consistency of unlabeled data; adversarial training: Generative adversarial networks are introduced to generate synthetic noise data to enhance the robustness of the hybrid supervised learning model to sensor outliers;

[0011] Step 5: Trigger a multi-level alarm mechanism, including a first-level alarm. If one or more of the collected data exceeds the preset safety range, an audible and visual alarm device is activated. A second-level alarm is triggered. If the same data item exceeds the preset safety range for three consecutive samples, an emergency notification is pushed to the management terminal and the production line is suspended.

[0012] Step 6: Data communication and storage, including uploading monitoring data, alarm records, and hybrid supervised learning model parameters to the cloud server through the LoRa and NB-IoT dual-mode communication protocols; enabling the local cache queue in the event of a network interruption, and automatically retransmitting data after the network is restored.

[0013] Preferably, in step one, the spectral reflectance data of the fertilizer is obtained by a near-infrared spectral sensor to analyze the nitrogen, phosphorus and potassium content; the pH value and conductivity of the fertilizer are measured by an electrochemical sensor; the moisture content of the fertilizer is detected by a humidity sensor; the image of the fertilizer particles is captured by an industrial camera, and the image clarity is ensured by adaptive exposure control to analyze the particle density and distribution uniformity.

[0014] Preferably, the industrial camera is equipped with a ring light source with a color temperature of 5000K and an exposure time adaptive range of 10ms-200ms.

[0015] Preferably, after the hybrid supervised learning model training is completed, the following steps are further included:

[0016] S1, hybrid supervised learning model performance evaluation and optimization, including cross-validation, calculation of hybrid supervised learning model accuracy and recall; dynamic threshold adjustment, based on confusion matrix analysis, optimization of classification threshold to balance false positive rate and false negative rate;

[0017] S2, real-time quality monitoring and result output, involves inputting real-time sensor data into a trained hybrid supervised learning model to predict fertilizer quality grades and generate visual reports. The visual reports include a three-dimensional heat map showing the quality distribution of each area within the batch and a line chart showing historical quality trends.

[0018] Preferably, the visualization report includes a QR code, and scanning the code allows access to the original sensor data and model inference log stored in the cloud.

[0019] Preferably, it also includes a model incremental update step, which includes regularly collecting newly labeled data for incremental learning. When the model accuracy drops by more than 3% or the amount of new data reaches 1,000, the model update process is automatically triggered.

[0020] Preferably, in step five, the preset safety range is dynamically adjusted based on historical data and updated every 24 hours using a sliding window algorithm.

[0021] Compared with the prior art, this application has at least the following beneficial effects:

[0022] When this system is implemented, by replacing the traditional method of manual sampling and then testing with sampling through sensors, the reliability of detection can be improved, and in the process, labor costs can be effectively reduced; the setting of the hybrid supervised learning model can improve the accuracy of fertilizer quality monitoring and effectively reduce the false alarm rate; the multi-level alarm mechanism can also perform graded alarms when quality problems occur, thereby helping users to deal with them in a timely manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] To more intuitively illustrate the prior art and the present application, exemplary drawings are provided below. It should be understood that the specific shapes and structures shown in the drawings should not generally be considered as limiting conditions for implementing the present application; for example, based on the technical concepts disclosed in the present application and the exemplary drawings, those skilled in the art are capable of easily making routine adjustments or further optimizations to the addition / reduction / attribution division, specific shapes, positional relationships, connection methods, dimensional ratios, etc. of certain units (components).

[0024] Figure 1 This is a step diagram of the fertilizer quality monitoring method based on machine learning provided in Example 1 of the present application. DETAILED DESCRIPTION

[0025] The present application is further described below in detail through specific embodiments in conjunction with the accompanying drawings.

[0026] like Figure 1As shown, a fertilizer quality monitoring method based on machine learning includes the following steps:

[0027] Step 1: Fertilizer data collection: Multi-source sensors are used to collect the physical and chemical parameters of fertilizer samples in real time. These parameters include fertilizer spectral data, fertilizer conductivity data, fertilizer moisture content data, and fertilizer particle image data. By analyzing the fertilizer spectral data, fertilizer conductivity data, and fertilizer moisture content data, the fertilizer composition can be accurately analyzed to facilitate subsequent monitoring of fertilizer quality. The fertilizer particle size can also reflect whether the fertilizer has absorbed water.

[0028] Step 2: Preprocess the collected data, including the following operations: To ensure the integrity of the data, missing values ​​need to be filled when processing the data. For local data loss caused by environmental interference of the sensor, linear interpolation is used to complete the data sequence so that the fertilizer quality can be judged more accurately when the data is processed later; Spectral noise reduction: When collecting spectral data, the collected data has noise interference. In order to remove the noise interference, the spectral data is filtered to remove high-frequency noise interference; Image analysis: Edge detection and morphological processing are performed on the particle image to extract particle size, shape and distribution uniformity indicators to better evaluate the particle size of the fertilizer;

[0029] Step three: extract high-dimensional features from the preprocessed data, including spectral feature extraction, and perform dimensionality reduction on the spectral data after noise reduction to reduce the complexity of the model and improve the model efficiency and accuracy. The first 10 principal components are extracted as key spectral features. Of course, when implementing the technical solution of this application, those skilled in the art can also extract the first 5 (any number) principal components as key spectral features; dynamic conductivity features, based on the curve of conductivity changing with time, extract its slope, peak value and fluctuation frequency as time series features; composite feature generation, fuse the particle distribution uniformity index with humidity data, and generate a composite feature vector characterizing the risk of fertilizer agglomeration through a weighted algorithm; when this step is implemented, the high-dimensional features can be reduced in dimensionality, which not only reduces the complexity of the data, but also retains important information, so that the subsequent hybrid supervised learning model is more lightweight, while also ensuring the accuracy of fertilizer quality monitoring.

[0030] Step 4: Construct a hybrid supervised learning model and train it. Specifically, the architecture of the hybrid supervised learning model uses a deep neural network as a classifier, the input layer receives a composite feature vector, the hidden layer contains 3 fully connected layers (with 256, 128, and 64 neurons respectively), the activation function is ReLU, and the output layer generates a quality grade label; semi-supervised learning, generates pseudo labels for unlabeled data, optimizes the hybrid supervised learning model through iterative training, predicts the consistency of unlabeled data, and thus accelerates the adaptation speed to newly added unlabeled fertilizer samples; adversarial training: introduces a generative adversarial network to generate synthetic noise data, enhances the robustness of the hybrid supervised learning model to sensor anomalies, so that the false alarm rate of the hybrid supervised learning model to image noise caused by sudden changes in illumination is significantly reduced; through the synergy of the hybrid supervised learning model architecture design, semi-supervised learning strategy and adversarial training mechanism, the three core advantages of high-precision classification, improved data utilization efficiency and enhanced anti-interference ability are achieved.

[0031] Step 5: Trigger a multi-level alarm mechanism, including a first-level alarm. When one or more of the collected data exceeds the preset safety range (such as nitrogen content or particle density), an audible and visual alarm device (or other form of alarm) is activated. A second-level alarm is triggered. If the same data item of three consecutive samples from the same batch of fertilizer exceeds the preset safety range, an emergency notification is pushed to the management terminal and the production line is suspended.

[0032] Step 6: Data communication and storage, including uploading monitoring data, alarm records, and hybrid supervised learning model parameters to the cloud server through the LoRa and NB-IoT dual-mode communication protocols; enabling the local cache queue in the event of a network interruption, and automatically retransmitting data after the network is restored.

[0033] When this system is implemented, by replacing the traditional method of manual sampling and then testing with sampling through sensors, the reliability of detection can be improved, and in the process, labor costs can be effectively reduced; the setting of the hybrid supervised learning model can improve the accuracy of fertilizer quality monitoring and effectively reduce the false alarm rate; the multi-level alarm mechanism can also perform graded alarms when quality problems occur, thereby helping users to deal with them in a timely manner.

[0034] In step one, in order to obtain spectral reflectance data, conductivity, moisture content of fertilizer, and fertilizer particle images, the following technical solutions are set up: spectral reflectance data of fertilizer is obtained through a near-infrared spectral sensor to analyze the nitrogen, phosphorus, and potassium content; the pH value and conductivity of the fertilizer are measured through an electrochemical sensor; the moisture content of the fertilizer is detected through a humidity sensor; and the image of fertilizer particles is captured by an industrial camera, and image clarity is ensured through adaptive exposure control to analyze particle density and distribution uniformity.

[0035] In order to ensure clear capture of images of fertilizers, the following technical solution is provided: the industrial camera is a high-resolution industrial camera, which is equipped with a ring light source with a color temperature of 5000K and an exposure time adaptive range of 10ms-200ms. Of course, other parameters can also be selected for the industrial camera.

[0036] After the hybrid supervised learning model is established, in order to enable it to be used efficiently and reduce the occurrence of false positives, the following technical solution is provided. After the hybrid supervised learning model is trained, the following steps are also included:

[0037] S1. Hybrid supervised learning model performance evaluation and optimization. This includes cross-validation and calculation of the model's accuracy and recall. Accuracy verification ensures the model can accurately assess fertilizer quality during implementation. Dynamic threshold adjustment uses confusion matrix analysis to optimize classification thresholds to balance false positives and false negatives. The confusion matrix quantifies the prediction accuracy of "qualified" and "unqualified" fertilizer samples, directly guiding model optimization and production line risk control.

[0038] S2, real-time quality monitoring and result output, involves inputting real-time sensor data into a trained hybrid supervised learning model to predict fertilizer quality grades and generate visual reports. The visual reports include a three-dimensional heat map showing the quality distribution of each area within the batch and a line chart showing historical quality trends.

[0039] The visualization report includes a QR code, which can be scanned to access the original sensor data and model reasoning log stored in the cloud. The visualization report can also include a hyperlink. When the hyperlink is clicked, it automatically jumps to the interface of the original sensor data and model reasoning log stored in the cloud.

[0040] Of course, the hybrid supervised learning model is not static. In order to enable the model to monitor fertilizer quality more and more accurately during use, the model also has the following functions, including the model incremental update step. The model incremental update includes regularly collecting newly labeled data for incremental learning. When the model accuracy drops by more than 3% or the amount of new data reaches 1,000, the model update process is automatically triggered.

[0041] In step 5, the preset safety range is dynamically adjusted based on historical data and is updated every 24 hours (or 3 days, or one week, depending on the user's choice) using a sliding window algorithm.

[0042] The technical features of the above embodiments can be combined arbitrarily (as long as there is no contradiction in the combination of these technical features). In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described; these embodiments that are not explicitly written should also be considered to be within the scope of this specification.

Claims

1. A fertilizer quality monitoring method based on machine learning, characterized in that: The following steps are involved: Step 1: Fertilizer data collection: Multi-source sensors are used to collect the physical and chemical parameters of fertilizer samples in real time. The physical and chemical parameters include fertilizer spectral data, fertilizer conductivity data, fertilizer moisture content data, and fertilizer particle image data. Step 2: Preprocess the collected data, including the following operations: filling missing values, using linear interpolation to complete the data sequence for local data loss caused by environmental interference; spectral noise reduction, filtering the spectral data to remove high-frequency noise interference; image analysis, performing edge detection and morphological processing on the particle image to extract particle size, shape and distribution uniformity indicators; Step 3: Extract high-dimensional features from the preprocessed data, including spectral feature extraction, performing dimensionality reduction on the denoised spectral data, and extracting the first 10 principal components as key spectral features; dynamic conductivity features, based on the conductivity curve changing over time, extracting its slope, peak value, and fluctuation frequency as time series features; Composite Features Generation, the particle distribution uniformity index is integrated with the humidity data, and a composite feature vector representing the fertilizer agglomeration risk is generated through a weighted algorithm; Step 4: Build and train a hybrid supervised learning model. Specifically, the architecture of the hybrid supervised learning model uses a deep neural network as a classifier, with the input layer receiving a composite feature vector, the hidden layer containing three fully connected layers, the activation function ReLU, and the output layer generating quality grade labels; semi-supervised learning generates pseudo labels for unlabeled data, and the hybrid supervised learning model is optimized through iterative training to predict the consistency of unlabeled data; adversarial training: Generative adversarial networks are introduced to generate synthetic noise data to enhance the robustness of the hybrid supervised learning model to sensor outliers; Step 5: Trigger a multi-level alarm mechanism, including a first-level alarm. If one or more of the collected data exceeds the preset safety range, an audible and visual alarm device is activated. A second-level alarm is triggered. If the same data item exceeds the preset safety range for three consecutive samples, an emergency notification is pushed to the management terminal and the production line is suspended. Step 6: Data communication and storage, including uploading monitoring data, alarm records, and hybrid supervised learning model parameters to the cloud server through the LoRa and NB-IoT dual-mode communication protocols; enabling the local cache queue in the event of a network interruption, and automatically retransmitting data after the network is restored.

2. A method for monitoring fertilizer quality based on machine learning according to claim 1, characterized in that: In step one, the spectral reflectance data of the fertilizer is obtained through a near-infrared spectral sensor to analyze the nitrogen, phosphorus, and potassium content; the pH value and conductivity of the fertilizer are measured through an electrochemical sensor; the moisture content of the fertilizer is detected through a humidity sensor; and the fertilizer particle image is captured through an industrial camera, and adaptive exposure control is used to ensure image clarity to analyze the particle density and distribution uniformity.

3. A fertilizer quality monitoring method based on machine learning according to claim 2, characterized in that, The industrial camera is equipped with a ring light source with a color temperature of 5000K and an exposure time adaptive range of 10ms-200ms.

4. The method for monitoring fertilizer quality based on machine learning according to claim 1, wherein: After the hybrid supervised learning model is trained, the following steps are also included: S1, hybrid supervised learning model performance evaluation and optimization, including cross-validation, calculation of hybrid supervised learning model accuracy and recall; dynamic threshold adjustment, based on confusion matrix analysis, optimization of classification threshold to balance false positive rate and false negative rate; S2, real-time quality monitoring and result output, involves inputting real-time sensor data into a trained hybrid supervised learning model to predict fertilizer quality grades and generate visual reports. The visual reports include a three-dimensional heat map showing the quality distribution of each area within the batch and a line chart showing historical quality trends.

5. The method for monitoring fertilizer quality based on machine learning according to claim 4, wherein: The visualization report contains a QR code, which can be scanned to access the raw sensor data and model inference logs stored in the cloud.

6. The method for monitoring fertilizer quality based on machine learning according to claim 1, wherein: It also includes a model incremental update step, which involves regularly collecting newly labeled data for incremental learning. When the model accuracy drops by more than 3% or the amount of new data reaches 1,000, the model update process is automatically triggered.

7. The method for monitoring fertilizer quality based on machine learning according to claim 1, wherein: In step 5, the preset safety range is dynamically adjusted based on historical data and updated every 24 hours using a sliding window algorithm.

Citation Information

Patent Citations

  • Unsupervised medicine foreign matter detection method and system based on hyperspectral image

    CN117876769A

  • Beef carcass quality rating method based on image analysis in combination with machine learning

    CN118537664A