Feed blending method for preventing and treating fatty liver syndrome of laying hens based on image recognition

By using an improved CPSeg semantic segmentation network and a weighted evidence fusion network based on image recognition, high-resolution detection of early risk of fatty liver in laying hens and individualized feed formulation were achieved. This solved the problem of the separation between detection and intervention in existing technologies and improved the efficiency of health risk management and resource utilization.

CN121543989APending Publication Date: 2026-02-17XICHANG COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610056552.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-16
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve highly sensitive and repeatable early fatty liver risk detection in screening and feed formulation for laying hens, and lack precise nutritional regulation of individualized body shape and health risks, resulting in delayed intervention responses and low resource utilization efficiency.

Method used

An image recognition-based approach is adopted, which improves the CPSeg semantic segmentation network for multi-angle image acquisition and preprocessing, and combines it with a weighted evidence fusion network to achieve dynamic adjustment and automatic closed-loop feedback of feed formulation, and output individual/group nutritional responses.

Benefits of technology

It significantly improved the detection rate and segmentation repeatability of early risk of fatty liver in laying hens, realized the scientific nature and traceability of risk quantification, and improved health risk management and resource utilization efficiency through individualized feed formulation optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121543989A_ABST
    Figure CN121543989A_ABST
Patent Text Reader

Abstract

The invention discloses a feed blending method for preventing and treating fatty liver syndrome of laying hens based on image recognition. The method comprises the following steps: obtaining a calibration image data set; mapping into a prompt vector set through an embedding layer; inputting the calibration image data set and the prompt vector set into the improved CPSeg semantic segmentation network to form a prompt segmentation result set; generating a standardized body feature matrix; inputting the standardized body shape feature matrix into a weighted evidence fusion network to form a scoring result set; according to the scoring result set, the protein interval, the energy interval and the vitamin interval, constructing a feed formula multi-objective optimization model; and obtaining a group-level differential feed formula scheme according with energy balance, protein balance and vitamin balance, and distributing the group-level differential feed formula scheme to an actual feeding system. According to the invention, dynamic adjustment, automatic closed-loop feedback and real-time individual / group nutrition response can be realized, and the health risk management and resource utilization efficiency is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of feed formulation technology, and in particular to a feed formulation method for preventing fatty liver syndrome in laying hens based on image recognition. Background Technology

[0002] As the livestock and poultry farming industry develops towards intensification and intelligence, the health management and refined nutritional regulation of laying hens have increasingly become the focus of industry attention. In the fields of screening for fatty liver in laying hens and feed formulation, existing technologies mostly rely on manual visual inspection of body condition, experience-based intervention in feeding, or coarse-grained detection of laying hen phenotypes based on conventional image segmentation algorithms.

[0003] In non-invasive indoor environments with complex lighting and varying postures, conventional semantic segmentation algorithms can typically only identify large areas or typical abnormalities on the body surface, making it difficult to achieve high sensitivity and repeatability in detecting subtle structural changes in the early phenotype of fatty liver. Existing methods lack body shape, risk quantification, and interpretability indicators for different risk levels in laying hens, failing to provide fine-grained quantitative assessments of early fatty liver risk. Traditional feed formulations are mostly based on empirical rules or static range settings, failing to link individualized body shape and health risk characteristics to precise nutritional regulation, resulting in a disconnect between the "detection-decision-intervention" stages, leading to delayed response and difficulty in closed-loop verification of intervention measures. Summary of the Invention

[0004] One objective of this invention is to propose a feed formulation method for preventing fatty liver syndrome in laying hens based on image recognition. This invention can achieve dynamic adjustment, automatic closed-loop feedback, and real-time individual / group nutritional response, significantly improving health risk management and resource utilization efficiency.

[0005] A feed formulation method for preventing fatty liver syndrome in laying hens based on image recognition, according to an embodiment of the present invention, includes:

[0006] Multi-angle visible light images of laying hens were simultaneously acquired in their natural rearing environment and preprocessed to obtain a calibration image dataset.

[0007] The language prompts for subcutaneous fat band, abdominal boundary and fat cyst focal area in laying hens are called from the preset early phenotypic prompt word library and mapped into a set of prompt vectors through the embedding layer.

[0008] The calibration image dataset and the cue vector set are input into the improved CPSeg semantic segmentation network. The cue vectors are activated in the backbone network and attention path, guiding the improved CPSeg semantic segmentation network to output the semantic mask map of the target part, the morphological boundary map and the corresponding uncertainty map, forming the cue segmentation result set.

[0009] Based on the segmentation results set, calculate the thickness of subcutaneous fat region, abdominal curvature, and abdominal area ratio to generate a standardized body shape feature matrix;

[0010] The standardized body shape feature matrix is ​​input into the weighted evidence fusion network, which outputs body shape score and early risk score of fatty liver, and simultaneously outputs the contribution weight information of each body shape feature to the early risk score of fatty liver, forming a score result set.

[0011] Based on the scoring result set, protein range, energy range, and vitamin range, a multi-objective optimization model for feed formulation is constructed.

[0012] In the multi-objective optimization model of feed formulation, integer-real number mixed programming is performed to obtain a group-level differentiated feed formulation scheme that meets the requirements of energy balance, protein balance and vitamin balance, and the group-level differentiated feed formulation scheme is allocated to the actual feeding system.

[0013] Optionally, the acquisition and preprocessing of multi-angle visible light images of laying hens includes:

[0014] In the natural rearing environment of laying hens, several visible light cameras are set up according to preset azimuth and elevation angles. Using a unified hardware clock, multi-angle synchronous image acquisition of laying hens is carried out to obtain raw images.

[0015] After acquiring the original images, illumination correction is performed on each frame to obtain a normalized image;

[0016] By detecting the corner points of the reference ruler target on the normalized image, and calculating the homography matrix based on the spatial correspondence of the corner points, the pixel coordinates are linearly transformed using the homography matrix to obtain the pose normalized image.

[0017] In the pose-normalized image, measure the pixel length corresponding to the reference ruler target, and divide the physical length of the reference ruler target by the measured pixel length to obtain the scale factor.

[0018] The pose-normalized images output by all cameras are synchronized according to the timestamp t to construct a calibration image dataset.

[0019] Optionally, the mapping to a set of cue vectors through the embedding layer includes:

[0020] Construct a pre-defined lexicon of early fatty liver phenotypes;

[0021] The language prompts describing the subcutaneous fat zone of laying hens, the abdominal shape boundary of laying hens, and the fat sac focal area of ​​laying hens are called from the prompt word library respectively, and then input into the embedding layer in sequence. The embedding layer converts each language prompt word into a prompt vector according to the preset vector dimension.

[0022] Perform vector normalization on each prompt vector separately, and combine all the normalized prompt vectors into a normalized prompt vector set.

[0023] Optionally, the improved CPSeg semantic segmentation network includes:

[0024] The pose-normalized image acquired by the i-th camera in the calibration image dataset at time t is used as the current input image, and the corresponding scale factor is used as the current scale parameter.

[0025] The current input image is input into the backbone feature extraction path of the improved CPSeg semantic segmentation network to obtain the feature mapping result. Each normalized cue vector is input into the cue kernel generator to obtain the cue convolution kernel adapted to the topic. The cue convolution kernel is then used to perform conditional convolution operation on the feature mapping result to obtain the preliminary segmentation mask image.

[0026] Based on the physical scale consistency of the screening theme for fatty liver in laying hens, a millimeter-level cue perception radius was set for each target area, and a pixel-level dilation rate was calculated. Morphological smoothing was performed on each preliminary segmentation mask image using the pixel-level dilation rate as the structural scale to obtain the area segmentation mask image.

[0027] Calculate the similarity between the segmentation mask image of each part and its corresponding normalized cue vector to obtain the cue attention score, and obtain the cue gating coefficient through the Sigmoid activation function;

[0028] Based on the directional consistency of the abdominal contour of the laying hen, the orientation field of each part is predicted from the segmentation mask image. The orientation field of the part is used to construct an anisotropic metric tensor. An anisotropic terrain transformation is performed on the segmentation mask image of each part under the constraint of the anisotropic metric tensor to obtain the optimized semantic segmentation probability map.

