Method and system for detecting quality of organic fertilizer

CN122734463BActive Publication Date: 2026-10-27SHAANXI HANTANG AGRI TECH GRP CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202611216504.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-12
Publication Date
2026-10-27
Estimated Expiration
2046-08-12

AI Technical Summary

Technical Problem

[0005]本申请实施例提供了一种有机肥质量检测方法及系统,用以解决现有技术中激励方式单一导致检测维度不足、适配性差的问题

Benefits of technology

1、实现了激励方式与菌群特性的匹配,全面提升了检测维度。本申请通过前置菌群类别识别环节,结合菌群-激励敏感性知识库,为不同菌群结构的样品匹配热脉冲、电化学、声波、光波等多模态激励组合,可针对性激活各类功能菌群的代谢响应,解决单一热脉冲对部分菌群激发不足的问题,有效拓展响应信号的维度与丰富度,为后续活性评估提供更全面的数据支撑。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122734463B_ABST
    Figure CN122734463B_ABST
Patent Text Reader

Abstract

The application discloses an organic fertilizer quality detection method and system, and relates to the technical field of fertilizer quality detection. In the method, the bacterial community type and abundance information of the to-be-detected organic fertilizer is acquired first, the corresponding qualified sample is matched according to the bacterial community characteristics, the excitation type combination is applied, the multi-source response signal is collected after excitation, and the collected signal is compared with the qualified reference template; when the consistency meets the threshold value, the sample is directly determined as qualified; when the consistency is insufficient, the excitation parameters are adjusted or the excitation type is increased or decreased through a deep excitation optimization network; the optimized excitation is applied, the response data is collected, the matrix interference is decoupled, the multi-modal characteristics are fused, the comprehensive quality index is generated, and the quality grade determination is completed. The application can be adapted to organic fertilizer samples with different bacterial community characteristics, expand the detection signal dimension, and improve the detection accuracy of complex formula fertilizers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of fertilizer quality testing technology, and in particular to a non-destructive intelligent testing method for the microbial activity of organic fertilizers. Background Technology

[0002] Bio-organic fertilizer is a new type of fertilizer that integrates organic matter, functional microorganisms, and nutrients. Its fertilizer efficacy depends on the activity and metabolic capacity of the functional microbial community, and accurate detection of microbial activity is a key link in ensuring the quality of organic fertilizer products. Traditional detection methods mostly rely on offline methods such as laboratory plate culture and chemical titration, which have drawbacks such as long detection cycles, cumbersome operations, and susceptibility to human experience, making them unsuitable for the real-time quality control needs of large-scale production. In recent years, non-destructive technologies such as spectral detection and gas sensing have been gradually applied to fertilizer quality testing. However, due to the interference of the complex matrix of organic fertilizer, a single sensor signal is difficult to distinguish between the actual metabolic signal of microorganisms and background noise, making it difficult to guarantee detection accuracy.

[0003] The existing patent technology, CN121384835A, proposes a gas-spectral coupling detection approach based on micro-area thermal pulse excitation. This technology excites the metabolic response of microorganisms through thermal pulses, and combined with a feature decoupling algorithm, it reduces matrix interference to some extent and improves detection efficiency. However, this technology's excitation method is too singular, using only thermal pulses as energy input. Organic fertilizers contain a diverse range of functional microbial communities, with significant differences in metabolic response characteristics among different groups such as Bacillus, Actinomycetes, filamentous fungi, and electrochemically active bacteria. Some microbial communities have weak responses to thermal stimulation or even exhibit thermal inhibition effects. A single excitation method cannot fully activate the specific responses of various microbial communities, resulting in insufficient detection dimensions. The activity of low-responsive microbial communities is easily underestimated, leading to false negatives. Moreover, the fixed excitation parameters and detection procedures cannot be adapted to organic fertilizer samples with different formulations and microbial structures. For fertilizers containing different excipients, the signal-to-noise ratio fluctuates greatly under single thermal excitation, limiting the accuracy of feature decoupling.

[0004] It is evident that existing single-excitation detection schemes can no longer meet the high-precision quality control requirements of various types of organic fertilizers. There is an urgent need to develop organic fertilizer quality detection methods that can adaptively match microbial community characteristics, coordinate multimodal excitations, and have dynamic optimization capabilities. Summary of the Invention

[0005] This application provides a method and system for testing the quality of organic fertilizer, which solves the problems of insufficient detection dimensions and poor adaptability caused by the single excitation method in the prior art.

[0006] On the one hand, embodiments of this application provide a method for testing the quality of organic fertilizer, including: Obtain the abundance information of microbial communities and basic apparent parameters of the organic fertilizer samples to be tested; The comprehensive fitness score of various incentive methods is calculated based on the abundance information of the microbial community and the preset microbial community-incentive sensitivity matrix. The incentive methods with the highest comprehensive fitness scores are selected to form the initial incentive combination. At the same time, the qualified sample benchmark response template that matches the current microbial community composition is retrieved. Synchronous pulse excitation is applied to the same micro-region on the sample surface according to the initial excitation combination, and dynamic response signals of multiple modes are acquired simultaneously to extract the corresponding transient response feature sequences. Calculate the consistency score between the transient response feature sequence and the baseline response template. When the consistency score is higher than a preset threshold, the sample quality is deemed qualified. When the consistency score is lower than the preset threshold, the bacterial community abundance information, transient response feature sequence and parameters of the initial stimulus combination are input into the deep stimulus optimization network, and the parameter adjustment coefficients of each stimulus and the stimulus type retention decision are output to generate the optimized secondary stimulus combination. Pulse excitation was applied to the sample according to the secondary excitation combination and the corresponding response signal was collected. The secondary response features were extracted and matrix background interference was decoupled to obtain pure metabolic features. A heterogeneous feature topology graph is constructed by combining pure metabolic features with basic apparent parameters. Multi-dimensional features are then fused through a heterogeneous graph convolutional network to generate a comprehensive quality index. The final quality grade determination result is output based on the comprehensive quality indicators.

[0007] On the other hand, embodiments of this application also provide an organic fertilizer quality testing system, including: The data acquisition module is used to acquire information on the abundance of microorganisms and basic apparent parameters of the organic fertilizer samples to be tested. The initial combination selection module is used to calculate the comprehensive fitness score of various incentive methods based on the bacterial abundance information and the preset bacterial community-incentive sensitivity matrix, select the incentive methods with the highest comprehensive fitness scores to form the initial incentive combination, and at the same time retrieve the qualified sample benchmark response template that matches the current bacterial community composition. The excitation module is used to apply synchronous pulse excitation to the same micro-region on the sample surface according to the initial excitation combination, synchronously acquire dynamic response signals of multiple modes, and extract the corresponding transient response feature sequence. The quality assessment module is used to calculate the consistency score between the transient response feature sequence and the baseline response template. When the consistency score is higher than a preset threshold, the sample quality is deemed to be qualified. The combinatorial optimization module is used to input the bacterial community abundance information, transient response feature sequence and parameters of the initial stimulus combination into the deep stimulus optimization network when the consistency score is lower than the preset threshold. It outputs the parameter adjustment coefficients of each stimulus and the stimulus type retention decision to generate the optimized secondary stimulus combination. The excitation module applies pulse excitation to the sample according to the secondary excitation combination and collects the corresponding response signal. It extracts the secondary response features and performs matrix background interference decoupling processing to obtain pure metabolic features. The index calculation module is used to construct a heterogeneous feature topology graph by combining pure metabolic features with basic apparent parameters, and to generate a comprehensive quality index by fusing multi-dimensional features through a heterogeneous graph convolutional network. The quality assessment module outputs the final quality grade assessment result based on the comprehensive quality indicators.

