A Method and System for Detecting Moisture Content in Chicken Manure Based on Hyperspectral Imaging and Image Segmentation

By combining hyperspectral imaging and image segmentation with the HS-SegNet model, multi-parameter collaborative detection and adaptive control of chicken manure moisture content were achieved, solving the problems of insufficient detection accuracy and poor cross-scene adaptability in existing technologies, and providing a real-time and accurate detection and control solution.

CN121483419BActive Publication Date: 2026-07-03SHANGHAI HENGZE FUHUI INTELLIGENT TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI HENGZE FUHUI INTELLIGENT TECHNOLOGY CO LTD
Filing Date
2026-01-08
Publication Date
2026-07-03

Smart Images

  • Figure CN121483419B_ABST
    Figure CN121483419B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of moisture content detection, and particularly relates to a method and system for detecting the moisture content of chicken manure based on hyperspectral imaging and image segmentation. The method simultaneously collects hyperspectral data, image data, and environmental information data of chicken manure, and after preprocessing, forms an enhanced detection data sequence. This sequence is input into a pre-trained HS-SegNet model, which, combined with dynamic thresholding, outputs a multi-dimensional parameter sequence including global moisture content, morphology discrimination, uniformity, scene type, and a moisture content distribution heatmap. Based on the parameter sequence, the method intelligently selects and executes moisture content adjustment, qualified sorting, and blockchain traceability strategies from a reinforcement adjustment strategy library, driving a conditioning controller and a diversion device to achieve precise conditioning and automatic sorting of chicken manure. This invention achieves non-contact, multi-parameter collaborative detection and adaptive control of chicken manure moisture content, significantly improving the intelligence level and quality stability of chicken manure resource utilization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of moisture content detection, and particularly relates to a method and system for detecting the moisture content of chicken manure based on hyperspectral imaging and image segmentation. Background Technology

[0002] The moisture content of chicken manure is a core parameter for the appropriate moisture content required for composting and fermentation in organic fertilizer production, the higher moisture content required for biogas power generation in manure resource utilization, and environmental risk control. Existing chicken manure moisture content detection technologies have significant limitations. Traditional contact detection methods, such as drying and weighing, require sample destruction and have long detection cycles, making real-time monitoring impossible. Capacitive detection is susceptible to the adhesion of chicken manure, leading to sensor contamination and large single-point measurement errors, making it difficult to represent the overall sample. Single hyperspectral detection methods rely solely on spectral features and cannot effectively distinguish the spectral superposition effects of moisture and components such as coarse fiber and impurities. Detection accuracy is significantly affected by sample uniformity and cannot provide moisture content distribution analysis. Traditional image detection methods indirectly infer moisture content through color and texture but do not incorporate information about the internal composition of chicken manure. Furthermore, they cannot accurately segment impurities in the sample, such as feathers and straw, leading to false features interfering with the detection results and generally high errors. In addition, existing methods are difficult to adapt to the diverse needs of different farming scenarios (such as free-range and large-scale farming) and different manure forms (such as fresh manure and semi-dry manure), and their cross-scenario adaptability is insufficient, which restricts the accuracy and efficiency in practical applications. Summary of the Invention

[0003] To address the shortcomings of existing technologies, this invention proposes a method and system for detecting chicken manure moisture content based on hyperspectral imaging and image segmentation. This method simultaneously collects hyperspectral data, image data, and environmental information data of chicken manure, preprocessing them to form an enhanced detection data sequence. This sequence is then input into a pre-trained HS-SegNet model, which, combined with dynamic thresholding, outputs a multi-dimensional parameter sequence containing global moisture content, morphology discrimination, uniformity, scene type, and a heatmap of moisture content distribution. Based on this parameter sequence, the system intelligently selects and executes moisture content adjustment, qualification sorting, and blockchain traceability strategies from a reinforcement adjustment strategy library, driving a conditioning controller and a diversion device to achieve precise conditioning and automatic sorting of chicken manure. This invention achieves non-contact, multi-parameter collaborative detection and adaptive control of chicken manure moisture content, significantly improving the intelligence level and quality stability of chicken manure resource utilization.

[0004] To achieve the above objectives, the present invention provides the following technical solution:

[0005] A method for detecting the moisture content of chicken manure based on hyperspectral imaging and image segmentation includes:

[0006] Simultaneously collect hyperspectral data, image data, and environmental information data of chicken manure under different farming scenarios, and preprocess them to obtain enhanced detection data sequences;

[0007] The enhanced detection data sequence is input into the pre-trained HS-SegNet model and combined with the scene dynamic qualification judgment threshold to obtain the first detection parameter sequence; the first detection parameter sequence includes the global moisture content estimate, chicken manure morphology judgment result, moisture content uniformity, scene judgment result, heat map of chicken manure moisture content cluster distribution area, and the second global moisture content estimate and chicken manure qualification judgment result;

[0008] The first detection parameter sequence is synchronized to the production line console. In response to preset trigger conditions satisfied in the preset enhancement adjustment strategy library, at least two enhancement adjustment response strategies corresponding to the trigger conditions are selected from the enhancement adjustment strategy library. The enhancement adjustment strategy library includes moisture content adjustment strategy, sorting strategy and storage traceability strategy.

[0009] Specifically, the process of acquiring enhanced detection data sequences includes:

[0010] The collected hyperspectral data of chicken manure were subjected to a first enhancement preprocessing to obtain the first enhanced hyperspectral features of chicken manure;

[0011] The synchronously acquired image data is subjected to a second enhancement preprocessing to obtain second enhanced chicken manure image features;

[0012] Simultaneously, environmental information data within the same time axis of the image data undergoes a third encoding preprocessing to obtain environmental condition embedding features. The environmental information data includes collected environmental temperature and humidity data, chicken manure thickness data, sample morphological parameters, and the farming scenario. The sample morphological parameters include whether the manure is fresh or semi-dry, determined by the morphological texture features of the chicken manure. The farming scenario includes free-range and large-scale farming, characterized by the impurity content and moisture content uniformity in the chicken manure. Fresh manure is coded as 1, semi-dry manure as 2, large-scale farming as 3, and free-range farming as 4.

[0013] Specifically, the HS-SegNet model includes a hyperspectral feature extraction branch, an image segmentation branch, a cross-modal feature fusion module, and a multi-scale regression head; the construction and training process of the HS-SegNet model includes:

[0014] Based on the first enhanced chicken manure hyperspectral features combined with the hyperspectral feature extraction branch, a high-dimensional spectral feature map is obtained;

[0015] Simultaneously, the second enhanced chicken manure image features are input into the image segmentation branch to obtain a chicken manure mask binary image and chicken manure morphological texture features; wherein the feature vector corresponding to the impurity feature region in the chicken manure mask binary image is set to 0, and the feature vector corresponding to the chicken manure feature region is set to 1.

[0016] The spectral features corresponding to the same region in the high-dimensional spectral feature map are weighted and filtered using the chicken manure mask binary map to obtain a first weighted fusion feature map and an impurity screening segmentation map.

[0017] Based on the first weighted fusion feature map and the first filtering matrix in the first enhancement preprocessing, a second weighting is performed to obtain a second weighted fusion feature map; the first filtering matrix is ​​constructed from the correlation coefficient matrix between the spectral data bands and the water content detection accuracy, and is used to screen spectral data with strong correlation bands to water content detection.

[0018] Specifically, the construction and training process of the HS-SegNet model also includes:

[0019] The environmental condition embedding features are combined with the second weighted fusion feature map and the high-dimensional spectral feature map, and then input into the cross-modal feature fusion module to obtain the third weighted fusion feature map;

[0020] Based on the third weighted fusion feature map combined with coarse-grained branching, the global water content estimate and the global regression prediction loss are obtained.

[0021] Based on the third weighted fusion feature map combined with medium-granularity branch, the predicted value of single pixel moisture content and local regression prediction loss are obtained. Based on the predicted value of single pixel moisture content combined with the regional clustering algorithm, the initial chicken manure moisture content clustering distribution area heat map, the estimated value of moisture content in each region and the corresponding moisture content change gradient in each region are obtained.

[0022] Specifically, the multi-scale regression head includes coarse-grained branches, medium-grained branches, fine-grained branches, morphology discrimination branches, and scene discrimination branches; the construction and training process of the HS-SegNet model also includes:

[0023] Based on the heat map of the distribution area of ​​chicken manure moisture content cluster, the estimated regional moisture content, the morphological texture features of chicken manure combined with the morphological discrimination branch, the morphological discrimination results and morphological discrimination loss of chicken manure are obtained.

[0024] Based on the heat map of chicken manure moisture content cluster distribution area and the corresponding moisture content change gradient in each chicken manure moisture content cluster distribution area, the moisture content uniformity is evaluated to obtain the moisture content uniformity of the chicken manure moisture content cluster distribution area corresponding to each image.

[0025] Based on the uniformity of water content in the clustered distribution area of ​​chicken manure water content for each image, combined with the impurity screening segmentation map, the scene discrimination result and scene discrimination loss are obtained through the scene discrimination branch.