[0029] The semantic segmentation probability map after anisotropic optimization is modulated with the cue gating coefficient to obtain cue activation features, and cue log odds are generated from the cue activation features through linear transformation.

[0030] Based on the log-odds, we introduce boundary smoothing regularization terms and thickness prior regularization terms related to scale parameters to constrain the boundary rate of change and local thickness deviation, respectively, and obtain the quantitative constrained log-odds.

[0031] The Softmax operation is performed synchronously on the log-probability of the measurement constraints for all target parts to obtain the pixel-level probability of each pixel belonging to different target parts, which is used to describe the segmentation confidence distribution of each target part.

[0032] Based on pixel-level probabilities, a threshold discrimination method is used to obtain the semantic mask map of the target part, and at the same time, a morphological boundary map is generated based on the spatial gradient of pixel-level probabilities.

[0033] Uncertainty decomposition is performed on pixel-level probabilities, and entropy uncertainty based on pixel probability entropy and variance uncertainty based on multiple random forward inference results are calculated separately. The entropy uncertainty and variance uncertainty are linearly fused according to weights to obtain the final uncertainty map.

[0034] The semantic mask map, morphological boundary map and uncertainty map of all target parts are combined according to the target part and camera number, and synchronized with timestamps to form a prompt segmentation result set.

[0035] Optionally, generating the standardized body shape feature matrix includes:

[0036] Based on the prompting segmentation result set, the number of pixels in the subcutaneous fat band mask of each vertical scan line is counted, and the local thickness is obtained by multiplying it with the scale factor. The average local thickness of all scan lines is taken as the thickness feature value of the subcutaneous fat region of laying hens.

[0037] Based on the prompt segmentation result set, a boundary extraction algorithm is used to obtain the set of abdominal boundary points. After sorting the set of abdominal boundary points, the pixel-scale curvature of each point is calculated using second-order finite difference and converted into physical scale curvature. The mean of the physical scale curvature of all boundary points is taken to obtain the abdominal curvature feature.

[0038] Based on the prompt segmentation result set, the number of pixels belonging to the abdominal region of laying hens is counted in the semantic mask map of the abdominal region, and the number of effective pixels in the whole image is counted. The ratio of the number of pixels in the abdominal region to the number of effective pixels in the whole image is used as the abdominal area proportion feature.

[0039] The thickness of subcutaneous fat region in laying hens, abdominal curvature, and abdominal area ratio are combined into a feature set. The feature set is then standardized to obtain standardized features.

[0040] A standardized body shape feature matrix is ​​constructed by combining the standardized features obtained from all camera numbers and all timestamps.

[0041] Optionally, forming the scoring result set includes:

[0042] In the weighted evidence fusion network, a pre-defined nonlinear transformation function is used to perform feature fusion processing on the standardized body shape feature matrix to form a fusion feature vector. The fusion feature vector is then weighted and summed with the weight vectors of the body shape score output and the weight vectors of the risk score output, and a linear bias term is added to each. The Sigmoid activation function is used to output the body shape score and the early risk score of fatty liver as a score value between 0 and 1.

[0043] In the process of generating an early risk score for fatty liver using a weighted evidence fusion network, the normalized gradient response value of each feature channel in the fused feature vector to the early risk score for fatty liver is calculated separately.

[0044] The body shape scores, early fatty liver risk scores, and their respective normalized gradient response values ​​obtained under all camera numbers and timestamps are arranged according to the combination of timestamps and camera numbers to construct a score result set.

[0045] Optionally, the multi-objective optimization model for feed formulation includes:

[0046] Construct a vector of feed nutrition variables including daily energy intake, crude protein intake, and the intake of various vitamins or functional additives;

[0047] Establish a regulatory mapping relationship between the normalized gradient response value of each individual and feed nutrient variables to construct a sensitive term for fatty liver induction.

[0048] We construct body shape optimization constraints by subtracting the square of the body shape score from the result.

[0049] By weighting and summing the results of the fatty liver induction sensitivity term and the body shape optimization constraint term, and adding the daily formula cost corresponding to the current combination of feed nutrient variables, a multi-objective optimization model for feed formulation is obtained.

[0050] In the process of optimizing the multi-objective optimization model of feed formulation, the constraints that each component of the feed nutrient variable vector must satisfy are set by combining the protein range, energy range, and intake restriction range of each type of vitamin and functional additive, thus obtaining the nutrient variable constraint set.

[0051] Optionally, obtaining a population-level differentiated feed formulation scheme that meets energy balance, protein balance, and vitamin balance includes:

[0052] Based on the early risk score of fatty liver and body size score of each individual laying hen in the scoring results, all laying hens were grouped using a two-dimensional partitioning strategy, and were divided into high-risk group, medium-risk group and low-risk group.

[0053] For high-risk, medium-risk and low-risk groups, the multi-objective optimization model of feed formulation and the set of nutritional variable constraints are called respectively. The average score result set and gradient response value of laying hens in the group are used to update the group-level formulation optimization parameters. The multi-objective optimization function of feed formulation for each group is established respectively.

[0054] For each group's feed formulation multi-objective optimization function and nutrient variable constraint set, an integer-real number hybrid programming solution model is constructed. The optimal combination of feed nutrient variables for the high-risk group, medium-risk group and low-risk group is solved by linear programming algorithm to obtain the optimal combination of feed formulation variables for each group.

[0055] Based on the optimal combination of feed formulation variables for each group, output the group-level differentiated feed formulation schemes for high-risk, medium-risk, and low-risk groups.

[0056] The differentiated feed formulation schemes for high-risk, medium-risk, and low-risk groups are numbered and mapped to the three groups to generate a group feed allocation instruction table, which is then uploaded to the feeding system interface to complete the automated feeding task.

[0057] Optionally, the grouping rules of the two-dimensional partitioning strategy are as follows:

[0058] The high-risk group consists of laying hens with an early fatty liver risk score greater than or equal to the first risk threshold and a body size score less than or equal to the first body size threshold.

[0059] The medium-risk group consists of laying hens whose early risk score for fatty liver is between the first and second risk thresholds, or whose body size score is between the first and second body size thresholds.

[0060] The low-risk group consists of laying hens whose early fatty liver risk score is less than the second risk threshold and whose body size score is greater than or equal to the second body size threshold.

[0061] Optionally, the group-level differentiated feed formulation schemes for the high-risk group, medium-risk group, and low-risk group include:

[0062] The group-level differentiated feed formulation for the high-risk group is to control the energy supply in the low range, the protein supply is higher than the conventional benchmark, and add high levels of Yin Chen Ze Xie San, choline, antioxidants, bile acids and vitamin E.

[0063] The group-level differentiated feed formulation for the medium-risk group is to maintain a balance between energy and protein, with a moderate proportion of vitamins and functional additives, and to focus on controlling the intake of oily raw materials and balancing the amino acid composition.

[0064] The group-level differentiated feed formulation scheme for the low-risk group maintains the standard formula, while appropriately reducing the amount of functional additives and high-cost components.

[0065] The beneficial effects of this invention are:

[0066] (1) This invention achieves high-resolution interpretable segmentation and quantitative index output of early phenotype of fatty liver in laying hens. It embeds professional prompt words for multiple sites (subcutaneous fat zone, abdominal boundary, and fat cyst focus area) into the semantic segmentation backbone network. Through adaptive prompt convolution kernel and scale receptive field regulation mechanism, combined with physical scale calibration and anisotropic modulation, it achieves structural enhancement of millimeter-level thickness, boundary continuity and density. Through morphological processing and orientation field optimization, it outputs quantitative indicators such as thickness, curvature and area ratio, and simultaneously generates segmentation confidence and pixel-level uncertainty map, which significantly improves the detection rate and segmentation repeatability of early fatty liver risk areas.

[0067] (2) This invention constructs a body type-risk score fusion and attribution sensitivity quantification mechanism to improve the scientific nature and source tracing ability of risk quantification. It designs a weighted evidence fusion network, inputs standardized body type features into the deep feature fusion and scoring module, realizes the hierarchical output of body type score and early risk score of fatty liver, and quantitatively reveals the contribution sensitivity of each structural feature to the risk score of fatty liver through normalized gradient response analysis, so that the risk score can not only quantify the current state, but also trace the source of risk.