[0008] The organic fertilizer quality testing method and system disclosed in this application have the following advantages: 1. This application achieves a match between the excitation method and the characteristics of the bacterial community, comprehensively enhancing the detection dimensions. Through a preliminary bacterial community category identification step, combined with a bacterial community-excitation sensitivity knowledge base, this application matches samples with different bacterial community structures using multimodal excitation combinations such as thermal pulses, electrochemical stimulation, acoustic waves, and optical waves. This can specifically activate the metabolic responses of various functional bacterial communities, solving the problem of insufficient excitation of some bacterial communities by a single thermal pulse, effectively expanding the dimensions and richness of the response signals, and providing more comprehensive data support for subsequent activity evaluation.

[0009] 2. A dynamic optimization mechanism for the excitation scheme was constructed, significantly improving the detection accuracy in complex scenarios. For samples with low initial consistency, this application uses a deep excitation optimization network to adaptively adjust excitation parameters or increase / decrease the excitation type, specifically enhancing the signal intensity of weakly responding bacterial communities, improving the distinction between metabolic signals and matrix background, and effectively reducing the probability of misclassification in complex matrices. Compared to single-shot detection with fixed parameters, this mechanism can significantly improve the detection accuracy of low-confidence samples without significantly increasing the overall detection time.

[0010] 3. Deep fusion of multi-source and multi-modal features further enhances the decoupling capability against matrix interference. This application integrates multi-dimensional response signals such as gas release, spectral evolution, electrochemical impedance, and acoustic attenuation under multiple excitations to construct a richer feature space. Combined with a multi-channel attention decoupling network, it can more accurately separate the true metabolic features of microorganisms from matrix background noise. Compared with the dual-channel decoupling scheme, the multi-modal features have stronger constraints, and the dynamic metabolic fingerprint obtained by decoupling has higher fidelity.

[0011] 4. The tiered testing process balances efficiency and accuracy, making it suitable for industrial batch testing scenarios. This application adopts a two-stage testing mode: rapid initial screening followed by optimized review with low confidence. Most qualified samples can be directly output in the initial screening stage, with only a few low-consistency samples entering the secondary optimized testing stage. This ensures overall testing efficiency while improving the testing accuracy of difficult samples through targeted optimization, making it suitable for various application scenarios such as batch sampling on production lines and warehousing quality inspection. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 A flowchart of an organic fertilizer quality testing method provided in an embodiment of this application. Detailed Implementation

[0014] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0015] Figure 1 A flowchart illustrating an organic fertilizer quality testing method provided in this application embodiment. This application embodiment provides an organic fertilizer quality testing method, including: Step 1: Obtain the microbial abundance information and basic apparent parameters of the organic fertilizer sample to be tested.

[0016] For example, the organic fertilizer sample to be tested is placed in a constant temperature and humidity testing chamber and left to stand for 10 minutes to allow the sample temperature to reach equilibrium with the ambient temperature, which is set to 25°C. After standing, the basic appearance parameters of the sample are collected through a visual imaging unit and a sensor array. Specifically, an area array camera is used to acquire images of the sample surface, and the particle size distribution, average color, and porosity of the sample are calculated through image segmentation and grayscale statistics; a capacitive humidity sensor is used to collect the surface moisture content of the sample, with a sampling accuracy of ±0.5%; and a contact temperature probe is used to collect the surface temperature of the sample, with a sampling accuracy of ±0.1°C.

[0017] All basic apparent parameters are uniformly mapped to the 0-1 range using a range normalization method, forming an apparent parameter vector. This vector includes five dimensions: sample moisture content, average particle size, color brightness value, porosity, and surface temperature. This vector will serve as an auxiliary feature for subsequent quality assessment and participate in the final multi-dimensional quality fusion.

[0018] Microbial abundance information was obtained through hyperspectral imaging combined with a lightweight convolutional neural network for microbial classification. A hyperspectral imaging system in the 400nm~1000nm band was used to acquire hyperspectral images of the sample surface at a spectral resolution of 10nm, with a spatial resolution of 0.1mm per pixel. The acquisition area covered a circular region with a diameter of 30mm on the sample surface, and a total of 200×200 spatial pixels of spectral reflectance data were acquired to form a three-dimensional hyperspectral image data cube.

[0019] The hyperspectral image data cube undergoes spatial averaging spectral preprocessing, which involves averaging the spectral curves of all spatial pixels to obtain a 61-dimensional average spectral curve representing the overall spectral characteristics of the sample. The vector corresponding to this average spectral curve is then expanded into a 200×200×61 pseudo-feature map, which is input into a pre-trained lightweight microbial community classification convolutional neural network. The network outputs the relative abundance of 12 common functional microbial communities in the sample. The microbial community classification convolutional neural network employs an image-level global classification strategy, directly outputting the microbial community abundance distribution of the entire sample without requiring pixel-level segmentation.

[0020] The microbial community classification convolutional neural network consists of an input layer, three convolutional blocks, a global average pooling layer, a fully connected layer, and an output layer. The input layer receives a pseudo-feature map of size 200×200×61, corresponding to spectral data across 61 wavelength channels. The first convolutional block contains two 3×3 convolutional layers, one 2×2 max pooling layer, one batch normalization layer, and a ReLU activation function, with 16 and 32 kernels respectively, and an output feature map size of 100×100×32. The second convolutional block contains two 3×3 convolutional layers, one 2×2 max pooling layer, one batch normalization layer, and a ReLU activation function, with 64 and 64 kernels respectively, and an output feature map size of 50×50×64. The third convolutional block contains two 3×3 convolutional layers, one 2×2 max pooling layer, one batch normalization layer, and a ReLU activation function, with 128 and 128 kernels respectively, and an output feature map size of 25×25×128. The global average pooling layer compresses the two-dimensional feature map into a 128-dimensional one-dimensional feature vector. Here, 128 dimensions refers to the number of columns, while one dimension represents the number of rows. That is, a 128-dimensional one-dimensional feature vector is a vector with 1 row and 128 columns. The same meaning applies to vectors described in the following sections, so it will not be elaborated further. The fully connected layer contains two hidden layers with 64 and 32 neurons respectively, using the ReLU activation function for non-linear feature mapping. The output layer has 12 output nodes, employing the Softmax activation function to output the relative abundance values ​​of 12 bacterial communities. The sum of all node outputs is 1.

[0021] The 12 bacterial groups are Bacillus, Pseudomonas, Actinomycetes, Aspergillus, Trichoderma, Yeast, Lactobacillus, Photosynthetic Bacteria, Nitrogen-fixing Bacteria, Phosphate-solubilizing Bacteria, Potassium-solubilizing Bacteria, and Electrochemically Active Bacteria, covering the core functional bacterial groups in mainstream organic fertilizers on the market.

[0022] The microbial community classification convolutional neural network was trained using supervised learning. The training dataset contained 1200 sets of organic fertilizer hyperspectral samples with known microbial community composition, of which 80% were used as the training set and 20% as the validation set. The true values ​​of microbial communities in all samples were calibrated using high-throughput sequencing.

[0023] The network is trained using a multi-class cross-entropy loss function, the expression of which is: ; In the formula, The cross-entropy loss function value represents the multi-class classification, where M is the batch sample size and K is the total number of bacterial colony categories, with a value of 12. This is the true abundance label for the k-th bacterial community in the m-th sample. The abundance value of the k-th class of bacteria in the m-th sample, predicted by a convolutional neural network for bacterial community classification.