[0026] Using the scene discrimination result as a condition, and combining the third weighted fusion feature map with the fine-grained branch and chicken manure morphology discrimination result, the second global moisture content estimate and the second global regression prediction loss are obtained.

[0027] Specifically, the construction and training process of the HS-SegNet model also includes:

[0028] The initial chicken manure moisture content cluster distribution area heat map is updated based on the second global moisture content estimate to obtain the chicken manure moisture content cluster distribution area heat map and update bias loss.

[0029] A joint loss function is constructed based on global regression prediction loss, local regression prediction loss, morphology discrimination loss, scene discrimination loss, second global regression prediction loss and update bias loss, as well as the image segmentation loss corresponding to the second enhancement preprocessing.

[0030] The HS-SegNet model is trained based on the joint loss function and a preset training period to obtain the trained HS-SegNet model. The second global moisture content estimate, chicken manure morphology discrimination result, moisture content uniformity of chicken manure area in each image, and heat map of chicken manure moisture content cluster distribution area are output.

[0031] Specifically, the response to preset trigger conditions satisfied in the preset enhancement adjustment strategy library includes:

[0032] The second global moisture content estimate and moisture content uniformity, output in real time by the trained HS-SegNet model, are combined with a preset application scenario discrimination threshold to determine the moisture content qualification. When both the second global moisture content estimate and the moisture content uniformity meet the corresponding application scenario discrimination threshold, the sample is deemed qualified, and a sorting strategy is simultaneously responded to. Based on the real-time collected chicken manure conveying rate, combined with a preset conveying rate-baffle delay-diversion efficiency mapping relationship and a fuzzy control algorithm, a diversion baffle response command is obtained to perform diversion and sorting operations on qualified chicken manure and impurities, and the storage traceability strategy is simultaneously responded to. The application scenario discrimination threshold includes a moisture content application scenario discrimination threshold range and a moisture content uniformity application scenario discrimination threshold. The diversion baffle response command includes a diversion baffle response timestamp and response rate.

[0033] When at least one of the second global moisture content estimate and the moisture content uniformity does not meet the corresponding application scenario discrimination threshold, the real-time moisture content change gradient corresponding to each chicken manure moisture content cluster distribution area is mapped according to the heat map of the chicken manure moisture content cluster distribution area.

[0034] Specifically, in response to preset trigger conditions satisfied in the preset enhancement adjustment strategy library, it also includes:

[0035] Based on the real-time moisture content change gradient corresponding to each chicken manure moisture content cluster distribution area and combined with the second global moisture content estimate, the real-time moisture content distribution of each chicken manure moisture content cluster distribution area is obtained.

[0036] Based on the real-time moisture content distribution of each chicken manure moisture content cluster distribution area, combined with the upper limit of the moisture content application scenario discrimination threshold interval and the moisture content uniformity application scenario discrimination threshold, the magnitude and sign of the real-time moisture content deviation between the real-time moisture content distribution and the upper limit of the moisture content application scenario discrimination threshold interval, as well as the uniformity deviation value of the corresponding chicken manure moisture content cluster distribution area, are calculated.

[0037] The genetic algorithm input sequence is constructed using the uniformity deviation value of each chicken manure moisture content cluster distribution area, the magnitude and sign of the real-time moisture content deviation between the real-time moisture content distribution and the upper limit of the threshold interval for the moisture content application scenario, the preset uniformity deviation value-chicken manure thickness-turning equipment speed curve, the moisture content deviation value-positive sign-drying rate curve, and the moisture content deviation value-negative sign-water addition rate curve.

[0038] Specifically, in response to preset trigger conditions satisfied in the preset enhancement adjustment strategy library, it also includes:

[0039] A fitness function is constructed by minimizing the uniformity deviation value in the heat map of the clustered distribution area of ​​chicken manure moisture content. The threshold interval for judging the application scenario of moisture content is used as the constraint interval. A label for water addition or drying is constructed based on the positive or negative sign of the real-time moisture content deviation. An adjustment coefficient for water addition rate or drying rate is constructed based on the absolute value of the real-time moisture content deviation. The adjustment coefficient for water addition rate or drying rate is proportional to the absolute value of the real-time moisture content deviation.

[0040] The genetic algorithm input sequence, fitness function, constraint interval, water addition or drying discrimination label and water addition rate or drying rate adjustment coefficient are input into the genetic algorithm. Combined with the preset iteration period threshold, the optimal turning equipment speed and optimal water addition rate or drying rate corresponding to each chicken manure moisture content cluster distribution area are obtained.

[0041] Based on the optimal turning speed and optimal water addition rate or drying rate corresponding to each chicken manure moisture content cluster distribution area, combined with the water addition or drying device configured in the conditioning treatment area in the production line control console, the corresponding turning speed adjustment command, water addition command or drying command is generated through a preset fuzzy control algorithm to perform real-time turning and water addition or drying adjustments.

[0042] During the real-time turning and watering or drying adjustment process, the sorting strategy is simultaneously responded to to perform diversion and sorting operations on qualified chicken manure, unqualified chicken manure and impurities and waste materials, and the storage traceability strategy is simultaneously responded to to store the optimal turning equipment speed and optimal watering rate or drying rate corresponding to the turning and watering or drying adjustment process on the chain.

[0043] Simultaneously, the enhanced detection data sequences collected in real time during the turning, watering, or drying adjustment processes are labeled in conjunction with the drying method to construct a fine-tuning training set. When the fine-tuning training set collected within a preset time period meets the preset quantity, the trained HS-SegNet model is periodically updated with fine-tuned parameters based on the fine-tuning training set and the incremental learning algorithm to obtain the fine-tuned and updated HS-SegNet model. The updated HS-SegNet model is then synchronized to the production line control console for chicken manure sorting, watering, drying, and optimal watering or drying rates, along with the enhanced detection data sequences, to be stored on the blockchain.

[0044] A chicken manure moisture content detection system based on hyperspectral imaging and image segmentation includes: a synchronous acquisition module, a detection module, and a response adjustment module;

[0045] The synchronous acquisition module is used to synchronously acquire hyperspectral data, image data and environmental information data of chicken manure under different breeding scenarios, and preprocess them to obtain enhanced detection data sequences.

[0046] The detection module is used to input the enhanced detection data sequence into the pre-trained HS-SegNet model and combine it with the scene dynamic qualification judgment threshold to obtain the first detection parameter sequence; the first detection parameter sequence includes the global moisture content estimate, chicken manure morphology judgment result, moisture content uniformity, scene judgment result, heat map of chicken manure moisture content cluster distribution area, and the second global moisture content estimate and chicken manure qualification judgment result;

[0047] The response adjustment module synchronizes the first detection parameter sequence to the production line console and, in response to preset trigger conditions satisfied in the preset enhancement adjustment strategy library, selects at least two enhancement adjustment response strategies corresponding to the trigger conditions from the enhancement adjustment strategy library.

[0048] The enhanced adjustment strategy library includes a moisture content adjustment strategy, a sorting strategy, and a storage traceability strategy. The moisture content adjustment strategy is used to respond to the configured conditioning controller according to the first detection parameter sequence. The sorting strategy is used to respond to the sorting strategy according to the first detection parameter sequence and drive the configured diversion baffle to perform diversion operations on the detected qualified chicken manure, unqualified chicken manure, and impurity waste. The storage traceability strategy is used to combine the first detection parameter sequence, the corresponding moisture content adjustment strategy or sorting strategy, and the corresponding response result detection information at each time stamp with blockchain for on-chain storage and traceability of the chicken manure moisture content adjustment process.

[0049] Compared with the prior art, the beneficial effects of the present invention are:

[0050] This invention addresses the shortcomings of existing technologies by optimizing the entire process of chicken manure moisture content detection and production line control through multi-source data fusion and an innovative model architecture. It simultaneously collects hyperspectral, image, and environmental data, performs targeted preprocessing, and combines the multi-scale branching design and cross-modal fusion capabilities of the HS-SegNet model to accurately output multi-dimensional parameters such as moisture content estimates, morphology discrimination results, and clustering heatmaps. This effectively distinguishes between qualified chicken manure, unqualified chicken manure, and impurities, solving the problems of insufficient accuracy and poor scenario adaptability in traditional detection methods. Furthermore, based on a reinforcement adjustment strategy using genetic algorithms and fuzzy control, it can... The turning speed and water / drying rate are dynamically optimized based on real-time monitoring data to achieve precise control of moisture content. At the same time, a graded diversion mechanism improves sorting efficiency, adapting to different scenarios such as free-range and large-scale farming. Blockchain storage enables full traceability of monitoring data, control strategies, and results, ensuring data credibility and process traceability. Incremental learning algorithms are used to regularly fine-tune the model, continuously improving the adaptability and stability of monitoring and control, significantly reducing the cost of manual intervention, and balancing monitoring accuracy, production line efficiency, and intelligent control, providing reliable technical support for the resource utilization of chicken manure. Attached Figure Description