[0068] (3) This invention directly links body shape score, early risk score of fatty liver and its gradient sensitivity to feed formulation optimization. Through integer-real number mixed programming, the risk sensitivity item driven by the score, the body shape compensation item and the feed formulation cost function are organically integrated to achieve precise control of energy, protein and vitamin nutritional components of high, medium and low risk groups. It outputs group-level differentiated feed formulation and automatically maps it to the feeding system. It can realize dynamic adjustment, automatic closed-loop feedback and real-time individual / group nutritional response, which significantly improves health risk management and resource utilization efficiency. Attached Figure Description

[0069] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0070] Figure 1 This is a flowchart of a feed formulation method for preventing fatty liver syndrome in laying hens based on image recognition, as proposed in this invention.

[0071] Figure 2 This is a structural block diagram of the improved CPSeg semantic segmentation network in a feed formulation method for preventing fatty liver syndrome in laying hens based on image recognition proposed in this invention. Detailed Implementation

[0072] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0073] refer to Figure 1 As shown in Example 1: A feed formulation method for preventing fatty liver syndrome in laying hens based on image recognition, comprising:

[0074] Multi-angle visible light images of laying hens were simultaneously acquired in their natural rearing environment and preprocessed to obtain a calibration image dataset.

[0075] In this embodiment, the acquisition and preprocessing of multi-angle visible light images of laying hens includes:

[0076] In the natural rearing environment of laying hens, several visible light cameras are set up according to preset azimuth and elevation angles. Using a unified hardware clock, multi-angle synchronous image acquisition of laying hens is carried out to obtain raw images.

[0077] A reference ruler and target are placed in the center of the field of view of each camera. The physical length of the reference ruler and target is in millimeters. When acquiring images, ensure that the reference ruler and target and the abdomen of the laying hen being photographed are on the same plane.

[0078] After acquiring the original images, illumination correction is performed on each frame to obtain a normalized image;

[0079] In Example 1, the illumination correction method is as follows: subtract the minimum pixel intensity in the frame image from the original pixel intensity of each pixel in the current frame image, divide the result by the difference between the maximum and minimum pixel intensities in the frame image, and multiply the normalized result by 255 to obtain the normalized pixel intensity.

[0080] By detecting the corner points of the reference ruler target on the normalized image, and calculating the homography matrix based on the spatial correspondence of the corner points, the pixel coordinates are linearly transformed using the homography matrix to obtain the pose normalized image.

[0081] The four corner points of the reference target are detected on the normalized image, and their four pixel coordinates in the image are obtained respectively. A one-to-one correspondence is established between the four pixel coordinates and the coordinates of four known reference points on the actual physical plane of the reference target. Based on this set of known spatial correspondence points, the mathematical principle of perspective transformation is adopted, and the least squares algorithm is used to calculate the 3x3 homography matrix describing the projection transformation relationship between pixel coordinates and physical reference coordinates. The homography matrix is ​​used to perform a linear projection transformation on all pixel coordinates [x,y,1] of the normalized image to obtain new pixel coordinates [x',y',1], generating a posture normalized image. The image maintains the same scale and angle as the actual hen's abdominal plane and the reference target in spatial geometry.

[0082] In the pose-normalized image, measure the pixel length corresponding to the reference ruler target, and divide the physical length of the reference ruler target by the measured pixel length to obtain the scale factor.

[0083] The pose-normalized images output by all cameras are synchronized according to the timestamp t to construct a calibration image dataset.

[0084] The calibration image dataset consists of the following: the pose-normalized image acquired by the i-th camera at time t, the scale factor corresponding to the image, and the corresponding homography matrix H, where i takes values ​​from 1 to n.

[0085] The language prompts for subcutaneous fat band, abdominal boundary and fat cyst focal area in laying hens are called from the preset early phenotypic prompt word library and mapped into a set of prompt vectors through the embedding layer.

[0086] In this embodiment, the step of mapping to a set of cue vectors through the embedding layer includes:

[0087] Construct a pre-defined lexicon of early fatty liver phenotypes;

[0088] The cue word library consists of language cue words describing the subcutaneous fat zone of laying hens, language cue words describing the outer boundary of the abdominal shape of laying hens, and language cue words describing the focal area of ​​the fat cyst in laying hens. Each type of language cue word is obtained by experts through manual annotation and summarization of authoritative industry literature based on the clinical phenotype of fatty liver in laying hens and veterinary professional knowledge. It is used to uniquely and clearly indicate specific body surface areas related to the early risk of fatty liver in laying hens.

[0089] The language prompts describing the subcutaneous fat zone of laying hens, the abdominal shape boundary of laying hens, and the fat sac focal area of ​​laying hens are called from the prompt word library respectively, and then input into the embedding layer in sequence. The embedding layer converts each language prompt word into a prompt vector according to the preset vector dimension.

[0090] In Example 1, each language prompt word is sequentially input into the embedding layer. The embedding layer vectorizes each language prompt word according to the preset vector dimension requirements, converting each language prompt word into a unique prompt vector. The prompt vector is used to express the semantic part of interest corresponding to the language prompt word.

[0091] Perform vector normalization on each prompt vector separately, and combine all the normalized prompt vectors into a normalized prompt vector set.

[0092] The calibration image dataset and the cue vector set are input into the improved CPSeg semantic segmentation network. The cue vectors are activated in the backbone network and attention path, guiding the improved CPSeg semantic segmentation network to output the semantic mask map of the target part, the morphological boundary map and the corresponding uncertainty map, forming the cue segmentation result set.

[0093] refer to Figure 2 As shown, in this embodiment, the improved CPSeg semantic segmentation network includes:

[0094] The pose-normalized image acquired by the i-th camera in the calibration image dataset at time t is used as the current input image, and the corresponding scale factor is used as the current scale parameter.

[0095] The current input image is input into the backbone feature extraction path of the improved CPSeg semantic segmentation network to obtain the feature mapping result. Each normalized cue vector is input into the cue kernel generator to obtain the cue convolution kernel adapted to the topic. The cue convolution kernel is then used to perform conditional convolution operation on the feature mapping result to obtain the preliminary segmentation mask image.

[0096] Based on the physical scale consistency of the screening theme for fatty liver in laying hens, a millimeter-level cue perception radius was set for each target area, and a pixel-level dilation rate was calculated. Morphological smoothing was performed on each preliminary segmentation mask image using the pixel-level dilation rate as the structural scale to obtain the area segmentation mask image.

[0097] Divide the cue perception radius by the current scale parameter and round down to obtain the pixel-level dilation rate; morphological smoothing operation is used to enhance the millimeter-scale thickness sensitivity features of the subcutaneous fat band, the millimeter-scale continuity features of the abdominal shape boundary, and the millimeter-scale density features of the fat cyst focal area.

[0098] ;

[0099] in, Indicates the first Each camera at any time Next, regarding the first The initial segmentation mask obtained from the indicated areas (subcutaneous fat zone of laying hens, abdominal boundary, and fat cyst focal area). The part segmentation mask image obtained after morphological processing, the part segmentation mask image in spatial coordinates A value of 1 indicates that the element belongs to that semantic region; otherwise, it is 0. The subscripts represent morphological processing operators, including erosion, dilation, opening, and closing operations. Indicates that for the first The camera and the first The morphological structural parameters of each prompting region are adaptively set based on the actual spatial scale, boundary complexity, and noise level of the target region in the laying hen image. This step removes isolated noise during the segmentation process and fills in small gaps in the region mask, making the segmentation of regions related to fatty liver risk in laying hens more coherent and realistic.

[0100] Calculate the similarity between the segmentation mask image of each part and its corresponding normalized cue vector to obtain the cue attention score, and obtain the cue gating coefficient through the Sigmoid activation function;

[0101] In Example 1, the part segmentation mask image and the corresponding normalized cue vector are multiplied element-wise along the same dimension and then summed. The summation result is used to measure the semantic matching degree of the pixel position in the overall feature dimension. The semantic matching result is the cue attention score. The cue attention score is input into the Sigmoid activation function. The Sigmoid activation function is used to compress the value range of the cue attention score to 0 to 1. The compressed result is used as the cue gating coefficient. The cue gating coefficient is used to adjust the activation degree of the corresponding part in the feature path, so that the subcutaneous fat band of the laying hen, the outer boundary of the laying hen's abdomen, and the fat sac focal area of ​​the laying hen can achieve differentiated responses under the drive of their respective cue vectors.