[0024] The optimizer used is the Adam optimizer, with an initial learning rate set to 1×10⁻⁶. -4 The weight decay coefficient is 1×10 -5 The training consists of 50 rounds. After each round, the accuracy is calculated on the validation set. Training is terminated early when the validation set accuracy no longer improves after 5 consecutive rounds. During training, random Gaussian noise and random spectral shifts are added to the hyperspectral data to enhance the model's generalization ability to different samples.

[0025] After training, the model achieves a Top-3 accuracy of 92.7% in bacterial community classification on the validation set, with an average abundance prediction error of less than 8%, meeting the accuracy requirements for subsequent stimulus matching. The final output is a bacterial community abundance vector, which contains the relative abundance of 12 bacterial communities, with the sum of the abundance of all categories being 1.

[0026] Step 2: Calculate the comprehensive fitness score of various incentive methods based on the bacterial community abundance information and the preset bacterial community-incentive sensitivity matrix. Select the incentive methods with the highest comprehensive fitness scores to form the initial incentive combination. At the same time, retrieve the qualified sample benchmark response template that matches the current bacterial community composition.

[0027] For example, the microbial community-stimulation sensitivity matrix was constructed through a standardized calibration experiment. For 12 target microbial communities, their metabolic response intensity under four stimulation methods was measured to obtain standardized sensitivity coefficients. The four stimulation methods were micro-area thermal pulse stimulation, micro-area electrochemical pulse stimulation, low-frequency acoustic pulse stimulation, and characteristic light pulse stimulation.

[0028] The sensitivity coefficient calibration method is as follows: First, a single-complex purified organic fertilizer sample was prepared. Using sterilized peat moss as a carrier, a quantitatively purified single-functional bacterial group was inoculated. After adjusting the moisture content to 30%, the sample was incubated at a constant temperature for 72 hours to ensure the bacterial group was in a stable metabolic state. Three parallel samples were prepared for each bacterial group. Subsequently, a single stimulus with standardized parameters was applied, and characteristic response signals were simultaneously collected within 5 seconds before and after the stimulus. The ratio of the peak metabolic response to the baseline noise standard deviation was used as the signal-to-noise ratio (SNR). The mean SNR of the three parallel samples was normalized to a maximum and minimum value within the range of 0 to 1 to obtain the sensitivity coefficient of the bacterial group corresponding to the stimulus, with a value range of 0 to 1. The entire calibration experiment was conducted at a controlled ambient temperature of 25℃ and a relative humidity of 60% to eliminate environmental interference.

[0029] After calibration, the sensitivity coefficients of Bacillus to thermal pulses were determined to be 0.82, those of electrochemically active bacteria to electrochemical pulses to be 0.91, those of Trichoderma filamentous fungi to acoustic pulses to be 0.76, and those of photosynthetic bacteria to characteristic light wave excitation to be 0.87. All sensitivity coefficients were organized into a 12x4 matrix and stored in a knowledge base. This matrix can be continuously updated with new experimental data to accommodate more bacterial populations and excitation methods.

[0030] Based on the bacterial community abundance information and sensitivity matrix, the comprehensive fitness score for each incentive method is calculated using the following formula: ; In the formula, The overall fit score for the i-th incentive method is given. Let k be the relative abundance of the k-th bacterial group. Let K be the sensitivity coefficient of the k-th bacterial community to the ith stimulus, where K is the total number of bacterial community categories.

[0031] The four incentives were ranked from highest to lowest based on their overall fit score, and the top three incentives were selected to form the initial incentive combination. If the overall fit score of the third-ranked incentive was less than 30% of that of the first-ranked incentive, only the first two incentives were selected to avoid introducing incentives with weak motivating effects and reduce invalid data collection.

[0032] After determining the excitation type, the standard initial parameters for the corresponding excitation combination are retrieved from the knowledge base: micro-region thermal pulse excitation: initial temperature amplitude 4℃, pulse duration 80ms, excitation region diameter 6mm; micro-region electrochemical pulse excitation: initial voltage amplitude 50mV, pulse frequency 10Hz, duty cycle 50%, applied using a microelectrode array; low-frequency acoustic pulse excitation: initial frequency 20kHz, power density 0.2W / cm². 2 The pulse duration is 200ms; the initial wavelength of the characteristic light pulse excitation is 730nm, and the light intensity density is 5mW / cm². 2 The pulse duration is 150ms.

[0033] Simultaneously, a qualified sample baseline response template matching the current microbial community composition is retrieved from the baseline template library as a reference standard for subsequent consistency determination. The baseline template library is constructed through standardized calibration experiments: organic fertilizer samples verified by national standard methods are selected, covering 12 types of single microbial communities and 36 common compound microbial community combinations, encompassing 5 common matrix formulations including peat moss, humic acid, and attapulgite. Twenty parallel samples are prepared for each combination, and response feature sequences are collected under standard excitation parameters. After dynamic time-normalization and alignment of all sample feature sequences under the same combination, mean clustering is used to generate a standard baseline template for that combination, and the maximum statistical distance corresponding to the template is recorded as a reference parameter. The template library is indexed according to microbial community composition characteristics. During retrieval, the cosine similarity of the microbial community abundance vector is used to match the nearest neighbor template, with a similarity threshold set to 0.85 to ensure a high degree of matching between the template and the microbial community structure of the sample to be tested.

[0034] Step 3: Apply synchronous pulse excitation to the same micro-region on the sample surface according to the initial excitation combination, and simultaneously acquire dynamic response signals of multiple modes to extract the corresponding transient response feature sequences.

[0035] For example, all excitation modules are scheduled by a unified timing control system to ensure that the start time, duration, and repetition period of each excitation pulse are strictly synchronized. The excitation adopts a single-pulse excitation plus continuous acquisition mode, that is, after applying a pulse excitation, the response signal is continuously acquired for 5 seconds to fully capture the metabolic transient response process after excitation.

[0036] The excitation was applied to the same micro-region on the sample surface, which was a circular area with a diameter of 6 mm. This ensured that all excitations acted on the same sample area, guaranteeing the spatial consistency of the response signal. The excitation energy was controlled within a safe threshold, so as not to cause irreversible damage to microorganisms or disrupt the physicochemical structure of the fertilizer matrix.

[0037] The dynamic response signals of multiple modes include gas release kinetic signals, hyperspectral change signals, electrochemical impedance signals, and acoustic echo signals. The specific acquisition process is as follows.

[0038] Gas release signal acquisition: A gas sensor array, including a carbon dioxide sensor, an ammonia sensor, and a volatile organic compound sensor, is arranged in the detection chamber. The sampling accuracies are ±5ppm, ±1ppm, and ±0.1ppm, respectively. The gas concentration changes within 5 seconds before and after excitation are continuously recorded to obtain the gas release kinetic curve.

[0039] Hyperspectral signal acquisition: Hyperspectral images of the sample surface are continuously acquired at a rate of 20 frames per second, and the dynamic changes in spectral reflectance before and after excitation are recorded to obtain the spectral change trajectory of each wavelength.

[0040] Electrochemical impedance signal acquisition: A microelectrode array was inserted 1 mm into the sample surface, a weak AC detection signal was applied, and the changes in the real and imaginary parts of the electrochemical impedance before and after excitation were continuously recorded to obtain the impedance response curve.

[0041] Acoustic echo signal acquisition: An ultrasonic transducer is used to receive the sample echo signal after excitation, and the amplitude and phase changes of the echo are analyzed to obtain the acoustic attenuation response curve.

[0042] All signals were synchronously acquired at a sampling frequency of 100Hz, and signal alignment was achieved through a unified timestamp. After acquisition, all signals were timestamped, and the time axis of each signal was recalibrated with the excitation application time as the time zero point, constructing a four-dimensional multimodal coupled dataset. The dataset has three dimensions: spatial coordinates, time, and modality type, for a total of four modes. This dataset integrates information from three dimensions: spatial, temporal, and multimodal, providing a complete data foundation for subsequent feature extraction.