[0051] Figure 1 This is a flowchart of the chicken manure moisture content detection method based on hyperspectral imaging and image segmentation in Embodiment 1 of the present invention;

[0052] Figure 2 This is a flowchart illustrating the HS-SegNet model construction and training process of Embodiment 1 of the present invention.

[0053] Figure 3 This is a diagram of the improved U-Net network structure according to Embodiment 1 of the present invention;

[0054] Figure 4 This is a structural diagram of the production line control console in Embodiment 1 of the present invention. Detailed Implementation

[0055] Example 1

[0056] Please see Figure 1 The present invention provides an embodiment of a method for detecting the moisture content of chicken manure based on hyperspectral imaging and image segmentation, comprising the following steps:

[0057] S1. Through the configured sensor array, synchronously collect hyperspectral data, image data and environmental information data of chicken manure under different breeding scenarios, and preprocess to obtain enhanced detection data sequence; the environmental information data includes collected environmental temperature and humidity data, chicken manure thickness data and sample morphology parameters;

[0058] It should be further noted that the hyperspectral data acquisition in this embodiment uses a pushbroom hyperspectral camera with a wavelength range of 900-1700nm, a spectral resolution of ≤5nm, and a spatial resolution of ≥0.2mm. The camera acquires spectral data and spatial images of chicken manure samples in a non-contact manner within a detection distance range of 0.8-1.5m. The hyperspectral camera is equipped with a diffuse reflection light source to avoid spectral saturation caused by direct strong light.

[0059] It should be further noted that the image data in this embodiment uses a 20-megapixel CMOS camera with a resolution of 2048×2048, equipped with a white LED ring light source, and synchronously acquires RGB images of chicken manure samples at the same time stamp for subsequent image segmentation and appearance feature extraction.

[0060] It should be further explained that the environmental information in this embodiment is obtained by integrating a temperature and humidity sensor and a laser rangefinder to detect environmental temperature and humidity parameters and measure the thickness of chicken manure accumulation, respectively; at the same time, the morphology of chicken manure is automatically determined by texture feature analysis based on the collected RGB images, and the breeding scene information can be manually entered through the human-computer interaction interface.

[0061] Data synchronization mechanism: By adding precise timestamps to all sensor data through a unified clock source, hyperspectral data, image data and environmental information data are collected and synchronized under the same time base, forming a multimodal data set.

[0062] Further explanation is needed; please refer to [link / reference]. Figure 2 The enhanced detection data sequence acquisition process in this embodiment includes:

[0063] S101. Perform a first enhancement preprocessing on the collected chicken manure hyperspectral data to obtain the first enhanced chicken manure hyperspectral features; it should be further explained that the process of performing the first enhancement preprocessing in this embodiment includes:

[0064] S1011. Based on the synchronously collected hyperspectral data of chicken manure, the spectral data is filtered using the first filtering matrix to obtain a strongly correlated spectral filtering feature sequence.

[0065] The first filtering matrix is ​​constructed from the correlation coefficient matrix between spectral data bands and moisture content detection accuracy. It is used to screen spectral data with strong correlation to moisture content detection. Specifically, it involves: firstly, acquiring a training dataset containing multiple chicken manure samples' hyperspectral raw data and their corresponding moisture content reference values ​​determined by the drying method, and preprocessing the hyperspectral data using standard normal variable transformation correction and wavelet transform denoising; then, calculating the Pearson correlation coefficient between each spectral band and the moisture content reference value to form a spectral band-moisture content correlation matrix, and then screening out strongly correlated bands as effective bands based on a pre-set correlation threshold based on statistical distribution; next, constructing a binary diagonal matrix as the first filtering matrix, with its diagonal elements set to 1 at the effective band positions and 0 at the non-effective band positions; finally, evaluating the accuracy of the screened bands in the moisture content detection model using cross-validation, and optimizing the correlation threshold to maximize detection accuracy, thereby effectively reducing spectral data redundancy and improving the accuracy and efficiency of moisture content detection.

[0066] S1012. Based on the strongly correlated spectral filtering feature sequence, a spectral feature sequence with dimensions H×W×64 is obtained through standard normal variable transformation and wavelet transform. In this embodiment of the invention, the specific implementation process of preprocessing the strongly correlated spectral filtering feature sequence through standard normal variable transformation and wavelet transform includes: First, using standard normal variable transformation to correct spectral distortion of the strongly correlated spectral filtering feature sequence, wherein the application process includes calculating the mean and standard deviation of the spectral curve of each pixel, and performing standardization processing on the spectral value of each wavelength point, that is, subtracting the mean and dividing by the standard deviation, to eliminate spectral baseline shift and shape distortion caused by light scattering and path length differences; then, Wavelet transform was used to denoise and remove baseline drift from the SNV-corrected spectral data. Multi-scale decomposition was performed using the db5 wavelet basis, and soft thresholding was used to suppress high-frequency noise components. Low-frequency signals were reconstructed to eliminate instrument-introduced baseline drift while preserving effective spectral features related to water content. Finally, a preprocessed spectral feature sequence with dimensions H×W×64 was obtained, where H and W represent the height and width of the image, respectively, and 64 represents the number of strongly correlated feature bands retained after the transformation. For example, the retained effective spectral features include at least water-sensitive bands such as 1100-1200 nm, 1400-1500 nm, and 1800-1900 nm.

[0067] S1013. Perform a random band masking operation on the preprocessed spectral data. This operation is achieved by randomly selecting one or more consecutive feature bands and setting their data values ​​to zero, in order to simulate the working conditions of the hyperspectral sensor experiencing local faults or data loss during the acquisition process. It should be further explained that the motivation for using the random band masking operation in this embodiment is to enhance the robustness of the model to abnormal sensor working conditions by actively introducing spectral data loss. Its technical principle is based on the adversarial training idea. By simulating the local faults or data transmission packet loss phenomena that may occur in the hyperspectral sensor during long-term operation, the model is forced to learn feature expressions that do not depend on specific fixed band combinations, thereby improving the fault tolerance and stability of the water content detection system in the actual industrial environment.

[0068] S1014. Perform a spectral shift operation on the preprocessed spectral data. This operation is achieved by superimposing a random offset on the spectral curves of all pixels in the spectral dimension to simulate the spectral baseline change caused by fluctuations in ambient light conditions. The motivation for using the spectral shift operation in this embodiment is to enhance the model's adaptability to ambient light interference. The technical principle is to introduce random baseline drift in the spectral dimension to simulate the spectral baseline fluctuation phenomenon caused by light source attenuation and changes in ambient temperature and humidity in the actual production environment. This forces the model to learn the essential characteristics based on the spectral absorption peak shape rather than the absolute reflectance value, thereby effectively improving the stability and generalization performance of the moisture content detection model under different light conditions.

[0069] S1015. After the above-mentioned random band masking and spectral shifting processing, the first enhanced chicken manure hyperspectral feature with enhanced robustness is generated.

[0070] S102. Perform a second enhancement preprocessing on the synchronously acquired image data to obtain second enhanced chicken manure image features; it should be further explained that the process of performing the second enhancement preprocessing in this embodiment includes:

[0071] S1021. Obtain the original RGB image data with a resolution of 2048×2048×3;

[0072] Based on the original RGB image data, the grayscale world algorithm is used to perform illumination normalization processing to obtain a color-equalized image.

[0073] S1022. Based on the color-equalized image, perform convolution operation using a 5×5 pixel Gaussian kernel with a standard deviation of 1.5 to obtain the denoised image;

[0074] S1023. Based on the denoised image, a grayscale image is obtained through color space conversion, and the optimal segmentation threshold is calculated using the maximum inter-class variance method. Based on this threshold, binarization processing is performed to obtain the initially segmented chicken manure region image and background region. The motivation for using the maximum inter-class variance method for image segmentation in this embodiment is to achieve automatic and accurate separation of the chicken manure region and the background. Its technical principle is based on the histogram distribution characteristics of the grayscale image. By maximizing the inter-class variance of the foreground and background pixels, the optimal segmentation threshold is adaptively determined, thereby overcoming the problem of fixed threshold segmentation failure caused by factors such as uneven chicken manure color and changes in ambient light, and providing a reliable regional analysis basis for subsequent accurate detection of moisture content.

[0075] S1024. Based on the preliminarily segmented chicken manure region image, morphological opening operation is performed using a 3×3 pixel circular structure to obtain a second enhanced chicken manure image feature with isolated noise points removed and smooth boundaries.

[0076] S103. Simultaneously, the environmental information data under the same time axis of the image data undergoes a third encoding preprocessing to obtain environmental condition embedding features; it should be further explained that the process of performing the third encoding preprocessing in this embodiment includes:

[0077] S1031. Acquire ambient temperature and humidity data collected by the temperature and humidity sensor, wherein the temperature detection accuracy is set to [accuracy value missing]. The humidity detection accuracy is set to ±2%RH, and the thickness data of chicken manure accumulation collected by the laser rangefinder is acquired simultaneously.