[0102] Based on the directional consistency of the abdominal contour of the laying hen, the orientation field of each part is predicted from the segmentation mask image. The orientation field of the part is used to construct an anisotropic metric tensor. An anisotropic terrain transformation is performed on the segmentation mask image of each part under the constraint of the anisotropic metric tensor to obtain the optimized semantic segmentation probability map.

[0103] ;

[0104] ;

[0105] in, Indicates at time At that time, the first The first image of an egg-laying hen taken by a camera. Anisotropic metric tensor of a region of interest at pixel coordinates (x, y) Represents the identity matrix. Indicates the first The anisotropic modulation intensity hyperparameter of each region of interest is used to control the adjustment of orientation sensitivity when different parts of the laying hen are split. Indicates pixel coordinates Place, No. The first image of an egg-laying hen taken by a camera. Spatial gradient of the semantic boundary phase field of a region of interest. The squared L2 norm of the spatial gradient Represents a small positive constant. Represents the first [unit] after anisotropic modulation. The camera was used to observe the laying hens. Pixels of the area of ​​interest The optimized semantic segmentation probability map reflects the segmentation response probability after structural adaptation. This represents the divergence operator.

[0106] The semantic segmentation probability map after anisotropic optimization is modulated with the cue gating coefficient to obtain cue activation features, and cue log odds are generated from the cue activation features through linear transformation.

[0107] In Example 1, the cue gating coefficient is multiplied element-wise with the anisotropic optimized semantic segmentation probability map to obtain the cue activation feature. This cue activation feature is spatially preserved or enhanced only in regions highly correlated with the cue vector, while other regions are suppressed. The feature vector at each spatial location of the cue activation feature is then multiplied with the linear weight vector of that location, and a linear bias term is added to obtain the cue log odds. The cue log odds are used to quantitatively measure the confidence strength that the spatial location belongs to a specific target region, and are correlated with the optimized semantic segmentation probability. Figure 1 One-to-one correspondence.

[0108] Based on the log-odds, we introduce boundary smoothing regularization terms and thickness prior regularization terms related to scale parameters to constrain the boundary rate of change and local thickness deviation, respectively, and obtain the quantitative constrained log-odds.

[0109] ;

[0110] in, Indicates the first Each camera at any time The image was captured and output by the improved CPSeg semantic segmentation network. Target areas (subcutaneous fat zone in laying hens, abdominal boundary, and fat sac focal area) in pixel coordinates The regularized semantic segmentation response value at the given point is the constrained log-odds ratio. Indicates the first Each camera at any time The original improved CPSeg semantic segmentation network was captured in the first... Target area, pixel coordinates The log-odds ratio of the semantic segmentation output at the location. Indicates the first Gradient sparsity adjustment coefficient for segmentation response of target-type regions. Indicates the first The scale factor of each camera calibration image, in units of pixel It is used to map the pixel space segmentation results to the actual physical scale of the laying hen's body surface. For the first Each camera at any time Shooting prompts logarithmic odds In pixel coordinates The sum of the absolute values ​​of the gradients at each point represents the boundary smoothing regularization term. Indicates the first The area normalization adjustment coefficient of the segmentation response of the target region. For the first Each camera at any time Shooting, targeting the The segmentation mask of the target part and its standard reference mask in pixel coordinates The area difference value at a given location represents the thickness prior regularization term. For the first The reference physical scale radius of the target part represents the expected or standard radius of the target part on the surface of the laying hen in the actual physical space, so as to achieve the comparability of the segmentation scale between different parts.

[0111] The Softmax operation is performed synchronously on the log-probability of the measurement constraints for all target parts to obtain the pixel-level probability of each pixel belonging to different target parts, which is used to describe the segmentation confidence distribution of each target part.

[0112] Based on pixel-level probabilities, a threshold discrimination method is used to obtain the semantic mask map of the target part, and at the same time, a morphological boundary map is generated based on the spatial gradient of pixel-level probabilities.

[0113] In Example 1, based on pixel-level probabilities, for each pixel, its category with the highest probability among all target parts is determined. If the highest probability exceeds the discrimination threshold of the corresponding target part, the corresponding pixel is marked as the mask of the current target part; otherwise, it is marked as a non-target part region. Thus, a pixel-level target part semantic mask map is generated for each target part. The target part semantic mask map is used to clearly distinguish the pixel belonging relationships of target regions such as the subcutaneous fat band of the laying hen, the abdominal outer boundary, and the fat sac focal area. At the same time, the absolute value of the first-order gradient of the pixel-level probability distribution of each pixel on the spatial coordinates is calculated. The response of the spatial gradient is nonlinearly mapped through the boundary enhancement function to obtain a pixel boundary intensity map. The pixel boundary intensity map is then binarized with a set boundary response threshold to obtain a morphological boundary map. The morphological boundary map is used to accurately depict the edge and local structural details of the target part.

[0114] Uncertainty decomposition is performed on pixel-level probabilities, and entropy uncertainty based on pixel probability entropy and variance uncertainty based on multiple random forward inference results are calculated separately. The entropy uncertainty and variance uncertainty are linearly fused according to weights to obtain the final uncertainty map.

[0115] In Example 1, the pixel probability entropy of each pixel is calculated based on the pixel-level probability of each pixel in the three target locations. The pixel probability entropy is used as the entropy-type uncertainty. The pixel probability entropy is obtained by taking the natural logarithm of the pixel-level probability of each pixel in the three target locations, summing the product of each pixel-level probability and its natural logarithm, and taking the negative of the summation result. The pixel probability entropy is used to measure the uncertainty of the current pixel in the category distribution.

[0116] While maintaining consistency between the cue vector and the feature path, K random forward inferences are performed on the current input image to obtain K sets of pixel-level probabilities. Variance uncertainty is then calculated using these K sets of pixel-level probabilities. The variance uncertainty is obtained by calculating the average of the K sets of pixel-level probabilities, summing the squared differences between each set of pixel-level probabilities and the average, and then dividing the sum by K. Variance uncertainty measures the instability of the model under random forward inference conditions. The final uncertainty map reflects the overall confidence level of each pixel in cue segmentation.

[0117] The semantic mask map, morphological boundary map and uncertainty map of all target parts are combined according to the target part and camera number, and synchronized with timestamps to form a prompt segmentation result set.

[0118] In Example 1, the semantic mask map, morphological boundary map and uncertainty map of all camera numbers and all target parts under the same timestamp are combined to construct a prompt segmentation result set indexed by timestamp. The prompt segmentation result set completely records the segmentation results of each target part, each camera number and each time point.

[0119] Based on the segmentation results set, calculate the thickness of subcutaneous fat region, abdominal curvature, and abdominal area ratio to generate a standardized body shape feature matrix;

[0120] In this embodiment, generating the standardized body shape feature matrix includes:

[0121] Based on the prompting segmentation result set, the number of pixels in the subcutaneous fat band mask of each vertical scan line is counted, and the local thickness is obtained by multiplying it with the scale factor. The average local thickness of all scan lines is taken as the thickness feature value of the subcutaneous fat region of laying hens.

[0122] In Example 1, based on the prompting segmentation result set, for each scan line that is vertical to the abdomen of the laying hen, the number of pixels belonging to the subcutaneous fat zone in the semantic mask image of the subcutaneous fat zone is counted. The number of pixels belonging to the subcutaneous fat zone is multiplied by the scale factor in the calibration image dataset to obtain the local thickness of the subcutaneous fat zone at the real physical scale. The physical scale value of the thickness corresponding to all scan lines is averaged to obtain the thickness feature value of the subcutaneous fat region of the laying hen. The thickness feature value of the subcutaneous fat region of the laying hen is used to quantify the degree of subcutaneous fat deposition in the laying hen.

