Method and system for detecting nutritional ingredients of animal feed
By generating standardized three-dimensional spectral data through dual-spectral imaging and temperature and humidity sensors, and combining an improved ResNet50 network and embedded edge computing, the problems of non-destructive accuracy and cross-species adaptability in animal feed detection are solved, enabling rapid and accurate detection and sorting.
Patent Information
- Application Number
- CN202510576805.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-05-06
AI Technical Summary
Existing methods for detecting nutrient components in animal feed rely on destructive chemical analysis, which cannot achieve non-destructive testing. Traditional spectroscopic detection equipment lacks accuracy and cross-species adaptability, resulting in large detection errors and long adaptation cycles, making it impossible to achieve real-time and efficient industrial applications.
Three-dimensional layered scanning is performed using dual-spectral imaging technology. Raw three-dimensional spectral data is generated by combining temperature and humidity sensors. Standardized three-dimensional spectral data is generated by using correction factors. Transfer learning is performed using an improved ResNet50 network. Real-time detection and sorting are achieved by combining embedded edge computing with production line equipment.
It enables rapid detection (≤30 seconds/sample) and accurate analysis (crude protein error ±0.8%) of animal feed nutrients, breaking through the bottlenecks of low efficiency and poor cross-species adaptability of traditional detection methods, and realizing closed-loop industrial application.
Smart Images