[0078] S1032. Based on the synchronously acquired RGB image data, extract image texture features through gray-level co-occurrence matrix, and automatically determine whether the chicken manure is fresh or semi-dry based on the texture features using a support vector machine classifier.

[0079] S1033. Obtain breeding scene information manually entered through the human-computer interaction interface, wherein the breeding scene information includes free-range or large-scale breeding types.

[0080] S1034. Normalize the environmental temperature and humidity data, chicken manure accumulation thickness data, chicken manure morphology determination results and breeding scene information, and splice them into a multi-dimensional condition vector.

[0081] S1035. The multidimensional conditional vector is input into a pre-trained fully connected neural network layer and processed by linear transformation and activation function to be mapped into fixed-dimensional environmental condition embedding features.

[0082] S2. Input the enhanced detection data sequence into the pre-trained HS-SegNet model and combine it with the scene dynamic qualification judgment threshold to obtain the first detection parameter sequence; the first detection parameter sequence includes the global moisture content estimate, chicken manure morphology judgment result, moisture content uniformity, scene judgment result, heat map of chicken manure moisture content cluster distribution area, and the second global moisture content estimate and chicken manure qualification judgment result;

[0083] It should be further explained that the HS-SegNet model in this embodiment includes a hyperspectral feature extraction branch, an image segmentation branch, a cross-modal feature fusion module, and a multi-scale regression head; it should also be explained that the construction and training process of the HS-SegNet model in this embodiment includes:

[0084] S201. Based on the first enhanced chicken manure hyperspectral features combined with the hyperspectral feature extraction branch, a high-dimensional spectral feature map is obtained; it should be further noted that the hyperspectral feature extraction branch (HS-Branch) in this embodiment adopts a lightweight convolutional neural network (HS-CNN), which includes a 3-level feature extraction module, specifically:

[0085] The first level is set to 1×10 spectral convolution kernel (adapting to spectral dimensions) + 3×3 spatial convolution kernel, with the number of channels increasing from 64 to 128. The global spectral-spatial correlation features of chicken manure are extracted from the first enhanced hyperspectral features of chicken manure.

[0086] The second stage is set to a 3×3 convolution (downsampling) with a stride of 2 + residual block (containing BN layer + SiLU activation), with the number of channels increasing from 128 to 256, in order to enhance the representation of mesoscale features in the high-dimensional spectral feature map;

[0087] The third stage is set to a 3×3 convolution (downsampling) with a stride of 2 plus a residual block, with the number of channels increasing from 256 to 512, used to output a high-dimensional spectral feature map with dimensions H / 4×W / 4×512.

[0088] S202. Simultaneously, the second enhanced chicken manure image features are input into the image segmentation branch to obtain a chicken manure mask binary image and chicken manure morphological texture features; wherein the feature vector corresponding to the impurity feature region in the chicken manure mask binary image is set to 0, and the feature vector corresponding to the chicken manure feature region is set to 1.

[0089] It should be further noted that the image segmentation branch (Seg-Branch) in this embodiment uses an improved U-Net network, which is constructed by a 4-layer encoder, a bottleneck layer, a 4-layer decoder, and residual connections. For the specific structure, please refer to [link / reference needed]. Figure 3 I won't go into details here;

[0090] S203. Using the chicken manure mask binary image, the spectral features corresponding to the same region in the high-dimensional spectral feature image are weighted and filtered to obtain a first weighted fusion feature image and an impurity screening segmentation image.

[0091] It should be further explained that in this embodiment, the chicken manure mask binary map and the high-dimensional spectral feature map are aligned in spatial dimension by downsampling, and then element-wise multiplication is performed. The spectral features corresponding to chicken manure regions with a mask value of 1 are multiplied by a weight of 1 and retained, while the spectral features corresponding to impurity regions with a mask value of 0 are multiplied by a weight of 0 and removed, thereby obtaining a first weighted fusion feature map containing only the spectral features of chicken manure regions. At the same time, the spatial coordinates of impurity regions are extracted based on the chicken manure mask binary map to generate a binary impurity screening and segmentation map that identifies the distribution of impurities.

[0092] S204. Based on the first weighted fusion feature map and the first filtering matrix in the first enhancement preprocessing, a second weighting is performed to obtain a second weighted fusion feature map. The first filtering matrix is ​​constructed from the correlation coefficient matrix between the spectral data bands and the water content detection accuracy, and is used to filter spectral data of bands strongly correlated with water content detection. The motivation for performing the second weighting based on the first weighted fusion feature map and the first filtering matrix in this embodiment is to further optimize the feature representation by utilizing band selection information, highlighting the spectral features strongly correlated with water content detection, and reducing the interference of non-critical bands. The specific implementation process includes: extracting the diagonal elements of the first filtering matrix into a 64-dimensional binary weight vector, mapping it through a fully connected layer to a 512-dimensional weight vector with the same number of channels as the first weighted fusion feature map, and performing element-wise multiplication on each channel of the first weighted fusion feature map, wherein the weight value of the effective bands in the weight vector is retained as 1, and the weight value of the non-effective bands is set to 0, thereby obtaining a second weighted fusion feature map that enhances the expression of water content-related features.

[0093] S205. The environmental condition embedded features are combined with the second weighted fusion feature map and the high-dimensional spectral feature map, and then input into the cross-modal feature fusion module to obtain a third weighted fusion feature map. In the cross-modal feature fusion module, key / value variables are constructed using the environmental condition embedded features, query variables are constructed using the second weighted fusion feature map, and the constructed key / value variables and query variables are input into a multi-head attention network for weighted fusion. The fused features are then combined with residual connections and cascaded with the original high-dimensional spectral feature map to obtain the third weighted fusion feature map. It should be further noted that in this embodiment, the environmental condition embedded features... The motivation for combining the high-dimensional spectral feature map with the second weighted fusion feature map is to improve the model's feature discrimination ability in different aquaculture scenarios by fusing environmental context and spectral features through a cross-modal attention mechanism. The specific implementation steps include: in the cross-modal feature fusion module, the environmental condition embedding features are linearly mapped to key vectors and value vectors, the second weighted fusion feature map is linearly mapped to query vectors, and the query vector, key vector, and value vector are input into a multi-head attention network to calculate the weighted fusion feature; then the weighted fusion feature is channel-cascaded with the high-dimensional spectral feature map through residual connections, and finally the third weighted fusion feature map that fuses multi-source information is output.

[0094] S206. Based on the third weighted fusion feature map combined with coarse-grained branch, the global water content estimate and global regression prediction loss are obtained. It should be further explained that the coarse-grained branch in this embodiment is constructed by combining a global average pooling layer with a fully connected layer of size 512×1, which is used to quickly screen extreme water content samples. The motivation for setting the coarse-grained branch in this invention is to establish a rapid water content screening mechanism. Its technical principle is to obtain image-level statistical features by compressing the spatial dimension through the global average pooling layer, and then mapping them to a single water content estimate through the fully connected layer. By utilizing the characteristic that extreme samples deviate significantly from the normal distribution in the feature space, the rapid identification and diversion of excessively high or low water content samples can be achieved, providing preprocessing and screening for subsequent fine detection.

[0095] S207. Based on the third weighted fusion feature map combined with the medium-granularity branch, the predicted value of single-pixel moisture content and the local regression prediction loss are obtained. Based on the predicted value of single-pixel moisture content combined with the region clustering algorithm, the initial chicken manure moisture content clustering distribution area heat map, the estimated value of moisture content in each area, and the corresponding moisture content change gradient in each area are obtained. In this embodiment, the medium-granularity branch outputs the estimated value of moisture content in 16 areas through a 4×4 grid local average pooling layer combined with a 16×512 fully connected layer. This is used to determine the uniformity of the sample. It should be further explained that the initial chicken manure moisture content clustering distribution area heat map in this embodiment represents the spatial distribution difference of moisture content within a single sample. It merges the predicted single-pixel moisture content values ​​according to similarity through the region clustering algorithm to form multiple continuous areas with different average moisture content levels, and presents them intuitively with a visual color gradient. This heatmap is used to precisely assess the uniformity of moisture content in chicken manure samples. By analyzing the range of each cluster region, its estimated moisture content, and the gradient of moisture content change at the region boundaries, the system can quantitatively determine whether the sample is locally too wet or too dry, and whether the moisture is uniformly distributed. This provides crucial information on the uniformity of distribution for subsequent qualification and quality grading.

[0096] It should be further explained that the multi-scale regression head in this embodiment includes coarse-grained branches, medium-grained branches, fine-grained branches, morphological discrimination branches, and scene discrimination branches;

[0097] S208. Based on the heat map of chicken manure moisture content clustering distribution area, the estimated regional moisture content, and the morphological texture features of chicken manure combined with the morphological discrimination branch, the morphological discrimination result and morphological discrimination loss of chicken manure are obtained. In this embodiment, the morphological discrimination branch uses the softmax activation function to perform chicken manure morphological discrimination. The moisture content of fresh manure is approximately 60%-90%, and the moisture content of semi-dry manure is 30%-60%.