[0123] Based on the prompt segmentation result set, a boundary extraction algorithm is used to obtain the set of abdominal boundary points. After sorting the set of abdominal boundary points, the pixel-scale curvature of each point is calculated using second-order finite difference and converted into physical scale curvature. The mean of the physical scale curvature of all boundary points is taken to obtain the abdominal curvature feature.

[0124] In Example 1, based on the prompting segmentation result set, a boundary extraction algorithm is used to obtain the set of abdominal boundary points in the abdominal shape boundary map. The set of abdominal boundary points is sorted in spatial order, and the first and second derivatives of each abdominal boundary point are calculated using the second-order finite difference method to obtain the pixel-scale curvature. The pixel-scale curvature is converted into the actual physical scale curvature by combining the scale factor in the calibration image dataset. The average of the physical scale curvature of all abdominal boundary points is taken to obtain the abdominal curvature feature. The abdominal curvature feature is used to quantify the degree of curvature and structural changes of the abdominal shape of the laying hen.

[0125] ;

[0126] in, The first derivative at the boundary point, It is the second derivative. The curvature is at the pixel scale.

[0127] Based on the prompt segmentation result set, the number of pixels belonging to the abdominal region of laying hens is counted in the semantic mask map of the abdominal region, and the number of effective pixels in the whole image is counted. The ratio of the number of pixels in the abdominal region to the number of effective pixels in the whole image is used as the abdominal area proportion feature.

[0128] The abdominal area proportion feature is used to quantify the proportion of the abdominal region of laying hens in the overall field of view.

[0129] The feature set is composed of the thickness of the subcutaneous fat region of laying hens, the curvature of the abdomen, and the proportion of the abdominal area. The feature set is then standardized to obtain standardized features.

[0130] A standardized body shape feature matrix is ​​constructed by combining the standardized features obtained from all camera numbers and all timestamps.

[0131] The standardized body shape feature matrix is ​​input into the weighted evidence fusion network, which outputs body shape score and early risk score of fatty liver, and simultaneously outputs the contribution weight information of each body shape feature to the early risk score of fatty liver, forming a score result set.

[0132] In this embodiment, forming the scoring result set includes:

[0133] In the weighted evidence fusion network, a pre-defined nonlinear transformation function is used to perform feature fusion processing on the standardized body shape feature matrix to form a fusion feature vector. The fusion feature vector is then weighted and summed with the weight vectors of the body shape score output and the weight vectors of the risk score output, and a linear bias term is added to each. The Sigmoid activation function is used to output the body shape score and the early risk score of fatty liver as a score value between 0 and 1.

[0134] In Example 1, the weighted evidence fusion network includes:

[0135] The feature input module is used to receive the standardized body shape feature matrix.

[0136] The feature fusion module is used to perform multi-channel nonlinear fusion operations on the standardized body shape feature matrix. That is, the standardized body shape feature matrix is ​​used as input, and through the nonlinear transformation function and network parameters in the feature fusion module, the thickness feature value of the subcutaneous fat region of laying hens, the abdominal curvature feature, and the abdominal area ratio feature are mapped and transformed in multiple layers to obtain the fused feature vector.

[0137] The scoring output module is used to perform linear mapping and Sigmoid activation function processing on the fused feature vector. Specifically, the fused feature vector is multiplied by the body shape score weight vector, a linear bias term is added, and the result is transformed by the Sigmoid activation function to output the body shape score. The fused feature vector is multiplied by the early risk score weight vector of fatty liver, a linear bias term is added, and the result is transformed by the Sigmoid activation function to output the early risk score of fatty liver. The body shape score is used to quantitatively reflect the current body shape health status of laying hens, and the early risk score of fatty liver is used to quantitatively reflect the risk level of fatty liver in laying hens.

[0138] The feature contribution weight generation module is used to calculate the normalized gradient response value of each body shape feature to the early risk score of fatty liver.

[0139] The scoring output interface module is used to output body shape score, early fatty liver risk score and all feature contribution weights to the feed formulation optimization module. Body shape score serves as a quantitative input of the health status of laying hens, early fatty liver risk score serves as a quantitative input of the risk level of fatty liver in laying hens, and all feature contribution weights are used to guide the differentiated regulation of each nutrient component in the feed formulation optimization module to achieve precise linkage between nutrient formulation and laying hen health risk.

[0140] In the process of generating an early risk score for fatty liver using a weighted evidence fusion network, the normalized gradient response value of each feature channel in the fused feature vector to the early risk score for fatty liver is calculated separately.

[0141] The normalized gradient response value is used to measure the quantitative influence of this feature channel on the early risk score of fatty liver. The numerical unit of each normalized gradient response value is consistent with the reciprocal of its corresponding feature. The normalized gradient response value corresponds one-to-one with the characteristics of subcutaneous fat region thickness, abdominal curvature, and abdominal area ratio in laying hens.

[0142] ;

[0143] in, For the first The first feature (corresponding to subcutaneous fat area thickness, abdominal curvature, or abdominal area percentage) in the 1st One camera, moment The local sensitivity value under the given condition represents the normalized gradient response value. This represents the early risk score of fatty liver in the laying hen corresponding to the i-th camera at time t. , Indicates the first Each camera at any time Next, the The value of a standardized body shape feature, when hour, Standardized values ​​representing the thickness characteristics of the subcutaneous fat region in laying hens, when hour, The standardized value representing the abdominal curvature characteristic of laying hens, when hour, Standardized values ​​representing the percentage of abdominal area in laying hens.

[0144] The body shape scores, early fatty liver risk scores, and their respective normalized gradient response values ​​obtained under all camera numbers and timestamps are arranged according to the combination of timestamps and camera numbers to construct a score result set.

[0145] The scoring results set records the body shape score, early risk score of fatty liver, and normalized gradient response values ​​of the thickness of subcutaneous fat region, abdominal curvature, and abdominal area ratio of laying hens to the early risk score of fatty liver at each time point and under each camera.

[0146] Based on the scoring result set, protein range, energy range, and vitamin range, a multi-objective optimization model for feed formulation is constructed.

[0147] In this embodiment, the multi-objective optimization model for feed formulation includes:

[0148] Construct a vector of feed nutrition variables including daily energy intake, crude protein intake, and the intake of various vitamins or functional additives;

[0149] Daily feed intake energy is measured in kcal per animal per day, crude protein is measured in grams per animal per day, and the intake of various vitamins or functional additives is measured in milligrams per animal per day.

[0150] Establish a regulatory mapping relationship between the normalized gradient response value of each individual and feed nutrient variables to construct a sensitive term for fatty liver induction.

[0151] In Example 1, a regulatory mapping relationship was established between the normalized gradient response values ​​corresponding to the subcutaneous fat region thickness, abdominal curvature, and abdominal area ratio of each individual laying hen at time t and the components of the feed nutrient variable vector to construct a fatty liver induction sensitivity term. The specific values ​​of the fatty liver induction sensitivity term are as follows: the early risk score of fatty liver is used as the weight, each normalized gradient response value is used as the sensitivity adjustment factor, and the absolute value of the difference between the feed nutrient variable and the reference intake level of healthy laying hens is taken.

[0152] ;

[0153] in, Indicates the relationship with the first Feed nutrient variables associated with individual phenotype traits Provide a reference for the intake of dietary nutrients in healthy individual laying hens. It is a sensitive factor in the induction of fatty liver.

[0154] We construct body shape optimization constraints by subtracting the square of the body shape score from the result.

[0155] The body shape optimization constraint is used to quantify the degree to which the current body shape score of laying hens deviates from the state of healthy body shape. The closer the body shape score is to one, the smaller the value of the body shape optimization constraint.

[0156] By weighting and summing the results of the fatty liver induction sensitivity term and the body shape optimization constraint term, and adding the daily formula cost corresponding to the current combination of feed nutrient variables, a multi-objective optimization model for feed formulation is obtained.

[0157] In the process of optimizing the multi-objective optimization model of feed formulation, the constraints that each component of the feed nutrient variable vector must satisfy are set by combining the protein range, energy range, and intake restriction range of each type of vitamin and functional additive, thus obtaining the nutrient variable constraint set.

[0158] The protein range is defined by the minimum and maximum values ​​of crude protein supply, the energy range is defined by the minimum and maximum values ​​of daily feed energy supply, and the intake range of each type of vitamin or functional additive is defined by the minimum and maximum supply of the component. All feed nutrient variables must simultaneously meet the corresponding range constraints.