[0043] For each mode of the time-series signal, a variational mode decomposition algorithm is used for multi-scale decomposition, decomposing the original signal into 6 intrinsic mode components and 1 residual component. The decomposition process is achieved by minimizing a constrained variational model, with the constraint that the sum of the estimated bandwidths of all mode components is minimized, and the sum of all modes equals the original signal. The core parameters of the algorithm are set as follows: the number of modes is set to 6, the quadratic penalty factor is set to 2000, and the convergence threshold is set to 10. -7 The decomposition terminates when the iteration error falls below the threshold.

[0044] Based on the center frequency and time constant of each modal component, they are divided into fast response components and slowly varying background components: components with a time constant less than 1 s are classified as fast response components, corresponding to the transient response of microbial metabolism; components with a time constant greater than 3 s are classified as slowly varying background components, corresponding to the physicochemical background changes of the matrix material; components with a center frequency higher than 50 Hz are identified as high-frequency noise components. All fast response components are retained, while the slowly varying background components and high-frequency noise components are removed, achieving preliminary noise reduction and effective component extraction of the signal.

[0045] For each mode, the fast response components are extracted in both the time and frequency domains to construct a multi-dimensional transient response feature sequence. The specific extraction process is as follows.

[0046] Temporal Feature Extraction: High-order differential processing is performed on the fast response components to calculate the first and second derivative sequences, capturing the abrupt changes in the response. The differential calculation employs the central difference method; the first derivative reflects the change in response rate, and the second derivative reflects the change in response acceleration. Six temporal parameters are extracted from the differential sequence: extreme point amplitude, extreme point occurrence time, abrupt rise slope, fall slope, full width at half maximum (FWHM), and rise time.

[0047] Frequency domain feature extraction: Fast Fourier transform is performed on the fast response components to obtain the spectral distribution of the signal, and six frequency domain parameters are extracted, including the dominant frequency, total energy of the frequency band, centroid of the frequency spectrum, bandwidth of the frequency spectrum, skewness of the frequency spectrum, and kurtosis of the frequency spectrum.

[0048] Six time-domain features and six frequency-domain features are extracted for each modality, resulting in a total of 12-dimensional single-modal features. The feature vectors of the four modalities are concatenated to obtain a transient response feature sequence with a dimension of 48.

[0049] Next, principal component analysis was used to reduce the dimensionality of the 48-dimensional transient response feature sequence. The top 8 principal components with a cumulative contribution rate of over 90% were selected to form the core feature subset, thereby reducing the complexity of subsequent calculations.

[0050] Finally, the core feature subset of each spatial location is mapped onto a two-dimensional plane, and a continuous heatmap of activity intensity distribution is generated using radial basis function interpolation, i.e., a multimodal fusion activity response distribution map. Gaussian radial basis functions are used for interpolation, and the shape parameter is adaptively set according to the spatial density of sampling points; the smaller the sampling interval, the larger the shape parameter, ensuring the smoothness and accuracy of the interpolation results. This map can visually display the distribution of microbial metabolic activity in different regions of the sample surface, marking metabolic hotspots and low-activity regions, reflecting the spatial heterogeneity of the microbial community.

[0051] Step 4: Calculate the consistency score between the transient response feature sequence and the baseline response template. When the consistency score is higher than the preset threshold, the sample quality is deemed qualified.

[0052] For example, each template in the benchmark template library corresponds to a specific combination of microbial communities and excitations, and contains standard core feature time series sequences. First, the transient response feature sequence to be tested and the benchmark response template are subjected to Z-score normalization to eliminate the influence of amplitude differences. The normalization method is to subtract the sequence mean from the original feature value and then divide by the sequence standard deviation.

[0053] Then, the similarity distance between the normalized transient response feature sequence and the reference response template is calculated using the dynamic time warping algorithm. This algorithm can match the optimal alignment path between the two time series sequences through the elastic scaling of the time axis, thus eliminating the influence of response time offset.

[0054] Let the length of the transient response feature sequence to be tested be P, and the length of the reference response template sequence be Q. Construct a distance matrix of P rows and Q columns, where each element represents the Euclidean distance between the corresponding point in the transient response feature sequence and the corresponding point in the reference response template. Dynamic programming is used to find the minimum cumulative distance path from the top left corner to the bottom right corner of the matrix. A Sakamoto global constraint is incorporated during the solution process to limit the maximum deviation of the path from the diagonal to no more than 20% of the sequence length, preventing excessive time axis distortion that could lead to matching distortion. The final minimum cumulative distance is the dynamic time warped distance.

[0055] The distance is converted into a consistency score, calculated using the following formula: ; In the formula, C is the consistency score. For dynamic time-normalized distance, This represents the maximum reference distance to the corresponding baseline response template. The consistency score ranges from 0 to 1, with higher values ​​indicating greater consistency between the tested sample and the qualified sample.

[0056] Next, a preset threshold of 0.75 is set, and the following judgment rule is adopted: If the consistency score is greater than or equal to the preset threshold, the sample response consistency is determined to be good, the quality qualified conclusion is directly output, and the testing process ends. If the consistency score is less than the preset threshold, the sample response consistency is deemed insufficient, and the quality status cannot be directly confirmed. The sample then proceeds to the incentive optimization and secondary testing stage.

[0057] This grading mechanism enables most qualified samples to be tested quickly, effectively improving the overall efficiency of batch testing.

[0058] Step 5: When the consistency score is lower than the preset threshold, input the bacterial community abundance information, transient response feature sequence and parameters of the initial stimulus combination into the deep stimulus optimization network, output the parameter adjustment coefficients of each stimulus and the stimulus type retention decision, and generate the optimized secondary stimulus combination.

[0059] For example, the Deep Activation Optimization Network (DEBON) employs a fully connected neural network structure with multiple inputs and multiple outputs. It integrates an attention mechanism to weight key features and outputs continuous parameter adjustments and discrete activation type decisions. The overall network structure consists of four parts: an input layer, a feature encoding layer, an attention layer, and a dual-branch output layer.

[0060] The input layer receives three types of input features, with a total dimension of 24: 12-dimensional bacterial community abundance features, corresponding to the relative abundance of 12 bacterial communities; 8-dimensional transient response feature sequences, corresponding to the core feature subset obtained from the initial detection; and 4-dimensional initial stimulus combination parameters, corresponding to the standardized values ​​of the intensity parameters of the four stimulus types.

[0061] The feature encoding layer contains three fully connected hidden layers with 128, 96, and 64 neurons respectively. Each layer is followed by a batch normalization layer and a ReLU activation function to encode the input features into 64-dimensional high-dimensional latent features and uncover deep correlations between the input features.

[0062] The attention layer employs a channel attention mechanism to adaptively weight the 64-dimensional latent features, calculated using the following formula: ; ; In the formula, z represents the input 64-dimensional latent feature. , Let be a trainable weight matrix, where The dimensions are 64×64. The size is 64×64. Both matrices are initialized using the He normal distribution, with a mean of 0 and a standard deviation of 0. The initial values ​​of all offset terms in the matrix are set to 0.01. It is the Sigmoid activation function. It is a 64-dimensional attention weight vector. This is an element-wise multiplication operation. This is the weighted eigenvector.

[0063] Attention mechanisms can automatically strengthen the weights of features that are highly relevant to the optimization, weaken the interference of irrelevant features, and improve optimization accuracy.

[0064] The dual-branch output layer is divided into two independent branches: the parametric regression branch and the type decision branch, which handle parametric regression and incentive type decision respectively.