[0098] S209. Based on the heat map of chicken manure moisture content cluster distribution area and the corresponding moisture content change gradient in each chicken manure moisture content cluster distribution area, the moisture content uniformity is evaluated to obtain the moisture content uniformity of the chicken manure moisture content cluster distribution area corresponding to each image; in this embodiment, the moisture content uniformity is evaluated by a consistency evaluation algorithm.

[0099] S210. Based on the uniformity of water content in the clustered distribution area of ​​chicken manure water content for each image, combined with the impurity screening and segmentation map, the scene discrimination result and scene discrimination loss are obtained through the scene discrimination branch. It should be further noted that the scene discrimination branch in this embodiment uses a 0-1 classification discrimination algorithm for discrimination; the impurity content corresponding to free-range farming is >15%, and the impurity content corresponding to large-scale farming is <5%. This embodiment achieves a comprehensive evaluation of chicken manure quality by constructing a multi-level analysis architecture: First, the feature map is processed into grid partitions, and the regional water content distribution is obtained through local pooling and fully connected layers. A heat map is generated by combining the clustering algorithm and the gradient change is calculated. At the same time, a state discrimination model is established by using texture features and water content distribution patterns, and the manure morphology is automatically identified according to the water distribution characteristics. Meanwhile, the impurity distribution characteristics and water content uniformity index are integrated, and a scene classifier is constructed based on the differences in impurity content under different farming modes. Finally, a reliable quality evaluation system is formed through cross-validation of multi-source data.

[0100] S211. Using the scene discrimination result as a condition, based on the third weighted fusion feature map combined with the fine-grained branch and the chicken manure morphology discrimination result, the second global moisture content estimate and the second global regression prediction loss are obtained. It should be further explained that the fine-grained branch in this embodiment is constructed by a 1×1 convolutional network combined with a fully connected layer of dimension H / 4×W / 4×64, which is used to output a high-precision moisture content value as the final detection result. The motivation for setting the fine-grained branch and fusing the scene and morphology discrimination results in this embodiment is to build a high-precision detection model with environmental adaptability. Its technical principle is to inject the scene features and morphology discrimination results as prior conditions into the feature extraction process, use 1×1 convolution to maintain spatial resolution while realizing feature recombination, and then perform fine regression through a fully connected layer, so that the model can dynamically adjust the feature weights according to different breeding environments and chicken manure states, thereby maintaining the accuracy and robustness of moisture content detection under complex working conditions.

[0101] S212. The initial chicken manure moisture content cluster distribution area heat map is updated based on the second global moisture content estimate to obtain the chicken manure moisture content cluster distribution area heat map and update deviation loss. The motivation for updating the initial chicken manure moisture content cluster distribution area heat map through the second global moisture content estimate in this embodiment is to establish a collaborative optimization mechanism between global and local detection results. The technical principle is to use the high-precision global moisture content value output by fine-grained branch as a benchmark reference, and correct the local deviations in the initial chicken manure moisture content cluster distribution area heat map through backpropagation, so that the regional distribution data and the overall detection results form spatial consistency. At the same time, the degree of optimization is quantified by updating the deviation loss, thereby improving the accuracy of moisture content distribution characterization and the overall detection reliability of the system.

[0102] S213. Construct a joint loss function based on global regression prediction loss, local regression prediction loss, morphology discrimination loss, scene discrimination loss, second global regression prediction loss and update bias loss, and the image segmentation loss corresponding to the second enhancement preprocessing.

[0103] S214. The HS-SegNet model is trained based on the joint loss function and a preset training period to obtain the trained HS-SegNet model, and outputs the second global moisture content estimate, chicken manure morphology discrimination result, moisture content uniformity of chicken manure area corresponding to each image, and heat map of chicken manure moisture content cluster distribution area.

[0104] Please refer to this embodiment. Figure 4 The production line control console includes a chicken manure conveying system, a detection system, and a control and feedback system. The detection system deploys the HS-SegNet model trained in this embodiment to identify breeding scenarios, chicken manure status, and moisture content. The control and feedback system corresponds to the moisture content adjustment strategy, sorting strategy, and storage traceability strategy included in the reinforcement adjustment strategy library of this embodiment. The moisture content adjustment strategy corresponds to a conditioning controller that adjusts the water addition / drying temperature based on moisture content and moisture content uniformity. The sorting strategy corresponds to a sorting actuator that drives baffles to separate qualified / conditioning-needed / waste materials in the chicken manure based on the detection results. The storage traceability strategy corresponds to a data storage server used for storing chicken manure detection data and adjustment strategy parameters, and for tracing subsequent chicken manure treatment processes. For the remaining parts of the production line control console in this embodiment, please refer to [link to relevant documentation]. Figure 4 I won't go into details here.

[0105] S3. Synchronize the first detection parameter sequence to the production line console, and in response to the preset trigger conditions satisfied in the preset enhancement adjustment strategy library, select at least two enhancement adjustment response strategies corresponding to the trigger conditions from the enhancement adjustment strategy library.

[0106] The enhanced adjustment strategy library includes moisture content adjustment strategies, sorting strategies, and storage traceability strategies. In this embodiment, these strategies together constitute a closed-loop execution system for intelligent control and quality management of chicken manure. Specifically, the moisture content adjustment strategy automatically decides and drives the conditioning controller (such as humidifiers, dryers, and turning equipment) to precisely adjust the moisture content of the chicken manure according to real-time detected moisture content and uniformity results, ensuring it meets target process requirements. The sorting strategy automatically controls diversion baffles and other actuators based on the chicken manure's conformity assessment results, accurately sorting the material flow into different categories such as qualified products, products awaiting conditioning, and waste, achieving automated sorting. The storage traceability strategy uses technologies such as blockchain to immutably store and associate the detection data, control instructions, execution results, and timestamps generated throughout the entire process, thereby completely recording the processing technology and quality data of each batch of chicken manure to meet the needs of quality traceability and process optimization.

[0107] It should be further explained that this embodiment responds to preset triggering conditions satisfied in the preset enhancement adjustment strategy library, including:

[0108] The second global moisture content estimate and moisture content uniformity, output in real time by the trained HS-SegNet model, are combined with a preset application scenario discrimination threshold to determine the moisture content compliance. When both the second global moisture content estimate and the moisture content uniformity meet the corresponding application scenario discrimination threshold, it is judged as qualified. It should be further noted that the application scenario discrimination threshold in this embodiment is determined by those skilled in the art based on the specific application scenario of chicken manure. For example, the moisture content threshold is customized according to the application scenario (composting fermentation → 50%-60%, biogas power generation → 80%-90%, solid organic fertilizer → <30%), and the "qualified / unqualified" judgment result is output. The moisture content value (e.g., 58.2%) and the heat map of the distribution area are pushed to the production line control console. It should be further explained that the motivation for setting the discrimination threshold according to the application scenario of chicken manure in this embodiment is to adapt to the specific requirements of different resource utilization processes on moisture content, and to ensure that the test results directly match the standards of subsequent processing procedures. The specific implementation steps include: based on the final application goal of chicken manure, including composting, biogas power generation or solid organic fertilizer production, a corresponding moisture content threshold range is preset. The second global moisture content estimate and moisture content uniformity output by the model in real time are compared with the threshold range. When both meet the threshold, it is judged as qualified, thereby realizing accurate sorting and process adaptation of chicken manure quality.

[0109] Simultaneously responding to the sorting strategy, based on the real-time collected chicken manure conveying rate combined with the preset conveying rate-baffle delay-diversion efficiency mapping relationship and fuzzy control algorithm, the diversion baffle response command is obtained to perform diversion and sorting operations on qualified chicken manure and impurities, and simultaneously respond to the storage traceability strategy; the application scenario discrimination threshold includes the moisture content application scenario discrimination threshold range and the moisture content uniformity application scenario discrimination threshold; the diversion baffle response command includes the diversion baffle response timestamp and response rate; it should be further explained that the motivation for combining the chicken manure conveying rate and the conveying rate-baffle delay-diversion efficiency mapping relationship in this embodiment is to achieve precise synchronization between the diversion action and the dynamic material position. The conveying rate is characterized by the length of chicken manure passing through the detection area per unit time, used to predict the time it takes for materials to arrive at the sorting point; the baffle delay is characterized by the time difference required from the issuance of the instruction to the baffle moving to the designated position, used to compensate for the time lag in mechanical response; the diversion efficiency is characterized by the proportion of qualified chicken manure successfully diverted per unit time, used to evaluate sorting accuracy; the specific implementation techniques include: establishing a fuzzy rule base with conveying rate as input, baffle delay as intermediate variable, and diversion efficiency as output; obtaining the optimal baffle response parameters by querying the rule base with the real-time collected conveying rate, thereby generating diversion baffle instructions with specific timestamps and response rates, ensuring that the sorting action is synchronized with the material flow.

[0110] When at least one of the second global moisture content estimate and the moisture content uniformity does not meet the corresponding application scenario discrimination threshold, the real-time moisture content change gradient corresponding to each chicken manure moisture content cluster distribution area is mapped according to the heat map of the chicken manure moisture content cluster distribution area.