[0159] In the multi-objective optimization model of feed formulation, integer-real number mixed programming is performed to obtain a group-level differentiated feed formulation scheme that meets the requirements of energy balance, protein balance and vitamin balance, and the group-level differentiated feed formulation scheme is allocated to the actual feeding system.

[0160] In this embodiment, obtaining a population-level differentiated feed formulation scheme that meets energy balance, protein balance, and vitamin balance includes:

[0161] Based on the early risk score of fatty liver and body size score of each individual laying hen in the scoring results, all laying hens were grouped using a two-dimensional partitioning strategy, and were divided into high-risk group, medium-risk group and low-risk group.

[0162] In this embodiment, the grouping rules of the two-dimensional partitioning strategy are as follows:

[0163] The high-risk group consists of laying hens with an early fatty liver risk score greater than or equal to the first risk threshold and a body size score less than or equal to the first body size threshold.

[0164] The medium-risk group consists of laying hens whose early risk score for fatty liver is between the first and second risk thresholds, or whose body size score is between the first and second body size thresholds.

[0165] The low-risk group consists of laying hens whose early fatty liver risk score is less than the second risk threshold and whose body size score is greater than or equal to the second body size threshold.

[0166] For high-risk, medium-risk and low-risk groups, the multi-objective optimization model of feed formulation and the set of nutritional variable constraints are called respectively. The average score result set and gradient response value of laying hens in the group are used to update the group-level formulation optimization parameters. The multi-objective optimization function of feed formulation for each group is established respectively.

[0167] The multi-objective optimization function for each group's feed formulation consists of the weighted sum of the group's daily cost function, the group's average fatty liver induction sensitivity term, and the group's average body size compensation term.

[0168] ;