[0065] The parametric regression branch contains two fully connected layers with 32 hidden neurons. It outputs a 4-dimensional continuous value, which corresponds to the intensity parameter adjustment coefficients of four types of excitations. The value ranges from 0.5 to 1.5, representing the scaling factor of the original parameters.

[0066] The type decision branch contains two fully connected layers with 32 hidden neurons. It outputs a 4-dimensional probability value, which is activated by Softmax and corresponds to the retention or addition probability of each stimulus. Activations with a probability higher than 0.5 are retained or added, while activations with a probability lower than 0.5 are removed.

[0067] The deep incentive optimization network employs a two-stage training approach combining offline supervised pre-training with online reinforcement learning fine-tuning to ensure the accuracy and generalization of the optimization results.

[0068] In the offline supervised pre-training phase, the training dataset contains 5000 samples, each containing four parts: bacterial community abundance, initial stimulus parameters, initial response features, and optimal stimulus parameter labels. The optimal stimulus parameter labels are determined through an traversal search experiment, i.e., the stimulus parameters with the highest detection accuracy are used as the labels.

[0069] Training uses a joint loss function to optimize both output branches simultaneously. The function expression is as follows: ; In the formula, For the joint loss function value, The mean squared error loss value of the parametric regression branch measures the deviation between the predicted parameter values ​​and the label values; The binary cross-entropy loss value for the type decision branch measures the accuracy of incentive type selection; , These are the loss weighting coefficients, with values ​​of 0.6 and 0.4 respectively.

[0070] The optimizer used is the AdamW optimizer, with an initial learning rate of 5×10. -4 The learning rate is decayed using a cosine annealing strategy, with a weight decay coefficient of 1×10⁻⁶. -4 The training consists of 100 rounds, with validation performed every 10 rounds. If the validation set loss does not decrease for 10 consecutive rounds, the training will terminate early.

[0071] In the online reinforcement learning fine-tuning stage, based on offline supervised pre-training, a deep Q-learning strategy is used to fine-tune the deep incentive optimization network online, with the improvement of detection accuracy as a reward signal, thereby improving the model's adaptability in real production scenarios.

[0072] Specifically, in the deep Q-learning strategy, the agent is a deep incentive optimization network. The action space includes two parts: continuous actions and discrete actions. The continuous actions are the parameter scaling factors of the four incentives, ranging from 0.5 to 1.5. The discrete actions are the retention or removal decisions of the four incentives.

[0073] The state space is a 24-dimensional feature vector, containing 12-dimensional bacterial abundance information, 8-dimensional transient response feature sequence, and 4-dimensional parameters of the current excitation combination.

[0074] The reward function uses the change in confidence of the second detection result as the reward. If the confidence of the second detection after optimization is more than 0.1 higher than the initial judgment, a positive reward of +1 is given; if the confidence decreases by more than 0.1, a negative reward of -1 is given; if the confidence fluctuation is within 0.1, a reward of zero is given; if the deviation between the optimized detection result and the true value is reduced, an additional reward of +0.5 is given.

[0075] The online reinforcement learning fine-tuning phase employs an experience replay mechanism, with a replay pool capacity of 10,000 samples. 64 samples are randomly selected for training each time. A target network is set, and its parameters are updated every 100 steps to improve training stability. A discount factor of 0.9 is used to balance the weight of current rewards and future rewards.

[0076] After two phases of training, the deep stimulus optimization network can improve the detection accuracy by an average of 12.3% and the signal-to-noise ratio by an average of 18.7% by optimizing the stimulus scheme.

[0077] After adjusting the output parameter coefficients and retaining the incentive type in the deep incentive optimization network, a secondary incentive combination is generated according to the following rules: For the retained excitation, the original parameters are multiplied by the corresponding adjustment coefficient to obtain the new excitation parameters; For new incentives, the standard parameters of the incentive for the current microbial community are retrieved from the knowledge base as initial values. The standard parameters of the new incentives are determined by the optimal excitation parameters of the corresponding microbial community in the microbial community-incentive sensitivity knowledge base, ensuring that the initial parameters of the new incentives are adapted to the characteristics of the current microbial community. The incentives for removal are eliminated from the incentive combination; Verify the safety thresholds of all excitation parameters to ensure that the energy intensity will not cause microbial inactivation or sample damage. For example, set the upper limit of thermal pulse temperature amplitude to 8°C and the upper limit of electrochemical pulse voltage to 200mV. If the threshold is exceeded, cut off to the upper limit of the threshold.

[0078] Finally, the optimized secondary stimulus combination is generated and enters the secondary detection stage.

[0079] Step 6: Apply pulse excitation to the sample according to the secondary excitation combination and collect the corresponding response signal. Extract the secondary response features and perform matrix background interference decoupling processing to obtain pure metabolic features.

[0080] For example, the aforementioned signal acquisition process is repeated according to the secondary excitation combination to obtain the response signal under secondary excitation, and the secondary response features are extracted through the aforementioned preprocessing process.

[0081] Then, a multi-channel attention decoupling network is used in the matrix background interference decoupling process. The input is the secondary response features, and the output is the pure metabolic features with matrix interference removed.

[0082] Specifically, the multichannel attention decoupling network includes an input layer, a feature separation module, a residual mapping module, and an output layer.

[0083] The input layer is a dual-channel one-dimensional input, receiving spatial gradient features and intensity distribution features respectively. Each channel inputs an 8-dimensional one-dimensional feature vector. The spatial gradient features are calculated from the intensity difference between adjacent sampling points of the activity response distribution map, including a total of 8-dimensional gradient statistics such as maximum gradient, average gradient, and gradient variance. The intensity distribution features are composed of histogram statistics of activity intensity, including a total of 8-dimensional distribution parameters such as distribution mean, variance, and skewness.

[0084] The feature separation module contains three one-dimensional convolutional layers, each with a kernel size of 3 and output channels of 16, 32, and 32 respectively. Each layer is followed by batch normalization and ReLU activation function. The module embeds a channel attention gating unit, which generates channel weights through global average pooling and fully connected layers, automatically learns the separation weights of matrix features and activity features, suppresses matrix background feature channels, and enhances metabolic activity feature channels.

[0085] The residual mapping module contains four fully connected layers with skip connections, with the number of hidden layer neurons being 64, 64, 48, and 32, respectively. Each layer is followed by a ReLU activation function, and the skip connections span every two layers of the network, preserving the feature information of the lower layers and establishing a nonlinear mapping relationship between activity features and microbial metabolic intensity.

[0086] The output layer outputs a 12-dimensional pure activity feature vector, corresponding to 12 metabolic feature dimensions.

[0087] The multi-channel attention decoupling network is trained using a contrastive learning strategy, with the loss function being the contrastive loss, expressed as: ; In the formula, To compare the loss function values, N is the batch sample size. The feature distance of the nth positive sample pair is the distance between the positive sample pairs, which are sample pairs with the same activity but different matrices. denoted as , where is the feature distance of the nth negative sample pair, and negative sample pairs are sample pairs with different activities; m is the margin parameter, with a value of 0.5. The training objective is to reduce the feature distance of positive sample pairs and increase the feature distance of negative sample pairs, so that the network outputs consistent activity features under different matrix backgrounds.

[0088] The output purified metabolic features are recombined according to time series to construct a dynamic metabolic trajectory matrix. The rows of the matrix correspond to different feature dimensions, and the columns correspond to different sampling times. The top four main metabolic patterns are extracted by singular value decomposition, and combined with the metabolic pathway similarity calculated by dynamic time warping, a unique 12-dimensional dynamic metabolic fingerprint is generated as a feature characterizing the true activity of microorganisms.