[0111] Based on the real-time moisture content change gradient corresponding to each chicken manure moisture content cluster distribution area and combined with the second global moisture content estimate, the real-time moisture content distribution of each chicken manure moisture content cluster distribution area is obtained.

[0112] Based on the real-time moisture content distribution of each chicken manure moisture content cluster, combined with the upper limit of the moisture content application scenario discrimination threshold interval and the moisture content uniformity application scenario discrimination threshold, the magnitude and sign of the real-time moisture content deviation between the real-time moisture content distribution and the upper limit of the moisture content application scenario discrimination threshold interval, as well as the corresponding uniformity deviation value of the chicken manure moisture content cluster distribution area, are calculated. In this embodiment, when the system detects that the global moisture content or moisture content distribution uniformity of the chicken manure sample fails to meet the preset process standard, a fine-tuning mechanism is triggered. The system first analyzes the heat map of the chicken manure moisture content cluster distribution area, and obtains the real-time moisture content distribution data of the area by calculating the weighted average moisture content of all pixels in each cluster area. Then, the average moisture content of each area is compared with the target moisture content threshold upper limit, and the specific numerical difference is calculated as the real-time moisture content deviation. The sign of this deviation value clearly indicates whether the moisture state of the area is higher or lower than the ideal range. At the same time, the uniformity deviation value is calculated based on the standard deviation of the moisture content of the pixels in each cluster area to quantify the degree of unevenness of moisture distribution. These two sets of deviation data together form the basis for subsequent intelligent control decisions. Based on this, the system automatically generates differentiated treatment plans for different areas, providing data support for the implementation of precise humidification, drying, or turning operations, and ultimately achieving precise control and optimization of the moisture content of chicken manure.

[0113] The genetic algorithm input sequence is constructed using the uniformity deviation value of each chicken manure moisture content cluster distribution area, the magnitude and sign of the real-time moisture content deviation between the real-time moisture content distribution and the upper limit of the threshold interval for the moisture content application scenario, preset uniformity deviation value-chicken manure thickness-turning equipment speed curve, moisture content deviation value-positive sign-drying rate curve, and moisture content deviation value-negative sign-water addition rate curve. The motivation for introducing the uniformity deviation value-chicken manure thickness-turning equipment speed curve, moisture content deviation value-positive sign-drying rate curve, and moisture content deviation value-negative sign-water addition rate curve in this embodiment is to establish a multi-parameter coupled precise control model, directly converting the detection data into equipment control commands through a preset process parameter mapping relationship. The multi-parameter coupled control model construction method of this invention specifically includes: continuously collecting chicken manure thickness and moisture content uniformity values ​​through sensors deployed on the production line. The uniformity deviation value and the optimal turning speed under the corresponding working conditions were recorded to form a training dataset. A Gaussian process regression algorithm was used to establish a turning speed prediction model with the uniformity deviation value and chicken manure thickness as input features, generating a two-parameter lookup table. Based on the heat balance equation of the hot air drying system, a three-segment linear function was established with positive moisture content deviation values ​​as the dividing points, where the slope for the deviation value range of 0-5% is 2.5kW / %, the slope for the range of 5-10% is 4.2kW / %, and the slope for the range of >10% is 6.8kW / %. A water addition rate calculation model was constructed based on the Bernoulli equation, and the measured values ​​of the pipeline pressure sensor and the valve flow characteristic curve were introduced to determine the compensation coefficient, forming a two-dimensional water addition rate matrix with the negative moisture content deviation value as the row index and the pipeline pressure as the column index. Finally, the goodness of fit between the output values ​​of each model and the actual equipment operating parameters was verified by the control variable method. When the coefficient of determination R... 2 The model validity is confirmed when the value is ≥0.95, and a knowledge base of process parameters that can output the turning speed, drying power and water addition rate in real time is formed.

[0114] A fitness function is constructed by minimizing the uniformity deviation value in the heat map of the chicken manure moisture content cluster distribution area. A threshold range for moisture content application scenarios is used as a constraint range. A label for water addition or drying is constructed based on the sign of the real-time moisture content deviation. An adjustment coefficient for the water addition rate or drying rate is constructed based on the absolute value of the real-time moisture content deviation. This implementation achieves precise control of chicken manure moisture content by constructing a multi-objective optimization model. Its core lies in using a genetic algorithm for global parameter optimization. This process uses the heat map of the chicken manure moisture content cluster distribution area as the basic data source, aiming to achieve both uniform moisture distribution and precise moisture control. In its specific construction, the minimum uniformity deviation value in each cluster region is set as the fitness function to ensure that the optimization process prioritizes improving the regions with the most uneven moisture distribution. The moisture content threshold range of the specific application scenario is used as a constraint to ensure that the treated chicken manure meets the requirements of subsequent processes. The sign of the real-time moisture content deviation is used to automatically determine the type of water addition or drying operation to be performed, establishing a two-way control mechanism based on physical processes. Simultaneously, an adjustment coefficient is set that is proportional to the absolute value of the moisture content deviation, achieving a precise match between the control intensity and the degree of deviation. This optimization system, by transforming actual process requirements into a calculable mathematical model, can automatically output optimal parameters such as turning speed, water addition rate, and drying power. This not only significantly improves the accuracy of chicken manure moisture content control but also effectively reduces energy consumption, realizing a shift from experience-based operation to intelligent control.

[0115] The genetic algorithm input sequence, fitness function, constraint interval, water addition or drying discrimination label and water addition rate or drying rate adjustment coefficient are input into the genetic algorithm. Combined with the preset iteration period threshold, the optimal turning equipment speed and optimal water addition rate or drying rate corresponding to each chicken manure moisture content cluster distribution area are obtained.

[0116] Based on the optimal turning speed and optimal water addition rate or drying rate corresponding to each chicken manure moisture content cluster distribution area, combined with the water addition or drying device configured in the conditioning treatment area in the production line control console, the corresponding turning speed adjustment command, water addition command or drying command is generated through a preset fuzzy control algorithm to perform real-time turning and water addition or drying adjustments.

[0117] During the real-time turning and watering or drying adjustments described above, the sorting strategy is simultaneously responded to, and qualified chicken manure, unqualified chicken manure, and impurities are sorted and diverted. Simultaneously, the storage and traceability strategy is responded to, and the optimal turning speed and optimal watering or drying rate corresponding to the turning and watering or drying adjustment process are stored on the blockchain. The core motivation of the control-sorting-traceability collaborative execution mechanism constructed in this invention is to establish a closed-loop quality control system throughout the entire process, achieving efficient and precise resource utilization of chicken manure through multi-stage linkage. Based on parallel processing and data-driven principles, this solution spatially integrates the conditioning treatment area and the sorting device, utilizing the physical residence time of materials during the conditioning process to simultaneously complete quality re-inspection and diversion operations. This ensures that only qualified materials can enter subsequent processes and avoids capacity loss caused by setting up separate sorting stations. The system performs precise adjustments based on real-time acquired optimal turning speed, water addition rate, and drying power, and uses the adjusted quality inspection results as the basis for sorting decisions. Materials that still fail to meet standards after conditioning are automatically marked as permanently defective, preventing the system from falling into an ineffective control cycle. Simultaneously, blockchain technology is used to establish an immutable storage record for all control parameters, sorting results, and time-series data, meeting the qualification certification requirements for organic fertilizer production and providing complete data support for process optimization. This collaborative mechanism effectively solves common industry problems in traditional production, such as delayed control response, disconnect between quality control and the production process, and difficulties in quality traceability, achieving fully automated management and quality control throughout the entire process from detection and adjustment to sorting.

[0118] Simultaneously, the enhanced detection data sequences collected in real time during the turning, watering, or drying adjustment processes are labeled using the drying method to construct a fine-tuning training set. When the number of fine-tuning training sets collected within a preset time period meets a preset quantity, the trained HS-SegNet model is periodically updated with fine-tuned parameters based on the fine-tuned training set and an incremental learning algorithm to obtain the fine-tuned and updated HS-SegNet model. The updated HS-SegNet model is then synchronized to the production line control console for chicken manure sorting, watering, drying, and optimal watering or drying rates, along with the enhanced detection data sequences, to be stored on the blockchain. In this embodiment, 1000 labeled true values ​​(determined by the drying method) of detection data are collected daily. Incremental learning is used to fine-tune the model parameters, and the weight of spectral features is increased to address the high uniformity of chicken manure in large-scale farming.

[0119] This embodiment achieves a significant breakthrough in chicken manure moisture content detection and control technology by innovatively constructing an integrated system for multimodal data fusion detection and intelligent control. Its beneficial effects are mainly reflected in four aspects: First, it employs a non-contact detection method combining hyperspectral imaging and machine vision. A pushbroom hyperspectral camera acquires spectral data in the 900-1700nm wavelength range, while a 20-megapixel CMOS camera collects high-resolution image data, effectively overcoming problems such as sensor contamination and sample damage inherent in traditional contact detection methods. Simultaneously, a multi-source data synchronous acquisition mechanism ensures the temporal consistency of spectral data, image data, and environmental parameters, laying the foundation for subsequent accurate analysis.