[0169] in, Indicates the first Group( High-risk group, medium-risk group, low-risk group The corresponding feed nutrient variable vector, and These are the group average fatty liver induction sensitivity items and body shape compensation items, respectively. For the daily cost function of the formula, These are the weight parameters.

[0170] For each group's feed formulation multi-objective optimization function and nutrient variable constraint set, an integer-real number hybrid programming solution model is constructed. The optimal combination of feed nutrient variables for the high-risk group, medium-risk group and low-risk group is solved by linear programming algorithm to obtain the optimal combination of feed formulation variables for each group.

[0171] In Example 1, multi-objective optimization functions and nutrient variable constraint sets for feed formulations were established for high-risk, medium-risk, and low-risk groups, respectively. An integer-real-number hybrid programming solution model was constructed. The selection of each type of feed ingredient was represented by integer variables, while the supply level of each nutrient component was represented by real-number variables. Both integer and real variables were used as the combination of feed formulation variables to be solved. During the solution process, the multi-objective optimization function for each group was converted into a single solution objective. The daily cost of the formulation, the group's average fatty liver induction sensitivity, and the group's average body size compensation were synthesized according to preset weights. The constraint sets were used to control energy supply, crude protein supply, and various vitamins or functional groups. The supply of energy-efficient additives is synchronously restricted. An integer linear programming algorithm is invoked, with a single objective and the entire set of constraints input into the solver. The solver iteratively searches within the feasible spaces of integer and real variables. In each iteration, the feasibility of the integer variables is checked, and the real variables are searched in a continuous interval. The current optimal solution is updated based on the search results. When the solver reaches convergence in the joint feasible region of integer and real variables, the resulting set of integer and real variables is used as the optimal combination of feed nutrient variables for that group. This yields the optimal feed formulation variable combinations for the high-risk, medium-risk, and low-risk groups, thus completing the search for the optimal feed formulation for each group.

[0172] Based on the optimal combination of feed formulation variables for each group, output the group-level differentiated feed formulation schemes for high-risk, medium-risk, and low-risk groups.

[0173] In this embodiment, the group-level differentiated feed formulation schemes for the high-risk group, medium-risk group, and low-risk group include:

[0174] The group-level differentiated feed formulation for the high-risk group is to control the energy supply in the low range, the protein supply is higher than the conventional benchmark, and add high levels of Yin Chen Ze Xie San, choline, antioxidants, bile acids and vitamin E to alleviate liver lipid deposition and lipid metabolism abnormalities.

[0175] Yin Chen Ze Xie San is a compound Chinese herbal medicine additive developed using authentic medicinal materials from Liangshan, guided by traditional Chinese medicine theory. It has a clear effect on protecting the liver, improving egg production performance and immune function. In Example 1, one dose of Yin Chen Ze Xie San can be Yin Chen 30g, Ze Xie 15g, Zhi Zi 10g, Huang Qin 10g, Chi Fu Ling 12g, and Gan Cao 6g. One dose of Yin Chen Ze Xie San is added per kilogram.

[0176] The group-level differentiated feed formulation for the medium-risk group is to maintain a balance between energy and protein, with a moderate ratio of vitamins and functional additives, and to focus on controlling the intake of oily raw materials and balancing the amino acid composition to prevent risk transfer.

[0177] The group-level differentiated feed formulation scheme for the low-risk group maintains the standard formula, moderately reduces functional additives and high-cost components, and focuses on economy.

[0178] The differentiated feed formulation schemes for high-risk, medium-risk, and low-risk groups are numbered and mapped to the three groups to generate a group feed allocation instruction table, which is then uploaded to the feeding system interface to complete the automated feeding task.

[0179] Example 2: In one breeding cycle of an egg-laying hen unit, the system automatically acquired 42,200 frames of image data of egg-laying hens. The calibration module performed illumination correction, pose normalization, and scale calibration on each frame. After preprocessing, 40,213 frames of images successfully established a calibration image dataset. Each frame contained a pose-normalized image, scale factor, and homography matrix parameters. The system automatically compared the actual length of the reference ruler target with the pixel length, and calculated the scale factor distribution range to be 0.081~0.094 mm·pixel⁻¹. All valid images passed the scale normalization test.

[0180] In the image, the improved CPSeg semantic segmentation backbone network calls three types of cue words: "subcutaneous fat band of laying hen", "abdominal shape boundary of laying hen", and "focusing area of ​​fat sac of laying hen". The embedding layer generates a set of normalized cue vectors with a vector dimension of 128. The improved CPSeg semantic segmentation backbone network performs conditional segmentation based on each frame of image and cue vector. The backbone network path generates preliminary feature maps. The cue convolution kernel performs conditional convolution on the feature maps. During morphological smoothing operation, the system automatically identifies the millimeter-level thickness of subcutaneous fat band (set receptive radius of 2mm, pixel-level dilation rate of 23), abdominal shape boundary (receptive radius of 1mm, pixel-level dilation rate of 11), and fat sac focusing area (receptive radius of 1.5mm, pixel-level dilation rate of 17). The segmentation mask is processed by erosion, dilation and closing operations. The number of isolated noise points is reduced from an average of 37 per frame to 3, and the average width of the mask gap is reduced from 8.4 pixels to 1.9 pixels.

[0181] For each frame's segmentation result, the system generates 162 scan lines along the vertical direction of the hen's abdomen. The number of pixels under the subcutaneous fat band mask is counted, and the thickness is calculated using a scale factor. In Example 2, taking "hen A" as an example, the average local thickness is 5.8 mm, the standard deviation of the scan line thickness is 0.6 mm, and the average thickness of all hen types ranges from 3.6 to 7.2 mm. After extracting the abdominal outline boundary, 236 boundary points are generated. The curvature of each point is calculated using second-order finite difference, with a physical scale distribution of curvature ranging from 0.017 to 0.045 mm⁻¹. The area percentage is calculated by dividing the pixel count of the segmentation mask by the pixel count of the entire effective area; the abdominal area percentage is 14.3% to 19.9%. After all features are uniformly normalized, the system constructs a body shape feature matrix with a total of 40,213 records.

[0182] The weighted evidence fusion network performs a three-layer nonlinear mapping on the body shape feature matrix, outputting a body shape score and an early fatty liver risk score, and simultaneously calculates the normalized gradient response for each feature. In Example 2, taking "Laying Hen B" as an example, its body shape score is 0.39, its early fatty liver risk score is 0.83, the normalized sensitivity of subcutaneous fat thickness to the risk score is 0.61, its abdominal curvature is 0.22, and its area ratio is 0.17. Therefore, Laying Hen B is classified as a high-risk individual. Population data statistics show that there are 1768 individuals in the high-risk group (scoring grouping rule: early fatty liver risk score ≥ 0.7 and body shape score ≤ 0.4), 14512 individuals in the medium-risk group, and 23933 individuals in the low-risk group.

[0183] The multi-objective optimization model for feed formulation sets constraints for each group. In Example 2, taking the high-risk group as an example, the optimized range for daily energy intake is 265-272 kcal / animal / day, crude protein intake is 16.2-17.0 g / animal / day, vitamin E is 20-26 mg / animal / day, choline is 470-600 mg / animal / day, and bile acids are 120-150 mg / animal / day. The multi-objective optimization function for feed formulation is a weighted average fatty liver induced sensitivity term and a group average body size compensation term, using an integer linear programming algorithm. The final solution is:

[0184] The high-risk group formula is 268kcal / animal / day of energy, 16.9g / animal / day of protein, 24mg / animal / day of vitamin E, 0.1 dose of Yin Chen Ze Xie San / animal / day, 572mg / animal / day of choline, 147mg / animal / day of bile acid, and a daily cost of 0.93 yuan / animal / day.

[0185] The medium-risk group formula is 275kcal / animal / day of energy, 16.1g / animal / day of protein, 19mg / animal / day of vitamin E, 435mg / animal / day of choline, 117mg / animal / day of bile acid, with a daily cost of 0.90 yuan / animal / day.

[0186] The low-risk group maintains the basic formula: 282kcal / animal / day for energy, 15.9g / animal / day for protein, 14mg / animal / day for vitamin E, 376mg / animal / day for choline, and 91mg / animal / day for bile acids, with a daily cost of 0.87 yuan / animal / day.

[0187] After receiving the formula distribution instruction, the automatic feeding system precisely fed the three groups of hens. Before the intervention, 100 hens in the high-risk group were randomly sampled and tested. The mean body size score was 0.35, the mean early risk score for fatty liver was 0.81, and the mean thickness characteristic was 6.6 mm. The mean body size score in the medium-risk group was 0.55, the mean risk score was 0.63, and the mean thickness characteristic was 5.1 mm. The mean body size score in the low-risk group was 0.77, the mean risk score was 0.24, and the mean thickness characteristic was 4.1 mm.

[0188] After 28 days of continuous intervention, 100 laying hens were randomly sampled from each of the three groups, and various indicators were retested: In the high-risk group, the body size score improved to 0.61, the risk score decreased to 0.35, the thickness characteristic decreased to 5.0 mm, the abdominal curvature increased from 0.041 mm⁻¹ to 0.027 mm⁻¹, and the number of individuals with fatty liver actually detected decreased from 17 to 3, a decrease rate of 82.4%; In the medium-risk group, the body size score improved to 0.67, the risk score decreased to 0.38, the thickness characteristic decreased to 4.3 mm, and the number of individuals with fatty liver detected decreased from 8 to 1; In the low-risk group, the fluctuation of indicators was less than 5%, and no new cases of fatty liver were found.

[0189] Compared with the control group that used traditional manual visual assessment of body condition and standardized empirical formula management during the same period, the traditional method only improved the body shape score of the high-risk group by 0.08, decreased the risk score by 0.06, decreased the thickness feature by 0.2 mm, and reduced the detection rate of fatty liver by only 17.2% within the same period. The segmentation accuracy of the traditional method was also far lower than that of this invention. In a random sample of 500 segmented regions, the Dice coefficient of the subcutaneous fat band of the traditional U-Net model was 0.874, with a boundary error of 7.1 pixels, while the CPSeg suggested a Dice coefficient of 0.943 and a boundary error of 2.3 pixels, indicating that the segmentation repeatability of the suggested segmentation model was improved by more than 8%.

[0190] Furthermore, within the operating cycle of this invention's system, automatic scoring and formula optimization feedback achieve a daily dynamic closed loop, automatically adjusting the formula and automatically grouping feeds daily. This enables continuous health monitoring and real-time precise intervention without human intervention throughout the entire facility, with formula optimization taking an average of 3 minutes. In contrast, traditional methods with a formula adjustment cycle of 5-7 days result in greater health losses due to insufficient manual checks and delayed intervention.

[0191] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. An image recognition-based feed formulation method for preventing and treating fatty liver syndrome in laying hens, characterized by, The method comprises the following steps: Synchronously collecting multi-angle visible light images of laying hens in a natural feeding environment of the laying hens and performing preprocessing to obtain a calibration image dataset; Calling language prompt words for the subcutaneous fat band, the abdominal shape boundary and the fat capsule focus area of the laying hen from a preset early fatty liver phenotype prompt word library, and mapping the language prompt words into a prompt vector set through an embedding layer; Inputting the calibration image dataset and the prompt vector set into an improved CPSeg semantic segmentation network, activating the prompt vector in the backbone network and the attention path, guiding the improved CPSeg semantic segmentation network to output a target part semantic mask graph, a morphological boundary graph and a corresponding uncertainty graph, and forming a prompt segmentation result set; Calculating the subcutaneous fat area thickness, the abdominal curvature and the abdominal area proportion according to the prompt segmentation result set, and generating a standardized body shape feature matrix; Inputting the standardized body shape feature matrix into a weighted evidence fusion network to output a body shape score and an early fatty liver risk score, and synchronously outputting the contribution weight information of each body shape feature to the early fatty liver risk score, and forming a scoring result set; According to the scoring result set, the protein interval, the energy interval and the vitamin interval, a feed formula multi-objective optimization model is constructed; Integer-real mixed programming is performed in the feed formula multi-objective optimization model to obtain a group-level differentiated feed formula scheme that meets the energy balance, protein balance and vitamin balance, and the group-level differentiated feed formula scheme is distributed to an actual feeding system.

2. The feed formulation method for preventing and treating fatty liver syndrome in laying hens based on image recognition according to claim 1, characterized in that, The method for collecting multi-angle visible light images of laying hens and performing preprocessing comprises the following steps: In the natural feeding environment of the laying hens, a plurality of visible light cameras are arranged according to preset azimuth angles and elevation angles, and a unified hardware clock trigger is used to trigger the multi-angle synchronous image collection of the laying hens to obtain original images; After the original images are collected, illumination correction is performed on each frame of image to obtain normalized images; The corner points of the reference scale target are detected on the normalized images, and a homography matrix is calculated based on the spatial correspondence of the corner points, and the homography matrix is used for linear transformation of pixel coordinates to obtain posture normalized images; The pixel length corresponding to the reference scale target in the posture normalized image is measured, and the physical length of the reference scale target is divided by the measured pixel length to obtain a scale factor; The posture normalized images output by all cameras are synchronously processed according to the time stamp t to construct a calibration image dataset.

3. The feed formulation method for preventing and treating fatty liver syndrome in laying hens based on image recognition according to claim 1, characterized in that, The method for mapping the language prompt words into a prompt vector set through an embedding layer comprises the following steps: A preset early fatty liver phenotype prompt word library is constructed; Language prompt words describing the subcutaneous fat band of the laying hen, language prompt words describing the abdominal shape boundary of the laying hen and language prompt words describing the fat capsule focus area of the laying hen are called from the prompt word library respectively, and are input into the embedding layer in sequence, and the embedding layer converts each language prompt word into a prompt vector according to a preset vector dimension; Vector normalization processing is performed on each prompt vector, and all normalized prompt vectors are combined into a normalized prompt vector set.

4. The feed formulation method for preventing and treating fatty liver syndrome in laying hens based on image recognition according to claim 1, characterized in that, The improved CPSeg semantic segmentation network comprises the following steps: The posture normalized image collected by the i th camera in the calibration image dataset at time t is taken as a current input image, and the corresponding scale factor is taken as a current scale parameter; The current input image is input into the improved CPSeg semantic segmentation network to obtain a feature mapping result, each normalized prompt vector is input into a prompt kernel generator to obtain a prompt convolution kernel adapted to the theme, and a conditional convolution operation is performed on the feature mapping result by using the prompt convolution kernel to obtain a preliminary segmentation mask image; According to the physical scale consistency of the egg-laying hen fatty liver screening theme, a millimeter-level prompt perception radius is set for each target part, and a pixel-level inflation rate is calculated. A morphological smoothing operation is performed on each preliminary segmentation mask image according to the pixel-level inflation rate as the structural scale to obtain a part segmentation mask image; The similarity between each part segmentation mask image and the corresponding normalized prompt vector is calculated to obtain a prompt attention score, and a prompt gating coefficient is obtained through a Sigmoid activation function; According to the direction consistency of the egg-laying hen abdominal profile, a part direction field is predicted from each part segmentation mask image, the part direction field is used to construct an anisotropy measurement tensor, and an anisotropic deformation transformation is performed on each part segmentation mask image under the constraint of the anisotropy measurement tensor to obtain an optimized semantic segmentation probability image; The prompt gating coefficient is used to modulate the anisotropic optimized semantic segmentation probability image to obtain a prompt activated feature, and the prompt activated feature is used to generate a prompt logit through a linear transformation; On the basis of the prompt logit, a boundary smoothing regular term and a thickness prior regular term related to a scale parameter are introduced to constrain the boundary change rate and the local thickness deviation, respectively, to obtain a measurement-constrained logit; The Softmax operation is performed on all the measurement-constrained logits of the target parts to obtain a pixel-level probability that each pixel point belongs to different target parts, which is used to describe the segmentation confidence distribution of each target part; According to the pixel-level probability, a threshold discrimination method is used to obtain a target part semantic mask image, and a morphological boundary image is generated according to the spatial gradient of the pixel-level probability; The pixel-level probability is decomposed into uncertainty, and the entropy-type uncertainty based on the pixel probability entropy and the variance-type uncertainty based on the results of multiple random forward inferences are calculated. The entropy-type uncertainty and the variance-type uncertainty are linearly fused according to the weight to obtain a final uncertainty map; The semantic mask images, the morphological boundary images and the uncertainty maps of all target parts are combined according to the target parts and the camera numbers, and are synchronized with the time stamp to form a prompt segmentation result set.

5. The feed formulation method for preventing and treating fatty liver syndrome in laying hens based on image recognition according to claim 1, characterized in that, The generation of the standardized body shape feature matrix includes: Based on the prompt segmentation result set, the number of pixels in the subcutaneous fat band mask of each vertical scanning line is counted, and multiplied by a scale factor to obtain a local thickness. The average of the local thicknesses of all scanning lines is taken as the thickness feature value of the subcutaneous fat area of the egg-laying hen; Based on the prompt segmentation result set, a boundary extraction algorithm is used to obtain an abdominal boundary point set. After sorting the abdominal boundary point set, the pixel scale curvature of each point is calculated by using a second-order finite difference, and is converted into a physical scale curvature. The average of the physical scale curvatures of all boundary points is taken as the abdominal curvature feature. Based on the prompt segmentation result set, the number of pixels belonging to the abdominal region of the laying hen is counted in the abdominal region semantic mask image, and the number of effective pixels in the whole image is counted, and the ratio of the number of pixels in the abdominal region to the number of effective pixels in the whole image is taken as the abdominal area proportion feature; The subcutaneous fat region thickness feature value, the abdominal curvature feature and the abdominal area proportion feature are combined as a feature set, and the feature set is standardized to obtain a standardized feature; The standardized features obtained under all camera numbers and all time stamps are combined to construct a standardized body shape feature matrix.

6. The feed formulation method for preventing and treating fatty liver syndrome in laying hens based on image recognition according to claim 1, characterized in that, The forming score result set comprises: In the weighted evidence fusion network, the standardized body shape feature matrix is processed by a preset nonlinear transformation function to form a fusion feature vector, and the fusion feature vector is weighted and summed by a body shape score output weight vector and a risk score output weight vector, and a linear bias term is added respectively, and the body shape score and the early fatty liver risk score are output by a Sigmoid activation function to be a score value between 0 and 1; In the process of generating the early fatty liver risk score in the weighted evidence fusion network, the normalized gradient response value of each feature channel in the fusion feature vector to the early fatty liver risk score is calculated respectively; The body shape score, the early fatty liver risk score and the respective normalized gradient response value obtained under all camera numbers and all time stamps are arranged according to the combination of the time stamp and the camera number to construct a score result set.

7. The feed formulation method for preventing and treating fatty liver syndrome in laying hens based on image recognition according to claim 6, characterized in that, The feed formula multi-objective optimization model comprises: A feed nutrition variable vector including daily energy intake supply, crude protein supply and supply of various vitamins or functional additives is constructed; A fatty liver induction sensitive term is constructed by establishing a regulatory mapping relationship between the normalized gradient response value of each individual and the feed nutrition variable; A body shape optimization constraint term is constructed by subtracting the square of the result of the body shape score; The fatty liver induction sensitive term and the body shape optimization constraint term are weighted and summed, and the daily formula cost corresponding to the current feed nutrition variable combination is added to obtain the feed formula multi-objective optimization model; In the optimization process of the feed formula multi-objective optimization model, the constraint conditions that must be met by each component of the feed nutrition variable vector are set in combination with the protein interval, the energy interval and the intake limit interval of each type of vitamin and functional additive to obtain a nutrition variable constraint set.

8. The feed formulation method for preventing and treating fatty liver syndrome in laying hens based on image recognition according to claim 1, characterized in that, The group-level differentiated feed formula scheme meeting the energy balance, protein balance and vitamin balance comprises: According to the early fatty liver risk score and the body shape score of each laying hen individual in the score result set, all laying hen individuals are grouped by a two-dimensional partitioning strategy, and all laying hen individuals are divided into a high-risk group, a medium-risk group and a low-risk group; For the high-risk group, the medium-risk group and the low-risk group, the feed formula multi-objective optimization model and the nutrition variable constraint set are called respectively, the average score result set and the gradient response value of the laying hens in the group are used for group-level formula optimization parameter updating, and a feed formula multi-objective optimization function of each group is established respectively; An integer-real mixed programming solving model is constructed for the multi-objective optimization function of the feed formula of each group and the set of nutritional variable constraints, and the optimal feed nutritional variable combination of the high-risk group, the medium-risk group and the low-risk group is respectively solved through a linear programming algorithm to obtain the optimal feed formula variable combination of each group; According to the optimal feed formula variable combination of each group, the group-level differentiated feed formula scheme of the high-risk group, the medium-risk group and the low-risk group is output; The group-level differentiated feed formula scheme of the high-risk group, the medium-risk group and the low-risk group is numbered respectively and mapped with the three types of groups to generate a group feed distribution instruction table, which is uploaded to a feeding system interface to complete an automatic feeding task. 9.The feed blending method for preventing and treating fatty liver syndrome in laying hens based on image recognition according to claim 8, characterized in that, The grouping rule of the two-dimensional partition strategy is: The high-risk group is an egg chicken individual with a fatty liver early risk score greater than or equal to a first risk threshold and a body type score less than or equal to a first body type threshold; The medium-risk group is an egg chicken individual with a fatty liver early risk score between the first risk threshold and a second risk threshold or a body type score between the first body type threshold and a second body type threshold; The low-risk group is an egg chicken individual with a fatty liver early risk score less than the second risk threshold and a body type score greater than or equal to the second body type threshold.

10. The feed formulation method for preventing and treating fatty liver syndrome in laying hens based on image recognition according to claim 8, characterized in that, The group-level differentiated feed formula scheme of the high-risk group, the medium-risk group and the low-risk group includes: The group-level differentiated feed formula scheme of the high-risk group is to control the energy supply amount in a low range, increase the protein supply amount, add high levels of Yinchen Zexie powder, choline, antioxidants, bile acids and vitamin E; The group-level differentiated feed formula scheme of the medium-risk group is to keep energy and protein balanced, maintain a medium level of vitamins and functional additives, and focus on controlling the intake of oil and fat raw materials and balancing the composition of amino acids; The group-level differentiated feed formula scheme of the low-risk group is to maintain a standard formula and moderately reduce functional additives and high-cost ingredients.