[0089] Step 7: Construct a heterogeneous feature topology graph by combining pure metabolic features with basic appearance parameters, and perform multi-dimensional feature fusion through a heterogeneous graph convolutional network to generate a comprehensive quality index.

[0090] For example, 17 features, including a 12-dimensional dynamic metabolic fingerprint and 5-dimensional basic appearance parameters, are used as graph nodes. These nodes are divided into two categories based on feature type: 12 metabolic nodes and 5 appearance nodes. Three types of relationships are defined between nodes: metabolism-metabolism association (both nodes are metabolic); appearance-appearance association (both nodes are appearance); and metabolism-appearance association (two nodes belong to different types).

[0091] Then, connections between nodes are constructed based on the mutual information between features: for each type of relationship, the mutual information of the corresponding node pairs is calculated, and connections are established between node pairs whose mutual information is higher than the corresponding threshold; the threshold for metabolism-metabolism association is set to 0.15, the threshold for appearance-appearance association is set to 0.2, and the threshold for metabolism-appearance association is set to 0.1, to adapt to the association characteristics of different types of features. Finally, a heterogeneous feature topology graph containing 2 types of nodes, 3 types of relationships, and multiple connections is formed.

[0092] The heterogeneous graph convolutional network consists of two heterogeneous graph convolutional layers. The computational expression for each heterogeneous graph convolutional layer is as follows: ; In the formula, and are the feature vectors of the v-th node in the l-th and l+1-th layers, respectively, and R is the set of relation types between nodes, including metabolism-metabolism, appearance-appearance, and metabolism-appearance. Let be the set of neighboring nodes of node v under relation r. The node is a node in the set of neighboring nodes; Let be the trainable weight matrix corresponding to the r-th layer; The node self-loop weight matrix; and All values ​​are initialized uniformly using Xavier, with a limited range of values. ,in This is the input feature dimension for this layer. For the output feature dimension of this layer, the matrix and its corresponding bias vector are uniformly initialized to 0; is the normalization coefficient of node v under relation r, and its value is the number of corresponding neighboring nodes; This is the ReLU activation function.

[0093] By using two heterogeneous graph convolutional layers, each node can aggregate neighbor features within a two-hop range while preserving the characteristics of different types of features, thus achieving deep fusion of local features and global associations.

[0094] Global average pooling and max pooling are performed on all node features after convolution. The pooling results are concatenated and input into a fully connected layer, which outputs three quality scores: microbial activity score, nutrient composition score, and physical property score. The weights of the three scores are 0.5, 0.3, and 0.2, respectively. The weighted sum is used to obtain a comprehensive quality score of 0 to 100.

[0095] Step 8: Output the final quality grade determination result based on the comprehensive quality indicators.

[0096] For example, a hierarchical Bayesian decision model is used to determine the quality level, classifying quality into three levels: superior, acceptable, and unacceptable. The determination process consists of two layers: Prior probability calculation: Based on the prior distributions for microbial activity, nutrient composition, and physical properties, the conditional probabilities for each dimension corresponding to the three levels are calculated. The prior distributions for each dimension are obtained from statistical data of 1000 calibrated samples. For microbial activity, a Gaussian distribution is used: the mean of the distribution for superior products is 90, and the standard deviation is 5; for qualified products, the mean is 72, and the standard deviation is 8; and for unqualified products, the mean is 45, and the standard deviation is 10. For nutrient composition and physical properties, a trapezoidal distribution is used. Taking nutrient composition as an example, the upper and lower limits of the trapezoidal distribution for superior products are 85-100, with a transition range of 5 points; for qualified products, the upper and lower limits are 60-85, with a transition range of 5 points; and for unqualified products, the upper and lower limits are 0-60, with a transition range of 5 points. The conditional probabilities for the three levels corresponding to the current dimension are calculated by substituting the current dimension score into the probability density function of the corresponding distribution.

[0097] Top-level posterior probability fusion: Based on the weights of each dimension, the underlying conditional probabilities are weighted and fused to obtain the posterior probabilities of the sample for the three levels. The level with the highest posterior probability is selected as the final judgment result, i.e., the comprehensive quality score, and the corresponding confidence level, i.e., the posterior probability value of that level, is also output.

[0098] After obtaining the overall quality score and confidence level, the quality grade is determined according to the following rules: an overall quality score ≥ 85 and a confidence level ≥ 0.7 is determined to be a superior product; an overall quality score ≥ 60 and < 85 and a confidence level ≥ 0.7 is determined to be a qualified product; and an overall quality score < 60 is determined to be a non-qualified product.

[0099] Furthermore, in the scenario of continuous batch testing, the spatial distribution feature parameters of the activity response distribution map of each batch of samples are extracted to construct a time-series evolution sequence, and the changing trend of the feature parameters in the time-series evolution sequence is calculated. This changing trend includes the rate of change and the acceleration of change. When the changing trend of multiple consecutive batches exceeds the statistical threshold, a graded early warning signal is triggered, and the corresponding abnormal feature map is recorded at the same time.

[0100] Specifically, for continuous batch testing scenarios, characteristic parameters of the activity response distribution map of each batch of samples are extracted, including the mean activity intensity, the proportion of metabolic hotspot regions, and the spatial heterogeneity index, to construct a temporal evolution sequence. The rate of change and acceleration of change of the sequence are calculated, and a graded warning is triggered when the change trend of three consecutive batches exceeds a statistical threshold. A Level 1 warning corresponds to a single batch of three consecutive batches with an average decrease in activity intensity of 3.5% to 7%, or a single batch of spatial heterogeneity index with an increase of ≤4%, indicating that there may be a slight deviation in the production process. A Level II warning corresponds to a single batch of three consecutive batches of average activity intensity decreasing by more than 7% and less than 12%, or a single batch of spatial heterogeneity index increasing by 4% to 9%, indicating a significant abnormality in the production process. A Level 3 warning corresponds to a single batch showing a decrease of more than 12% in the average activity intensity of three consecutive batches, or a single batch showing a reduction of ≥10% in the proportion of metabolic hotspot areas, indicating a serious quality problem.

[0101] The warning system also records abnormal feature maps, including the batch, time, and abnormal activity distribution areas where the abnormality occurred, providing data support for production process investigation.

[0102] This application embodiment also provides an organic fertilizer quality testing system, the system comprising: The data acquisition module is used to acquire information on the abundance of microorganisms and basic apparent parameters of the organic fertilizer samples to be tested. The initial combination selection module is used to calculate the comprehensive fitness score of various incentive methods based on the bacterial abundance information and the preset bacterial community-incentive sensitivity matrix, select the incentive methods with the highest comprehensive fitness scores to form the initial incentive combination, and at the same time retrieve the qualified sample benchmark response template that matches the current bacterial community composition. The excitation module is used to apply synchronous pulse excitation to the same micro-region on the sample surface according to the initial excitation combination, synchronously acquire dynamic response signals of multiple modes, and extract the corresponding transient response feature sequence. The quality assessment module is used to calculate the consistency score between the transient response feature sequence and the baseline response template. When the consistency score is higher than a preset threshold, the sample quality is deemed to be qualified. The combinatorial optimization module is used to input the bacterial community abundance information, transient response feature sequence and parameters of the initial stimulus combination into the deep stimulus optimization network when the consistency score is lower than the preset threshold. It outputs the parameter adjustment coefficients of each stimulus and the stimulus type retention decision to generate the optimized secondary stimulus combination. The excitation module applies pulse excitation to the sample according to the secondary excitation combination and collects the corresponding response signal. It extracts the secondary response features and performs matrix background interference decoupling processing to obtain pure metabolic features. The index calculation module is used to construct a heterogeneous feature topology graph by combining pure metabolic features with basic apparent parameters, and to generate a comprehensive quality index by fusing multi-dimensional features through a heterogeneous graph convolutional network. The quality assessment module outputs the final quality grade assessment result based on the comprehensive quality indicators.