[0120] Secondly, the innovatively designed HS-SegNet model achieves effective feature extraction and fusion through a multi-branch collaborative architecture. The hyperspectral feature extraction branch uses a three-level convolutional structure to extract spectral-spatial features layer by layer, while the image segmentation branch accurately separates chicken manure regions from impurities based on an improved U-Net network. Then, environmental condition embedding features are fused through a cross-modal attention mechanism, constructing a detection model adaptable to different farming scenarios. The multi-scale regression head performs moisture content analysis at three levels: coarse-grained, medium-grained, and fine-grained, ensuring both detection efficiency and accuracy, ultimately achieving excellent performance with a moisture content detection error of less than 3%.

[0121] Third, the intelligent decision-making system based on genetic algorithms achieves optimized solution of control parameters. By establishing multi-parameter coupled models such as uniformity deviation value-chicken manure thickness-turning equipment speed curve, moisture content deviation value-drying rate curve, and moisture content deviation value-water addition rate curve, the detection data is directly converted into equipment control commands. With the goal of minimizing the fitness function and the process threshold range as constraints, the optimal turning speed, water addition rate, and drying power are automatically solved, so that the control process meets the process requirements and achieves energy consumption optimization, saving more than 25% energy compared with traditional methods.

[0122] Finally, the constructed control-sorting-traceability collaborative execution mechanism achieves closed-loop quality management throughout the entire process. By arranging conditioning and sorting operations in parallel, and utilizing the physical dwell time during processing to complete quality re-inspection, it ensures that defective products do not flow into the next process and avoids capacity loss caused by setting up separate sorting stations. Simultaneously, blockchain technology is used to establish tamper-proof storage records for all control parameters and sorting results, meeting the qualification certification requirements for organic fertilizer production and providing complete data support for process optimization. Combined with a model-based continuous optimization mechanism based on incremental learning, the system can adapt to changes in chicken manure characteristics under different seasons and farming models, maintaining excellent detection and control performance over the long term.

[0123] Example 2

[0124] Another embodiment of the present invention: a chicken manure moisture content detection system based on hyperspectral imaging and image segmentation, comprising: a synchronous acquisition module, a detection module and a response adjustment module;

[0125] The synchronous acquisition module is used to simultaneously acquire hyperspectral data, image data and environmental information data of chicken manure under different breeding scenarios, and preprocess them to obtain enhanced detection data sequences;

[0126] The detection module is used to input the enhanced detection data sequence into the pre-trained HS-SegNet model and combine it with the scene dynamic qualification judgment threshold to obtain the first detection parameter sequence; the first detection parameter sequence includes the global moisture content estimate, chicken manure morphology judgment result, moisture content uniformity, scene judgment result, heat map of chicken manure moisture content cluster distribution area, and the second global moisture content estimate and chicken manure qualification judgment result;

[0127] The response adjustment module synchronizes the first detection parameter sequence to the production line console and, in response to preset trigger conditions satisfied in the preset reinforcement adjustment strategy library, selects at least two reinforcement adjustment response strategies corresponding to the trigger conditions from the reinforcement adjustment strategy library.

[0128] The enhanced adjustment strategy library includes a moisture content adjustment strategy, a sorting strategy, and a storage traceability strategy. The moisture content adjustment strategy is used to respond to the configured conditioning controller according to the first detection parameter sequence. The sorting strategy is used to respond to the sorting strategy according to the first detection parameter sequence and drive the configured diversion baffle to perform diversion operations on the detected qualified chicken manure, unqualified chicken manure, and impurity waste. The storage traceability strategy is used to combine the first detection parameter sequence, the corresponding moisture content adjustment strategy or sorting strategy, and the corresponding response result detection information at each time stamp with blockchain for on-chain storage and traceability of the chicken manure moisture content adjustment process.

[0129] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments under the guidance of the present invention without departing from the spirit and scope of the present invention. All of these variations are within the protection scope of the present invention.

[0130] If the technical solution disclosed herein involves personal information, the product using this technical solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If the technical solution disclosed herein involves sensitive personal information, the product using this technical solution has obtained the user's separate consent before processing the sensitive personal information, and also meets the requirement of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set up to inform users that they have entered the scope of personal information collection and that personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed that they have agreed to the collection of their personal information; or on the personal information processing device, with clear signs / information informing users of the personal information processing rules, authorization is obtained from the individual through pop-up information or by asking the individual to upload their personal information; wherein, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.

Claims

1. A method for detecting the moisture content of chicken manure based on hyperspectral imaging and image segmentation, characterized in that, include: Simultaneously collect hyperspectral data, image data, and environmental information data of chicken manure under different farming scenarios, and preprocess them to obtain enhanced detection data sequences; The enhanced detection data sequence is input into the pre-trained HS-SegNet model and combined with the scene dynamic qualification judgment threshold to obtain the first detection parameter sequence; the first detection parameter sequence includes the global moisture content estimate, chicken manure morphology judgment result, moisture content uniformity, scene judgment result, heat map of chicken manure moisture content cluster distribution area, and the second global moisture content estimate and chicken manure qualification judgment result; The global moisture content estimate is obtained by processing the third weighted fusion feature map output by the cross-modal feature fusion module through the coarse-grained branch of the HS-SegNet model, and is used to screen samples with extreme moisture content. The second global moisture content estimate is obtained by processing the third weighted fusion feature map and chicken manure morphology discrimination results through the fine-grained branch of the HS-SegNet model, based on the scene discrimination results, and is used as the final detection result, while also updating the initial chicken manure moisture content cluster distribution area heat map. The HS-SegNet model includes a hyperspectral feature extraction branch, an image segmentation branch, a cross-modal feature fusion module, and a multi-scale regression head. The multi-scale regression head includes coarse-grained branches, medium-grained branches, fine-grained branches, morphology discrimination branches, and scene discrimination branches. The first detection parameter sequence is synchronized to the production line console. In response to preset trigger conditions satisfied in the preset enhancement adjustment strategy library, at least two enhancement adjustment response strategies corresponding to the trigger conditions are selected from the enhancement adjustment strategy library. The enhancement adjustment strategy library includes moisture content adjustment strategy, sorting strategy and storage traceability strategy.

2. The method for detecting the moisture content of chicken manure based on hyperspectral imaging and image segmentation as described in claim 1, characterized in that, The process of acquiring the enhanced detection data sequence includes: The collected hyperspectral data of chicken manure were subjected to a first enhancement preprocessing to obtain the first enhanced hyperspectral features of chicken manure; The synchronously acquired image data is subjected to a second enhancement preprocessing to obtain second enhanced chicken manure image features; Simultaneously, environmental information data at the same time axis of the image data undergoes a third encoding preprocessing to obtain environmental condition embedding features. The environmental information data includes collected environmental temperature and humidity data, chicken manure thickness data, sample morphological parameters, and breeding scenarios. The sample morphological parameters include fresh or semi-dry manure, determined by the morphological and textural features of chicken manure. The breeding scenarios include free-range and large-scale breeding, characterized by the impurity content and moisture content uniformity in chicken manure. Fresh manure is coded as 1, semi-dry manure as 2, large-scale breeding as 3, and free-range breeding as 4.

3. The method for detecting the moisture content of chicken manure based on hyperspectral imaging and image segmentation as described in claim 2, characterized in that, The construction and training process of the HS-SegNet model includes: Based on the first enhanced chicken manure hyperspectral features combined with the hyperspectral feature extraction branch, a high-dimensional spectral feature map is obtained; Simultaneously, the second enhanced chicken manure image features are input into the image segmentation branch to obtain a chicken manure mask binary image and chicken manure morphological texture features; wherein the feature vector corresponding to the impurity feature region in the chicken manure mask binary image is set to 0, and the feature vector corresponding to the chicken manure feature region is set to 1. The spectral features corresponding to the same region in the high-dimensional spectral feature map are weighted and filtered using the chicken manure mask binary map to obtain a first weighted fusion feature map and an impurity screening segmentation map. Based on the first weighted fusion feature map and the first filtering matrix in the first enhancement preprocessing, a second weighting is performed to obtain a second weighted fusion feature map; the first filtering matrix is ​​constructed from the correlation coefficient matrix between the spectral data bands and the water content detection accuracy, and is used to screen spectral data with strong correlation bands to water content detection.

4. The method for detecting the moisture content of chicken manure based on hyperspectral imaging and image segmentation as described in claim 3, characterized in that, The construction and training process of the HS-SegNet model also includes: The environmental condition embedding features are combined with the second weighted fusion feature map and the high-dimensional spectral feature map, and then input into the cross-modal feature fusion module to obtain the third weighted fusion feature map; Based on the third weighted fusion feature map combined with coarse-grained branching, the global water content estimate and the global regression prediction loss are obtained. Based on the third weighted fusion feature map combined with medium-granularity branch, the predicted value of single pixel moisture content and local regression prediction loss are obtained. Based on the predicted value of single pixel moisture content combined with the regional clustering algorithm, the initial chicken manure moisture content clustering distribution area heat map, the estimated value of moisture content in each region and the corresponding moisture content change gradient in each region are obtained.