Figure CN120314227B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of animal feed, specifically to a method and system for detecting the nutritional components of animal feed. Background Technology
[0002] Animal feed, as a core input in animal husbandry, directly determines the growth performance, health level, and quality of livestock and poultry products. The modern feed industry needs to precisely control core indicators such as protein, fat, and crude fiber to meet the nutritional needs of different species and growth stages. With the global development of large-scale farming, feed testing faces technical demands for high throughput, multiple indicators, and real-time monitoring. The integrated application of near-infrared spectroscopy, sensor networks, and big data technologies provides a technical foundation for non-destructive testing and full traceability of feed components, promoting the industry's upgrade towards intelligence and standardization.
[0003] Currently, the detection of nutrient components in animal feed mainly relies on chemical analysis methods (such as Kjeldahl nitrogen determination and Soxhlet extraction), which require destructive treatment of samples such as crushing and digestion, making it impossible to achieve non-destructive testing and repeatability. Traditional spectroscopic detection equipment is limited to a single wavelength, making it difficult to accurately resolve the characteristics of complex components such as crude fiber and amino acids. It is also susceptible to interference from uneven particle size and fluctuations in environmental temperature and humidity, leading to increased detection errors. In addition, existing analytical models rely on large-sample training for specific species, and new models need to be built when faced with new formulations or cross-species feeds, resulting in long adaptation cycles and high costs.
[0004] Existing methods generally rely on single-dimensional spectral analysis, which cannot integrate the multi-source spectral characteristics of feed surface morphology and deep components, resulting in insufficient accuracy in resolving complex components. Environmental compensation mechanisms only apply to static temperature and humidity parameters, ignoring dynamic nonlinear interference from particle size differences, making it difficult to achieve stable detection across batches. Traditional models lack cross-species knowledge transfer capabilities, requiring full reconstruction of network parameters for new feed formulations, which has a long adaptation period. In addition, the detection and execution systems are disconnected, making it impossible to generate sorting instructions in real time through edge computing, which restricts industrial closed-loop applications. Summary of the Invention
[0005] In order to solve the technical problems mentioned in the background art, the present invention proposes a method and system for detecting the nutritional components of animal feed.
[0006] Therefore, the technical solution adopted by the present invention is as follows:
[0007] An animal feed nutrient composition detection system, characterized in that the system includes
[0008] M1, the multimodal data acquisition module, performs three-dimensional layered scanning of the animal feed to be tested through dual-spectral imaging, generating layered scanning data, which includes spatial coordinates and multi-wavelength reflectance;
[0009] The dual-spectral imaging is divided into visible-near-infrared imaging and short-wave infrared imaging. Driven by the axial lifting and rotation scanning of the rotating stage, the surface morphology and internal component wavelength data of the feed are collected layer by layer synchronously to generate layered scanning data containing spatial coordinates and multi-wavelength reflectivity.
[0010] The multi-wavelength reflectance is divided into visible-near-infrared multi-wavelength reflectance and short-wave multi-wavelength reflectance;
[0011] Meanwhile, the temperature and humidity sensors monitor the ambient temperature and humidity in real time and generate layered temperature and humidity compensation parameters;
[0012] The layered temperature and humidity compensation parameters and layered scanning data are bound together to generate raw three-dimensional spectral data, which is then output to the dynamic compensation processing module.
[0013] M2, the dynamic compensation processing module, generates particle size parameters based on the visible-near infrared multi-wavelength reflectance, generates a correction factor based on the particle size parameters, and multiplies it with the short-wave infrared multi-wavelength reflectance to further generate compensated multi-wavelength reflectance data.
[0014] The compensated multi-wavelength reflectance data, particle size parameters, and layered temperature and humidity compensation parameters are aligned according to spatial coordinates to generate standardized three-dimensional spectral data, which is then output to the transfer learning module.
[0015] Based on the visible-near-infrared multi-wavelength reflectance and combined with a morphological edge detection algorithm to segment the feed particle outline, the particle size parameters at each spatial coordinate are calculated using the following formula:
[0016]
[0017] in, Let be the particle size parameter of the i-th feed grain. The actual projected area of the particle outline;
[0018] Based on the particle size parameters, a correction factor for multi-wavelength reflectance is calculated to eliminate spectral errors. The formula is as follows:
[0019]
[0020] in, For reflectivity correction factor, The particle size parameter of the current particle. As the reference particle size, For calibration coefficients, when At that time, a speed adjustment command is sent to the rotating platform;
[0021] M3, Transfer Learning Analysis Module, which has a pre-set database of spectral characteristics of different feeds;
[0022] The feature database performs feature matching between the input standardized three-dimensional spectral data and historical data to invoke the transfer learning pre-trained network model;
[0023] The normalized three-dimensional spectral data was optimized and the parameters of the pre-trained network model were adjusted using an improved ResNet50 network.
[0024] Standardized three-dimensional spectral data is input into a pre-trained network model to output the nutritional indicators of the feed to be tested, and then output to the intelligent decision output module.
[0025] The M4 intelligent decision output module generates control commands in real time based on nutritional indicators via embedded edge computing, and transmits them to the hierarchical actuator through a multi-protocol industrial interface. The actuator triggers a response according to the error level and feeds back to the multimodal data acquisition module.
[0026] Furthermore, the visible-near infrared imaging focuses on the 400-1000nm band to scan the multi-wavelength reflectivity of the feed surface. After identifying abnormal areas, it immediately sends coordinate commands for enhanced scanning to the short-wave infrared imaging.
[0027] The short-wave infrared imaging focuses on the 1000-2500nm band. After receiving coordinate instructions from the visible-near-infrared imaging, it increases the scanning density of abnormal areas and captures the multi-wavelength reflectance of the feed's internal components.
[0028] The temperature and humidity compensation parameters for each layer are bound to the spatial coordinates of the corresponding layer in the layered scanning data, generating raw three-dimensional spectral data consisting of spatial coordinates, multi-wavelength reflectance, and temperature and humidity compensation parameters.
[0029] Furthermore, the process for generating the standardized three-dimensional spectral data is as follows:
[0030] Weighted multi-wavelength reflectance is generated by assigning weights based on wavelength importance-compensated multi-wavelength reflectance data.
[0031] Subsequently, the weighted multi-wavelength reflectance, particle size parameters, and temperature and humidity compensation parameters were normalized according to spatial coordinates.
[0032] Furthermore, the feature matching rule is as follows:
[0033] The similarity between the input standardized three-dimensional spectral data and historical data is calculated. When the similarity reaches a set threshold, the pre-trained network model that best matches the feed to be tested is automatically selected. The similarity calculation formula is as follows:
[0034]
[0035] in, To standardize three-dimensional spectral data; This refers to the average spectral data of a certain type of feed in the feature database. It is the inverse of the covariance matrix.
[0036] Furthermore, the improved ResNet50 network includes a channel optimization mechanism and a transfer learning adaptation layer;
[0037] The channel optimization mechanism receives standardized three-dimensional spectral data and utilizes a channel attention mechanism based on band importance to increase the weight of key bands and decrease the weight of irrelevant bands. The calculation formula is as follows:
[0038]
[0039] in, For the data of the c-th spectral channel, For global average pooling, For learnable parameters, For the Sigmoid function;
[0040] The transfer learning adaptation layer adjusts the parameters of the pre-trained network model using a portion of standardized 3D spectral data, and then synchronously feeds the adjusted pre-trained network model back to the feature database.
[0041] Furthermore, the improved ResNet50 network performs feature space alignment operations and data augmentation strategies to adjust the parameters of the pre-trained network model.
[0042] The feature space alignment operation involves aligning the standardized three-dimensional spectral data of the feed to be detected with the existing feed categories in the feature database, and then inputting the aligned standardized three-dimensional spectral data into the improved ResNet50 network to adjust the pre-trained network model.
[0043] The data augmentation strategy is based on the input standardized three-dimensional spectral data. It uses spectral mixing technology to synthesize three-dimensional spectral augmented data and inputs the three-dimensional spectral augmented data into an improved ResNet50 network to adjust the pre-trained network model.
[0044] Furthermore, when adjusting the parameters of the pre-trained network model in the improved ResNet50 network, 85% of the original parameters are retained, and 15% of the model parameters related to the feed to be detected are adjusted.
[0045] Furthermore, the embedded edge computing classifies feed grades and detects abnormal indicators through a decision logic engine. The multi-protocol industrial interface adaptively converts and matches the device type, drives the grading actuator to complete the physical sorting of feed, and triggers dual-spectrum imaging re-inspection when an abnormality is detected.
[0046] A method for detecting nutrient components in animal feed, characterized by comprising the following steps:
[0047] S1. Multimodal data acquisition: Three-dimensional layered scanning of the animal feed to be tested is performed through dual-spectral imaging to generate layered scanning data, which includes spatial coordinates and multi-wavelength reflectance.
[0048] The dual-spectral imaging is divided into visible-near-infrared imaging and short-wave infrared imaging. Driven by the axial lifting and rotation scanning of the rotating stage, the surface morphology and internal component wavelength data of the feed are collected layer by layer synchronously to generate layered scanning data containing spatial coordinates and multi-wavelength reflectivity.
[0049] The multi-wavelength reflectance is divided into visible-near-infrared multi-wavelength reflectance and short-wave multi-wavelength reflectance;
[0050] Meanwhile, the temperature and humidity sensors monitor the ambient temperature and humidity in real time and generate layered temperature and humidity compensation parameters;
[0051] The layered temperature and humidity compensation parameters and layered scanning data are bound together to generate raw three-dimensional spectral data, which is then output to dynamic compensation processing.
[0052] S2. Dynamic compensation processing: Based on the visible-near infrared multi-wavelength reflectance, a particle size parameter is generated; based on the particle size parameter, a correction factor is generated; and multiplied with the short-wave infrared multi-wavelength reflectance to further generate compensated multi-wavelength reflectance data.
[0053] The compensated multi-wavelength reflectance data, particle size parameters, and layered temperature and humidity compensation parameters are aligned according to spatial coordinates to generate standardized three-dimensional spectral data, which is then output to transfer learning.
[0054] Based on the visible-near-infrared multi-wavelength reflectance and combined with a morphological edge detection algorithm to segment the feed particle outline, the particle size parameters at each spatial coordinate are calculated using the following formula:
[0055]
[0056] in, Let be the particle size parameter of the i-th feed grain. The actual projected area of the particle outline;
[0057] Based on the particle size parameters, a correction factor for multi-wavelength reflectance is calculated to eliminate spectral errors. The formula is as follows:
[0058]
[0059] in, For reflectivity correction factor, The particle size parameter of the current particle. As the reference particle size, For calibration coefficients, when At that time, a speed adjustment command is sent to the rotating platform;
[0060] S3. Transfer learning analysis, with a pre-set database of spectral features of different feeds;
[0061] The feature database performs feature matching between the input standardized three-dimensional spectral data and historical data to invoke the transfer learning pre-trained network model;
[0062] The normalized three-dimensional spectral data was optimized and the parameters of the pre-trained network model were adjusted using an improved ResNet50 network.
[0063] Standardized three-dimensional spectral data is input into a pre-trained network model to output the nutritional indicators of the feed to be tested, and then output to the intelligent decision output.
[0064] S4 Intelligent decision output: Based on nutritional indicators, control commands are generated in real time via embedded edge computing and transmitted to the hierarchical actuator through a multi-protocol industrial interface. The response is triggered according to the error level and fed back to the multimodal data acquisition.
[0065] Compared with the prior art, the advantages of the present invention are as follows:
[0066] 1. By using dual-spectral imaging and a rotating stage for coordinated three-dimensional layered scanning, combined with temperature and humidity sensors to generate raw three-dimensional spectral data, and finally using correction factors to generate standardized three-dimensional spectral data, the detection accuracy of key indicators such as crude protein and crude fiber is significantly improved.
[0067] 2. Based on the improved ResNet50 network's channel optimization mechanism and incremental learning strategy, rapid adaptation of feed samples to be detected is achieved. Furthermore, by automatically calling pre-trained network models in the feature database through feature space alignment, the bottleneck of poor adaptability in traditional cross-species detection is overcome.
[0068] 3. Through the embedded edge computing unit and multi-protocol industrial interface, the parameters of the pre-trained network model are converted into sorting control commands in real time, abnormal indicators are fed back to the dual-spectrum imaging, and mechanical equipment such as pneumatic sorting valves and belt scales are triggered to sort feed. Attached Figure Description
[0069] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0070] Figure 1 This is a flowchart of the animal feed nutrient composition detection system of the present invention;
[0071] Figure 2 This is a flowchart of the dynamic compensation processing module of the present invention;
[0072] Figure 3 This is a flowchart of the transfer learning analysis module of the present invention. Detailed Implementation
[0073] To achieve the above objectives, the present invention provides an animal feed nutrient composition detection system. Please refer to the provided technical solution. Figure 1 The system includes:
[0074] M1, the multimodal data acquisition module, performs three-dimensional layered scanning of the animal feed to be tested through dual-spectral imaging, generating layered scanning data, which includes spatial coordinates and multi-wavelength reflectance. At the same time, the temperature and humidity sensor monitors the ambient temperature and humidity in real time and generates layered temperature and humidity compensation parameters. The layered temperature and humidity compensation parameters are bound to the layered scanning data to generate raw three-dimensional spectral data, which is then output to the dynamic compensation processing module.
[0075] The dual-spectral imaging is divided into visible-near-infrared imaging and short-wave infrared imaging. Driven by the axial lifting and rotation scanning of the rotating stage, the surface morphology and internal component wavelength data of the feed are collected layer by layer synchronously to generate layered scanning data containing spatial coordinates and multi-wavelength reflectivity.
[0076] In some embodiments, the visible-near infrared imaging is focused on the 400-1000nm band to scan the multi-wavelength reflectance of the feed surface. After identifying abnormal areas (such as mold spots or clumps), it immediately sends coordinate commands for enhanced scanning to the short-wave infrared imaging.
[0077] In some embodiments, the shortwave infrared imaging is focused on the 1000-2500nm band. After receiving coordinate instructions from the visible-near infrared imaging, the scanning density of abnormal areas is increased to capture the multi-wavelength reflectance of the internal components of the feed.
[0078] The temperature and humidity sensor simultaneously acquires data during dual-spectral imaging and three-dimensional layered scanning on a rotating stage. It binds the temperature and humidity compensation parameters of each layer to the spatial coordinates of the corresponding layer in the layered scanning data, generating original three-dimensional spectral data composed of spatial coordinates, multi-wavelength reflectance, and temperature and humidity compensation parameters.
[0079] M2, the dynamic compensation processing module, generates particle size parameters based on the visible-near-infrared multi-wavelength reflectance, generates a correction factor based on the particle size parameters, and multiplies it with the short-wave infrared multi-wavelength reflectance to further generate compensated multi-wavelength reflectance data. The compensated multi-wavelength reflectance data, particle size parameters, and layered temperature and humidity compensation parameters are aligned according to spatial coordinates to generate standardized three-dimensional spectral data, which is then output to the transfer learning module; (Refer to...) Figure 2 .
[0080] The particle size parameter generation process is as follows:
[0081] The visible-near-infrared multi-wavelength reflectance is received, and the feed particle outline is segmented using a morphological edge detection algorithm. The particle size parameters at each spatial coordinate are calculated using the following formula:
[0082]
[0083] in, The equivalent diameter of the particle. The actual projected area of the particle outline;
[0084] The process for generating the correction factor is as follows:
[0085] Based on the particle size parameter, a correction factor for multi-wavelength reflectance is calculated to eliminate spectral errors. The formula is as follows:
[0086]
[0087] in, For reflectivity correction factor, The particle size parameter of the current particle. For the reference particle size, k is the calibration coefficient (determined through standard sample experiments). At that time, a speed adjustment command (such as reducing the speed by 20%) is sent to the rotating platform.
[0088] The process of generating the standardized three-dimensional spectral data is as follows:
[0089] The correction factor is multiplied by the multi-wavelength reflectance data in short-wave infrared imaging to output the compensated multi-wavelength reflectance data.
[0090] Weights are assigned to the multi-wavelength reflectance data after compensation based on wavelength importance to generate a weighted multi-wavelength reflectance. The weight assignment formula is as follows:
[0091]
[0092] in, This is the weighted reflectance. The data are reflectance data after particle size analysis correction. This is the wavelength weighting matrix;
[0093] Subsequently, the weighted multi-wavelength reflectance data, particle size parameters, and temperature and humidity compensation parameters are normalized according to spatial coordinates, and the final output is three-dimensional spectral data. The normalization formula is as follows:
[0094]
[0095] in, The mean of the data. The standard deviation of the data. This is the standardized reflectance.
[0096] M3, Transfer Learning Analysis Module: This module has a pre-set database of spectral features for different feeds. This database performs feature matching between the input standardized three-dimensional spectral data and historical data to invoke a pre-trained transfer learning network model. It optimizes the standardized three-dimensional spectral data and adjusts the parameters of the pre-trained network model using an improved ResNet50 network. The standardized three-dimensional spectral data is then input into the pre-trained network model to output the nutritional indicators of the feed to be tested, and finally outputs them to the intelligent decision output module. (Refer to...) Figure 3 .
[0097] The feature database pre-records the spectral patterns of different feed formulations, and performs feature matching based on standardized three-dimensional spectral data. The feature matching rules are as follows:
[0098] The similarity between the input standardized three-dimensional spectral data and historical data is calculated. When the similarity reaches a set threshold, the pre-trained network model that best matches the feed to be tested is automatically selected. The similarity calculation formula is as follows:
[0099]
[0100] in, To standardize three-dimensional spectral data; This refers to the average spectral data of a certain type of feed in the feature database. It is the inverse of the covariance matrix;
[0101] The improved ResNet50 network includes a channel optimization mechanism and a transfer learning adaptation layer;
[0102] In some embodiments, the channel optimization mechanism receives standardized three-dimensional spectral data and utilizes a channel attention mechanism based on band importance to increase the weight of key bands and decrease the weight of irrelevant bands. The calculation formula is as follows:
[0103]
[0104] in, For the data of the c-th spectral channel, For global average pooling, For learnable parameters, For the Sigmoid function;
[0105] In some embodiments, the transfer learning adaptation layer adjusts the parameters of the pre-trained network model using a portion of standardized three-dimensional spectral data, and synchronously feeds the adjusted pre-trained network model back to the feature database.
[0106] The improved ResNet50 network performs feature space alignment and data augmentation strategies to adjust the parameters of the pre-trained network model.
[0107] In some embodiments, the feature space alignment operation involves aligning the standardized three-dimensional spectral data of the feed to be detected with existing feed categories in the feature database, and then inputting the aligned standardized three-dimensional spectral data into an improved ResNet50 network to adjust the pre-trained network model.
[0108] In some embodiments, the data augmentation strategy is based on the input standardized three-dimensional spectral data, uses spectral mixing technology to synthesize three-dimensional spectral augmented data, and inputs the three-dimensional spectral augmented data into an improved ResNet50 network to adjust the pre-trained network model;
[0109] When adjusting the parameters of the pre-trained network model in the improved ResNet50 network, 85% of the original parameters are retained, and 15% of the model parameters related to the feed to be detected are adjusted.
[0110] M4, the intelligent decision output module, generates control commands in real time based on nutritional indicators via embedded edge computing, and transmits them to the hierarchical actuator through a multi-protocol industrial interface. The actuator triggers a response according to the error level and feeds it back to the multimodal data acquisition module.
[0111] The embedded edge computing is used to receive three-dimensional spectral data, convert the pre-trained network model parameters into control commands, and transmit them to the graded execution mechanism via a multi-protocol industrial interface. First, the feed grade is divided according to the threshold of nutritional indicators, and then abnormal indicators are detected in real time. When an abnormality is detected, the problematic batch is locked and simultaneously fed back to the dual-spectral imaging, forcibly interrupting the current process.
[0112] The multi-protocol industrial interface includes protocol adaptive conversion and data compression transmission;
[0113] In some embodiments, the protocol adaptive conversion automatically identifies the access device type and switches the corresponding communication protocol to receive standardized three-dimensional spectral data and nutritional indicators.
[0114] In some embodiments, the data compression transmission adopts a lossless compression algorithm to compress the volume of nutritional indicators to less than 35% of the original size, retain all valid information, and finally upload it to the cloud monitoring platform.
[0115] The graded execution mechanism is the physical execution unit of the intelligent decision output module. Based on nutritional indicators and control instructions, it drives equipment such as belt scales and pneumatic sorting screens to complete the physical sorting of feed quality.
[0116] A method for detecting nutrient components in animal feed, characterized by comprising the following steps:
[0117] S1. Multimodal data acquisition: The animal feed to be tested is scanned in three dimensions using dual-spectral imaging to generate layered scanning data, which includes spatial coordinates and multi-wavelength reflectance. At the same time, temperature and humidity sensors monitor the ambient temperature and humidity in real time and generate layered temperature and humidity compensation parameters. The layered temperature and humidity compensation parameters are bound to the layered scanning data to generate raw three-dimensional spectral data, which is then output to dynamic compensation processing.
[0118] S2. Dynamic compensation processing: Based on the visible-near infrared multi-wavelength reflectance, a particle size parameter is generated. Based on the particle size parameter, a correction factor is generated and multiplied with the short-wave infrared multi-wavelength reflectance to further generate compensated multi-wavelength reflectance data. The compensated multi-wavelength reflectance data, particle size parameter, and layered temperature and humidity compensation parameter are aligned according to spatial coordinates to generate standardized three-dimensional spectral data, which is then output to transfer learning.
[0119] S3. Transfer learning analysis: This is a pre-set database of spectral features of different feeds. The feature database performs feature matching between the input standardized three-dimensional spectral data and historical data to call the transfer learning pre-trained network model. The standardized three-dimensional spectral data is optimized and the parameters of the pre-trained network model are adjusted through an improved ResNet50 network. The standardized three-dimensional spectral data is input into the pre-trained network model to output the nutritional indicators of the feed to be tested and output them to the intelligent decision output.
[0120] S4 Intelligent decision output: Based on nutritional indicators, control commands are generated in real time via embedded edge computing and transmitted to the hierarchical actuator through a multi-protocol industrial interface. The response is triggered according to the error level and fed back to the multimodal data acquisition.
[0121] This invention proposes a method and system for detecting nutrient components in animal feed. Multimodal data acquisition is based on dual-spectral imaging and temperature / humidity sensors to collect raw three-dimensional spectral data of the feed to be tested. Dynamic compensation processing generates standardized three-dimensional spectral data through correction factors. Transfer learning analysis uses an improved ResNet50 network to optimize the standardized three-dimensional spectral data and adjust the parameters of the pre-trained network model. The standardized three-dimensional spectral data is input into the pre-trained network model to output the nutrient indicators of the feed to be tested. Embedded edge computing converts the parameters of the pre-trained network model into control commands, driving the linkage of production line equipment through a multi-protocol industrial interface. This achieves rapid detection (≤30 seconds / sample) and analysis of feed nutrient components (crude protein error ±0.8%), as well as closed-loop control of physical sorting of feed quality. This solves the problems of low efficiency and insufficient cross-species adaptability of traditional detection methods.
[0122] In summary, the advantages of this invention are as follows: it performs three-dimensional layered scanning using dual-spectral imaging and a rotating stage, collects raw three-dimensional spectral data of the feed to be tested using temperature and humidity sensors, generates standardized three-dimensional spectral data through correction factors, optimizes the standardized three-dimensional spectral data based on an improved ResNet50 network, constructs and adjusts the parameters of a pre-trained network model, and finally outputs the nutritional indicators of the feed to be tested. These are then converted into control commands via embedded edge computing and driven through a multi-protocol industrial interface to link production line equipment, thereby driving the production line equipment to perform feed sorting. This forms a closed-loop system of "spectral acquisition - migration analysis - sorting execution - anomaly feedback," solving the problems of low efficiency and poor cross-species adaptability in traditional detection methods.
[0123] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A system for detecting nutrient components in animal feed, characterized in that, The system includes: M1, the multimodal data acquisition module, performs three-dimensional layered scanning of the animal feed to be tested through dual-spectral imaging, generating layered scanning data, which includes spatial coordinates and multi-wavelength reflectance; The dual-spectral imaging is divided into visible-near-infrared imaging and short-wave infrared imaging. Driven by the axial lifting and rotation scanning of the rotating stage, the surface morphology and internal component wavelength data of the feed are collected layer by layer synchronously to generate layered scanning data containing spatial coordinates and multi-wavelength reflectivity. The multi-wavelength reflectance is divided into visible-near-infrared multi-wavelength reflectance and short-wave multi-wavelength reflectance; Meanwhile, the temperature and humidity sensors monitor the ambient temperature and humidity in real time and generate layered temperature and humidity compensation parameters; The layered temperature and humidity compensation parameters and layered scanning data are bound together to generate raw three-dimensional spectral data, which is then output to the dynamic compensation processing module. M2, the dynamic compensation processing module, generates particle size parameters based on the visible-near infrared multi-wavelength reflectance, generates a correction factor based on the particle size parameters, and multiplies it with the short-wave infrared multi-wavelength reflectance to further generate compensated multi-wavelength reflectance data. The compensated multi-wavelength reflectance data, particle size parameters, and layered temperature and humidity compensation parameters are aligned according to spatial coordinates to generate standardized three-dimensional spectral data, which is then output to the transfer learning module. Based on the visible-near-infrared multi-wavelength reflectance and combined with a morphological edge detection algorithm to segment the feed particle outline, the particle size parameters at each spatial coordinate are calculated using the following formula: in, Let be the particle size parameter of the i-th feed grain. The actual projected area of the particle outline; Based on the particle size parameters, a correction factor for multi-wavelength reflectance is calculated to eliminate spectral errors. The formula is as follows: in, The reflectivity correction factor. The particle size parameter of the current particle. As the reference particle size, For calibration coefficients, when At that time, a speed adjustment command is sent to the rotating platform; M3, Transfer Learning Analysis Module, which has a pre-set database of spectral characteristics of different feeds; The feature database performs feature matching between the input standardized three-dimensional spectral data and historical data to invoke the transfer learning pre-trained network model; The normalized three-dimensional spectral data was optimized and the parameters of the pre-trained network model were adjusted using an improved ResNet50 network. Standardized three-dimensional spectral data is input into a pre-trained network model to output the nutritional indicators of the feed to be tested, and then output to the intelligent decision output module. The M4 intelligent decision output module generates control commands in real time based on nutritional indicators via embedded edge computing, and transmits them to the hierarchical actuator through a multi-protocol industrial interface. The actuator triggers a response according to the error level and feeds back to the multimodal data acquisition module.
2. The animal feed nutrient composition detection system according to claim 1, characterized in that, The visible-near infrared imaging focuses on the 400-1000nm band to scan the multi-wavelength reflectivity of the feed surface. After identifying abnormal areas, it immediately sends coordinate commands for enhanced scanning to the short-wave infrared imaging. The short-wave infrared imaging focuses on the 1000-2500nm band. After receiving coordinate instructions from the visible-near-infrared imaging, it increases the scanning density of abnormal areas and captures the multi-wavelength reflectance of the feed's internal components. The temperature and humidity compensation parameters for each layer are bound to the spatial coordinates of the corresponding layer in the layered scanning data, generating raw three-dimensional spectral data consisting of spatial coordinates, multi-wavelength reflectance, and temperature and humidity compensation parameters.
3. The animal feed nutrient composition detection system according to claim 2, characterized in that, The process of generating the standardized three-dimensional spectral data is as follows: Weighted multi-wavelength reflectance is generated by assigning weights based on wavelength importance-compensated multi-wavelength reflectance data. Subsequently, the weighted multi-wavelength reflectance, particle size parameters, and temperature and humidity compensation parameters were normalized according to spatial coordinates.
4. The animal feed nutrient composition detection system according to claim 3, characterized in that, The feature matching rule is as follows: The similarity between the input standardized three-dimensional spectral data and historical data is calculated. When the similarity reaches a set threshold, the pre-trained network model that best matches the feed to be tested is automatically selected. The similarity calculation formula is as follows: in, To standardize three-dimensional spectral data; This refers to the average spectral data of a certain type of feed in the feature database. It is the inverse of the covariance matrix.
5. The animal feed nutrient composition detection system according to claim 4, characterized in that, The improved ResNet50 network includes a channel optimization mechanism and a transfer learning adaptation layer; The channel optimization mechanism receives standardized three-dimensional spectral data and utilizes a channel attention mechanism based on band importance to increase the weight of key bands and decrease the weight of irrelevant bands. The calculation formula is as follows: in, For the data of the c-th spectral channel, For global average pooling, For learnable parameters, For the Sigmoid function; The transfer learning adaptation layer adjusts the parameters of the pre-trained network model using a portion of standardized 3D spectral data, and then synchronously feeds the adjusted pre-trained network model back to the feature database.
6. The animal feed nutrient composition detection system according to claim 5, characterized in that, The improved ResNet50 network performs feature space alignment and data augmentation strategies to adjust the parameters of the pre-trained network model. The feature space alignment operation involves aligning the standardized three-dimensional spectral data of the feed to be detected with the existing feed categories in the feature database, and then inputting the aligned standardized three-dimensional spectral data into the improved ResNet50 network to adjust the pre-trained network model. The data augmentation strategy is based on the input standardized three-dimensional spectral data. It uses spectral mixing technology to synthesize three-dimensional spectral augmented data and inputs the three-dimensional spectral augmented data into an improved ResNet50 network to adjust the pre-trained network model.
7. The animal feed nutrient composition detection system according to claim 6, characterized in that, When adjusting the parameters of the pre-trained network model in the improved ResNet50 network, 85% of the original parameters are retained, and 15% of the model parameters related to the feed to be detected are adjusted.
8. The animal feed nutrient composition detection system according to claim 1, characterized in that, The embedded edge computing classifies feed grades and detects abnormal indicators through a decision logic engine. The multi-protocol industrial interface adaptively converts and matches the device type, drives the graded execution mechanism to complete the physical sorting of feed, and triggers bispectral imaging re-inspection when an abnormality is detected.
9. A method for detecting nutrient components in animal feed, characterized in that, The method includes the following steps: S1. Multimodal data acquisition: Three-dimensional layered scanning of the animal feed to be tested is performed through dual-spectral imaging to generate layered scanning data, which includes spatial coordinates and multi-wavelength reflectance. The dual-spectral imaging is divided into visible-near-infrared imaging and short-wave infrared imaging. Driven by the axial lifting and rotation scanning of the rotating stage, the surface morphology and internal component wavelength data of the feed are collected layer by layer synchronously to generate layered scanning data containing spatial coordinates and multi-wavelength reflectivity. The multi-wavelength reflectance is divided into visible-near-infrared multi-wavelength reflectance and short-wave multi-wavelength reflectance; Meanwhile, the temperature and humidity sensors monitor the ambient temperature and humidity in real time and generate layered temperature and humidity compensation parameters; The layered temperature and humidity compensation parameters and layered scanning data are bound together to generate raw three-dimensional spectral data, which is then output to dynamic compensation processing. S2. Dynamic compensation processing: Based on the visible-near infrared multi-wavelength reflectance, a particle size parameter is generated; based on the particle size parameter, a correction factor is generated; and multiplied with the short-wave infrared multi-wavelength reflectance to further generate compensated multi-wavelength reflectance data. The compensated multi-wavelength reflectance data, particle size parameters, and layered temperature and humidity compensation parameters are aligned according to spatial coordinates to generate standardized three-dimensional spectral data, which is then output to transfer learning. Based on the visible-near-infrared multi-wavelength reflectance and combined with a morphological edge detection algorithm to segment the feed particle outline, the particle size parameters at each spatial coordinate are calculated using the following formula: in, Let be the particle size parameter of the i-th feed grain. The actual projected area of the particle outline; Based on the particle size parameters, a correction factor for multi-wavelength reflectance is calculated to eliminate spectral errors. The formula is as follows: in, The reflectivity correction factor. The particle size parameter of the current particle. As the reference particle size, For calibration coefficients, when At that time, a speed adjustment command is sent to the rotating platform; S3. Transfer learning analysis, with a pre-set database of spectral features of different feeds; The feature database performs feature matching between the input standardized three-dimensional spectral data and historical data to invoke the transfer learning pre-trained network model; The normalized three-dimensional spectral data was optimized and the parameters of the pre-trained network model were adjusted using an improved ResNet50 network. Standardized three-dimensional spectral data is input into a pre-trained network model to output the nutritional indicators of the feed to be tested, and then output to the intelligent decision output. S4 Intelligent decision output: Based on nutritional indicators, control commands are generated in real time via embedded edge computing and transmitted to the hierarchical actuator through a multi-protocol industrial interface. The response is triggered according to the error level and fed back to the multimodal data acquisition.
Citation Information
Patent Citations
Method and system for detecting nutritional ingredients of laying hen feed
CN118130368A
Visible light / near infrared spectral analysis method
JP2005291704A