[0103] To verify the detection performance of this method, a control experiment was set up to compare this method with the existing method published in CN121384835A, and to conduct a quantitative evaluation from the dimensions of detection accuracy, false positive rate, and scope of application.

[0104] Three groups of different types of organic fertilizer samples were prepared for the experiment, with 50 samples in each group, for a total of 150 samples. The true quality grade of all samples was determined by a combination of the national standard plate colony count method and the organic matter content determination method, and was used as the experimental true value.

[0105] The first group consists of conventional Bacillus-based organic fertilizers, using peat moss and humic acid as substrates. The functional microbial community is dominated by Bacillus, accounting for more than 70%. It includes 25 qualified samples and 25 unqualified samples, used to verify the detection performance under a single heat-sensitive microbial community.

[0106] The second group is a compound microbial organic fertilizer, which contains multiple microbial groups such as Bacillus, Actinomycetes, and electrochemically active bacteria. The matrix is ​​supplemented with highly absorbent additives such as attapulgite and zeolite. It includes 25 qualified samples and 25 unqualified samples, which are used to verify the detection performance under complex matrix and multiple microbial groups.

[0107] The third group consists of fungal organic fertilizers, whose functional microbial communities are mainly filamentous fungi such as Trichoderma and Aspergillus. These fungi have low sensitivity to heat stimulation and include 25 qualified samples and 25 unqualified samples. This group is used to verify the detection performance under non-heat-sensitive microbial communities.

[0108] The experiment used the same hardware detection platform, loading two different detection algorithms to ensure consistent hardware conditions and eliminate the influence of hardware differences on the results. The control method adopted the method described in publication number CN121384835A, applying only a single thermal pulse excitation, collecting gas and spectral signals, and completing the quality judgment according to its procedure. The excitation parameters were consistent with those disclosed in the corresponding patent specification. This method employs the entire process of bacterial community identification, adaptive excitation, initial judgment, optimization, and secondary judgment as described in this application, supports multimodal excitation, uses pre-trained weights for all models, and maintains parameter settings consistent with those in the previous implementation methods.

[0109] All samples were tested blindly using two different methods. The test results and the average testing time per sample were recorded, and the results were compared with the true values ​​to calculate the accuracy, false negative rate, and false positive rate. Each experiment was repeated three times, and the average value was taken as the final result.

[0110] Experimental results showed that, based on the overall detection results of 150 samples, the overall accuracy of this method was 94.7%, the false negative rate was 3.1%, and the false positive rate was 2.7%; the overall accuracy of the control method was 81.3%, the false negative rate was 12.4%, and the false positive rate was 6.2%. This method improved accuracy by 13.4 percentage points and reduced the false negative rate by 9.3 percentage points, demonstrating a significant improvement in overall detection performance. The substantial reduction in the false negative rate is mainly attributed to the comprehensive activation of different bacterial communities by multimodal stimulation, preventing the underestimation of the activity of weakly responding bacterial communities.

[0111] Performance varies across different sample types. In the first group of samples, the accuracy difference between the two methods was small, with the accuracy of this method at 96% and the control method at 90%. For heat-sensitive Bacillus-type fertilizers, a single thermal pulse can achieve a good excitation effect. This method further improves the detection accuracy slightly through feature decoupling optimization and graded judgment.

[0112] In the second group of samples, the accuracy of our method was 94%, while that of the control method was 78%, showing a significant difference. The second group contained an adsorbent matrix and various bacterial communities. Under a single thermal pulse, matrix interference was severe, and the electrochemically active bacteria did not respond adequately to thermal excitation, resulting in a low signal-to-noise ratio and large feature decoupling error in the control method. Our method supplemented the electrochemical response dimension through multimodal excitation and combined it with a multi-channel decoupling network, effectively reducing matrix interference and covering the responses of more bacterial communities, thus significantly improving performance.

[0113] In the third group of samples, the accuracy rate of this method was 94%, while that of the control method was only 76%, showing the most significant difference. Filamentous fungi have low sensitivity to heat pulses, and their response signals are weak under single heat excitation. The control method easily misclassifies highly active fungal fertilizers as unqualified, with a false negative rate as high as 24%. This method automatically matches acoustic excitation as the main excitation through fungal community identification, effectively activating the fungal metabolic response and significantly improving the detection accuracy.

[0114] Regarding detection efficiency, the average detection time per sample was approximately 12 seconds, compared to approximately 8 seconds for the control method. About 65% of the samples could be detected in the initial judgment stage, taking approximately 8 seconds, comparable to the control method; only 35% of the samples with low consistency underwent secondary detection, with a single sample time of approximately 19 seconds. Overall, this method significantly improves accuracy while only increasing detection time by 50%, still meeting the efficiency requirements for batch testing.

[0115] Experimental results show that this method effectively solves the problems of insufficient detection dimensions and low detection accuracy for non-thermal sensitive microbial communities in existing single-excitation methods through multimodal adaptive excitation and dynamic optimization mechanism. It shows better performance in the detection of multiple types of organic fertilizers, especially for compound microbial communities and fungal fertilizers, and at the same time takes into account detection efficiency. It has high practical value and industrial application prospects.

[0116] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0117] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for testing the quality of organic fertilizer, characterized in that, Includes the following steps: The abundance information and basic apparent parameters of the microbial community in the organic fertilizer sample to be tested are obtained. The microbial community abundance information is acquired through hyperspectral imaging combined with a lightweight microbial community classification convolutional neural network. The acquisition process is as follows: a cube of hyperspectral image data from the sample surface is collected, preprocessed with spatial average spectrum, and then input into the microbial community classification convolutional neural network, which outputs the relative abundance of various functional microbial communities. The microbial community classification convolutional neural network includes an input layer, convolutional blocks, a global average pooling layer, a fully connected layer, and an output layer. The microbial community classification convolutional neural network is trained using a multi-class cross-entropy loss function, the expression of which is: ; In the formula, The cross-entropy loss function value represents the multi-class classification, where M is the batch sample size and K is the total number of bacterial colony categories. This is the true abundance label for the k-th bacterial community in the m-th sample. The abundance value of the k-th class of bacteria in the m-th sample predicted by the convolutional neural network for bacterial community classification; Based on the bacterial community abundance information and a preset bacterial community-stimulation sensitivity matrix, the comprehensive fitness score of various stimulation methods is calculated. The stimulation methods with the highest comprehensive fitness scores are selected to form an initial stimulation combination. Simultaneously, a qualified sample baseline response template matching the current bacterial community composition is retrieved. The bacterial community-stimulation sensitivity matrix is ​​constructed through standardized calibration experiments, and its elements are the sensitivity coefficients of various bacterial communities to various stimulation methods, with values ​​ranging from 0 to 1. The calculation expression for the comprehensive fitness score is: ; In the formula, The comprehensive fit score for the i-th incentive method is given. Let k be the relative abundance of the k-th bacterial group. Let K be the sensitivity coefficient of the k-th bacterial group to the ith type of incentive, where K is the total number of bacterial groups; select the top three incentive methods with the highest overall fitness scores to form the initial incentive combination. If the overall fitness score of the third-ranked incentive is less than 30% of that of the first-ranked incentive, then only the first two incentive methods will be selected. Synchronous pulse excitation is applied to the same micro-region on the sample surface according to the initial excitation combination, and dynamic response signals of multiple modes are acquired simultaneously to extract the corresponding transient response feature sequences. Calculate the consistency score between the transient response feature sequence and the baseline response template, and determine that the sample quality is qualified when the consistency score is higher than a preset threshold. When the consistency score is lower than the preset threshold, the bacterial abundance information, the transient response feature sequence, and the parameters of the initial stimulus combination are input into a deep stimulus optimization network. The network outputs the parameter adjustment coefficients for each stimulus and the stimulus type retention decision, generating an optimized secondary stimulus combination. The deep stimulus optimization network adopts a multi-input multi-output fully connected neural network structure, consisting of an input layer, a feature encoding layer, an attention layer, and a dual-branch output layer connected sequentially. The input layer receives the bacterial abundance information, the transient response feature sequence, and the parameters of the initial stimulus combination. The feature encoding layer contains three fully connected hidden layers, encoding the input features into high-dimensional latent features. The attention layer uses a channel attention mechanism to adaptively weight the high-dimensional latent features. The dual-branch output layer is divided into a parameter regression branch and a type decision branch. The parameter regression branch outputs the intensity parameter adjustment coefficients for each stimulus, and the type decision branch outputs the retention probability of each stimulus. Pulse excitation is applied to the sample according to the secondary excitation combination and the corresponding response signal is collected. The secondary response features are extracted and matrix background interference decoupling processing is performed to obtain pure metabolic features. The pure metabolic features and the basic appearance parameters are used to construct a heterogeneous feature topology graph. Multi-dimensional features are fused through a heterogeneous graph convolutional network to generate a comprehensive quality index. The final quality grade determination result is output based on the comprehensive quality indicators.