5. The method for detecting the moisture content of chicken manure based on hyperspectral imaging and image segmentation as described in claim 4, characterized in that, The construction and training process of the HS-SegNet model also includes: Based on the heat map of the distribution area of ​​chicken manure moisture content cluster, the estimated regional moisture content, the morphological texture features of chicken manure combined with the morphological discrimination branch, the morphological discrimination results and morphological discrimination loss of chicken manure are obtained. Based on the heat map of chicken manure moisture content cluster distribution area and the corresponding moisture content change gradient in each chicken manure moisture content cluster distribution area, the moisture content uniformity is evaluated to obtain the moisture content uniformity of the chicken manure moisture content cluster distribution area corresponding to each image. Based on the uniformity of water content in the clustered distribution area of ​​chicken manure water content for each image, combined with the impurity screening segmentation map, the scene discrimination result and scene discrimination loss are obtained through the scene discrimination branch. Using the scene discrimination result as a condition, and combining the third weighted fusion feature map with the fine-grained branch and chicken manure morphology discrimination result, the second global moisture content estimate and the second global regression prediction loss are obtained.

6. The method for detecting the moisture content of chicken manure based on hyperspectral imaging and image segmentation as described in claim 5, characterized in that, The construction and training process of the HS-SegNet model also includes: The initial chicken manure moisture content cluster distribution area heat map is updated based on the second global moisture content estimate to obtain the chicken manure moisture content cluster distribution area heat map and update bias loss. A joint loss function is constructed based on global regression prediction loss, local regression prediction loss, morphology discrimination loss, scene discrimination loss, second global regression prediction loss and update bias loss, as well as the image segmentation loss corresponding to the second enhancement preprocessing. The HS-SegNet model is trained based on the joint loss function and a preset training period to obtain the trained HS-SegNet model. The model outputs the second global moisture content estimate, chicken manure morphology discrimination result, moisture content uniformity of the chicken manure area corresponding to each image, and heat map of chicken manure moisture content cluster distribution area.

7. The method for detecting the moisture content of chicken manure based on hyperspectral imaging and image segmentation as described in claim 6, characterized in that, Responding to preset trigger conditions met in the preset enhancement adjustment strategy library, including: The second global moisture content estimate and moisture content uniformity, output in real time by the trained HS-SegNet model, are combined with a preset application scenario discrimination threshold to determine the moisture content qualification. When both the second global moisture content estimate and the moisture content uniformity meet the corresponding application scenario discrimination threshold, the sample is deemed qualified, and a sorting strategy is simultaneously responded to. Based on the real-time collected chicken manure conveying rate, combined with a preset conveying rate-baffle delay-diversion efficiency mapping relationship and a fuzzy control algorithm, a diversion baffle response command is obtained to perform diversion and sorting operations on qualified chicken manure and impurities, and the storage traceability strategy is simultaneously responded to. The application scenario discrimination threshold includes a moisture content application scenario discrimination threshold range and a moisture content uniformity application scenario discrimination threshold. The diversion baffle response command includes a diversion baffle response timestamp and response rate. When at least one of the second global moisture content estimate and the moisture content uniformity does not meet the corresponding application scenario discrimination threshold, the real-time moisture content change gradient corresponding to each chicken manure moisture content cluster distribution area is mapped according to the heat map of the chicken manure moisture content cluster distribution area.

8. The method for detecting the moisture content of chicken manure based on hyperspectral imaging and image segmentation as described in claim 7, characterized in that, In response to preset trigger conditions met in the preset enhancement adjustment strategy library, it also includes: Based on the real-time moisture content change gradient corresponding to each chicken manure moisture content cluster distribution area and combined with the second global moisture content estimate, the real-time moisture content distribution of each chicken manure moisture content cluster distribution area is obtained. Based on the real-time moisture content distribution of each chicken manure moisture content cluster distribution area, combined with the upper limit of the moisture content application scenario discrimination threshold interval and the moisture content uniformity application scenario discrimination threshold, the magnitude and sign of the real-time moisture content deviation between the real-time moisture content distribution and the upper limit of the moisture content application scenario discrimination threshold interval, as well as the uniformity deviation value of the corresponding chicken manure moisture content cluster distribution area, are calculated. The genetic algorithm input sequence is constructed using the uniformity deviation value of each chicken manure moisture content cluster distribution area, the magnitude and sign of the real-time moisture content deviation between the real-time moisture content distribution and the upper limit of the threshold interval for the moisture content application scenario, the preset uniformity deviation value-chicken manure thickness-turning equipment speed curve, the moisture content deviation value-positive sign-drying rate curve, and the moisture content deviation value-negative sign-water addition rate curve.

9. The method for detecting the moisture content of chicken manure based on hyperspectral imaging and image segmentation as described in claim 8, characterized in that, In response to preset trigger conditions met in the preset enhancement adjustment strategy library, it also includes: A fitness function is constructed by minimizing the uniformity deviation value in the heat map of the clustered distribution area of ​​chicken manure moisture content. The threshold interval for judging the application scenario of moisture content is used as the constraint interval. A label for water addition or drying is constructed based on the positive or negative sign of the real-time moisture content deviation. An adjustment coefficient for water addition rate or drying rate is constructed based on the absolute value of the real-time moisture content deviation. The adjustment coefficient for water addition rate or drying rate is proportional to the absolute value of the real-time moisture content deviation. The genetic algorithm input sequence, fitness function, constraint interval, water addition or drying discrimination label and water addition rate or drying rate adjustment coefficient are input into the genetic algorithm. Combined with the preset iteration period threshold, the optimal turning equipment speed and optimal water addition rate or drying rate corresponding to each chicken manure moisture content cluster distribution area are obtained. Based on the optimal turning speed and optimal water addition rate or drying rate corresponding to each chicken manure moisture content cluster distribution area, combined with the water addition or drying device configured in the conditioning treatment area in the production line control console, the corresponding turning speed adjustment command, water addition command or drying command is generated through a preset fuzzy control algorithm to perform real-time turning and water addition or drying adjustments. During the real-time turning and watering or drying adjustment process, the sorting strategy is simultaneously responded to to perform diversion and sorting operations on qualified chicken manure, unqualified chicken manure and impurities and waste materials, and the storage traceability strategy is simultaneously responded to to store the optimal turning equipment speed and optimal watering rate or drying rate corresponding to the turning and watering or drying adjustment process on the chain. Simultaneously, the enhanced detection data sequences collected in real time during the turning, watering, or drying adjustment processes are labeled in conjunction with the drying method to construct a fine-tuning training set. When the fine-tuning training set collected within a preset time period meets the preset quantity, the trained HS-SegNet model is periodically updated with fine-tuned parameters based on the fine-tuning training set and the incremental learning algorithm to obtain the fine-tuned and updated HS-SegNet model. The updated HS-SegNet model is then synchronized to the production line control console for chicken manure sorting, watering, drying, and optimal watering or drying rates, along with the enhanced detection data sequences, to be stored on the blockchain.

10. A chicken manure moisture content detection system based on hyperspectral imaging and image segmentation, used to implement the chicken manure moisture content detection method based on hyperspectral imaging and image segmentation as described in any one of claims 1-9, characterized in that, include: Synchronous acquisition module, detection module, and response adjustment module; The synchronous acquisition module is used to synchronously acquire hyperspectral data, image data and environmental information data of chicken manure under different breeding scenarios, and preprocess them to obtain enhanced detection data sequences. The detection module is used to input the enhanced detection data sequence into the pre-trained HS-SegNet model and combine it with the scene dynamic qualification judgment threshold to obtain the first detection parameter sequence; the first detection parameter sequence includes the global moisture content estimate, chicken manure morphology judgment result, moisture content uniformity, scene judgment result, heat map of chicken manure moisture content cluster distribution area, and the second global moisture content estimate and chicken manure qualification judgment result; The response adjustment module synchronizes the first detection parameter sequence to the production line console and, in response to preset trigger conditions satisfied in the preset enhancement adjustment strategy library, selects at least two enhancement adjustment response strategies corresponding to the trigger conditions from the enhancement adjustment strategy library. The enhanced adjustment strategy library includes moisture content adjustment strategies, sorting strategies, and storage traceability strategies. The moisture content adjustment strategy is used to respond to the configured conditioning controller according to the first detection parameter sequence; the sorting strategy is used to respond to the sorting strategy according to the first detection parameter sequence and drive the configured diversion baffle to perform diversion operations on the detected qualified chicken manure, unqualified chicken manure and impurity waste. The storage traceability strategy is used to combine the first detection parameter sequence, the response moisture content adjustment strategy or sorting strategy, and the corresponding response result detection information corresponding to each timestamp with blockchain for on-chain storage and traceability of the chicken manure moisture content adjustment process.