2. The method for testing the quality of organic fertilizer according to claim 1, characterized in that, The deep incentive optimization network employs a two-stage training approach combining offline supervised pre-training with online reinforcement learning fine-tuning. During the offline supervised pre-training stage, a joint loss function is used to optimize the network parameters. The expression for the joint loss function is as follows: ; In the formula, For the joint loss function value, This represents the mean squared error loss value of the parameter regression branch. The binary cross-entropy loss value for the decision branch of the aforementioned type. , These are the loss weighting coefficients, with values ​​of 0.6 and 0.4 respectively; In the fine-tuning phase of online reinforcement learning, a deep Q-learning strategy is adopted, using changes in confidence as a reward signal and updating network parameters through an experience replay mechanism.

3. The method for testing the quality of organic fertilizer according to claim 1, characterized in that, The matrix background interference decoupling process is implemented using a multi-channel attention decoupling network, which includes an input layer, a feature separation module, a residual mapping module, and an output layer. The input layer has dual-channel input, receiving spatial gradient features and intensity distribution features respectively. The feature separation module includes multiple one-dimensional convolutional layers and channel attention gating units to filter matrix background features; the residual mapping module includes fully connected layers with skip connections to establish a nonlinear mapping relationship between activity features and metabolic intensity; the output layer outputs pure metabolic features. The multi-channel attention decoupling network is trained using a contrastive loss function, the expression of which is: ; In the formula, To compare the loss function values, N is the batch sample size. The feature distance of the nth positive sample pair. is the feature distance of the nth negative sample pair, and m is the margin parameter.

4. The method for testing the quality of organic fertilizer according to claim 1, characterized in that, The heterogeneous feature topology graph uses the pure metabolic features and the basic appearance parameters as graph nodes, classifying them into metabolic nodes and appearance nodes according to feature type, and establishing different types of node connection edges based on the mutual information between features; the heterogeneous graph convolutional network contains two heterogeneous graph convolutional layers, and the calculation expression for each heterogeneous graph convolutional layer is: ; In the formula, and Let be the feature vectors of the v-th node in the l-th and (l+1)-th layers, respectively, and R be the set of relation types between nodes. Let be the set of neighboring nodes of node v under relation r. For each node in the set of neighboring nodes, This is the weight matrix corresponding to the r-th layer. Let v be the normalized coefficient of node v under relation r. The node self-loop weight matrix, It is the ReLU activation function; The node features after convolutional aggregation are then mapped through global pooling and fully connected layers to output the comprehensive quality index.

5. The method for testing the quality of organic fertilizer according to claim 1, characterized in that, The consistency score is calculated using a dynamic time warping algorithm. The calculation process is as follows: after standardizing the transient response feature sequence to be tested and the baseline response template respectively, the dynamic time warping distance between the two is calculated, and the dynamic time warping distance is converted into the consistency score. The expression for calculating the consistency score is: ; In the formula, C is the consistency score. The dynamic time warping distance is... This is the maximum reference distance for the corresponding baseline response template.

6. The method for testing the quality of organic fertilizer according to claim 1, characterized in that, The dynamic response signals of multiple modes include gas release kinetic signals, hyperspectral change signals, electrochemical impedance signals, and acoustic echo signals. All signals are acquired synchronously at the same sampling frequency and constructed into a multimodal coupled dataset after being timestamped. During the signal extraction process, the variational mode decomposition algorithm is used to separate the fast response component and the slowly varying background component from the multimodal coupled dataset. The time-domain and frequency-domain features of the fast response component are extracted to form the transient response feature sequence.

7. The method for testing the quality of organic fertilizer according to claim 1, characterized in that, In a continuous batch testing scenario, spatial distribution feature parameters of the activity response distribution map of each batch of samples are extracted to construct a time-series evolution sequence. The changing trend of the feature parameters in the time-series evolution sequence is calculated, and the changing trend includes the rate of change and the acceleration of change. When the changing trend of multiple consecutive batches of samples exceeds the statistical threshold, a graded early warning signal is triggered, and the corresponding abnormal feature map is recorded.

8. A system for testing the quality of organic fertilizer according to any one of claims 1-7, characterized in that, include: The data acquisition module is used to acquire information on the abundance of microorganisms and basic apparent parameters of the organic fertilizer samples to be tested. The initial combination selection module is used to calculate the comprehensive fitness score of various incentive methods based on the bacterial abundance information and the preset bacterial community-incentive sensitivity matrix, select the incentive methods with the highest comprehensive fitness scores to form the initial incentive combination, and at the same time retrieve the qualified sample benchmark response template that matches the current bacterial community composition. The excitation module is used to apply synchronous pulse excitation to the same micro-region on the sample surface according to the initial excitation combination, synchronously acquire dynamic response signals of multiple modes, and extract the corresponding transient response feature sequence. The quality assessment module is used to calculate the consistency score between the transient response feature sequence and the baseline response template. When the consistency score is higher than a preset threshold, the sample quality is determined to be qualified. The combination optimization module is used to input the bacterial community abundance information, the transient response feature sequence and the parameters of the initial incentive combination into the deep incentive optimization network when the consistency score is lower than the preset threshold, and output the parameter adjustment coefficients of each incentive and the incentive type retention decision to generate an optimized secondary incentive combination. The excitation module applies pulse excitation to the sample according to the secondary excitation combination and collects the corresponding response signal, extracts the secondary response features and performs matrix background interference decoupling processing to obtain pure metabolic features. The index calculation module is used to construct a heterogeneous feature topology graph by combining the pure metabolic features with the basic appearance parameters, and to perform multi-dimensional feature fusion through a heterogeneous graph convolutional network to generate a comprehensive quality index. The quality assessment module outputs the final quality grade assessment result based on the comprehensive quality index.

Citation Information

Patent Citations

  • Intelligent quality detection method and system for micro-mineral bio-organic fertilizer

    CN121384835A

  • Organic potash fertilizer and preparation method thereof

    CN119528635A

  • Coating uniformity detection method and system based on lining cloth

    CN121068765A